simulate_strategy
Simulate an intraday trade (entry + exit rule, long or short, on 1..30-minute bars) on each event of a saved run (run_id) or of new filters (saved as a run first). Answers "what if I bought the open and sold at a 2% stop / 5% target on days like this?". The finished job's result has summary (n_trades, win_rate 0..1, profit_factor, avg_pnl and total_pnl in USD per share, avg_holding_min), up to 200 trades with pnl_pct, run_id, and a note when there are no trades or some minute bars could not be loaded. limit_pairs (max 500) events are simulated; minute bars load on demand, so it can take minutes: waits up to wait_seconds (max 50), else returns {job_id, status} to poll with get_job. Uses the plan's simulation quota. Send exactly one of run_id or filters.
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": {
"strategy": "<strategy>"
},
"name": "simulate_strategy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | With filters: name of the run saved first. | |
| side | No | Trade direction: long (buy) or short (sell). | long |
| run_id | No | Saved run whose events to simulate (from list_runs or save_run). Send this or filters, not both. | |
| filters | No | New conditions (AND-joined, columns from search_filters): saved as a run first, then simulated. Send this or run_id, not both. | |
| outcome | No | Outcome of the run saved from filters (see get_meta); ignored with run_id. | day_close_position |
| end_date | No | With filters: last event date, YYYY-MM-DD. | |
| strategy | Yes | Entry and exit rule of the simulated trade. | |
| start_date | No | With filters: first event date, YYYY-MM-DD. | |
| bar_minutes | No | Bar size the strategy reads, 1..30 minutes. | |
| limit_pairs | No | How many of the run's events to simulate, 1..500. | |
| wait_seconds | No | Seconds to wait for the job to finish (0..50) before returning its job_id to poll with get_job. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||