33 ext::shared_ptr<GeneralizedBlackScholesProcess> process)
34 : process_(
std::move(process)) {
52 Real d1 = (log(
S / i) + (
b + pow(
v, 2) / 2)*
T) / (
v*sqrt(
T));
57 Real y1 = (log(
S / Xc) + (
b + pow(
v, 2) / 2)*Tc) / (
v*sqrt(Tc));
61 Real y2 = (log(
S / Xp) + (
b + pow(
v, 2) / 2)*Tp) / (
v*sqrt(Tp));
63 Real rho1 = sqrt(
T / Tc);
64 Real rho2 = sqrt(
T / Tp);
85 ext::shared_ptr<PlainVanillaPayoff > vanillaPayoff;
89 vanillaPayoff = ext::make_shared<PlainVanillaPayoff>(
97 vanillaPayoff = ext::make_shared<PlainVanillaPayoff>(
121 Real epsilon = 0.001;
124 while (std::fabs(yi) > epsilon){
170 return process_->dividendYield()->discount(
t);
178 return process_->riskFreeRate()->discount(
t);
bivariate cumulative normal distribution
Time choosingTime() const
DiscountFactor riskFreeDiscount(Time t) const
Real strike(Option::Type optionType) const
void calculate() const override
Volatility volatility(Time t) const
BlackScholesCalculator bsCalculator(Real spot, Option::Type optionType) const
Time callMaturity() const
Rate riskFreeRate(Time t) const
AnalyticComplexChooserEngine(ext::shared_ptr< GeneralizedBlackScholesProcess > process)
ext::shared_ptr< GeneralizedBlackScholesProcess > process_
Rate dividendYield(Time t) const
DiscountFactor dividendDiscount(Time t) const
Real criticalValue() const
Cumulative bivariate normal distribution function.
Black-Scholes 1973 calculator class.
ext::shared_ptr< Exercise > exerciseCall
ext::shared_ptr< Exercise > exercisePut
ComplexChooserOption::results results_
ComplexChooserOption::arguments arguments_
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
Option exercise classes and payoff function.
ext::function< Real(Real)> b
@ NoFrequency
null frequency
Real Time
continuous quantity with 1-year units
Real DiscountFactor
discount factor between dates
Real Volatility
volatility
ext::shared_ptr< YieldTermStructure > r
ext::shared_ptr< BlackVolTermStructure > v
Analytic engine for complex chooser option.