Skip to main content

implied_repo

Function implied_repo 

fn implied_repo(
    bond: &FixedRateBond,
    valuation: NaiveDate,
    delivery: NaiveDate,
    day_count: DayCountFraction,
    spot_dirty: f64,
    invoice: f64,
) -> (f64, f64)
Expand description

A deliverable’s implied repo and the coupons it pays inside the window: every coupon paid after valuation and on or before delivery, reinvested to delivery at the implied repo itself, so I + Σcᵢ(1 + r·τᵢ) = P(1 + r·τ) and r = (I + Σcᵢ − P) / (P·τ − Σcᵢ·τᵢ), simple on day_count. A non-positive price or denominator reads a rate of zero.