Table of Contents

Class GFunctionFactory

Namespace
NanoQL.Coupons
Assembly
NanoQL.dll

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

coupon CmsCoupon

The coupon.

context EvaluationContext

The 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

q int

The fixed leg's payments a year.

delta double

The payment's distance from the swap's start, in fixed-leg periods.

swapLength double

The 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

coupon CmsCoupon

The coupon.

meanReversion double

The mean reversion.

context EvaluationContext

The 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.