✨ feat(tsl-api-reference): expand and reorganize api catalog
Flatten builtin pages, add third-party and platform scopes, and import financial and data warehouse references. Keep the existing generated index without rebuilding after signature normalization.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# 金融 / 行情 / 矩阵
|
||||
|
||||
## `stocksReturnMatrix(stock_arr, beg_t, end_t, mehthod_type)`
|
||||
|
||||
声明:function
|
||||
|
||||
股票收益矩阵,与系统证券pn_stock()、系统时间pn_date()、复权方式pn_rate()和复权基准日pn_rateday()有关。调用时注意系统参数的设置
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| -------------- | ----------- | ------------------------------ |
|
||||
| `stock_arr` | array | 一维字符串数组,股票列表 |
|
||||
| `beg_t` | t_date_time | 日期类型,开始日期 |
|
||||
| `end_t` | t_date_time | 日期类型,截止日期 |
|
||||
| `mehthod_type` | integer | 整数,返回类型,收益率计算方法 |
|
||||
|
||||
返回:real
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
// /计算2018年8月22日平安银行的股票收益矩阵(对数收益率法)。
|
||||
setSysParam(PN_Stock(), 'SZ000001');
|
||||
setSysParam(PN_Date(), 20180822T);
|
||||
stockarr := array("SZ000001", "SZ000002");
|
||||
begt := intToDate(20180903);
|
||||
endt := intToDate(20180914);
|
||||
return stocksReturnMatrix(stock_arr, beg_t, end_t, 0);
|
||||
// 输出:0.08
|
||||
```
|
||||
Reference in New Issue
Block a user