CDS valuation for 2 historical dates (19 jun 2009 and 19 mar 2010)

Open
#798 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
backend

Research direction

Reproduce the error with the linked Python example, Python/examples/isda-engine.py, changing tradeDate to 19 June 2009 or 19 March 2010. Read the CDS accrual and contract start date handling reached by that example, then trace why those dates raise “contract cannot start before accrual.” Done means valuation runs for both dates; the issue names no test or implementation file.

Written by the indexing model from the issue text.

Description

help wanted

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

Dominant language
C++
Stars
7.7k
Forks
2.3k
Avg merge
5d 16h
Merged PRs (30d)
84

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lballabio/QuantLib

All issues in lballabio/QuantLib

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.