backtest_strategy
Backtest trading strategies using historical data to verify performance. Supports RSI oversold, MA crossover, breakout, and mean reversion for TW and US stocks.
Instructions
回測交易策略 — 用歷史數據驗證策略績效。支援策略:rsi_oversold(RSI超賣)、ma_crossover(均線交叉)、breakout(突破)、mean_reversion(均值回歸)
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": {
"stockId": "<stockId>",
"strategy": "<strategy>"
},
"name": "backtest_strategy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stockId | Yes | 股票代號,例如 2330 | |
| strategy | Yes | 策略名稱: rsi_oversold, ma_crossover, breakout, mean_reversion | |
| days | No | 回測天數,預設 252(一年) | |
| market | No | 市場 TW 或 US,預設 TW |