A股策略回测
backtest_strategyBacktest trading strategies on stocks using indicators like moving average crossover, MACD, and KDJ. Returns performance metrics including return, max drawdown, and win rate.
Instructions
对股票进行简单策略回测,支持均线交叉、MACD、KDJ等策略,返回收益率、最大回撤、胜率等指标。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"symbol": "<symbol>"
},
"name": "backtest_strategy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | 股票代码(纯数字或字母组合,如600519、AAPL、HK00700) | |
| ma_long | No | 长期均线周期(ma_cross策略) | |
| end_date | No | 结束日期,格式: 20241231,默认今天 | |
| ma_short | No | 短期均线周期(ma_cross策略) | |
| strategy | No | 策略类型: 'ma_cross'(均线交叉), 'macd'(MACD金叉死叉), 'kdj'(KDJ超买超卖), 'rsi'(RSI超买超卖), 'boll'(布林带突破) | ma_cross |
| start_date | No | 开始日期,格式: 20240101,默认一年前 | |
| initial_capital | No | 初始资金(元) |