Function discounted_sum_as_of
pub fn discounted_sum_as_of<R: Scalar>(
flows: &[Cashflow<R>],
disc: &dyn YieldCurve<R>,
as_of: NaiveDate,
) -> Result<R, CurveError>Expand description
discounted_sum, excluding any flow paying on or before as_of.
A leg values as of the discount curve’s own reference date, so a coupon paid
on or before it has already been realised and is not a future cashflow. It
drops out rather than being discounted with a DF ≥ 1 extrapolation, which
is what makes a time-rolled valuation mean anything.
§Errors
Whatever the curve reports for the flows that survive the filter.