QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
yoyoptionlethelpers.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2009 Chris Kenyon
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
24#ifndef quantlib_yoy_optionlet_helpers_hpp
25#define quantlib_yoy_optionlet_helpers_hpp
26
27#include <ql/experimental/inflation/yoyinflationoptionletvolatilitystructure2.hpp>
28#include <ql/instruments/inflationcapfloor.hpp>
29#include <ql/pricingengines/inflation/inflationcapfloorengines.hpp>
30#include <ql/termstructures/bootstraphelper.hpp>
31
32namespace QuantLib {
33
36 : public BootstrapHelper<YoYOptionletVolatilitySurface> {
37 public:
39 Real notional, // get the price level right
40 // (e.g. bps = 10,000)
41 YoYInflationCapFloor::Type capFloorType,
42 Period& lag,
43 DayCounter yoyDayCounter,
44 Calendar paymentCalendar,
45 Natural fixingDays,
46 ext::shared_ptr<YoYInflationIndex> index,
47 Rate strike,
48 Size n,
49 ext::shared_ptr<YoYInflationCapFloorEngine> pricer);
51 Real impliedQuote() const override;
52
53 protected:
54 Real notional_; // get the price level right (e.g. bps = 10,000)
58 ext::shared_ptr<YoYInflationIndex> index_; // VERY important - has
59 // nominal & yoy curves
61 Size n_; // how many payments
64 ext::shared_ptr<YoYInflationCapFloorEngine> pricer_;
65 // what you make
66 ext::shared_ptr<YoYInflationCapFloor> yoyCapFloor_;
67 };
68
69}
70
71#endif
72
Base helper class for bootstrapping.
calendar class
Definition: calendar.hpp:61
day counter class
Definition: daycounter.hpp:44
Shared handle to an observable.
Definition: handle.hpp:41
Year-on-year inflation-volatility bootstrap helper.
ext::shared_ptr< YoYInflationIndex > index_
void setTermStructure(YoYOptionletVolatilitySurface *) override
ext::shared_ptr< YoYInflationCapFloorEngine > pricer_
ext::shared_ptr< YoYInflationCapFloor > yoyCapFloor_
Real impliedQuote() const override
YoYInflationCapFloor::Type capFloorType_
QL_REAL Real
real number
Definition: types.hpp:50
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
Real Rate
interest rates
Definition: types.hpp:70
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35