backtest-agent
Agent Backtest
AI Agent 统一回测入口
接收策略自然语言描述,自动解析为可执行策略,完成回测后返回六大必返指标。
六大指标:
- sharpe_ratio — 年化夏普比率
- max_drawdown — 最大回撤 (%)
- win_rate — 胜率 (%)
- annualized_return — 年化收益率 (%)
- total_return — 总收益率 (%)
- profit_curve — 累计收益曲线(逐日)
支付流程(生产环境, TICKTEST_REQUIRE_PAYMENT=true):
- 调用 /api/v2/agent/backtest → 返回 HTTP 402 + Payment-Needed 头
- AI Agent 展示支付界面 → 用户授权支付
- Agent 重新请求并携带 Payment-Proof 头 → 验证 → 执行回测 → 履约确认
post/api/v2/agent/backtest
Request
- Base URL: https://api.ticktest.cn (the document declares no server; this is the origin it was published from)
- URL: https://api.ticktest.cn/api/v2/agent/backtest
- Auth: none declared
Request body
Example request
{
"end_date": "2026-06-26",
"initial_capital": 1000000,
"market": "sz",
"start_date": "2026-01-01",
"strategy": "MA5上穿MA20买入,MA5下穿MA20卖出,14:55强制平仓",
"symbol": "000001"
}Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.