Skip to content
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

avoid duplicate logic for bond price calculation #790

Merged
merged 2 commits into from
Apr 6, 2020

Conversation

pcaspers
Copy link
Contributor

@pcaspers pcaspers commented Apr 6, 2020

No description provided.

@@ -248,7 +248,10 @@ namespace QuantLib {

FittedBondDiscountCurve::FittingMethod::FittingCost::FittingCost(
FittedBondDiscountCurve::FittingMethod* fittingMethod)
: fittingMethod_(fittingMethod) {}
: fittingMethod_(fittingMethod) {
for (Size i = 0; i < fittingMethod_->curve_->bondHelpers_.size(); ++i)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe part of FittingMethod::init instead? Here it seems kind of hidden away to me...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. And I just noticed we can remove some more code there as well.

@lballabio lballabio added this to the 1.19 release milestone Apr 6, 2020
FittingCost::firstCashFlow_, which is actually not needed any more
@pcaspers
Copy link
Contributor Author

pcaspers commented Apr 6, 2020

Is the Travis CI job stuck?

@lballabio
Copy link
Owner

lballabio commented Apr 6, 2020

It finished successfully, but didn't signal back. I can merge anyway.

@lballabio lballabio merged commit 3e479de into lballabio:master Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants