Class GFunctionFactory
The factory of Hagan's g-functions, one per yield-curve model (GFunctionFactoryYieldCurveModel).
public static class GFunctionFactory
- Inheritance
-
GFunctionFactory
- Inherited Members
Methods
NewGFunctionExactYield(CmsCoupon, EvaluationContext)
The exact-yield model's g-function of a coupon: its swap's fixed leg's accruals.
public static GFunction NewGFunctionExactYield(CmsCoupon coupon, EvaluationContext context)
Parameters
couponCmsCouponThe coupon.
contextEvaluationContextThe evaluation context the coupon's swap is built under.
Returns
- GFunction
The g-function.
Exceptions
- ArgumentNullException
An argument is null.
- NanoQLException
The swap index has no forwarding curve.
NewGFunctionStandard(int, double, double)
The standard model's g-function.
public static GFunction NewGFunctionStandard(int q, double delta, double swapLength)
Parameters
qintThe fixed leg's payments a year.
deltadoubleThe payment's distance from the swap's start, in fixed-leg periods.
swapLengthdoubleThe swap's length in years, where QuantLib's is a whole number of the tenor's units; the model presumes swapLength·q equal periods.
Returns
- GFunction
The g-function.
NewGFunctionWithShifts(CmsCoupon, double, EvaluationContext)
The g-function of the forwarding curve's shifts for a coupon, shaped by a mean reversion; a parallel shift at a reversion of 0.
public static GFunction NewGFunctionWithShifts(CmsCoupon coupon, double meanReversion, EvaluationContext context)
Parameters
couponCmsCouponThe coupon.
meanReversiondoubleThe mean reversion.
contextEvaluationContextThe evaluation context the coupon's swap is built and priced under.
Returns
- GFunction
The g-function.
Exceptions
- ArgumentNullException
An argument is null.
- NanoQLException
The swap index has no forwarding curve, or its swap can't be priced.