Skip to main content

reset_pnl

Function reset_pnl 

pub(crate) fn reset_pnl(
    py: Python<'_>,
    book: &PyBook,
    before: &PyMarket,
    after: &PyMarket,
) -> PyResult<PyResetPnl>
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 it replaced to the print, beside the move and the book’s sensitivity to it.

Raises ValueError where the two markets are valued on different days, or differ by anything other than the prints.