Function cds_records
fn cds_records<R: Scalar>(
cds: &CreditDefaultSwap,
view: &PricingView<'_, R>,
factor: f64,
) -> Result<Records, PricingError>Expand description
A CDS’s flows: a Premium row per coupon the valuation reads, with its
coupon details and its pv survival-weighted to the day before payment; a
Protection row per premium period from protection start, the notional it
protects, rate the loss given default and pv that period’s expected
protection on the pricer’s own integration grid; and AccrualOnDefault,
Upfront and Rebate rows where the contract has them. pv sums to npv.
factor scales every row’s notional, amount and value: one for a
single-name contract, an index’s remaining fraction for an index CDS.