跳到主要内容

基金在线回测

信息

工具名:get_fund_backtest_result

对应 REST 端点:GET /api/fund/backtest/result

工具描述

使用完整基金代码、买卖条件和定投参数执行在线回测,返回交易、指标与收益曲线。

参数

参数类型必填默认说明
thscodestring含市场后缀的完整基金代码,例如 000001.OF
buy_conditionsstring买入条件 JSON 字符串。
sell_conditionsstring卖出条件 JSON 字符串。
buy_frequency_typestring买入频率。
max_buy_timesnumber最大买入次数。
per_buy_amountnumber每次买入金额。

调用示例

工具:get_fund_backtest_result
参数:
- thscode: "000001.OF"
- buy_conditions: "{\"indicator_code\":\"rsi_pct\",\"operator\":\">\",\"value\":0.5}"
- sell_conditions: "{\"indicator_code\":\"rsi_pct\",\"operator\":\"<\",\"value\":0.3}"
- buy_frequency_type: "WEEKLY"
- max_buy_times: 5
- per_buy_amount: 100

返回

返回交易明细、回测指标与收益曲线;详见基金在线回测