QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Black-Scholes process which supports local vega stress tests. More...
#include <vegastressedblackscholesprocess.hpp>
Public Member Functions | |
VegaStressedBlackScholesProcess (const Handle< Quote > &x0, const Handle< YieldTermStructure > ÷ndTS, const Handle< YieldTermStructure > &riskFreeTS, const Handle< BlackVolTermStructure > &blackVolTS, Time lowerTimeBorderForStressTest=0, Time upperTimeBorderForStressTest=1000000, Real lowerAssetBorderForStressTest=0, Real upperAssetBorderForStressTest=1000000, Real stressLevel=0, const ext::shared_ptr< discretization > &d=ext::shared_ptr< discretization >(new EulerDiscretization)) | |
StochasticProcess1D interface | |
Real | diffusion (Time t, Real x) const override |
returns the diffusion part of the equation, i.e. \( \sigma(t, x_t) \) More... | |
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 &) | |
Observer & | operator= (const Observer &) |
virtual | ~Observer () |
std::pair< iterator, bool > | registerWith (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 &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
interface for vega stress test | |
Real | lowerTimeBorderForStressTest_ |
Real | upperTimeBorderForStressTest_ |
Real | lowerAssetBorderForStressTest_ |
Real | upperAssetBorderForStressTest_ |
Real | stressLevel_ |
Real | getLowerTimeBorderForStressTest () const |
void | setLowerTimeBorderForStressTest (Time LTB) |
Real | getUpperTimeBorderForStressTest () const |
void | setUpperTimeBorderForStressTest (Time UTB) |
Real | getLowerAssetBorderForStressTest () const |
void | setLowerAssetBorderForStressTest (Real LAB) |
Real | getUpperAssetBorderForStressTest () const |
void | setUpperAssetBorderForStressTest (Real UBA) |
Real | getStressLevel () const |
void | setStressLevel (Real SL) |
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< discretization > | discretization_ |
Protected Attributes inherited from StochasticProcess | |
ext::shared_ptr< discretization > | discretization_ |
Black-Scholes process which supports local vega stress tests.
Definition at line 32 of file vegastressedblackscholesprocess.hpp.
VegaStressedBlackScholesProcess | ( | const Handle< Quote > & | x0, |
const Handle< YieldTermStructure > & | dividendTS, | ||
const Handle< YieldTermStructure > & | riskFreeTS, | ||
const Handle< BlackVolTermStructure > & | blackVolTS, | ||
Time | lowerTimeBorderForStressTest = 0 , |
||
Time | upperTimeBorderForStressTest = 1000000 , |
||
Real | lowerAssetBorderForStressTest = 0 , |
||
Real | upperAssetBorderForStressTest = 1000000 , |
||
Real | stressLevel = 0 , |
||
const ext::shared_ptr< discretization > & | d = ext::shared_ptr<discretization>(new EulerDiscretization) |
||
) |
Definition at line 24 of file vegastressedblackscholesprocess.cpp.
returns the diffusion part of the equation, i.e. \( \sigma(t, x_t) \)
Implements StochasticProcess1D.
Definition at line 101 of file vegastressedblackscholesprocess.cpp.
Real getLowerTimeBorderForStressTest | ( | ) | const |
Definition at line 44 of file vegastressedblackscholesprocess.cpp.
void setLowerTimeBorderForStressTest | ( | Time | LTB | ) |
Definition at line 70 of file vegastressedblackscholesprocess.cpp.
Real getUpperTimeBorderForStressTest | ( | ) | const |
Definition at line 49 of file vegastressedblackscholesprocess.cpp.
void setUpperTimeBorderForStressTest | ( | Time | UTB | ) |
Definition at line 76 of file vegastressedblackscholesprocess.cpp.
Real getLowerAssetBorderForStressTest | ( | ) | const |
Definition at line 54 of file vegastressedblackscholesprocess.cpp.
void setLowerAssetBorderForStressTest | ( | Real | LAB | ) |
Definition at line 82 of file vegastressedblackscholesprocess.cpp.
Real getUpperAssetBorderForStressTest | ( | ) | const |
Definition at line 59 of file vegastressedblackscholesprocess.cpp.
void setUpperAssetBorderForStressTest | ( | Real | UBA | ) |
Definition at line 88 of file vegastressedblackscholesprocess.cpp.
Real getStressLevel | ( | ) | const |
Definition at line 64 of file vegastressedblackscholesprocess.cpp.
void setStressLevel | ( | Real | SL | ) |
Definition at line 94 of file vegastressedblackscholesprocess.cpp.
|
private |
Definition at line 75 of file vegastressedblackscholesprocess.hpp.
|
private |
Definition at line 76 of file vegastressedblackscholesprocess.hpp.
|
private |
Definition at line 77 of file vegastressedblackscholesprocess.hpp.
|
private |
Definition at line 78 of file vegastressedblackscholesprocess.hpp.
|
private |
Definition at line 79 of file vegastressedblackscholesprocess.hpp.