QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
GsrProcessCore Class Reference

#include <ql/processes/gsrprocesscore.hpp>

+ Collaboration diagram for GsrProcessCore:

Public Member Functions

 GsrProcessCore (const Array &times, const Array &vols, const Array &reversions, Real T=60.0)
 
Real expectation_x0dep_part (Time w, Real xw, Time dt) const
 
Real expectation_rn_part (Time w, Time dt) const
 
Real expectation_tf_part (Time w, Time dt) const
 
Real variance (Time w, Time dt) const
 
Real y (Time t) const
 
Real G (Time t, Time w) const
 
Real sigma (Time t) const
 
Real reversion (Time t) const
 
void flushCache () const
 

Protected Attributes

const Arraytimes_
 
const Arrayvols_
 
const Arrayreversions_
 

Private Member Functions

int lowerIndex (Time t) const
 
int upperIndex (Time t) const
 
Real time2 (Size index) const
 
Real cappedTime (Size index, Real cap=Null< Real >()) const
 
Real flooredTime (Size index, Real floor=Null< Real >()) const
 
Real vol (Size index) const
 
Real rev (Size index) const
 
bool revZero (Size index) const
 

Private Attributes

std::map< std::pair< Real, Real >, Realcache1_
 
std::map< std::pair< Real, Real >, Realcache2a_
 
std::map< std::pair< Real, Real >, Realcache2b_
 
std::map< std::pair< Real, Real >, Realcache3_
 
std::map< std::pair< Real, Real >, Realcache5_
 
std::map< Real, Realcache4_
 
Time T_
 
std::vector< boolrevZero_
 

Detailed Description

Definition at line 39 of file gsrprocesscore.hpp.

Constructor & Destructor Documentation

◆ GsrProcessCore()

GsrProcessCore ( const Array times,
const Array vols,
const Array reversions,
Real  T = 60.0 
)

Definition at line 30 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ expectation_x0dep_part()

Real expectation_x0dep_part ( Time  w,
Real  xw,
Time  dt 
) const

Definition at line 68 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expectation_rn_part()

Real expectation_rn_part ( Time  w,
Time  dt 
) const

Definition at line 85 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expectation_tf_part()

Real expectation_tf_part ( Time  w,
Time  dt 
) const

Definition at line 158 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variance()

Real variance ( Time  w,
Time  dt 
) const

Definition at line 236 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ y()

Real y ( Time  t) const

Definition at line 266 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ G()

Real G ( Time  t,
Time  w 
) const

Definition at line 290 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sigma()

Real sigma ( Time  t) const

Definition at line 94 of file gsrprocesscore.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reversion()

Real reversion ( Time  t) const

Definition at line 98 of file gsrprocesscore.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flushCache()

void flushCache ( ) const

Definition at line 52 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lowerIndex()

int lowerIndex ( Time  t) const
private

Definition at line 314 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upperIndex()

int upperIndex ( Time  t) const
private

Definition at line 319 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ time2()

Real time2 ( Size  index) const
private

Definition at line 337 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cappedTime()

Real cappedTime ( Size  index,
Real  cap = Null<Real>() 
) const
private

Definition at line 328 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flooredTime()

Real flooredTime ( Size  index,
Real  floor = Null<Real>() 
) const
private

Definition at line 332 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vol()

Real vol ( Size  index) const
private

Definition at line 347 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rev()

Real rev ( Size  index) const
private

Definition at line 353 of file gsrprocesscore.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ revZero()

bool revZero ( Size  index) const
private

Definition at line 359 of file gsrprocesscore.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ times_

const Array& times_
protected

Definition at line 73 of file gsrprocesscore.hpp.

◆ vols_

const Array & vols_
protected

Definition at line 73 of file gsrprocesscore.hpp.

◆ reversions_

const Array & reversions_
protected

Definition at line 73 of file gsrprocesscore.hpp.

◆ cache1_

std::map<std::pair<Real, Real>, Real> cache1_
mutableprivate

Definition at line 85 of file gsrprocesscore.hpp.

◆ cache2a_

std::map<std::pair<Real, Real>, Real> cache2a_
private

Definition at line 85 of file gsrprocesscore.hpp.

◆ cache2b_

std::map<std::pair<Real, Real>, Real> cache2b_
private

Definition at line 85 of file gsrprocesscore.hpp.

◆ cache3_

std::map<std::pair<Real, Real>, Real> cache3_
private

Definition at line 86 of file gsrprocesscore.hpp.

◆ cache5_

std::map<std::pair<Real, Real>, Real> cache5_
private

Definition at line 86 of file gsrprocesscore.hpp.

◆ cache4_

std::map<Real, Real> cache4_
mutableprivate

Definition at line 87 of file gsrprocesscore.hpp.

◆ T_

Time T_
private

Definition at line 88 of file gsrprocesscore.hpp.

◆ revZero_

std::vector<bool> revZero_
mutableprivate

Definition at line 89 of file gsrprocesscore.hpp.