-
-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential issues for CDS pricing #187
Comments
Hi - Thanks for the comments. Let me look at this over the weekend. |
For the second point, this change should adjust the dates correctly: here
Also, you're right that |
We have almost completed addressing these issues. I will push a new version asap. |
Thanks for looking into this! Will continue to look at other modules as well. |
Hello,
I really like this package, and have been taking a very close look to the implementation. I spot two potential things that may not be reasonable based on my knowledge from a couple of references (including your book).
In protection leg calculation, the integral step is set to be
dt = (tmat - teff) / num_steps_per_year
, andnum_steps_per_year
is 25 by default. I assume this should meandt = 1 / nums_steps_per_year
and total steps aremath.ceil((tmat-teff) * nums_steps_per_year)
. Or else, a long enough term could makedt
detours from our target.The treatment for the last payment date is moved one day forward from the maturity date (usually 20th), which seems off at least when 20th itself is Saturday.
To replicate a given example from markit, use the following example.
CDS(Date(20, 2, 2009, 2, 20), Date(20, 3, 2010), 0.01)
. The last payment date given by the pricer is March 21st Sunday, which is still a weekend.The same setup can be found at https://www.cdsmodel.com/assets/cds-model/docs/Standard%20CDS%20Examples.pdf
where the last payment date is adjusted to March 22nd Monday.
Let me know your thoughts.
Thanks,
The text was updated successfully, but these errors were encountered: