Function extrapolate
fn extrapolate<R: Scalar>(taus: &[f64], ys: &[R], tau: f64) -> RExpand description
The log discount factor past the last pillar: the last segment’s forward rate, held flat.
Holding the final log discount factor instead — what every scheme did
until 2026-09-25 — stops discounting altogether: the forward past the end
is zero and the zero rate decays as 1/τ, so a bond maturing twenty years
beyond a thirty-year curve priced nearly twenty points rich. A flat forward
keeps the long end discounting at the rate the curve last showed.
The forward is the segment’s average, (y₀ − y₁)/(τ₁ − τ₀), rather
than any scheme’s instantaneous forward at the pillar. It is the same for
every scheme, which the pillar’s own derivative is not (ForwardFlat has
none there), and it is what LogLinear already carries across the last
segment, so the default scheme extends with no kink at all. With one pillar
the segment runs from the anchor, and the forward is that pillar’s zero
rate.
Linear in the two ordinates with passive weights, so every mode differentiates it exactly: a flow past the end loads on the last two pillars, not the last alone.