35 const std::vector<Period>& optionTenors,
39 nOptionTenors_(optionTenors.size()),
40 optionTenors_(optionTenors),
41 optionDates_(nOptionTenors_),
42 optionTimes_(nOptionTenors_),
54 const Date& settlementDate,
57 const std::vector<Period>& optionTenors,
61 nOptionTenors_(optionTenors.size()),
62 optionTenors_(optionTenors),
63 optionDates_(nOptionTenors_),
64 optionTimes_(nOptionTenors_),
76 const Date& settlementDate,
79 const std::vector<Period>& optionTenors,
80 const std::vector<Volatility>& vols,
83 nOptionTenors_(optionTenors.size()),
84 optionTenors_(optionTenors),
85 optionDates_(nOptionTenors_),
86 optionTimes_(nOptionTenors_),
87 volHandles_(vols.size()),
104 const std::vector<Period>& optionTenors,
105 const std::vector<Volatility>& vols,
108 nOptionTenors_(optionTenors.size()),
109 optionTenors_(optionTenors),
110 optionDates_(nOptionTenors_),
111 optionTimes_(nOptionTenors_),
112 volHandles_(vols.size()),
128 "mismatch between number of option tenors (" <<
130 vols_.size() <<
")");
135 "non increasing option tenor: " <<
io::ordinal(i) <<
Cap/floor at-the-money term-volatility curve.
std::vector< Date > optionDates_
void registerWithMarketData()
void performCalculations() const override
Interpolation interpolation_
CapFloorTermVolCurve(Natural settlementDays, const Calendar &calendar, BusinessDayConvention bdc, const std::vector< Period > &optionTenors, const std::vector< Handle< Quote > > &vols, const DayCounter &dc=Actual365Fixed())
floating reference date, floating market data
std::vector< Time > optionTimes_
std::vector< Period > optionTenors_
std::vector< Volatility > vols_
void initializeOptionDatesAndTimes() const
std::vector< Handle< Quote > > volHandles_
Cap/floor term-volatility structure.
Cubic interpolation between discrete points.
@ SecondDerivative
Match value of second derivative at end.
Shared handle to an observable.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
DateProxy & evaluationDate()
the date at which pricing is to be performed.
market element returning a stored value
static Settings & instance()
access to the unique instance
Time timeFromReference(const Date &date) const
date/time conversion
Date optionDateFromTenor(const Period &) const
period/date conversion
cubic interpolation between discrete points
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
BusinessDayConvention
Business Day conventions.
detail::ordinal_holder ordinal(Size)
outputs naturals as 1st, 2nd, 3rd...
unsigned QL_INTEGER Natural
positive integer
std::size_t Size
size of a container