25#ifndef quantlib_piecewise_yoy_optionlet_volatility_hpp
26#define quantlib_piecewise_yoy_optionlet_volatility_hpp
46 return s->baseLevel();
77 return std::max(0.0, c->data()[i-1] - 0.02);
85 return c->data()[i-1] + 0.02;
105 template <
class Interpolator,
106 template <
class>
class Bootstrap = IterativeBootstrap,
107 class Traits = YoYInflationVolatilityTraits>
132 std::vector<ext::shared_ptr<typename Traits::helper> > instruments,
133 Real accuracy = 1.0e-12,
134 const Interpolator& interpolator = Interpolator())
157 const std::vector<Time>&
times()
const override;
158 const std::vector<Date>&
dates()
const override;
159 const std::vector<Real>&
data()
const override;
160 std::vector<std::pair<Date, Real> >
nodes()
const override;
181 template <
class I,
template <
class>
class B,
class T>
184 return base_curve::baseDate();
187 template <
class I,
template <
class>
class B,
class T>
190 return base_curve::maxDate();
193 template <
class I,
template <
class>
class B,
class T>
194 const std::vector<Time>&
197 return base_curve::times();
200 template <
class I,
template <
class>
class B,
class T>
201 const std::vector<Date>&
204 return base_curve::dates();
207 template <
class I,
template <
class>
class B,
class T>
208 const std::vector<Real>&
211 return base_curve::data();
214 template <
class I,
template <
class>
class B,
class T>
215 std::vector<std::pair<Date, Real> >
218 return base_curve::nodes();
221 template <
class I,
template <
class>
class B,
class T>
224 bootstrap_.calculate();
227 template <
class I,
template <
class>
class B,
class T>
229 base_curve::update();
Base helper class for bootstrapping.
Interpolated flat smile surface.
Real minStrike() const override
the minimum strike for which the term structure can return vols
Real maxStrike() const override
the maximum strike for which the term structure can return vols
Framework for calculation on demand and result caching.
Piecewise year-on-year inflation volatility term structure.
void performCalculations() const override
std::vector< std::pair< Date, Real > > nodes() const override
const std::vector< Time > & times() const override
const std::vector< Real > & data() const override
Bootstrap< this_curve > bootstrap_
Date baseDate() const override
Interpolator interpolator_type
std::vector< ext::shared_ptr< typename Traits::helper > > instruments_
Date maxDate() const override
the latest date for which the curve can return values
PiecewiseYoYOptionletVolatilityCurve(Natural settlementDays, const Calendar &cal, BusinessDayConvention bdc, const DayCounter &dc, const Period &lag, Frequency frequency, bool indexIsInterpolated, Rate minStrike, Rate maxStrike, Volatility baseYoYVolatility, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, Real accuracy=1.0e-12, const Interpolator &interpolator=Interpolator())
PiecewiseYoYOptionletVolatilityCurve< Interpolator, Bootstrap, Traits > this_curve
InterpolatedYoYOptionletVolatilityCurve< Interpolator > base_curve
friend class Bootstrap< this_curve >
const std::vector< Date > & dates() const override
virtual Natural settlementDays() const
the settlementDays used for reference date calculation
traits for inflation-volatility bootstrap
static Real maxValueAfter(Size i, const C *c, bool, Size)
static Real guess(Size i, const C *c, bool validData, Size)
static Size maxIterations()
static Date initialDate(const YoYOptionletVolatilitySurface *s)
static Real minValueAfter(Size i, const C *c, bool, Size)
static void updateGuess(std::vector< Real > &vols, Real level, Size i)
static Real initialValue(const YoYOptionletVolatilitySurface *s)
BootstrapHelper< YoYOptionletVolatilitySurface > helper
virtual bool indexIsInterpolated() const
virtual Frequency frequency() const
Frequency
Frequency of events.
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
Real Volatility
volatility
std::size_t Size
size of a container
universal piecewise-term-structure boostrapper.
framework for calculation on demand and result caching
experimental yoy inflation volatility structures