Function cds_standard_maturity
pub fn cds_standard_maturity(today: NaiveDate, tenor_years: u32) -> NaiveDateExpand description
The CDS2015 standard maturity for a tenor_years-year CDS traded on today.
Per the ISDA CDS2015 convention, the maturity is
next_semi_annual_roll_date(today) + tenor_years − 3 months. Because the
semi-annual roll always lands on a 20-Mar or 20-Sep, the result for a
whole-year tenor always lands on a 20-Jun or 20-Dec (a CDS-IMM date).
§Panics
Panics if tenor_years == 0 (a 0Y CDS is not a meaningful contract).