Skip to main content

loan

Function loan 

pub(crate) fn loan(
    schedule: &PySchedule,
    currency: &str,
    notional: f64,
    fixed_rate: Option<f64>,
    day_count: Named<DayCountFraction>,
    borrower: bool,
    amortisation: Option<&str>,
    issuer: Option<&str>,
    index: Option<&str>,
    margin: f64,
) -> PyResult<PyInstrument>
Expand description

A fixed-rate loan over schedule: notional drawn on its first date, interest at fixed_rate on day_count paid at each period’s end, and the principal repaid on its last date. borrower=True takes the drawdown and pays the servicing; False books the lender’s side. amortisation="Straight-Line" repays notional / n at each of the n period ends instead, each period’s interest on what is still outstanding. issuer tags the borrower’s credit: the servicing survival-weighted with recovery on the outstanding, the drawdown risk-free.

index (a registry code, term or overnight) with margin floats the interest instead: give exactly one of fixed_rate and index.