Skip to content

Commit

Permalink
Explicit type conversion in additionalResults (#2027)
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio authored Jul 18, 2024
2 parents d8d8753 + 52b76ef commit 6d931d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ql/pricingengines/swaption/blackswaptionengine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ namespace QuantLib {
w, strike, atmForward, stdDev, annuity, displacement);
results_.additionalResults["timeToExpiry"] = exerciseTime;
results_.additionalResults["impliedVolatility"] = Real(stdDev / std::sqrt(exerciseTime));
results_.additionalResults["forwardPrice"] = results_.value / discountCurve_->discount(exerciseDate);
results_.additionalResults["forwardPrice"] = Real(results_.value / discountCurve_->discount(exerciseDate));
}

} // namespace detail
Expand Down

0 comments on commit 6d931d4

Please sign in to comment.