run_backtest
Statistics of what happened on the day of every historical event matching the filters (AND-joined, max 20): sample size n, mean/median/percentiles of the outcome, long/short/flat shares with the rule that defines them (direction_rule), share of up closes, monthly buckets, and up to sample_limit (max 20) example events. Outcomes: day_close_position (0 = closed at the low, 1 = at the high; default), day_return (fraction), reg_pct / hi_to_cl_pct / lo_to_cl_pct (percent). threshold is in the outcome's unit (0.05 = 5% for day_return, 5 = 5% for reg_pct); prob_le_threshold = share of events with outcome <= threshold. Dates are YYYY-MM-DD. Use for "how do setups like this usually resolve?". For the list of matching events use screen_events; for one ticker's own gap history use get_ticker_gap_stats.
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": {
"filters": "<filters>"
},
"name": "run_backtest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filters | Yes | Conditions that must all hold (AND-joined, max 20). Column names come from search_filters. | |
| outcome | No | Outcome to measure: day_close_position (default), day_return, reg_pct, hi_to_cl_pct or lo_to_cl_pct. Units and definitions: get_meta. | day_close_position |
| pos_max | No | day_close_position only: a close above this (0..1) counts as long (default 0.8). | |
| pos_min | No | day_close_position only: a close below this (0..1) counts as short (default 0.5). | |
| end_date | No | Last event date to include, YYYY-MM-DD (default: latest). | |
| threshold | No | Cut-off in the outcome's unit (0.05 = 5% for day_return, 5 = 5% for reg_pct, 0..1 for day_close_position); prob_le_threshold is the share of events at or below it. | |
| start_date | No | First event date to include, YYYY-MM-DD (default: start of history). | |
| sample_limit | No | Also return up to this many example events (0..20). | |
| flat_threshold | No | Half-width of the 'flat' zone for the long/short/flat split, as a fraction (0.002 = 0.2%). Ignored for day_close_position. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||