31 const Date& referenceDate,
32 const std::vector<Date>& dates,
33 const std::vector<ext::shared_ptr<std::vector<Real> > >& strikes,
40 referenceDate_(referenceDate),
43 dayCounter_(dayCounter),
44 lowerExtrapolation_(lowerExtrapolation),
45 upperExtrapolation_(upperExtrapolation) {
49 "strike vectors must have the same dimension");
55 for (
Size i=0; i < dates.size(); ++i) {
86 const ext::shared_ptr<Matrix> localVolMatrix(
90 localVolMatrix->begin(),
91 [](
const Parameter& p) { return p(0.0); });
93 localVol_ = ext::make_shared<FixedLocalVolSurface>(
std::vector< Parameter > arguments_
Standard constant parameter .
Time yearFraction(const Date &, const Date &, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date()) const
Returns the period between two dates as a fraction of year.
Extrapolation upperExtrapolation_
ext::shared_ptr< LocalVolTermStructure > localVol_
Real minStrike() const override
the minimum strike for which the term structure can return vols
std::vector< Time > times_
Volatility localVolImpl(Time t, Real strike) const override
local vol calculation
void generateArguments() override
const std::vector< ext::shared_ptr< std::vector< Real > > > strikes_
const DayCounter dayCounter_
GridModelLocalVolSurface(const Date &referenceDate, const std::vector< Date > &dates, const std::vector< ext::shared_ptr< std::vector< Real > > > &strikes, const DayCounter &dayCounter, Extrapolation lowerExtrapolation=FixedLocalVolSurface::ConstantExtrapolation, Extrapolation upperExtrapolation=FixedLocalVolSurface::ConstantExtrapolation)
Date maxDate() const override
the latest date for which the curve can return values
Real maxStrike() const override
the maximum strike for which the term structure can return vols
Time maxTime() const override
the latest time for which the curve can return values
Extrapolation lowerExtrapolation_
const Date referenceDate_
Matrix used in linear algebra.
Calendar for reproducing theoretical calculations.
Base class for model arguments.
Constraint imposing positivity to all arguments
virtual DayCounter dayCounter() const
the day counter used for date/time conversion
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Local volatility surface based on fixed values plus interpolation.
Maps function, bind and cref to either the boost or std implementation.
Parameterized volatility surface useful for model calibration.
Real Time
continuous quantity with 1-year units
Real Volatility
volatility
std::size_t Size
size of a container
Calendar for reproducing theoretical calculations.