-
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
LinearTsrPricer: fix past payment dates, support overnight swap indices, add missing include #1775
Conversation
QuantLib PR: lballabio#1775
ql/cashflows/lineartsrpricer.cpp
Outdated
if(auto on = ext::dynamic_pointer_cast<OvernightIndexedSwapIndex>(swapIndex_)) { | ||
onSwap_ = on->underlyingSwap(fixingDate_); | ||
swapRateValue_ = onSwap_->fairRate(); | ||
annuity_ = 1.0E4 * std::fabs(onSwap_->fixedLegBPS()); | ||
swapFixedLeg = onSwap_->fixedLeg(); | ||
} | ||
else { | ||
swap_ = swapIndex_->underlyingSwap(fixingDate_); | ||
swapRateValue_ = swap_->fairRate(); | ||
annuity_ = 1.0E4 * std::fabs(swap_->fixedLegBPS()); | ||
swapFixedLeg = swap_->fixedLeg(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably be reworked now that #1789 is merged
This PR 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. |
This PR 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. |
This PR 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. |
No description provided.