Skip to main content

curve_yield_at

Function curve_yield_at 

pub fn curve_yield_at<C: YieldCurve<f64>>(
    curve: &C,
    date: NaiveDate,
    basis: YieldBasis,
) -> Result<f64, CurveError>
Expand description

The zero rate curve implies to date, expressed on basis.

A curve stores continuously-compounded discounting; a bond yield is quoted on its market’s basis. Comparing the two without converting compares a continuous number with a periodic one and calls the difference a spread.

Where the basis names a day count, the time to date is measured on it — a zero-rate reading takes a day counter of its own — so a spread quoted on one basis measures both of its legs the same way.

§Errors

CurveError from the discount query.