quantlib.instruments.credit_default_swap.cds_maturity¶
- cds_maturity(Date trade_date, Period tenor, DateGeneration rule)¶
Computes a CDS maturity date.
- Parameters:
trade_date (Date)
tenor (Period)
rule (DateGeneration)
- Returns:
The maturity date. Returns None when a rule of CDS2015 and a tenor length of zero fail to yield a valid CDS maturity date.
- Return type:
datetime.date
- Raises:
ValueError –
if the rule is not ‘CDS2015’, ‘CDS’ or ‘OldCDS’. - if the rule is ‘OldCDS’ and a tenor of 0 months is provided. This restriction can be removed if 0M tenor was available before the CDS Big Bang 2009. - if the tenor is not a multiple of 3 months. For the avoidance of doubt, a tenor of 0 months is supported.