QuantLib icon indicating copy to clipboard operation
QuantLib copied to clipboard

swapzero curve bootstrapping

Open ChandanKSingh opened this issue 2 years ago • 1 comments

I am using "PiecewiseLinearZero" for bootstrapping swap zero curve as independent validation exercise. For shorter maturities, the bootstrapped curve matches well. For the longer maturities where swap quotes are used, have differences of order 10-e6 throughout. The difference lies with date generation logic "Backwardation". Is there any way to specify this in "swapratehelpers" or we can specify the payment start date, payment end date and forward end date for each coupon period. Solution to do so either in Python or C++ will work.

The reason I am lookin for this is QuantLib chooses to pay coupon on Saturday (14-04-2023) which is not a pillar and its holiday as well, 15th is Sunday, 16th is holiday as per calendar, so the payment date should be 17th. This causes difference in discount factor of floating leg for all consequent coupons. For previous coupon date, 14-01-2023 is Saturday and as per Modified Following convention Quantlib shifted the payment date to 16-01-2023. The issue is happening randomly on few coupon dates falling on holidays, not all coupon dates on holidays are wrong. image image

ChandanKSingh avatar Sep 04 '22 09:09 ChandanKSingh

Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.

boring-cyborg[bot] avatar Sep 04 '22 09:09 boring-cyborg[bot]

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

github-actions[bot] avatar Nov 07 '22 02:11 github-actions[bot]

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

github-actions[bot] avatar Jan 07 '23 01:01 github-actions[bot]

Hi @ChandanKSingh could you please post the c++ code used for the test?

jakeheke75 avatar Jan 07 '23 09:01 jakeheke75

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

github-actions[bot] avatar Mar 09 '23 02:03 github-actions[bot]

This issue was automatically closed because it has been stalled for two weeks with no further activity.

github-actions[bot] avatar Mar 24 '23 01:03 github-actions[bot]