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
Bond Key Rate Duration Calculator #33
Comments
Hello @domokane , |
Sure. Take a look at the code. We can discuss how to do it. If possible, I suggest putting as much of the code logic under models rather than putting it under FinBond.
It can then be called from the FinBond class.
I have not checked this but you may want to use this as a test case.
https://blog.deriscope.com/index.php/en/excel-quantlib-key-rate-duration
If you stop or change your mind, let me know.
Regards
D
From: BADAL SARKAR<mailto:notifications@github.com>
Sent: 09 March 2021 15:59
To: domokane/FinancePy<mailto:FinancePy@noreply.github.com>
Cc: Dominic O'Kane<mailto:quant@financepy.com>; Mention<mailto:mention@noreply.github.com>
Subject: Re: [domokane/FinancePy] Bond Key Rate Duration Calculator (#33)
Hello @domokane<https://github.com/domokane> ,
I would like to work on this issue. Please let me know if it is alright.
Thanks you.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#33 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABJ73PLC3OHVT2TBZEIOA7LTCYSSDANCNFSM4SA2V3LQ>.
|
Thank you. I am looking at the code base. And once I have a plan, I will discuss with you. |
Dear @domokane I have done some calculations. I will send you a notebook for your review. If I am on the right track I can incorporate into code together with the test cases. |
I am attaching the notebook here. Someone else may have an opinion or suggestion. .ipynb file inside a zipped file. |
Hello @domokane , The Periscope example in the above link does not seem to calculate the modified duration correctly. Their modified duration and the sum of key rate durations are consistent with each other. However, the modified duration is not in line with FinancePy and MS Excel. |
KRD_draft_by_sagayev_Bloomberg.pdf Dear @domokane, I have compared my numbers with Bloomberg. They are very close. I also added more comments to explain the code. Please let me know if it seems OK. |
Hi - this looks pretty good. The differences are probably due to small details in the price-yield formula. Maybe try implementing it as a function. Please think about where it should go - should it be part of a separate key rate class ? |
No description provided.
The text was updated successfully, but these errors were encountered: