Skip to main content

dirty_price_of_flows

Function dirty_price_of_flows 

pub fn dirty_price_of_flows<R: Scalar>(
    flows: &[(f64, f64)],
    y: R,
    basis: YieldBasis,
) -> R
Expand description

The dirty price of already-built flows ((time, amount per 100) pairs, as FixedRateBond::timed_flows_per_100 produces) at yield y.

The body dirty_price evaluates, split out so a solver that prices the same bond at many yields builds the flows once. Yield-independent work — the schedule walk and the day-count calls — happens in the flow builder, not here.