Skip to content

Commit

Permalink
Remove features deprecated in version 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Jul 20, 2020
1 parent 9e6042b commit 0f5b47c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 101 deletions.
30 changes: 0 additions & 30 deletions ql/methods/finitedifferences/operators/fdmornsteinuhlenbeckop.cpp
Expand Up @@ -59,36 +59,6 @@ namespace QuantLib {
*Array(mesher->layout()->size(), 1.0)), Array());
}

FdmOrnsteinUhlenbeckOp::FdmOrnsteinUhlenbeckOp(
const ext::shared_ptr<FdmMesher>& mesher,
const ext::shared_ptr<OrnsteinUhlenbeckProcess>& process,
const ext::shared_ptr<YieldTermStructure>& rTS,
const FdmBoundaryConditionSet&,
Size direction)
: mesher_ (mesher),
process_ (process),
rTS_ (rTS),
direction_(direction),
m_ (direction, mesher),
mapX_ (direction, mesher) {

const ext::shared_ptr<FdmLinearOpLayout> layout=mesher_->layout();

Array drift(layout->size());
const Array x(mesher_->locations(direction));

for (FdmLinearOpIterator iter=layout->begin(), endIter=layout->end();
iter!=endIter; ++iter) {
const Size i = iter.index();
drift[i] = process_->drift(0.0, x[i]);
}

m_.axpyb(drift, FirstDerivativeOp(direction, mesher),
SecondDerivativeOp(direction, mesher)
.mult(0.5*square<Real>()(process_->volatility())
*Array(mesher->layout()->size(), 1.0)), Array());
}

Size FdmOrnsteinUhlenbeckOp::size() const {
return mesher_->layout()->dim().size();;
}
Expand Down
11 changes: 0 additions & 11 deletions ql/methods/finitedifferences/operators/fdmornsteinuhlenbeckop.hpp
Expand Up @@ -44,17 +44,6 @@ namespace QuantLib {
const ext::shared_ptr<YieldTermStructure>& rTS,
Size direction = 0);

/*! \deprecated use the other constructor.
Deprecated in version 1.16.
*/
QL_DEPRECATED
FdmOrnsteinUhlenbeckOp(
const ext::shared_ptr<FdmMesher>& mesher,
const ext::shared_ptr<OrnsteinUhlenbeckProcess>& p,
const ext::shared_ptr<YieldTermStructure>& rTS,
const FdmBoundaryConditionSet& bcSet,
Size direction = 0);

Size size() const;
void setTime(Time t1, Time t2);

Expand Down
47 changes: 0 additions & 47 deletions ql/termstructures/volatility/swaption/swaptionvolmatrix.cpp
Expand Up @@ -254,53 +254,6 @@ namespace QuantLib {
}


SwaptionVolatilityMatrix::SwaptionVolatilityMatrix(
const Date& today,
const std::vector<Date>& optionDates,
const std::vector<Period>& swapT,
const Matrix& vols,
const DayCounter& dc,
const bool flatExtrapolation,
const VolatilityType type,
const Matrix& shifts)
: SwaptionVolatilityDiscrete(optionDates, swapT, today, Calendar(), Following, dc),
volHandles_(vols.rows()), shiftValues_(vols.rows()),
volatilities_(vols.rows(), vols.columns()),
shifts_(shifts.rows(),shifts.columns(),0.0), volatilityType_(type) {

checkInputs(vols.rows(), vols.columns(), shifts.rows(), shifts.columns());

// fill dummy handles to allow generic handle-based
// computations later on
for (Size i=0; i<vols.rows(); ++i) {
volHandles_[i].resize(vols.columns());
shiftValues_[i].resize(vols.columns());
for (Size j=0; j<vols.columns(); ++j) {
volHandles_[i][j] = Handle<Quote>(ext::shared_ptr<Quote>(new
SimpleQuote(vols[i][j])));
shiftValues_[i][j] = shifts.rows() > 0 ? shifts[i][j] : 0.0;
}
}
if (flatExtrapolation) {
interpolation_ =
FlatExtrapolator2D(ext::make_shared<BilinearInterpolation>(
swapLengths_.begin(), swapLengths_.end(),
optionTimes_.begin(), optionTimes_.end(), volatilities_));
interpolationShifts_ =
FlatExtrapolator2D(ext::make_shared<BilinearInterpolation>(
swapLengths_.begin(), swapLengths_.end(),
optionTimes_.begin(), optionTimes_.end(), shifts_));
} else {
interpolation_ = BilinearInterpolation(
swapLengths_.begin(), swapLengths_.end(), optionTimes_.begin(),
optionTimes_.end(), volatilities_);
interpolationShifts_ = BilinearInterpolation(
swapLengths_.begin(), swapLengths_.end(), optionTimes_.begin(),
optionTimes_.end(), shifts_);
}
}


void SwaptionVolatilityMatrix::checkInputs(Size volRows,
Size volsColumns,
Size shiftRows,
Expand Down
13 changes: 0 additions & 13 deletions ql/termstructures/volatility/swaption/swaptionvolmatrix.hpp
Expand Up @@ -107,19 +107,6 @@ namespace QuantLib {
bool flatExtrapolation = false,
VolatilityType type = ShiftedLognormal,
const Matrix& shifts = Matrix());
/*! \deprecated Use the constructor also taking a calendar and
business-day convention instead.
Deprecated in version 1.16.
*/
QL_DEPRECATED
SwaptionVolatilityMatrix(const Date& referenceDate,
const std::vector<Date>& optionDates,
const std::vector<Period>& swapTenors,
const Matrix& volatilities,
const DayCounter& dayCounter,
bool flatExtrapolation = false,
VolatilityType type = ShiftedLognormal,
const Matrix& shifts = Matrix());

//! \name LazyObject interface
//@{
Expand Down

0 comments on commit 0f5b47c

Please sign in to comment.