Skip to main content

repo_margin

Function repo_margin 

pub fn repo_margin(
    instrument: &AnyInstrument,
    market: &MarketContext,
    price: Option<f64>,
) -> Result<RepoMargin, BondReadingError>
Expand description

A repo’s margin position against market: exposure, collateral value on the margin basis, what the margin ratio requires, the excess, and the haircut. The collateral is priced off its curves, or at price per 100 when the desk marks it from a screen.

§Errors

BondReadingError::Product for an instrument that is not a repo; otherwise the market’s refusal.