QuantLib: G2 Class Reference

### A free/open-source library for quantitative finance

# G2 Class Reference
[Short-rate modelling framework]

`#include <ql/models/shortrate/twofactormodels/g2.hpp>`

Inheritance diagram for G2:

[legend]

List of all members.

## Detailed Description

Two-additive-factor gaussian model class.

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

where and are defined by

and .

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

Examples:

  BermudanSwaption.cpp.

## Public Member Functions
| G2 (const Handle< YieldTermStructure > &termStructure, Real a=0.1, Real sigma=0.01, Real b=0.1, Real eta=0.01, Real rho=-0.75)
boost::shared_ptr < ShortRateDynamics > | dynamics () const
| Returns the short-rate dynamics.
virtual Real | discountBond (Time now, Time maturity, Array factors) const
Real | discountBond (Time, Time, Rate, Rate) const
Real | discountBondOption (Option::Type type, Real strike, Time maturity, Time bondMaturity) const
Real | swaption (const Swaption::arguments &arguments, Rate fixedRate, Real range, Size intervals) const
DiscountFactor | discount (Time t) const
| Implied discount curve.
## Protected Member Functions
void | generateArguments ()
Real | A (Time t, Time T) const
Real | B (Real x, Time t) const
## Friends
class | SwaptionPricingFunction
## Classes
class | FittingParameter
| Analytical term-structure fitting parameter . More...