Skip to content

Commit df3a634

Browse files
pcaspersfarahkhashman
authored andcommitted
Merge branch 'feature/QPR-13650' into 'master'
QPR-13650 fix deprecated warnings introduced through QL 1.40 upgrade Closes QPR-13650 See merge request qs/oreplus!3021
1 parent b732ed1 commit df3a634

11 files changed

Lines changed: 10 additions & 26 deletions

OREData/ored/model/fxbsbuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
1717
*/
1818

19-
#include <ql/experimental/fx/blackdeltacalculator.hpp>
19+
#include <ql/pricingengines/blackdeltacalculator.hpp>
2020
#include <ql/math/optimization/levenbergmarquardt.hpp>
2121
#include <ql/quotes/simplequote.hpp>
2222
#include <ql/termstructures/volatility/equityfx/blackconstantvol.hpp>

QuantExt/qle/termstructures/blackdeltautilities.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
#include <ql/experimental/fx/bachelierdeltacalculator.hpp>
20-
#include <ql/experimental/fx/blackdeltacalculator.hpp>
20+
#include <ql/pricingengines/blackdeltacalculator.hpp>
2121
#include <qle/termstructures/blackdeltautilities.hpp>
2222

2323
namespace QuantExt {

QuantExt/qle/termstructures/blackvolsurfaceabsolute.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <qle/termstructures/blackvolsurfaceabsolute.hpp>
2020
#include <qle/math/flatextrapolation.hpp>
2121

22-
#include <ql/experimental/fx/blackdeltacalculator.hpp>
22+
#include <ql/pricingengines/blackdeltacalculator.hpp>
2323
#include <ql/math/comparison.hpp>
2424
#include <ql/math/interpolations/cubicinterpolation.hpp>
2525
#include <ql/math/interpolations/linearinterpolation.hpp>

QuantExt/qle/termstructures/blackvolsurfacebfrr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <qle/termstructures/blackvolsurfacebfrr.hpp>
2020
#include <qle/utilities/time.hpp>
2121

22-
#include <ql/experimental/fx/blackdeltacalculator.hpp>
22+
#include <ql/pricingengines/blackdeltacalculator.hpp>
2323
#include <ql/math/comparison.hpp>
2424
#include <ql/math/interpolations/cubicinterpolation.hpp>
2525
#include <ql/math/interpolations/linearinterpolation.hpp>

QuantExt/qle/termstructures/inflation/inflationtraits.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,7 @@ class CPITraits {
3636
};
3737
typedef QuantLib::BootstrapHelper<QuantLib::ZeroInflationTermStructure> helper;
3838
// start of curve data
39-
static QuantLib::Date initialDate(const QuantLib::ZeroInflationTermStructure* t) {
40-
if (t->hasExplicitBaseDate())
41-
return t->baseDate();
42-
else
43-
return QuantLib::inflationPeriod(t->referenceDate() - t->observationLag(), t->frequency()).first;
44-
}
39+
static QuantLib::Date initialDate(const QuantLib::ZeroInflationTermStructure* t) { return t->baseDate(); }
4540
// value at reference date
4641

4742
static QuantLib::Rate initialValue(const CPICurve* ts) {

QuantExt/qle/termstructures/inflation/interpolatedcpiinflationcurve.hpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,12 @@ InterpolatedCPIInflationCurve<Interpolator>::InterpolatedCPIInflationCurve(
106106
QuantLib::InterpolatedCurve<Interpolator>(interpolator) {}
107107

108108
template <class T> QuantLib::Date InterpolatedCPIInflationCurve<T>::baseDate() const {
109-
if (hasExplicitBaseDate())
110-
return ZeroInflationTermStructure::baseDate();
111-
else
112-
return dates_.front();
113-
}
114109

115-
template <class T> QuantLib::Date InterpolatedCPIInflationCurve<T>::maxDate() const {
116-
if (hasExplicitBaseDate())
117-
return dates_.back();
118-
else
119-
return QuantLib::inflationPeriod(dates_.back(), frequency()).second;
110+
return ZeroInflationTermStructure::baseDate();
120111
}
121112

113+
template <class T> QuantLib::Date InterpolatedCPIInflationCurve<T>::maxDate() const { return dates_.back(); }
114+
122115
template <class T> inline QuantLib::Rate InterpolatedCPIInflationCurve<T>::forwardCPIImpl(QuantLib::Time t) const {
123116
return this->interpolation_(t, true);
124117
}

QuantExt/qle/termstructures/inflation/piecewisecpiinflationcurve.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ class PiecewiseCPIInflationCurve : public Traits::template curve<Interpolator>::
8484

8585
template <class I, template <class> class B, class T>
8686
inline QuantLib::Date PiecewiseCPIInflationCurve<I, B, T>::baseDate() const {
87-
if (!this->hasExplicitBaseDate())
88-
this->calculate();
8987
return base_curve::baseDate();
9088
}
9189

QuantExt/qle/termstructures/piecewiseoptionletcurve.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ class PiecewiseOptionletCurve : public InterpolatedOptionletCurve<Interpolator>,
168168

169169
// Bootstrapper classes are declared as friend to manipulate the curve data
170170
friend class Bootstrap<this_curve>;
171-
friend class PenaltyFunction<this_curve>;
172171

173172
Bootstrap<this_curve> bootstrap_;
174173
};

QuantExt/qle/termstructures/piecewisepricecurve.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ class PiecewisePriceCurve : public InterpolatedPriceCurve<Interpolator> {
153153
Real accuracy_;
154154

155155
friend class Bootstrap<this_curve>;
156-
friend class PenaltyFunction<this_curve>;
157156
Bootstrap<this_curve> bootstrap_;
158157
};
159158

QuantExt/test/bfrrvolsurface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <qle/termstructures/blackdeltautilities.hpp>
2222
#include <qle/termstructures/blackvolsurfacebfrr.hpp>
2323

24-
#include <ql/experimental/fx/blackdeltacalculator.hpp>
24+
#include <ql/pricingengines/blackdeltacalculator.hpp>
2525
#include <ql/pricingengines/blackformula.hpp>
2626
#include <ql/quotes/simplequote.hpp>
2727
#include <ql/termstructures/yield/flatforward.hpp>

0 commit comments

Comments
 (0)