Skip to content
TotalFinance

portfolio · wire operation

Explain portfolio P&L between two marks

Explain the change in net asset value between two dated valuation marks: external flows, investment return, and the identity components (realized, unrealized, income, transaction costs, financing, foreign exchange) that reconcile to it with a published residual, by currency and by grouping. The result is portfolioPnl(...) verbatim.

totalfinance.portfolio.explain_pnl
MCP tool name
totalfinance_portfolio_explain_pnl
Pack / profiles
portfolio / full, portfolio
Default discovery
Opt-in (select its pack or profile)
Required capabilities
None
Effects / authorization
none / none
Cost / cancellation
small / Do not assume inline interruption
Handle-eligible inputs
ledger, from.market, to.market
Idempotency
not-applicable

Input schema

FieldTypeMeaning
ledgerRequiredobjectA serialized portfolio ledger (totalfinance.portfolio-ledger, the FC7 JSON form)
fromRequiredobjectThe opening valuation mark
toRequiredobjectThe closing valuation mark (strictly after `from`)
instrumentClassificationOptionalobjectIdentity metadata per instrument for grouping; unknown instruments group as unclassified
Complete JSON Schema

Loading…

Output schema

FieldTypeMeaning
baseCurrencyRequiredstring—
fromRequiredobject—
toRequiredobject—
netAssetValueChangeRequirednumber—
externalFlowsRequirednumber—
investmentReturnRequirednumber—
componentsRequiredobjectrealized, unrealized, income, costs, financing, FX, total
residualRequirednumber—
byCurrencyRequiredobject[]—
groupingsRequiredobject[]—
assumptionsRequiredobjectApplied conventions
diagnosticsRequiredobjectEngine, method, warnings
Complete JSON Schema

Loading…