27#ifndef quantlib_instruments_capfloor_hpp
28#define quantlib_instruments_capfloor_hpp
37 class YieldTermStructure;
93 Real accuracy = 1.0e-4,
98 Real displacement = 0.0)
const;
111 const std::vector<Rate>& exerciseRates)
113 exerciseRates,
std::vector<
Rate>()) {}
121 const std::vector<Rate>& exerciseRates)
123 std::vector<
Rate>(), exerciseRates) {}
152 std::vector<ext::shared_ptr<InterestRateIndex> >
indexes;
158 :
public GenericEngine<CapFloor::arguments, CapFloor::results> {};
Arguments for cap/floor calculation
std::vector< Time > accrualTimes
std::vector< Rate > forwards
std::vector< Date > startDates
std::vector< Real > gearings
std::vector< Rate > floorRates
std::vector< ext::shared_ptr< InterestRateIndex > > indexes
std::vector< Real > nominals
std::vector< Date > endDates
std::vector< Rate > capRates
std::vector< Date > fixingDates
std::vector< Real > spreads
void validate() const override
base class for cap/floor engines
Base class for cap-like instruments.
Volatility impliedVolatility(Real price, const Handle< YieldTermStructure > &disc, Volatility guess, Real accuracy=1.0e-4, Natural maxEvaluations=100, Volatility minVol=1.0e-7, Volatility maxVol=4.0, VolatilityType type=ShiftedLognormal, Real displacement=0.0) const
implied term volatility
ext::shared_ptr< CapFloor > optionlet(Size n) const
Returns the n-th optionlet as a new CapFloor with only one cash flow.
void setupArguments(PricingEngine::arguments *) const override
bool isExpired() const override
returns whether the instrument might have value greater than zero.
const std::vector< Rate > & capRates() const
const Leg & floatingLeg() const
void deepUpdate() override
ext::shared_ptr< FloatingRateCoupon > lastFloatingRateCoupon() const
Rate atmRate(const YieldTermStructure &discountCurve) const
Date maturityDate() const
const std::vector< Rate > & floorRates() const
std::vector< Rate > capRates_
std::vector< Rate > floorRates_
Cap(const Leg &floatingLeg, const std::vector< Rate > &exerciseRates)
Collar(const Leg &floatingLeg, const std::vector< Rate > &capRates, const std::vector< Rate > &floorRates)
Floor(const Leg &floatingLeg, const std::vector< Rate > &exerciseRates)
template base class for option pricing engines
Shared handle to an observable.
Abstract instrument class.
Interest-rate term structure.
unsigned QL_INTEGER Natural
positive integer
Real Volatility
volatility
std::size_t Size
size of a container
Globally accessible relinkable pointer.
Coupon paying a Libor-type index.
Abstract instrument class.
std::ostream & operator<<(std::ostream &out, GFunctionFactory::YieldCurveModel type)
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.