pub fn compute_span_margin_at(
snapshot: &PortfolioMarginSnapshot,
market_state: &PortfolioMarginMarketState,
now_ts: i64,
) -> Result<MarginDetails, MarginError>Expand description
Compute SPAN margin from a fully-populated snapshot and market state.
This is the primary entry point for portfolio margin calculation. The caller
must populate all option IVs in market_state before calling – this crate
has no IO and cannot fetch vol data.
The caller is responsible for populating option IVs in the market state before calling this function (the margin crate has no IO).