24#ifndef quantext_optionletstripper1_hpp
25#define quantext_optionletstripper1_hpp
27#include <ql/instruments/capfloor.hpp>
28#include <ql/quotes/simplequote.hpp>
31#include <boost/optional.hpp>
37typedef std::vector<std::vector<QuantLib::ext::shared_ptr<QuantLib::CapFloor> > >
CapFloorMatrix;
48 const QuantLib::ext::shared_ptr<IborIndex>&
index, Rate switchStrikes = Null<Rate>(),
49 Real accuracy = 1.0e-6, Natural maxIter = 100,
50 const Handle<YieldTermStructure>& discount = Handle<YieldTermStructure>(),
51 const VolatilityType type = ShiftedLognormal,
const Real
displacement = 0.0,
52 const optional<VolatilityType> targetVolatilityType = boost::none,
53 const optional<Real> targetDisplacement = boost::none);
67 bool stripOptionlets(std::vector<Real>&, CapFloor::Type, Size,
const Handle<YieldTermStructure>&, Real)
const;
74 mutable std::vector<std::vector<QuantLib::ext::shared_ptr<SimpleQuote> > >
volQuotes_;
75 mutable std::vector<std::vector<QuantLib::ext::shared_ptr<PricingEngine> > >
capFloorEngines_;
CapFloorMatrix capFloors_
const Matrix & capletVols() const
void performCalculations() const override
bool floatingSwitchStrike_
const Real inputDisplacement_
Rate switchStrike() const
std::vector< std::vector< QuantLib::ext::shared_ptr< SimpleQuote > > > volQuotes_
std::vector< std::vector< QuantLib::ext::shared_ptr< PricingEngine > > > capFloorEngines_
const Matrix & optionletPrices() const
bool capFlooMatrixNotInitialized_
bool stripOptionlets(std::vector< Real > &, CapFloor::Type, Size, const Handle< YieldTermStructure > &, Real) const
const Matrix & capFloorPrices() const
const Handle< YieldTermStructure > & discountCurve() const
const VolatilityType inputVolatilityType_
const Matrix & capFloorVolatilities() const
Handle< YieldTermStructure > discount_
Real displacement() const override
ext::shared_ptr< IborIndex > index() const
std::vector< std::vector< QuantLib::ext::shared_ptr< QuantLib::CapFloor > > > CapFloorMatrix
optionlet (caplet/floorlet) volatility stripper