42 riskFreeRate_(
std::move(riskFreeTS)), dividendYield_(
std::move(dividendTS)),
43 blackVolatility_(
std::move(blackVolTS)), externalLocalVolTS_(
std::move(localVolTS)),
44 forceDiscretization_(false), hasExternalLocalVol_(true), updated_(false),
45 isStrikeIndependent_(false) {
58 const ext::shared_ptr<discretization>& disc,
59 bool forceDiscretization)
61 dividendYield_(
std::move(dividendTS)), blackVolatility_(
std::move(blackVolTS)),
62 forceDiscretization_(forceDiscretization), hasExternalLocalVol_(false), updated_(false),
63 isStrikeIndependent_(false) {
89 return x0 * std::exp(dx);
188 ext::shared_ptr<BlackConstantVol> constVol =
189 ext::dynamic_pointer_cast<BlackConstantVol>(
191 if (constVol !=
nullptr) {
194 constVol->referenceDate(),
195 constVol->blackVol(0.0,
x0_->value()),
196 constVol->dayCounter()));
202 ext::shared_ptr<BlackVarianceCurve> volCurve =
203 ext::dynamic_pointer_cast<BlackVarianceCurve>(
205 if (volCurve !=
nullptr) {
233 const ext::shared_ptr<discretization>&
d,
234 bool forceDiscretization)
242 d,forceDiscretization) {}
250 const ext::shared_ptr<discretization>&
d,
251 bool forceDiscretization)
253 forceDiscretization) {}
259 const ext::shared_ptr<discretization>&
d,
260 bool forceDiscretization)
262 forceDiscretization) {}
270 const ext::shared_ptr<discretization>&
d,
271 bool forceDiscretization)
273 blackVolTS,
d,forceDiscretization) {}
Actual/365 (Fixed) day counter.
Actual/365 (Fixed) day count convention.
BlackProcess(const Handle< Quote > &x0, const Handle< YieldTermStructure > &riskFreeTS, const Handle< BlackVolTermStructure > &blackVolTS, const ext::shared_ptr< discretization > &d=ext::shared_ptr< discretization >(new EulerDiscretization), bool forceDiscretization=false)
BlackScholesMertonProcess(const Handle< Quote > &x0, const Handle< YieldTermStructure > ÷ndTS, const Handle< YieldTermStructure > &riskFreeTS, const Handle< BlackVolTermStructure > &blackVolTS, const ext::shared_ptr< discretization > &d=ext::shared_ptr< discretization >(new EulerDiscretization), bool forceDiscretization=false)
BlackScholesProcess(const Handle< Quote > &x0, const Handle< YieldTermStructure > &riskFreeTS, const Handle< BlackVolTermStructure > &blackVolTS, const ext::shared_ptr< discretization > &d=ext::shared_ptr< discretization >(new EulerDiscretization), bool forceDiscretization=false)
Euler discretization for stochastic processes.
Flat interest-rate curve.
GarmanKohlagenProcess(const Handle< Quote > &x0, const Handle< YieldTermStructure > &foreignRiskFreeTS, const Handle< YieldTermStructure > &domesticRiskFreeTS, const Handle< BlackVolTermStructure > &blackVolTS, const ext::shared_ptr< discretization > &d=ext::shared_ptr< discretization >(new EulerDiscretization), bool forceDiscretization=false)
Generalized Black-Scholes stochastic process.
Real apply(Real x0, Real dx) const override
bool forceDiscretization_
const Handle< Quote > & stateVariable() const
GeneralizedBlackScholesProcess(Handle< Quote > x0, Handle< YieldTermStructure > dividendTS, Handle< YieldTermStructure > riskFreeTS, Handle< BlackVolTermStructure > blackVolTS, const ext::shared_ptr< discretization > &d=ext::shared_ptr< discretization >(new EulerDiscretization), bool forceDiscretization=false)
const Handle< LocalVolTermStructure > & localVolatility() const
RelinkableHandle< LocalVolTermStructure > localVolatility_
Handle< LocalVolTermStructure > externalLocalVolTS_
Handle< BlackVolTermStructure > blackVolatility_
const Handle< YieldTermStructure > & dividendYield() const
Time time(const Date &) const override
Real diffusion(Time t, Real x) const override
Real stdDeviation(Time t0, Real x0, Time dt) const override
Real evolve(Time t0, Real x0, Time dt, Real dw) const override
bool hasExternalLocalVol_
Real drift(Time t, Real x) const override
bool isStrikeIndependent_
Handle< YieldTermStructure > dividendYield_
Real expectation(Time t0, Real x0, Time dt) const override
const Handle< BlackVolTermStructure > & blackVolatility() const
Real x0() const override
returns the initial value of the state variable
Real variance(Time t0, Real x0, Time dt) const override
const Handle< YieldTermStructure > & riskFreeRate() const
Handle< YieldTermStructure > riskFreeRate_
Shared handle to an observable.
Calendar for reproducing theoretical calculations.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
1-dimensional stochastic process
ext::shared_ptr< discretization > discretization_
Interest-rate term structure.
#define QL_FAIL(message)
throw an error (possibly with file and line information)
LinearInterpolation variance
flat forward rate term structure
@ NoFrequency
null frequency
Real Time
continuous quantity with 1-year units
Local constant volatility, no time dependence, no asset dependence.
Local volatility curve derived from a Black curve.
Local volatility surface derived from a Black vol surface.
Calendar for reproducing theoretical calculations.