From 52b76ef69befc65a458e10cf49399eb21ec8f012 Mon Sep 17 00:00:00 2001 From: Auto Differentiation Dev Team <107129969+auto-differentiation-dev@users.noreply.github.com> Date: Thu, 18 Jul 2024 07:37:50 +0000 Subject: [PATCH] Correct type conversion in additionalResults --- ql/pricingengines/swaption/blackswaptionengine.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql/pricingengines/swaption/blackswaptionengine.hpp b/ql/pricingengines/swaption/blackswaptionengine.hpp index 50bd9b96d2c..5b74fafbb60 100644 --- a/ql/pricingengines/swaption/blackswaptionengine.hpp +++ b/ql/pricingengines/swaption/blackswaptionengine.hpp @@ -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