Function npv_under
pub fn npv_under(
book: &Book,
market: &MarketContext,
scenario: &Scenario,
) -> Result<f64, ScenarioError>Expand description
The book’s value under scenario, against a market nothing mutates.
The shorthand for book.npv(&market.under(scenario)?)
— when more than a value is wanted, apply the scenario and use the shocked
market like any other.
§Errors
ScenarioError from building the shocked market or from a pricer.