run_backtest
Backtest a Moving Average Crossover trading strategy with customizable parameters and optional visualization of equity curves.
Instructions
Backtests a Moving Average Crossover strategy.
Args:
symbol: Ticker symbol
fast_ma: Fast moving average period
slow_ma: Slow moving average period
start_date: Backtest start date
end_date: Backtest end date
visualize: If True, returns equity curve chart
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>",
"fast_ma": "<fast_ma>",
"slow_ma": "<slow_ma>"
},
"name": "run_backtest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| fast_ma | Yes | ||
| slow_ma | Yes | ||
| start_date | No | 2020-01-01 | |
| end_date | No | 2023-12-31 | |
| visualize | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |