backtest · wire operation
Run a portfolio backtest
Backtest a multi-asset portfolio through the ledger: instruments with built-in adapters (equity, etf, option, future, fx-forward, crypto-spot, crypto-perpetual, bond), market data by row set, a model or inline targets on a rebalance schedule, an execution policy with settlement lags, external flows, a calendar, and the margin check with forced liquidation. Every fill, flow, lifecycle fact, and liquidation is a portfolio event; the equity is the ledger's net asset value. The result is portfolioBacktest(...) verbatim. Opt-in (backtestPack): payloads and runtime are heavier than the default set; bulk row sets above the row cap travel by handle.
totalfinance.backtest.portfolio_run- MCP tool name
- totalfinance_backtest_portfolio_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
- marketData
- Idempotency
- not-applicable
Input schema
| Field | Type | Meaning |
|---|---|---|
accountingRequired | object | — |
instrumentsRequired | object | — |
marketDataRequired | object | — |
strategyRequired | object | The declarative strategy; an onSession callback is SDK-only |
executionOptional | object | A declared execution policy over session bars (execution.declared): the label is the caller's claim; a caller fill model, session rules, and quote/order-book observations are SDK-only |
externalFlowsOptional | object[] | — |
calendarOptional | "NYSE" | "CBOE" | "ALWAYS_OPEN" | — |
windowOptional | object | — |
periodsPerYearOptional | number | Default 252 |
seedOptional | integer | — |
Complete JSON Schema
Loading…
Output schema
| Field | Type | Meaning |
|---|---|---|
ledgerRequired | object | — |
timelineRequired | object | null | — |
pnlRequired | object | null | — |
ordersRequired | object[] | — |
fillsRequired | object[] | — |
rejectionsRequired | object[] | — |
liquidationsRequired | object[] | — |
eventsRequired | object[] | — |
valuationMarksRequired | object[] | — |
pointsRequired | object[] | — |
returnsRequired | number[] | — |
performanceRequired | object | The standard performance summary |
finalValueRequired | number | — |
runIdRequired | string | — |
assumptionsRequired | object | Applied conventions |
diagnosticsRequired | object | Engine, method, warnings |
Complete JSON Schema
Loading…