Skip to content
TotalFinance

strategy · wire operation

Analyze an options strategy

Build a multi-leg options position from its legs and return breakevens, net debit/credit, max profit, and max loss. Legs may be given without premiums: pass `premiums: "model"` with a `market` snapshot (spot, volatility, riskFreeRate, asOf, expiry) and every unpriced leg is priced by the BSM engine — so an iron condor’s P&L and probability-of-profit come from strikes alone. Set `probability: true` (with `market`) to also get probability-of-profit, expected value, risk/reward, and probability-of-touch. `premiumSource` reports whether premiums were user- or model-supplied.

totalfinance.strategy.analyze
MCP tool name
totalfinance_strategy_analyze
Pack / profiles
strategy / default, full, strategies
Default discovery
Included in the default tool set
Required capabilities
None
Effects / authorization
none / none
Cost / cancellation
small / Do not assume inline interruption
Handle-eligible inputs
None
Idempotency
not-applicable

Input schema

FieldTypeMeaning
legsOptionalobject | object[]The option/stock legs of the position — supply legs OR strategy+input
strategyOptionalstringA named builder from totalfinance.strategy.list (e.g. ironCondor); pair with `input`
inputOptionalobjectThe named builder's input (shape per totalfinance.strategy.list examples)
premiumsOptional"user" | "model"Entry-premium source: 'user' (from the leg premiums, default) or 'model' (price unpriced legs from `market`)
marketOptionalobjectMarket snapshot; required for `premiums: model` and for `probability`
probabilityOptionalbooleanAlso compute probability-of-profit, expected value, risk/reward, and probability-of-touch (needs `market`)
multiplierOptionalnumberContract multiplier for option legs (default 100)
Complete JSON Schema

Loading…

Output schema

FieldTypeMeaning
premiumSourceRequired"user" | "model"—
classificationRequiredstring[]Named strategies these legs structurally match (derived via classifyStrategy; empty = custom)
metricsRequiredobject—
legsRequiredobject[]—
assumptionsRequiredobjectPosition-construction assumptions (premium source, multiplier, provenance)
diagnosticsRequiredobjectWarnings from the metric/probability computations (empty array when none)
probabilityOptionalobjectPresent when `probability: true` was supplied (requires `market`)
Complete JSON Schema

Loading…