Skip to main content

cds_standard_maturity_months

Function cds_standard_maturity_months 

pub fn cds_standard_maturity_months(today: NaiveDate, months: u32) -> NaiveDate
Expand description

cds_standard_maturity over a tenor in months, so sub-annual quotes (a 6M point) pin their own pillar.

The rule is the whole-year one generalized, not a second convention: roll today to the next semi-annual roll date (a 20-Mar or 20-Sep), advance by the tenor, then step back to the standard maturity — a 20-Jun or 20-Dec — on or before it. For a whole-year tenor the advance preserves the roll month, so this reduces exactly to the previous arithmetic (pinned by a test sweeping tenors and roll dates).

§Panics

Panics if months == 0 (a 0-tenor CDS is not a meaningful contract).