-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
TreeSwaptionEngine mispricing #1143
Comments
Thanks, Ralf. May you also check what happens if you remove the bit of code that changes the call dates? |
Sure! Now But we see the numerical issue why the dates are snapped. The
I simply used bool withinPreviousWeek(const Date& d1, const Date& d2) {
return false;
// return d2 >= d1-7 && d2 <= d1;
}
bool withinNextWeek(const Date& d1, const Date& d2) {
return false;
// return d2 >= d1 && d2 <= d1 + 7;
} |
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. |
Inspired by the problem in #930 I have tested the same for the
TreeSwaptionEngine
where we use the same snapping time mechanism as in theTreeCallableFixedRateBondEngine
.We have a similar problem here as well. The coupon date is at
2030-05-15
and when we change the call dates the next day theFdHullWhiteSwaptionEngine
calculates a jump from10.26
to28.79
regarding. TheTreeSwaptionEngine
price jumps only seven days later.Probably not that severe as in the
TreeCallableFixedRateBondEngine
as call dates shortly after coupon dates are not very common but I think the problem of misordered events is the same here.The text was updated successfully, but these errors were encountered: