@@ -179,14 +179,14 @@ YieldCurveConfig::YieldCurveConfig(const string& curveID, const string& curveDes
179179 const string& discountCurveID,
180180 const vector<QuantLib::ext::shared_ptr<YieldCurveSegment>>& curveSegments,
181181 const string& interpolationVariable, const string& interpolationMethod,
182- const string& zeroDayCounter, bool extrapolation,
182+ const string& zeroDayCounter, bool extrapolation, const string& extrapolationMethod,
183183 const BootstrapConfig& bootstrapConfig, const Size mixedInterpolationCutoff,
184184 QuantLib::ext::shared_ptr<IborFallbackConfig> iborFallbackConfig)
185185 : CurveConfig(curveID, curveDescription), currency_(currency), discountCurveID_(discountCurveID),
186186 curveSegments_ (curveSegments), interpolationVariable_(interpolationVariable),
187187 interpolationMethod_(interpolationMethod), zeroDayCounter_(zeroDayCounter), extrapolation_(extrapolation),
188- bootstrapConfig_(bootstrapConfig ), mixedInterpolationCutoff_(mixedInterpolationCutoff ),
189- iborFallbackConfig_(iborFallbackConfig) {}
188+ extrapolationMethod_(extrapolationMethod ), bootstrapConfig_(bootstrapConfig ),
189+ mixedInterpolationCutoff_(mixedInterpolationCutoff), iborFallbackConfig_(iborFallbackConfig) {}
190190
191191const vector<string>& YieldCurveConfig::quotes () {
192192 if (quotes_.size () == 0 ) {
@@ -284,6 +284,7 @@ void YieldCurveConfig::fromXML(XMLNode* node) {
284284 mixedInterpolationCutoff_ = XMLUtils::getChildValueAsInt (node, " MixedInterpolationCutoff" , false , 1 );
285285 zeroDayCounter_ = XMLUtils::getChildValue (node, " YieldCurveDayCounter" , false , " A365" );
286286 extrapolation_ = XMLUtils::getChildValueAsBool (node, " Extrapolation" , false , true );
287+ extrapolationMethod_ = XMLUtils::getChildValue (node, " ExtrapolationMethod" , false , " ContinuousForward" );
287288 excludeT0FromInterpolation_ = XMLUtils::getChildValueAsBool (node, " ExcludeT0FromInterpolation" , false , false );
288289
289290 // Optional bootstrap configuration
@@ -330,6 +331,7 @@ XMLNode* YieldCurveConfig::toXML(XMLDocument& doc) const {
330331 XMLUtils::addChild (doc, node, " YieldCurveDayCounter" , zeroDayCounter_);
331332 XMLUtils::addChild (doc, node, " Tolerance" , bootstrapConfig_.accuracy ());
332333 XMLUtils::addChild (doc, node, " Extrapolation" , extrapolation_);
334+ XMLUtils::addChild (doc, node, " ExtrapolationMethod" , extrapolationMethod_);
333335 XMLUtils::addChild (doc, node, " ExcludeT0FromInterpolation" , excludeT0FromInterpolation_);
334336 XMLUtils::appendNode (node, bootstrapConfig_.toXML (doc));
335337 XMLUtils::appendNode (node, reportConfig_.toXML (doc));
0 commit comments