QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
BlackProcess Class Reference

Black (1976) stochastic process. More...

#include <blackscholesprocess.hpp>

+ Inheritance diagram for BlackProcess:
+ Collaboration diagram for BlackProcess:

Public Member Functions

 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)
 
- Public Member Functions inherited from GeneralizedBlackScholesProcess
 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)
 
 GeneralizedBlackScholesProcess (Handle< Quote > x0, Handle< YieldTermStructure > dividendTS, Handle< YieldTermStructure > riskFreeTS, Handle< BlackVolTermStructure > blackVolTS, Handle< LocalVolTermStructure > localVolTS)
 
Real x0 () const override
 returns the initial value of the state variable More...
 
Real drift (Time t, Real x) const override
 
Real diffusion (Time t, Real x) const override
 
Real apply (Real x0, Real dx) const override
 
Real expectation (Time t0, Real x0, Time dt) const override
 
Real stdDeviation (Time t0, Real x0, Time dt) const override
 
Real variance (Time t0, Real x0, Time dt) const override
 
Real evolve (Time t0, Real x0, Time dt, Real dw) const override
 
Time time (const Date &) const override
 
void update () override
 
const Handle< Quote > & stateVariable () const
 
const Handle< YieldTermStructure > & dividendYield () const
 
const Handle< YieldTermStructure > & riskFreeRate () const
 
const Handle< BlackVolTermStructure > & blackVolatility () const
 
const Handle< LocalVolTermStructure > & localVolatility () const
 
- Public Member Functions inherited from StochasticProcess1D
- Public Member Functions inherited from StochasticProcess
 ~StochasticProcess () override=default
 
virtual Size factors () const
 returns the number of independent factors of the process More...
 
void update () override
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Member Functions inherited from StochasticProcess1D
 StochasticProcess1D ()=default
 
 StochasticProcess1D (ext::shared_ptr< discretization >)
 
- Protected Member Functions inherited from StochasticProcess
 StochasticProcess ()=default
 
 StochasticProcess (ext::shared_ptr< discretization >)
 
- Protected Attributes inherited from StochasticProcess1D
ext::shared_ptr< discretizationdiscretization_
 
- Protected Attributes inherited from StochasticProcess
ext::shared_ptr< discretizationdiscretization_
 

Detailed Description

Black (1976) stochastic process.

This class describes the stochastic process \( S \) for a forward or futures contract given by

\[ d\ln S(t) = -\frac{\sigma(t, S)^2}{2} dt + \sigma dW_t. \]

Warning:
while the interface is expressed in terms of \( S \), the internal calculations work on \( ln S \).

Definition at line 168 of file blackscholesprocess.hpp.

Constructor & Destructor Documentation

◆ BlackProcess()

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 
)

Definition at line 256 of file blackscholesprocess.cpp.