31 const std::vector<Period>& optionTenors,
33 std::vector<bool> inclusionInInterpolationFlag,
36 :
BlackAtmVolCurve(settlDays, cal, bdc, dc), nOptionTenors_(optionTenors.size()),
37 optionTenors_(optionTenors), optionDates_(nOptionTenors_), optionTimes_(nOptionTenors_),
38 actualOptionTimes_(nOptionTenors_), volHandles_(volsHandles), vols_(volsHandles.size()),
39 actualVols_(volsHandles.size()),
40 inclusionInInterpolation_(
std::move(inclusionInInterpolationFlag)) {
54 "mismatch between number of option tenors (" <<
61 "non increasing option tenor: " <<
io::ordinal(i) <<
70 "mismatch between number of option tenors (" <<
93 QL_FAIL(
"not a AbcdAtmVolCurve visitor");
Abcd-interpolated at-the-money (no-smile) interest rate vol curve.
std::vector< Date > optionDates_
void registerWithMarketData()
void performCalculations() const override
std::vector< Volatility > actualVols_
void initializeVolatilities()
void accept(AcyclicVisitor &) override
std::vector< Time > optionTimes_
AbcdAtmVolCurve(Natural settlementDays, const Calendar &cal, const std::vector< Period > &optionTenors, const std::vector< Handle< Quote > > &volsHandles, std::vector< bool > inclusionInInterpolationFlag=std::vector< bool >(1, true), BusinessDayConvention bdc=Following, const DayCounter &dc=Actual365Fixed())
floating reference date, floating market data
std::vector< bool > inclusionInInterpolation_
std::vector< Period > optionTenors_
std::vector< Period > actualOptionTenors_
std::vector< Volatility > vols_
void initializeOptionDatesAndTimes() const
std::vector< Handle< Quote > > volHandles_
std::vector< Time > actualOptionTimes_
ext::shared_ptr< AbcdInterpolation > interpolation_
degenerate base class for the Acyclic Visitor pattern
Black at-the-money (no-smile) volatility curve.
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.
static Settings & instance()
access to the unique instance
Time timeFromReference(const Date &date) const
date/time conversion
Visitor for a specific class
virtual void visit(T &)=0
Date optionDateFromTenor(const Period &) const
period/date conversion
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
#define QL_FAIL(message)
throw an error (possibly with file and line information)
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
ext::shared_ptr< BlackVolTermStructure > v
purely virtual base class for market observables