G2 Class Reference

#include <g2.hpp>

Inheritance diagram for G2:

Inheritance graph
[legend]
List of all members.

Detailed Description

Two-additive-factor gaussian model class.

This class implements a two-additive-factor model defined by

\[ dr_t = \varphi(t) + x_t + y_t \]

where $ x_t $ and $ y_t $ are defined by

\[ dx_t = -a x_t dt + \sigma dW^1_t, x_0 = 0 \]

\[ dy_t = -b y_t dt + \sigma dW^2_t, y_0 = 0 \]

and $ dW^1_t dW^2_t = \rho dt $.

Unstable:
This class was not tested enough to guarantee its functionality.


Public Member Functions

 G2 (const RelinkableHandle< TermStructure > &termStructure, double a=0.1, double sigma=0.01, double b=0.1, double eta=0.01, double rho=0.9)
Handle< ShortRateDynamics > dynamics () const
 Returns the short-rate dynamics.

double discountBondOption (Option::Type type, double strike, Time maturity, Time bondMaturity) const
double swaption (const Instruments::SwaptionArguments &arguments) const
DiscountFactor discount (Time t) const
 Implied discount curve.


Protected Member Functions

void generateArguments ()
double A (Time t, Time T) const
double B (double x, Time t) const

Friends

class SwaptionPricingFunction


The documentation for this class was generated from the following files:
  • ql/ShortRateModels/TwoFactorModels/g2.hpp
  • ql/ShortRateModels/TwoFactorModels/g2.cpp

QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen