Function market_diff
pub fn market_diff(
before: &MarketContext,
after: &MarketContext,
) -> Result<MarketDiff, PnlError>Expand description
The move from before to after, under the layout guard — with one
relaxation. A MarketInputId::Fixing that after holds and before
does not is a newly published print, not a move: it is lifted out into
MarketDiff::published and the remaining inputs are compared position by
position as ever. A print before holds and after does not is refused —
a print does not un-publish — and so is every other difference. Markets on
different valuation days get no relaxation: their prints are compared like
any other input.
§Errors
PnlError::LayoutMismatch naming the first position at which the two
markets’ lifted inputs differ.