From 9fe344543cf281448eeb717187510dba9e2d3504 Mon Sep 17 00:00:00 2001 From: haoxiaofeng Date: Tue, 14 Nov 2023 11:22:32 +0800 Subject: [PATCH 1/2] call enableExtrapolation() before linkTo --- OREData/ored/marketdata/yieldcurve.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OREData/ored/marketdata/yieldcurve.cpp b/OREData/ored/marketdata/yieldcurve.cpp index 52164fdaf9..7c1303b316 100644 --- a/OREData/ored/marketdata/yieldcurve.cpp +++ b/OREData/ored/marketdata/yieldcurve.cpp @@ -280,10 +280,10 @@ YieldCurve::YieldCurve(Date asof, YieldCurveSpec curveSpec, const CurveConfigura buildBootstrappedCurve(); } - h_.linkTo(p_); if (extrapolation_) { - h_->enableExtrapolation(); + p_->enableExtrapolation(); } + h_.linkTo(p_); // populate shared calibration info From 84664a31e9f3f19d662f905acb446c542b69f68b Mon Sep 17 00:00:00 2001 From: haoxiaofeng Date: Wed, 22 Nov 2023 10:47:15 +0800 Subject: [PATCH 2/2] Add one line code that may be missing to match the documentation description --- OREData/ored/portfolio/fxdigitaloption.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/OREData/ored/portfolio/fxdigitaloption.cpp b/OREData/ored/portfolio/fxdigitaloption.cpp index 7c7c821042..35f29648b0 100644 --- a/OREData/ored/portfolio/fxdigitaloption.cpp +++ b/OREData/ored/portfolio/fxdigitaloption.cpp @@ -51,6 +51,7 @@ void FxDigitalOption::build(const boost::shared_ptr& engineFactor bool flipResults = false; if (payoffCurrency_ == "") { DLOG("PayoffCurrency defaulting to " << domesticCurrency_ << " for FxDigitalOption " << id()); + payoffCurrency_ = domesticCurrency_; } else if (payoffCurrency_ == foreignCurrency_) { // Invert the trade, switch dom and for and flip Put/Call strike = 1.0 / strike;