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

#include <catrisk.hpp>

+ Inheritance diagram for BetaRiskSimulation:
+ Collaboration diagram for BetaRiskSimulation:

Public Member Functions

 BetaRiskSimulation (Date start, Date end, Real maxLoss, Real lambda, Real alpha, Real beta)
 
bool nextPath (std::vector< std::pair< Date, Real > > &path) override
 
Real generateBeta ()
 
- Public Member Functions inherited from CatSimulation
 CatSimulation (Date start, Date end)
 
virtual ~CatSimulation ()=default
 
virtual bool nextPath (std::vector< std::pair< Date, Real > > &path)=0
 

Private Attributes

Real maxLoss_
 
Integer dayCount_
 
Real yearFraction_
 
std::mt19937 rng_
 
std::exponential_distribution< Realexponential_
 
std::gamma_distribution< RealgammaAlpha_
 
std::gamma_distribution< RealgammaBeta_
 

Additional Inherited Members

- Protected Attributes inherited from CatSimulation
Date start_
 
Date end_
 

Detailed Description

Definition at line 90 of file catrisk.hpp.

Constructor & Destructor Documentation

◆ BetaRiskSimulation()

BetaRiskSimulation ( Date  start,
Date  end,
Real  maxLoss,
Real  lambda,
Real  alpha,
Real  beta 
)

Definition at line 80 of file catrisk.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ nextPath()

bool nextPath ( std::vector< std::pair< Date, Real > > &  path)
overridevirtual

Implements CatSimulation.

Definition at line 99 of file catrisk.cpp.

+ Here is the call graph for this function:

◆ generateBeta()

Real generateBeta ( )

Definition at line 92 of file catrisk.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ maxLoss_

Real maxLoss_
private

Definition at line 103 of file catrisk.hpp.

◆ dayCount_

Integer dayCount_
private

Definition at line 105 of file catrisk.hpp.

◆ yearFraction_

Real yearFraction_
private

Definition at line 106 of file catrisk.hpp.

◆ rng_

std::mt19937 rng_
private

Definition at line 108 of file catrisk.hpp.

◆ exponential_

std::exponential_distribution<Real> exponential_
private

Definition at line 109 of file catrisk.hpp.

◆ gammaAlpha_

std::gamma_distribution<Real> gammaAlpha_
private

Definition at line 110 of file catrisk.hpp.

◆ gammaBeta_

std::gamma_distribution<Real> gammaBeta_
private

Definition at line 111 of file catrisk.hpp.