Function explain_across_days
pub(crate) fn explain_across_days(
book: &Book,
before: &MarketContext,
rolled: &MarketContext,
after: &MarketContext,
cash: f64,
order: &[RiskAxis],
) -> Result<ExplainReport, PnlError>Expand description
The explain of book across days: cash, what the book was paid after
before’s date and up to after’s, as the ExplainLeg::Cash leg; the
ExplainLeg::Carry leg, from before to rolled — before’s quotes
rebuilt at after’s date, each print the book reads in between at the
forecast before projected it at; and from rolled to after, a
same-day move, the ladder of explain. The legs sum to npv(after) − npv(before) + cash.
§Errors
As explain from rolled to after, and a valuation on before.