Skip to content

Commit

Permalink
Deprecated superseded experimental classes
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Aug 7, 2024
1 parent 506ff1f commit 1a81cb1
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 17 deletions.
4 changes: 4 additions & 0 deletions ql/experimental/averageois/arithmeticaverageois.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

namespace QuantLib {

QL_DEPRECATED_DISABLE_WARNING

ArithmeticAverageOIS::ArithmeticAverageOIS(Type type,
Real nominal,
Schedule fixedLegSchedule,
Expand Down Expand Up @@ -143,4 +145,6 @@ namespace QuantLib {
return legNPV_[1];
}

QL_DEPRECATED_ENABLE_WARNING

}
19 changes: 8 additions & 11 deletions ql/experimental/averageois/arithmeticaverageois.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ namespace QuantLib {
class Schedule;
class OvernightIndex;

//! Arithemtic Average OIS: fix vs arithmetic average of overnight rate
class ArithmeticAverageOIS : public Swap {
/*! \deprecated Use OvernightIndexedSwap instead.
Deprecated in version 1.36.
*/
class [[deprecated("Use OvernightIndexedSwap instead")]] ArithmeticAverageOIS : public Swap {
public:
ArithmeticAverageOIS(Type type,
Real nominal,
Expand All @@ -60,7 +62,10 @@ namespace QuantLib {
//! \name Inspectors
//@{
Type type() const { return type_; }
Real nominal() const;
Real nominal() const {
QL_REQUIRE(nominals_.size()==1, "varying nominals");
return nominals_[0];
}
std::vector<Real> nominals() const { return nominals_; }

//const Schedule& schedule() { return schedule_; }
Expand Down Expand Up @@ -107,14 +112,6 @@ namespace QuantLib {
Real vol_;
};


// inline

inline Real ArithmeticAverageOIS::nominal() const {
QL_REQUIRE(nominals_.size()==1, "varying nominals");
return nominals_[0];
}

}

#endif
4 changes: 4 additions & 0 deletions ql/experimental/averageois/arithmeticoisratehelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

namespace QuantLib {

QL_DEPRECATED_DISABLE_WARNING

ArithmeticOISRateHelper::ArithmeticOISRateHelper(Natural settlementDays,
const Period& tenor, // swap maturity
Frequency fixedLegPaymentFrequency,
Expand Down Expand Up @@ -106,4 +108,6 @@ namespace QuantLib {
RateHelper::accept(v);
}

QL_DEPRECATED_ENABLE_WARNING

}
8 changes: 6 additions & 2 deletions ql/experimental/averageois/arithmeticoisratehelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@

namespace QuantLib {

//! Rate helper for bootstrapping over Overnight Indexed Swap rates
class ArithmeticOISRateHelper : public RelativeDateRateHelper {
/*! \deprecated Use OISRateHelper instead.
Deprecated in version 1.36.
*/
class [[deprecated("Use OISRateHelper instead")]] ArithmeticOISRateHelper : public RelativeDateRateHelper {
public:
QL_DEPRECATED_DISABLE_WARNING
ArithmeticOISRateHelper(
Natural settlementDays,
const Period& tenor, // swap maturity
Expand Down Expand Up @@ -80,6 +83,7 @@ namespace QuantLib {
Real vol_;
bool byApprox_;

QL_DEPRECATED_ENABLE_WARNING
};

}
Expand Down
4 changes: 4 additions & 0 deletions ql/experimental/averageois/makearithmeticaverageois.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

namespace QuantLib {

QL_DEPRECATED_DISABLE_WARNING

MakeArithmeticAverageOIS::MakeArithmeticAverageOIS(
const Period& swapTenor,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Expand Down Expand Up @@ -234,4 +236,6 @@ namespace QuantLib {
return *this;
}

QL_DEPRECATED_ENABLE_WARNING

}
11 changes: 7 additions & 4 deletions ql/experimental/averageois/makearithmeticaverageois.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@

namespace QuantLib {

//! helper class
/*! This class provides a more comfortable way
to instantiate arithemtic average overnight indexed swaps.
/*! \deprecated Use MakeOIS instead.
Deprecated in version 1.36.
*/
class MakeArithmeticAverageOIS {
class [[deprecated("Use MakeOIS instead")]] MakeArithmeticAverageOIS {
public:
QL_DEPRECATED_DISABLE_WARNING

MakeArithmeticAverageOIS(const Period& swapTenor,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Rate fixedRate = Null<Rate>(),
Expand Down Expand Up @@ -95,6 +96,8 @@ namespace QuantLib {
DayCounter fixedDayCount_;

ext::shared_ptr<PricingEngine> engine_;

QL_DEPRECATED_ENABLE_WARNING
};

}
Expand Down

0 comments on commit 1a81cb1

Please sign in to comment.