Skip to content

Commit 99c56ce

Browse files
authored
Use quoteError in FittedBondDiscountCurve (#2401)
2 parents 619a23a + 1e9efef commit 99c56ce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ql/termstructures/yield/fittedbonddiscountcurve.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,7 @@ namespace QuantLib {
322322
Array values(n + N);
323323
for (Size i=0; i<n; ++i) {
324324
ext::shared_ptr<BondHelper> helper = fittingMethod_->curve_->bondHelpers_[i];
325-
Real error = helper->impliedQuote() - helper->quote()->value();
326-
Real weightedError = fittingMethod_->weights_[i] * error;
325+
Real weightedError = fittingMethod_->weights_[i] * helper->quoteError();
327326
values[i] = weightedError * weightedError;
328327
}
329328

0 commit comments

Comments
 (0)