Skip to content

Commit

Permalink
Remove features deprecated in version 1.29 (#1891)
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Jan 22, 2024
2 parents 806e455 + 8be4136 commit ce606b0
Show file tree
Hide file tree
Showing 59 changed files with 86 additions and 1,270 deletions.
1 change: 0 additions & 1 deletion QuantLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,6 @@
<ClInclude Include="ql\experimental\credit\recursivelossmodel.hpp" />
<ClInclude Include="ql\experimental\credit\riskyassetswap.hpp" />
<ClInclude Include="ql\experimental\credit\riskyassetswapoption.hpp" />
<ClInclude Include="ql\experimental\credit\riskybond.hpp" />
<ClInclude Include="ql\experimental\credit\saddlepointlossmodel.hpp" />
<ClInclude Include="ql\experimental\credit\spotlosslatentmodel.hpp" />
<ClInclude Include="ql\experimental\credit\spreadedhazardratecurve.hpp" />
Expand Down
3 changes: 0 additions & 3 deletions QuantLib.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -3360,9 +3360,6 @@
<ClInclude Include="ql\experimental\credit\riskyassetswapoption.hpp">
<Filter>experimental\credit</Filter>
</ClInclude>
<ClInclude Include="ql\experimental\credit\riskybond.hpp">
<Filter>experimental\credit</Filter>
</ClInclude>
<ClInclude Include="ql\experimental\credit\saddlepointlossmodel.hpp">
<Filter>experimental\credit</Filter>
</ClInclude>
Expand Down
1 change: 0 additions & 1 deletion cmake/GenerateHeaders.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ function(generate_dir_headers source_dir binary_dir)
list(FILTER children_hpp EXCLUDE REGEX "analyticcomplexchooserengine.hpp")
endif ()

list(FILTER children_hpp EXCLUDE REGEX "riskybond.hpp")
list(FILTER children_hpp EXCLUDE REGEX "composite.hpp")
list(FILTER children_hpp EXCLUDE REGEX "lexicographicalview.hpp")
list(FILTER children_hpp EXCLUDE REGEX "^curve.hpp")
Expand Down
1 change: 0 additions & 1 deletion ql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,6 @@ set(QL_HEADERS
experimental/credit/recursivelossmodel.hpp
experimental/credit/riskyassetswap.hpp
experimental/credit/riskyassetswapoption.hpp
experimental/credit/riskybond.hpp
experimental/credit/saddlepointlossmodel.hpp
experimental/credit/spotlosslatentmodel.hpp
experimental/credit/spreadedhazardratecurve.hpp
Expand Down
18 changes: 0 additions & 18 deletions ql/cashflow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,6 @@ namespace QuantLib {

template <>
struct earlier_than<CashFlow> {
/*! \deprecated Use `auto` or `decltype` instead.
Deprecated in version 1.29.
*/
QL_DEPRECATED
typedef CashFlow first_argument_type;

/*! \deprecated Use `auto` or `decltype` instead.
Deprecated in version 1.29.
*/
QL_DEPRECATED
typedef CashFlow second_argument_type;

/*! \deprecated Use `auto` or `decltype` instead.
Deprecated in version 1.29.
*/
QL_DEPRECATED
typedef bool result_type;

bool operator()(const CashFlow& c1,
const CashFlow& c2) const {
return c1.date() < c2.date();
Expand Down
11 changes: 0 additions & 11 deletions ql/cashflows/cashflows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,17 +470,6 @@ namespace QuantLib {
return basisPoint_*calc.bps()/discountCurve.discount(npvDate);
}

void CashFlows::npvbps(const Leg& leg,
const YieldTermStructure& discountCurve,
bool includeSettlementDateFlows,
Date settlementDate,
Date npvDate,
Real& npv,
Real& bps) {
std::tie(npv, bps) =
npvbps(leg, discountCurve, includeSettlementDateFlows, settlementDate, npvDate);
}

std::pair<Real, Real> CashFlows::npvbps(const Leg& leg,
const YieldTermStructure& discountCurve,
bool includeSettlementDateFlows,
Expand Down
13 changes: 0 additions & 13 deletions ql/cashflows/cashflows.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,6 @@ namespace QuantLib {
Date settlementDate = Date(),
Date npvDate = Date());

//! NPV and BPS of the cash flows.
/*! \deprecated Use the overload returning a pair of Reals.
Deprecated in version 1.29.
*/
QL_DEPRECATED
static void npvbps(const Leg& leg,
const YieldTermStructure& discountCurve,
bool includeSettlementDateFlows,
Date settlementDate,
Date npvDate,
Real& npv,
Real& bps);

//! At-the-money rate of the cash flows.
/*! The result is the fixed rate for which a fixed rate cash flow
vector, equivalent to the input vector, has the required NPV
Expand Down
11 changes: 0 additions & 11 deletions ql/cashflows/conundrumpricer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,6 @@ namespace QuantLib {
// private:
class Function {
public:
/*! \deprecated Use `auto` or `decltype` instead.
Deprecated in version 1.29.
*/
QL_DEPRECATED
typedef Real argument_type;

/*! \deprecated Use `auto` or `decltype` instead.
Deprecated in version 1.29.
*/
QL_DEPRECATED
typedef Real result_type;
virtual ~Function() = default;
virtual Real operator()(Real x) const = 0;
};
Expand Down
5 changes: 0 additions & 5 deletions ql/cashflows/inflationcouponpricer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ namespace QuantLib {
void update() override { notifyObservers(); }
//@}
protected:
/*! \deprecated Don't use this data member. If you need it,
provide it in your derived class.
Deprecated in version 1.29.
*/
QL_DEPRECATED Handle<YieldTermStructure> rateCurve_;
Date paymentDate_;
};

Expand Down
3 changes: 1 addition & 2 deletions ql/experimental/credit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ this_include_HEADERS = \
recursivelossmodel.hpp \
riskyassetswap.hpp \
riskyassetswapoption.hpp \
riskybond.hpp \
saddlepointlossmodel.hpp \
spotlosslatentmodel.hpp \
spreadedhazardratecurve.hpp \
Expand Down Expand Up @@ -105,7 +104,7 @@ all.hpp: Makefile.am
echo "/* This file is automatically generated; do not edit. */" > ${srcdir}/$@
echo "/* Add the files to be included into Makefile.am instead. */" >> ${srcdir}/$@
echo >> ${srcdir}/$@
for i in $(filter-out all.hpp riskybond.hpp, $(this_include_HEADERS)); do \
for i in $(filter-out all.hpp, $(this_include_HEADERS)); do \
echo "#include <${subdir}/$$i>" >> ${srcdir}/$@; \
done
echo >> ${srcdir}/$@
Expand Down
27 changes: 0 additions & 27 deletions ql/experimental/credit/riskybond.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion ql/experimental/inflation/cpicapfloortermpricesurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace QuantLib {

Time T = inflationYearFraction(
zii_->frequency(),
detail::CPI::isInterpolated(zii_, interpolationType_), dayCounter(),
detail::CPI::isInterpolated(interpolationType_), dayCounter(),
referenceDate() - observationLag_, maturity - observationLag_);

return T > 0.0 ? std::pow(F1 / F0, 1 / T) - 1.0 : baseRate();
Expand Down
16 changes: 0 additions & 16 deletions ql/experimental/inflation/genericindexes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,6 @@ namespace QuantLib {
const Currency& ccy,
const Handle<ZeroInflationTermStructure>& ts = {})
: ZeroInflationIndex("CPI", GenericRegion(), revised, frequency, lag, ccy, ts) {}

/*! \deprecated Use the constructor without the "interpolated" parameter.
Deprecated in version 1.29.
*/
QL_DEPRECATED
GenericCPI(Frequency frequency,
bool revised,
bool interpolated,
const Period &lag,
const Currency &ccy,
const Handle<ZeroInflationTermStructure>& ts = {})
: GenericCPI(frequency, revised, lag, ccy, ts) {
QL_DEPRECATED_DISABLE_WARNING
interpolated_ = interpolated;
QL_DEPRECATED_ENABLE_WARNING
}
};


Expand Down
22 changes: 0 additions & 22 deletions ql/experimental/math/convolvedstudentt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,6 @@ namespace QuantLib {
*/
class CumulativeBehrensFisher { // ODD orders only by now, rename?
public:
/*! \deprecated Use `auto` or `decltype` instead.
Deprecated in version 1.29.
*/
QL_DEPRECATED
typedef Probability result_type;

/*! \deprecated Use `auto` or `decltype` instead.
Deprecated in version 1.29.
*/
QL_DEPRECATED
typedef Real argument_type;
/*!
@param degreesFreedom Degrees of freedom of the Ts convolved. The
algorithm is limited to odd orders only.
Expand Down Expand Up @@ -171,17 +160,6 @@ namespace QuantLib {
*/
class InverseCumulativeBehrensFisher {
public:
/*! \deprecated Use `auto` or `decltype` instead.
Deprecated in version 1.29.
*/
QL_DEPRECATED
typedef Real result_type;

/*! \deprecated Use `auto` or `decltype` instead.
Deprecated in version 1.29.
*/
QL_DEPRECATED
typedef Probability argument_type;
/*!
@param degreesFreedom Degrees of freedom of the Ts convolved. The
algorithm is limited to odd orders only.
Expand Down
6 changes: 0 additions & 6 deletions ql/experimental/math/latentmodel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ namespace QuantLib {
namespace detail {
// havent figured out how to do this in-place
struct multiplyV {
/*! \deprecated Use `auto` or `decltype` instead.
Deprecated in version 1.29.
*/
QL_DEPRECATED
typedef std::vector<Real> result_type;

std::vector<Real> operator()(Real d, std::vector<Real> v)
{
std::transform(v.begin(), v.end(), v.begin(),
Expand Down
14 changes: 0 additions & 14 deletions ql/indexes/inflation/aucpi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,6 @@ namespace QuantLib {
const Handle<ZeroInflationTermStructure>& ts = {})
: ZeroInflationIndex(
"CPI", AustraliaRegion(), revised, frequency, Period(2, Months), AUDCurrency(), ts) {}

/*! \deprecated Use the constructor without the "interpolated" parameter.
Deprecated in version 1.29.
*/
QL_DEPRECATED
AUCPI(Frequency frequency,
bool revised,
bool interpolated,
const Handle<ZeroInflationTermStructure>& ts = {})
: AUCPI(frequency, revised, ts) {
QL_DEPRECATED_DISABLE_WARNING
interpolated_ = interpolated;
QL_DEPRECATED_ENABLE_WARNING
}
};


Expand Down
26 changes: 0 additions & 26 deletions ql/indexes/inflation/euhicp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,6 @@ namespace QuantLib {
Period(1, Months), // availability
EURCurrency(),
ts) {}

/*! \deprecated Use the constructor without the "interpolated" parameter.
Deprecated in version 1.29.
*/
QL_DEPRECATED
explicit EUHICP(
bool interpolated,
const Handle<ZeroInflationTermStructure>& ts = {})
: EUHICP(ts) {
QL_DEPRECATED_DISABLE_WARNING
interpolated_ = interpolated;
QL_DEPRECATED_ENABLE_WARNING
}
};

//! EU HICPXT index
Expand All @@ -68,19 +55,6 @@ namespace QuantLib {
Period(1, Months), // availability
EURCurrency(),
ts) {}

/*! \deprecated Use the constructor without the "interpolated" parameter.
Deprecated in version 1.29.
*/
QL_DEPRECATED
explicit EUHICPXT(
bool interpolated,
const Handle<ZeroInflationTermStructure>& ts = {})
: EUHICPXT(ts) {
QL_DEPRECATED_DISABLE_WARNING
interpolated_ = interpolated;
QL_DEPRECATED_ENABLE_WARNING
}
};


Expand Down
13 changes: 0 additions & 13 deletions ql/indexes/inflation/frhicp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ namespace QuantLib {
explicit FRHICP(const Handle<ZeroInflationTermStructure>& ts = {})
: ZeroInflationIndex(
"HICP", FranceRegion(), false, Monthly, Period(1, Months), EURCurrency(), ts) {}

/*! \deprecated Use the constructor without the "interpolated" parameter.
Deprecated in version 1.29.
*/
QL_DEPRECATED
explicit FRHICP(
bool interpolated,
const Handle<ZeroInflationTermStructure>& ts = {})
: FRHICP(ts) {
QL_DEPRECATED_DISABLE_WARNING
interpolated_ = interpolated;
QL_DEPRECATED_ENABLE_WARNING
}
};


Expand Down
13 changes: 0 additions & 13 deletions ql/indexes/inflation/ukrpi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ namespace QuantLib {
explicit UKRPI(const Handle<ZeroInflationTermStructure>& ts = {})
: ZeroInflationIndex(
"RPI", UKRegion(), false, Monthly, Period(1, Months), GBPCurrency(), ts) {}

/*! \deprecated Use the constructor without the "interpolated" parameter.
Deprecated in version 1.29.
*/
QL_DEPRECATED
explicit UKRPI(
bool interpolated,
const Handle<ZeroInflationTermStructure>& ts = {})
: UKRPI(ts) {
QL_DEPRECATED_DISABLE_WARNING
interpolated_ = interpolated;
QL_DEPRECATED_ENABLE_WARNING
}
};


Expand Down
13 changes: 0 additions & 13 deletions ql/indexes/inflation/uscpi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,6 @@ namespace QuantLib {
Period(1, Months), // availability
USDCurrency(),
ts) {}

/*! \deprecated Use the constructor without the "interpolated" parameter.
Deprecated in version 1.29.
*/
QL_DEPRECATED
explicit USCPI(
bool interpolated,
const Handle<ZeroInflationTermStructure>& ts = {})
: USCPI(ts) {
QL_DEPRECATED_DISABLE_WARNING
interpolated_ = interpolated;
QL_DEPRECATED_ENABLE_WARNING
}
};


Expand Down
13 changes: 0 additions & 13 deletions ql/indexes/inflation/zacpi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ namespace QuantLib {
explicit ZACPI(const Handle<ZeroInflationTermStructure>& ts = {})
: ZeroInflationIndex(
"CPI", ZARegion(), false, Monthly, Period(1, Months), ZARCurrency(), ts) {}

/*! \deprecated Use the constructor without the "interpolated" parameter.
Deprecated in version 1.29.
*/
QL_DEPRECATED
explicit ZACPI(
bool interpolated,
const Handle<ZeroInflationTermStructure>& ts = {})
: ZACPI(ts) {
QL_DEPRECATED_DISABLE_WARNING
interpolated_ = interpolated;
QL_DEPRECATED_ENABLE_WARNING
}
};


Expand Down
Loading

0 comments on commit ce606b0

Please sign in to comment.