I bumped into a problem with historical CDS valuation as of 19 jun 2009 and 19 mar 2010. The easiest way to replicate is to take example provided and change row:
tradeDate = ql.Date(21,5,2009)
to either of two dates (e.g. ql.Date(19,6,2009)). One should get:
"RuntimeError: contract cannot start before accrual"
On both of those dates it is a Friday which might give some hint. Have v 1.18
I bumped into a problem with historical CDS valuation as of 19 jun 2009 and 19 mar 2010. The easiest way to replicate is to take example provided and change row:
tradeDate = ql.Date(21,5,2009)
to either of two dates (e.g. ql.Date(19,6,2009)). One should get:"RuntimeError: contract cannot start before accrual"
On both of those dates it is a Friday which might give some hint. Have v 1.18