Skip to main content

reset_pnl

Function reset_pnl 

pub fn reset_pnl(
    book: &Book,
    before: &MarketContext,
    after: &MarketContext,
) -> Result<ResetPnl, PnlError>
Expand description

The reset P&L of book from before to after: one row per print after holds and before does not, or holds at another value, each the exact revaluation from the forecast the print replaced to the print, the earlier prints already published, beside the move and the sensitivity. The walk starts from before with every new print standing at its forecast, since a market lacking a print the book has accrued does not value.

§Errors

PnlError::ValuationDateMismatch when the markets are valued on different days; the layout guard for any difference other than the prints; a missing projection curve or unregistered index for a print’s forecast; the risk pass; a valuation.