Skip to content

Commit 7681567

Browse files
committed
QPR-13744 t0 curve should not react to observables
1 parent 4794469 commit 7681567

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

OREData/ored/marketdata/inflationcurve.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,12 @@ InflationCurve::CurveBuildResults
307307
zcq->quote(), convention->observationLag(), maturity, convention->fixCalendar(),
308308
convention->fixConvention(), convention->dayCounter(), index, observationInterpolation, nominalTs,
309309
swapStart);
310-
instrument->unregisterWith(Settings::instance().evaluationDate());
310+
311+
// Unregister with inflation index. See PR #326 on github for details.
312+
instrument->unregisterWithAll();
313+
instrument->registerWith(nominalTs);
314+
instrument->registerWith(zcq->quote());
315+
311316
helpers.push_back(instrument);
312317
results.pillarDates.push_back(instrument->pillarDate());
313318
results.mdQuoteLabels.push_back(md->name());
@@ -413,7 +418,12 @@ InflationCurve::CurveBuildResults
413418
auto instrument = QuantLib::ext::make_shared<YearOnYearInflationSwapHelper>(
414419
quote, convention->observationLag(), maturity, convention->fixCalendar(), convention->fixConvention(),
415420
convention->dayCounter(), index, nominalTs, swapStart);
416-
instrument->unregisterWith(Settings::instance().evaluationDate());
421+
422+
// Unregister with inflation index (and evaluationDate). See PR #326 on github for details.
423+
instrument->unregisterWithAll();
424+
instrument->registerWith(nominalTs);
425+
instrument->registerWith(quote);
426+
417427
results.pillarDates.push_back(instrument->pillarDate());
418428
helpers.push_back(instrument);
419429
results.mdQuoteLabels.push_back(md->name());

0 commit comments

Comments
 (0)