backtest · wire operation
Run an options backtest
Backtest a declarative options strategy over chain snapshots: structure selection by delta and DTE, exit and roll triggers, optional delta hedging, declarative commission and slippage, American assignment modelling, and the marking policy (current-quote or entry volatility; what a missing mark does). Several rules may hold several trades at once (book), pre-trade limits reject entries with rows, combo or legged fills, quote freshness, split lineage, dividend evidence, the surface summary, and the portfolio ledger the equity reconciles to. Equity points, trades with per-leg attribution and mark counts, settlements, and the standard performance summary. The result is optionsBacktest(...) verbatim. Opt-in (backtestPack): payloads and runtime are heavier than the default set.
totalfinance.backtest.options_run- MCP tool name
- totalfinance_backtest_options_run
- Pack / profiles
- backtest / backtesting, full
- Default discovery
- Opt-in (select its pack or profile)
- Required capabilities
- None
- Effects / authorization
- none / none
- Cost / cancellation
- job / Do not assume inline interruption
- Handle-eligible inputs
- None
- Idempotency
- not-applicable
Input schema
| Field | Type | Meaning |
|---|---|---|
chainsRequired | object[] | Chain snapshots (any order; the engine sorts) |
markingOptional | object | Default: re-mark from the current quote; refuse a missing mark |
initialCapitalOptional | number | Default 100,000 |
riskFreeRateRequired | number | Continuously-compounded risk-free rate (decimal, e.g. 0.045) pricing every mark — REQUIRED; the engine never assumes a rate |
dividendYieldOptional | number | Default 0 |
entryOptional | object | object | object | object | object | object | object | The declarative entry structures; a `build` callback is SDK-only |
rulesOptional | object | object | object | object | object | object | object[] | Several rules, each a member of the book; exactly one of entry and rules |
exitRequired | object | A `when` predicate is SDK-only |
rollOptional | object | — |
hedgeOptional | object | — |
commissionOptional | object | object | object | object | A declarative commission model (fees.none / bps / perShare / fixed) |
slippageOptional | object | object | object | object | A declarative slippage model (slippage.none / bps / fixed / spread) |
assignmentOptional | "model" | "none" | — |
periodsPerYearOptional | number | Default 252 |
bookOptional | object | Default: one open trade |
limitsOptional | object | Pre-trade limits on the post-trade book; a breach is a limitRejections row |
fillPolicyOptional | object | — |
quoteFreshnessOptional | object | — |
corporateActionsOptional | object[] | — |
dividendsOptional | object[] | — |
baseCurrencyOptional | string | Default 'USD' |
Complete JSON Schema
Loading…
Output schema
| Field | Type | Meaning |
|---|---|---|
pointsRequired | object[] | — |
returnsRequired | number[] | — |
tradesRequired | object[] | — |
settlementsRequired | object[] | — |
finalValueRequired | number | — |
performanceRequired | object | The standard performance summary |
limitRejectionsRequired | object[] | — |
fillRejectionsRequired | object[] | — |
surfaceRequired | object[] | — |
ledgerRequired | object | The portfolio ledger snapshot (events) |
timelineRequired | object | null | The ledger timeline (null under two marks) |
runIdRequired | string | — |
assumptionsRequired | object | Applied conventions |
diagnosticsRequired | object | Engine, method, warnings |
Complete JSON Schema
Loading…