Skip to content

Commit ba27ca8

Browse files
pcaspersjenkins
authored andcommitted
Merge branch 'QPR-13213' into 'master'
QPR-13213 remove fallback rules 2, 3 Closes QPR-13213 See merge request qs/oreplus!2670
1 parent c54694d commit ba27ca8

2 files changed

Lines changed: 2 additions & 38 deletions

File tree

OREData/ored/model/lgmbuilder.cpp

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ createSwaptionHelper(const E& expiry, const T& term, const Handle<SwaptionVolati
7878
settlementDays, averagingMethod);
7979
auto sd = swaptionData(helper);
8080

81-
// ensure point 1 from above
81+
// ensure fallback rule 1
8282

8383
Real atmStdDev = svts->volatility(sd.timeToExpiry, sd.swapLength, sd.atmForward) * std::sqrt(sd.timeToExpiry);
8484
if (vt == ShiftedLognormal) {
@@ -99,35 +99,6 @@ createSwaptionHelper(const E& expiry, const T& term, const Handle<SwaptionVolati
9999
fallbackType = ore::data::LgmBuilder::FallbackType::FallbackRule1;
100100
}
101101

102-
// ensure point 2 from above
103-
104-
auto mv = std::abs(helper->marketValue());
105-
if (mv < ore::data::LgmBuilder::mmv) {
106-
DLOG("Helper with expiry " << expiry << " and term " << term << " has an absolute market value of "
107-
<< std::scientific << mv << " which is lower than minimum market value "
108-
<< ore::data::LgmBuilder::mmv << " so switching to helper with atm rate "
109-
<< sd.atmForward);
110-
strike = sd.atmForward;
111-
helper = QuantLib::ext::make_shared<SwaptionHelper>(expiry, term, vol, iborIndex, fixedLegTenor, fixedDayCounter,
112-
floatDayCounter, yts, errorType, strike, 1.0, vt, shift,
113-
settlementDays, averagingMethod);
114-
fallbackType = ore::data::LgmBuilder::FallbackType::FallbackRule2;
115-
}
116-
117-
// ensure point 3 from above
118-
119-
mv = std::abs(helper->marketValue());
120-
if (errorType != BlackCalibrationHelper::PriceError && mv < ore::data::LgmBuilder::smv) {
121-
errorType = BlackCalibrationHelper::PriceError;
122-
DLOG("Helper with expiry " << expiry << " and term " << term << " has an absolute market value of "
123-
<< std::scientific << mv << " which is lower than " << ore::data::LgmBuilder::smv
124-
<< " so switching to a price error helper.");
125-
helper = QuantLib::ext::make_shared<SwaptionHelper>(expiry, term, vol, iborIndex, fixedLegTenor, fixedDayCounter,
126-
floatDayCounter, yts, errorType, strike, 1.0, vt, shift,
127-
settlementDays, averagingMethod);
128-
fallbackType = ore::data::LgmBuilder::FallbackType::FallbackRule3;
129-
}
130-
131102
DLOG("Created swaption helper with expiry " << expiry << " and term " << term << ": vol=" << vol->value()
132103
<< ", index=" << iborIndex->name() << ", strike=" << strike
133104
<< ", shift=" << shift);

OREData/ored/model/lgmbuilder.hpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,12 @@ class LgmBuilder : public QuantExt::ModelBuilder {
4949
public:
5050
// We apply certain fallback rules to ensure a robust calibration:
5151

52-
enum class FallbackType { NoFallback, FallbackRule1, FallbackRule2, FallbackRule3 };
52+
enum class FallbackType { NoFallback, FallbackRule1 };
5353

5454
/* Rule 1 If the helper's strike is too far away from the ATM level in terms of the relevant std dev, we move the
5555
calibration strike closer to the ATM level */
5656
static constexpr Real maxAtmStdDev = 3.0;
5757

58-
/* Rule 2 If the helper value is lower than mmv, replace it with a "more reasonable" helper. We replace
59-
the helper with a helper that has the ATM strike. */
60-
static constexpr Real mmv = 1.0E-20;
61-
62-
/* Rule 3 Switch to PriceError if helper's market value is below smv */
63-
static constexpr Real smv = 1.0E-8;
64-
6558
/*! The configuration refers to the configuration to read swaption vol and swap index from the market.
6659
The discounting curve to price calibrating swaptions is derived from the swap index directly though,
6760
i.e. it is not read as a discount curve from the market (except as a fallback in case we do not find

0 commit comments

Comments
 (0)