diff --git a/ql/experimental/averageois/arithmeticaverageois.cpp b/ql/experimental/averageois/arithmeticaverageois.cpp index ee6e0ff9117..9c5754320f6 100644 --- a/ql/experimental/averageois/arithmeticaverageois.cpp +++ b/ql/experimental/averageois/arithmeticaverageois.cpp @@ -25,6 +25,8 @@ namespace QuantLib { + QL_DEPRECATED_DISABLE_WARNING + ArithmeticAverageOIS::ArithmeticAverageOIS(Type type, Real nominal, Schedule fixedLegSchedule, @@ -143,4 +145,6 @@ namespace QuantLib { return legNPV_[1]; } + QL_DEPRECATED_ENABLE_WARNING + } diff --git a/ql/experimental/averageois/arithmeticaverageois.hpp b/ql/experimental/averageois/arithmeticaverageois.hpp index 7a7f095b709..d09bd266299 100644 --- a/ql/experimental/averageois/arithmeticaverageois.hpp +++ b/ql/experimental/averageois/arithmeticaverageois.hpp @@ -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, @@ -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 nominals() const { return nominals_; } //const Schedule& schedule() { return schedule_; } @@ -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 diff --git a/ql/experimental/averageois/arithmeticoisratehelper.cpp b/ql/experimental/averageois/arithmeticoisratehelper.cpp index b0bb3d2b7a8..d31d0ca7141 100644 --- a/ql/experimental/averageois/arithmeticoisratehelper.cpp +++ b/ql/experimental/averageois/arithmeticoisratehelper.cpp @@ -25,6 +25,8 @@ namespace QuantLib { + QL_DEPRECATED_DISABLE_WARNING + ArithmeticOISRateHelper::ArithmeticOISRateHelper(Natural settlementDays, const Period& tenor, // swap maturity Frequency fixedLegPaymentFrequency, @@ -106,4 +108,6 @@ namespace QuantLib { RateHelper::accept(v); } + QL_DEPRECATED_ENABLE_WARNING + } diff --git a/ql/experimental/averageois/arithmeticoisratehelper.hpp b/ql/experimental/averageois/arithmeticoisratehelper.hpp index c97e0b4e27a..a8ce03d0f2f 100644 --- a/ql/experimental/averageois/arithmeticoisratehelper.hpp +++ b/ql/experimental/averageois/arithmeticoisratehelper.hpp @@ -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 @@ -80,6 +83,7 @@ namespace QuantLib { Real vol_; bool byApprox_; + QL_DEPRECATED_ENABLE_WARNING }; } diff --git a/ql/experimental/averageois/makearithmeticaverageois.cpp b/ql/experimental/averageois/makearithmeticaverageois.cpp index c1c9bfb49cf..a5aa63301c7 100644 --- a/ql/experimental/averageois/makearithmeticaverageois.cpp +++ b/ql/experimental/averageois/makearithmeticaverageois.cpp @@ -24,6 +24,8 @@ namespace QuantLib { + QL_DEPRECATED_DISABLE_WARNING + MakeArithmeticAverageOIS::MakeArithmeticAverageOIS( const Period& swapTenor, const ext::shared_ptr& overnightIndex, @@ -234,4 +236,6 @@ namespace QuantLib { return *this; } + QL_DEPRECATED_ENABLE_WARNING + } diff --git a/ql/experimental/averageois/makearithmeticaverageois.hpp b/ql/experimental/averageois/makearithmeticaverageois.hpp index 7fa41258a42..902f22f7ae6 100644 --- a/ql/experimental/averageois/makearithmeticaverageois.hpp +++ b/ql/experimental/averageois/makearithmeticaverageois.hpp @@ -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, Rate fixedRate = Null(), @@ -95,6 +96,8 @@ namespace QuantLib { DayCounter fixedDayCount_; ext::shared_ptr engine_; + + QL_DEPRECATED_ENABLE_WARNING }; }