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
VegaStressedBlackScholesProcess Class Reference

Black-Scholes process which supports local vega stress tests. More...

#include <vegastressedblackscholesprocess.hpp>

+ Inheritance diagram for VegaStressedBlackScholesProcess:
+ Collaboration diagram for VegaStressedBlackScholesProcess:

Public Member Functions

 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))
 
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 &)
 
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 ()
 

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< discretizationdiscretization_
 
- Protected Attributes inherited from StochasticProcess
ext::shared_ptr< discretizationdiscretization_
 

Detailed Description

Black-Scholes process which supports local vega stress tests.

Definition at line 32 of file vegastressedblackscholesprocess.hpp.

Constructor & Destructor Documentation

◆ VegaStressedBlackScholesProcess()

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.

Member Function Documentation

◆ diffusion()

Real diffusion ( Time  t,
Real  x 
) const
overridevirtual

returns the diffusion part of the equation, i.e. \( \sigma(t, x_t) \)

Implements StochasticProcess1D.

Definition at line 101 of file vegastressedblackscholesprocess.cpp.

+ Here is the call graph for this function:

◆ getLowerTimeBorderForStressTest()

Real getLowerTimeBorderForStressTest ( ) const

Definition at line 44 of file vegastressedblackscholesprocess.cpp.

◆ setLowerTimeBorderForStressTest()

void setLowerTimeBorderForStressTest ( Time  LTB)

Definition at line 70 of file vegastressedblackscholesprocess.cpp.

+ Here is the call graph for this function:

◆ getUpperTimeBorderForStressTest()

Real getUpperTimeBorderForStressTest ( ) const

Definition at line 49 of file vegastressedblackscholesprocess.cpp.

◆ setUpperTimeBorderForStressTest()

void setUpperTimeBorderForStressTest ( Time  UTB)

Definition at line 76 of file vegastressedblackscholesprocess.cpp.

+ Here is the call graph for this function:

◆ getLowerAssetBorderForStressTest()

Real getLowerAssetBorderForStressTest ( ) const

Definition at line 54 of file vegastressedblackscholesprocess.cpp.

◆ setLowerAssetBorderForStressTest()

void setLowerAssetBorderForStressTest ( Real  LAB)

Definition at line 82 of file vegastressedblackscholesprocess.cpp.

+ Here is the call graph for this function:

◆ getUpperAssetBorderForStressTest()

Real getUpperAssetBorderForStressTest ( ) const

Definition at line 59 of file vegastressedblackscholesprocess.cpp.

◆ setUpperAssetBorderForStressTest()

void setUpperAssetBorderForStressTest ( Real  UBA)

Definition at line 88 of file vegastressedblackscholesprocess.cpp.

+ Here is the call graph for this function:

◆ getStressLevel()

Real getStressLevel ( ) const

Definition at line 64 of file vegastressedblackscholesprocess.cpp.

◆ setStressLevel()

void setStressLevel ( Real  SL)

Definition at line 94 of file vegastressedblackscholesprocess.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ lowerTimeBorderForStressTest_

Real lowerTimeBorderForStressTest_
private

Definition at line 75 of file vegastressedblackscholesprocess.hpp.

◆ upperTimeBorderForStressTest_

Real upperTimeBorderForStressTest_
private

Definition at line 76 of file vegastressedblackscholesprocess.hpp.

◆ lowerAssetBorderForStressTest_

Real lowerAssetBorderForStressTest_
private

Definition at line 77 of file vegastressedblackscholesprocess.hpp.

◆ upperAssetBorderForStressTest_

Real upperAssetBorderForStressTest_
private

Definition at line 78 of file vegastressedblackscholesprocess.hpp.

◆ stressLevel_

Real stressLevel_
private

Definition at line 79 of file vegastressedblackscholesprocess.hpp.