Skip to content

Commit ad8d7a4

Browse files
committed
QPR-13744 fix
1 parent 4c0af44 commit ad8d7a4

10 files changed

Lines changed: 14 additions & 14 deletions

QuantExt/qle/termstructures/averageoisratehelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ AverageOISRateHelper::AverageOISRateHelper(
6060
void AverageOISRateHelper::initializeDates() {
6161

6262
averageOIS_ = MakeAverageOIS(swapTenor_, overnightIndex_, onTenor_,
63-
quote().empty() || !quote().isValid() ? 0.0 : quote()->value(), fixedTenor_,
63+
quote().empty() || !quote()->isValid() ? 0.0 : quote()->value(), fixedTenor_,
6464
fixedDayCounter_, spotLagTenor_)
6565
.withFixedCalendar(fixedCalendar_)
6666
.withFixedConvention(fixedConvention_)

QuantExt/qle/termstructures/basistwoswaphelper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void BasisTwoSwapHelper::initializeDates() {
7676
Null, you get an exception because the discountRelinkableHandle_
7777
is initially empty. */
7878
longSwap_ = MakeVanillaSwap(swapTenor_, longIndex_,
79-
quote().empty() || !quote().isValid() || !longMinusShort_ ? 0.0 : quote()->value())
79+
quote().empty() || !quote()->isValid() || !longMinusShort_ ? 0.0 : quote()->value())
8080
.withDiscountingTermStructure(discountRelinkableHandle_)
8181
.withFixedLegDayCount(longFixedDayCount_)
8282
.withFixedLegTenor(Period(longFixedFrequency_))
@@ -86,7 +86,7 @@ void BasisTwoSwapHelper::initializeDates() {
8686
.withFloatingLegCalendar(calendar_);
8787

8888
shortSwap_ = MakeVanillaSwap(swapTenor_, shortIndex_,
89-
quote().empty() || !quote().isValid() || longMinusShort_ ? 0.0 : quote()->value())
89+
quote().empty() || !quote()->isValid() || longMinusShort_ ? 0.0 : quote()->value())
9090
.withDiscountingTermStructure(discountRelinkableHandle_)
9191
.withFixedLegDayCount(shortFixedDayCount_)
9292
.withFixedLegTenor(Period(shortFixedFrequency_))

QuantExt/qle/termstructures/brlcdiratehelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void BRLCdiRateHelper::initializeDates() {
6464

6565
// Create the BRL CDI swap
6666
swap_ = QuantLib::ext::make_shared<BRLCdiSwap>(OvernightIndexedSwap::Payer, 1.0, startDate, endDate,
67-
quote().empty() || !quote().isValid() ? 0.01 : quote()->value(),
67+
quote().empty() || !quote()->isValid() ? 0.01 : quote()->value(),
6868
brlCdiIndex_, 0.0, telescopicValueDates_);
6969

7070
// Set the pricing engine

QuantExt/qle/termstructures/crossccybasismtmresetswaphelper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ void CrossCcyBasisMtMResetSwapHelper::initializeDates() {
155155

156156
swap_ = QuantLib::ext::make_shared<CrossCcyBasisMtMResetSwap>(
157157
foreignNominal, foreignCurrency_, foreignLegSchedule, foreignCcyIndex_,
158-
!spreadOnForeignCcy_ || quote().empty() || !quote().isValid() ? 0.0 : quote()->value(), domesticCurrency_,
158+
!spreadOnForeignCcy_ || quote().empty() || !quote()->isValid() ? 0.0 : quote()->value(), domesticCurrency_,
159159
domesticLegSchedule, domesticCcyIndex_,
160-
spreadOnForeignCcy_ || quote().empty() || !quote().isValid() ? 0.0 : quote()->value(), fxIdx, true,
160+
spreadOnForeignCcy_ || quote().empty() || !quote()->isValid() ? 0.0 : quote()->value(), fxIdx, true,
161161
foreignPaymentLag_, domesticPaymentLag_, foreignIncludeSpread_, foreignLookback_, foreignFixingDays_,
162162
foreignRateCutoff_, foreignIsAveraged_, domesticIncludeSpread_, domesticLookback_, domesticFixingDays_,
163163
domesticRateCutoff_, domesticIsAveraged_, telescopicValueDates_);

QuantExt/qle/termstructures/crossccybasisswaphelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void CrossCcyBasisSwapHelper::initializeDates() {
148148
/* Arbitrarily set the spread leg as the pay leg */
149149
swap_ = QuantLib::ext::make_shared<CrossCcyBasisSwap>(
150150
spreadLegNominal, spreadLegCurrency_, spreadLegSchedule, spreadIndex_,
151-
quote().empty() || !quote().isValid() ? 0.0 : quote()->value(), spreadGearing_, flatLegNominal,
151+
quote().empty() || !quote()->isValid() ? 0.0 : quote()->value(), spreadGearing_, flatLegNominal,
152152
flatLegCurrency_, flatLegSchedule, flatIndex_, spreadOnFlatLeg_, flatGearing_, paymentLag_, flatPaymentLag_,
153153
includeSpread_, lookback_, fixingDays_, rateCutoff_, isAveraged_, flatIncludeSpread_, flatLookback_,
154154
flatFixingDays_, flatRateCutoff_, flatIsAveraged_, telescopicValueDates_);

QuantExt/qle/termstructures/crossccyfixfloatmtmresetswaphelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void CrossCcyFixFloatMtMResetSwapHelper::initializeDates() {
9797
}
9898

9999
swap_ = QuantLib::ext::make_shared<CrossCcyFixFloatMtMResetSwap>(
100-
nominal, fixedCurrency_, fixedSchedule, quote().empty() || !quote().isValid() ? 0.0 : quote()->value(),
100+
nominal, fixedCurrency_, fixedSchedule, quote().empty() || !quote()->isValid() ? 0.0 : quote()->value(),
101101
fixedDayCount_, paymentConvention_, paymentLag, paymentCalendar_, index_->currency(), floatSchedule, index_,
102102
floatSpread, paymentConvention_, paymentLag, paymentCalendar_, fxIdx, resetsOnFloatLeg_, true, includeSpread_,
103103
lookback_, fixingDays_, rateCutoff_, isAveraged_);

QuantExt/qle/termstructures/crossccyfixfloatswaphelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void CrossCcyFixFloatSwapHelper::initializeDates() {
128128
Natural paymentLag = 0;
129129
Spread floatSpread = spread_.empty() ? 0.0 : spread_->value();
130130
swap_.reset(new CrossCcyFixFloatSwap(CrossCcyFixFloatSwap::Payer, fixedNominal, fixedCurrency_, fixedSchedule,
131-
quote().empty() || !quote().isValid() ? 0.0 : quote()->value(), fixedDayCount_,
131+
quote().empty() || !quote()->isValid() ? 0.0 : quote()->value(), fixedDayCount_,
132132
paymentConvention_, paymentLag, paymentCalendar_, floatNominal,
133133
index_->currency(), floatSchedule, index_, floatSpread, paymentConvention_,
134134
paymentLag, paymentCalendar_, telescopicValueDates_, includeSpread_, lookback_,

QuantExt/qle/termstructures/oisratehelper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void OISRateHelper::initializeDates() {
5858

5959
Calendar paymentCalendar_ = overnightIndex_->fixingCalendar();
6060

61-
swap_ = MakeOIS(swapTenor_, overnightIndex_, quote().empty() || !quote().isValid() ? 0.0 : quote()->value())
61+
swap_ = MakeOIS(swapTenor_, overnightIndex_, quote().empty() || !quote()->isValid() ? 0.0 : quote()->value())
6262
.withSettlementDays(settlementDays_)
6363
.withFixedLegDayCount(fixedDayCounter_)
6464
.withEndOfMonth(endOfMonth_)
@@ -164,7 +164,7 @@ DatedOISRateHelper::DatedOISRateHelper(const Date& startDate, const Date& endDat
164164
registerWith(overnightIndex_);
165165
registerWith(discountHandle_);
166166

167-
swap_ = MakeOIS(Period(), overnightIndex_, quote().empty() || !quote().isValid() ? 0.0 : quote()->value())
167+
swap_ = MakeOIS(Period(), overnightIndex_, quote().empty() || !quote()->isValid() ? 0.0 : quote()->value())
168168
.withEffectiveDate(startDate)
169169
.withTerminationDate(endDate)
170170
.withFixedLegDayCount(fixedDayCounter_)

QuantExt/qle/termstructures/subperiodsswaphelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void SubPeriodsSwapHelper::initializeDates() {
6060

6161
swap_ = QuantLib::ext::shared_ptr<SubPeriodsSwap>(new SubPeriodsSwap(
6262
effectiveDate, 1.0, swapTenor_, true, fixedTenor_,
63-
quote().empty() || !quote().isValid() ? 0.0 : quote()->value(), fixedCalendar_, fixedDayCount_,
63+
quote().empty() || !quote()->isValid() ? 0.0 : quote()->value(), fixedCalendar_, fixedDayCount_,
6464
fixedConvention_, floatPayTenor_, iborIndex_, floatDayCount_, DateGeneration::Backward, type_));
6565

6666
QuantLib::ext::shared_ptr<PricingEngine> engine(new DiscountingSwapEngine(discountRelinkableHandle_));

QuantExt/qle/termstructures/tenorbasisswaphelper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ void TenorBasisSwapHelper::initializeDates() {
139139

140140
swap_ = QuantLib::ext::make_shared<TenorBasisSwap>(
141141
effectiveDate, 1.0, swapTenor_, payIndex_,
142-
quote().empty() || !quote().isValid() || spreadOnRec_ ? 0.0 : quote()->value(), payFrequency_, receiveIndex_,
143-
quote().empty() || !quote().isValid() || !spreadOnRec_ ? 0.0 : quote()->value(), recFrequency_,
142+
quote().empty() || !quote()->isValid() || spreadOnRec_ ? 0.0 : quote()->value(), payFrequency_, receiveIndex_,
143+
quote().empty() || !quote()->isValid() || !spreadOnRec_ ? 0.0 : quote()->value(), recFrequency_,
144144
DateGeneration::Backward, includeSpread_, spreadOnRec_, type_, telescopicValueDates_);
145145

146146
auto engine = QuantLib::ext::make_shared<DiscountingSwapEngine>(discountRelinkableHandle_);

0 commit comments

Comments
 (0)