31 ext::shared_ptr<GeneralizedBlackScholesProcess> process)
32 : process_(
std::move(process)) {
39 "not a geometric average option");
41 "not an European Option");
45 ext::shared_ptr<PlainVanillaPayoff>
payoff =
46 ext::dynamic_pointer_cast<PlainVanillaPayoff>(
arguments_.payoff);
52 process_->blackVolatility()->blackVariance(exercise,
55 process_->riskFreeRate()->discount(exercise);
61 Spread dividendYield = 0.5 * (
62 process_->riskFreeRate()->zeroRate(exercise, rfdc,
64 process_->dividendYield()->zeroRate(exercise, divdc,
66 volatility*volatility/6.0);
69 process_->dividendYield()->referenceDate(), exercise);
73 QL_REQUIRE(spot > 0.0,
"negative or null underlying");
74 Real forward = spot * dividendDiscount / riskFreeDiscount;
90 process_->blackVolatility()->referenceDate(),
Analytic engine for continuous geometric average price Asian.
Black-formula calculator class.
AnalyticContinuousGeometricAveragePriceAsianEngine(ext::shared_ptr< GeneralizedBlackScholesProcess > process)
void calculate() const override
ext::shared_ptr< GeneralizedBlackScholesProcess > process_
Black 1976 calculator class.
Real dividendRho(Time maturity) const
virtual Real delta(Real spot) const
Real vega(Time maturity) const
virtual Real gamma(Real spot) const
virtual Real theta(Real spot, Time maturity) const
Real rho(Time maturity) const
Average::Type averageType
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.
ContinuousAveragingAsianOption::results results_
ContinuousAveragingAsianOption::arguments arguments_
template class providing a null value for a given type.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Option exercise classes and payoff function.
LinearInterpolation variance
@ NoFrequency
null frequency
Real Time
continuous quantity with 1-year units
Real DiscountFactor
discount factor between dates
Real Volatility
volatility
Real Spread
spreads on interest rates
ext::shared_ptr< QuantLib::Payoff > payoff