feat(tsl-api-reference): add class and framework API lookup

This commit is contained in:
csh
2026-08-20 13:49:55 +08:00
parent 7233646398
commit 651c1f68d2
637 changed files with 25498 additions and 36673 deletions
@@ -0,0 +1,149 @@
# 应用专题 / 天软策略 / 风格轮动
## `tsLargeAndSmallTurning`
声明:class
根据大盘和小盘指数的历史涨幅构造轮动信号并执行组合回测
<!-- tags: 大小盘轮动 风格轮动 策略回测 -->
父类:`tsBackTesting`
### `FIndexId1`
声明:field
大盘指数代码,默认值为 `SH000300`
可见性:`public`
类型:string
### `FIndexId2`
声明:field
小盘指数代码,默认值为 `SZ399905`
可见性:`public`
类型:string
### `FHistDays`
声明:field
建立轮动策略所使用的历史收益天数,默认值为 25
可见性:`public`
类型:integer
### `FAlphaType`
声明:field
轮动策略类型:1 满仓轮动、2 允许空仓、3 使用相对与绝对涨幅阈值
可见性:`public`
类型:integer
### `FAbThreshold`
声明:field
策略类型 3 使用的绝对涨幅阈值,默认值为 1
可见性:`public`
类型:real
### `FReThreshold`
声明:field
策略类型 3 使用的相对涨幅阈值,默认值为 1
可见性:`public`
类型:real
### `FRatio`
声明:field
买卖费率百分比,默认值为 0.1
可见性:`public`
类型:real
### `GetRawData(v_beg_t, v_end_t)`
声明:function
获取回测区间内大小盘收盘价、涨幅、Alpha 和当前持仓代码
<!-- tags: 原始数据 大小盘 Alpha -->
可见性:`public`
| 参数 | 类型 | 说明 |
| --------- | -------- | ------------ |
| `v_beg_t` | datetime | 查询区间起点 |
| `v_end_t` | datetime | 查询区间终点 |
返回:array
### `GetRegularAlpha(v_beg_t, v_end_t)`
声明:function
按年度统计回测区间内 Alpha 的分布特征
<!-- tags: Alpha统计 年度统计 -->
可见性:`public`
| 参数 | 类型 | 说明 |
| --------- | -------- | ------------ |
| `v_beg_t` | datetime | 查询区间起点 |
| `v_end_t` | datetime | 查询区间终点 |
返回:array
### `GetRegularHold(v_beg_t, v_end_t)`
声明:function
按年度统计回测区间内的调仓次数、持仓天数和平均持仓时间
<!-- tags: 持仓统计 调仓 年度统计 -->
可见性:`public`
| 参数 | 类型 | 说明 |
| --------- | -------- | ------------ |
| `v_beg_t` | datetime | 查询区间起点 |
| `v_end_t` | datetime | 查询区间终点 |
返回:array
### `GetPortfolioReturn3(v_beg_t, v_end_t)`
声明:function
获取大盘、小盘与轮动策略的净值和收益率序列
<!-- tags: 组合收益 风格轮动 净值 -->
可见性:`public`
| 参数 | 类型 | 说明 |
| --------- | -------- | ------------ |
| `v_beg_t` | datetime | 查询区间起点 |
| `v_end_t` | datetime | 查询区间终点 |
返回:array