3535########################################################################################
3636
3737
38+
3839@njit (
3940 float64 [:](
4041 float64 ,
@@ -280,7 +281,7 @@ def __init__(
280281 self ._generate_adjusted_cds_payment_dts ()
281282 self ._calc_flows ()
282283
283- ###########################################################################
284+ ####################################################################################
284285
285286 def _generate_adjusted_cds_payment_dts (self ):
286287 """Generate CDS payment dates which have been holiday adjusted."""
@@ -300,13 +301,11 @@ def _generate_adjusted_cds_payment_dts(self):
300301 if self .dg_type == DateGenRuleTypes .BACKWARD :
301302
302303 # We start at end date and step backwards
303-
304304 next_dt = self .maturity_dt
305305
306306 unadjusted_schedule_dts .append (next_dt )
307307
308- # the unadjusted dates start at end date and end at previous
309- # cpn date
308+ # the unadjusted dates start at end date and end at previous cpn date
310309 while next_dt > start_dt :
311310 next_dt = next_dt .add_months (- num_months )
312311 unadjusted_schedule_dts .append (next_dt )
@@ -350,18 +349,15 @@ def _generate_adjusted_cds_payment_dts(self):
350349 # Accrual End = [19-MAY-2009, 19-AUG-2009, 19-NOV-2009, 20-MAR-2010]
351350
352351 else :
353-
354352 raise FinError ("Unknown DateGenRuleType:" + str (self .dg_type ))
355353
356354 # We only include dates which fall after the CDS start date
357355 self .payment_dts = adjusted_dts [1 :]
358356
359- # Accrual start dates run from previous cpn date to penultimate
360- # cpn date
357+ # Accrual start dates run from previous cpn date to penultimate cpn date
361358 self .accrual_start_dts = adjusted_dts [:- 1 ]
362359
363- # Accrual end dates are one day before the start of the next
364- # accrual period
360+ # Accrual end dates are one day before the start of the next accrual period
365361 self .accrual_end_dts = [
366362 date .add_days (- 1 ) for date in self .accrual_start_dts [1 :]
367363 ]
0 commit comments