run_backtest
Backtest an Indian index option strategy on real 1-minute NIFTY options data. Returns P&L after real charges and slippage, return-on-margin, and an honesty panel: out-of-sample split, walk-forward folds, bootstrap interval, and a deflated Sharpe that accounts for how many variants you have already tried. Refuses windows too narrow to be meaningful, and reports no ratios below 30 trades. Two spec forms: a PRESET (structure + params) for the common shapes, or an OPEN STRATEGY (legs + rules) for anything else — any number of legs at any strikes on any expiry, strikes chosen by percent, points, premium or delta, entry at any minute, and rules that CHANGE the position while it is live (roll a tested leg, close one side, add a hedge, trail a stop) plus book-level rules like standing down after three losers. Nothing here is restricted by tier; a paid tier only widens the date window.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lots | No | ||
| spec | Yes | Either a preset spec (structure + params) or an open strategy (legs + rules). Use the open form for anything the presets cannot say. | |
| detail | No | How much per-trade data to return. 'standard' (default) is the equity curve, breakdowns and the first 25 trades with their leg prices. 'full' returns up to 300 trades — ask for it when the caller wants to audit or chart every trade. 'summary' returns aggregates only, and is the cheapest to read. |