26#include <ql/math/distributions/normaldistribution.hpp>
27#include <ql/methods/finitedifferences/utilities/bsmrndcalculator.hpp>
28#include <ql/processes/blackscholesprocess.hpp>
35 : process_(
std::move(process)) {}
37 std::pair<Real, Volatility>
40 process_->blackVolatility()->blackVol(t, std::exp(x))*std::sqrt(t);
41 const Real mean = std::log(
process_->x0()) - 0.5*stdDev*stdDev
42 + std::log(
process_->dividendYield()->discount(t)
43 /
process_->riskFreeRate()->discount(t));
45 return std::make_pair(mean, stdDev);
BSMRNDCalculator(ext::shared_ptr< GeneralizedBlackScholesProcess > process)
Real invcdf(Real q, Time t) const override
const ext::shared_ptr< GeneralizedBlackScholesProcess > process_
Real pdf(Real x, Time t) const override
Real cdf(Real x, Time t) const override
std::pair< Real, Volatility > distributionParams(Real x, Time t) const
Cumulative normal distribution function.
Normal distribution function.
Real Time
continuous quantity with 1-year units
Real Volatility
volatility
InverseCumulativeNormal InvCumulativeNormalDistribution