Table of Contents

Class ArithmeticAveragedOvernightIndexedCouponPricer

Namespace
NanoQL.Coupons
Assembly
NanoQL.dll

The pricer for arithmetically averaged overnight-indexed coupons.

public class ArithmeticAveragedOvernightIndexedCouponPricer : OvernightIndexedCouponPricer
Inheritance
ArithmeticAveragedOvernightIndexedCouponPricer
Derived
Inherited Members
Extension Methods

Remarks

Reference: Katsumi Takada 2011, Valuation of Arithmetically Average of Fed Funds Rates and Construction of the US Dollar Swap Yield Curve. The forward part is forecast fixing by fixing, each with a Hull-White convexity adjustment for its payment delay, or, with the approximation, through one discount ratio less two convexity adjustments.

Unsealed, as in QuantLib, where the Black averaging pricer derives from it. A mean reversion of zero gives NaN wherever a fixing is forecast, as QuantLib's formulas do, the volatility being divided by its cube.

Constructors

ArithmeticAveragedOvernightIndexedCouponPricer(bool)

Initializes a new instance of the ArithmeticAveragedOvernightIndexedCouponPricer class with no convexity adjustment.

public ArithmeticAveragedOvernightIndexedCouponPricer(bool byApprox)

Parameters

byApprox bool

Whether to use Katsumi Takada's approximation.

ArithmeticAveragedOvernightIndexedCouponPricer(double, double, bool, OptionletVolatilityStructure?, bool)

Initializes a new instance of the ArithmeticAveragedOvernightIndexedCouponPricer class.

public ArithmeticAveragedOvernightIndexedCouponPricer(double meanReversion = 0.03, double volatility = 0, bool byApprox = false, OptionletVolatilityStructure? v = null, bool effectiveVolatilityInput = false)

Parameters

meanReversion double

The Hull-White mean reversion of the convexity adjustment.

volatility double

The Hull-White volatility of the convexity adjustment; none by default.

byApprox bool

Whether to use Katsumi Takada's approximation.

v OptionletVolatilityStructure

The optionlet volatility for caplets and floorlets, or null for none.

effectiveVolatilityInput bool

Whether the volatility is the effective volatility of the period's rate.

Methods

AverageRate(FloatingRateCoupon, Date, EvaluationContext)

The coupon's rate accrued up to a date, which its accrued amount uses.

public override double AverageRate(FloatingRateCoupon coupon, Date date, EvaluationContext context)

Parameters

coupon FloatingRateCoupon

The coupon.

date Date

The date.

context EvaluationContext

The evaluation context.

Returns

double

The rate.

Exceptions

NanoQLException

A past fixing is missing, or a fixing is forecast and the index has no curve.

CapletPrice(FloatingRateCoupon, double, EvaluationContext)

Not available: QuantLib's pricer throws.

public override double CapletPrice(FloatingRateCoupon coupon, double effectiveCap, EvaluationContext context)

Parameters

coupon FloatingRateCoupon

The coupon.

effectiveCap double

The effective cap.

context EvaluationContext

The evaluation context.

Returns

double

Never returns.

Exceptions

NanoQLException

Always.

CapletRate(FloatingRateCoupon, double, EvaluationContext)

Not available: QuantLib's pricer throws.

public override double CapletRate(FloatingRateCoupon coupon, double effectiveCap, EvaluationContext context)

Parameters

coupon FloatingRateCoupon

The coupon.

effectiveCap double

The effective cap.

context EvaluationContext

The evaluation context.

Returns

double

Never returns.

Exceptions

NanoQLException

Always.

CapletRate(FloatingRateCoupon, double, bool, EvaluationContext)

Not implemented: QuantLib's pricer throws; the Black averaging pricer prices caplets.

public override double CapletRate(FloatingRateCoupon coupon, double effectiveCap, bool dailyCapFloor, EvaluationContext context)

Parameters

coupon FloatingRateCoupon

The coupon.

effectiveCap double

The effective cap.

dailyCapFloor bool

Whether the cap applies to the daily rates.

context EvaluationContext

The evaluation context.

Returns

double

Never returns.

Exceptions

NanoQLException

Always.

ConvAdj1(double, double)

The approximation's first convexity adjustment.

protected double ConvAdj1(double ts, double te)

Parameters

ts double

The time of the forward part's start.

te double

The time of its end.

Returns

double

The adjustment.

ConvAdj2(double, double)

The approximation's second convexity adjustment.

protected double ConvAdj2(double ts, double te)

Parameters

ts double

The time of the forward part's start.

te double

The time of its end.

Returns

double

The adjustment.

FloorletPrice(FloatingRateCoupon, double, EvaluationContext)

Not available: QuantLib's pricer throws.

public override double FloorletPrice(FloatingRateCoupon coupon, double effectiveFloor, EvaluationContext context)

Parameters

coupon FloatingRateCoupon

The coupon.

effectiveFloor double

The effective floor.

context EvaluationContext

The evaluation context.

Returns

double

Never returns.

Exceptions

NanoQLException

Always.

FloorletRate(FloatingRateCoupon, double, EvaluationContext)

Not available: QuantLib's pricer throws.

public override double FloorletRate(FloatingRateCoupon coupon, double effectiveFloor, EvaluationContext context)

Parameters

coupon FloatingRateCoupon

The coupon.

effectiveFloor double

The effective floor.

context EvaluationContext

The evaluation context.

Returns

double

Never returns.

Exceptions

NanoQLException

Always.

FloorletRate(FloatingRateCoupon, double, bool, EvaluationContext)

Not implemented: QuantLib's pricer throws; the Black averaging pricer prices floorlets.

public override double FloorletRate(FloatingRateCoupon coupon, double effectiveFloor, bool dailyCapFloor, EvaluationContext context)

Parameters

coupon FloatingRateCoupon

The coupon.

effectiveFloor double

The effective floor.

dailyCapFloor bool

Whether the floor applies to the daily rates.

context EvaluationContext

The evaluation context.

Returns

double

Never returns.

Exceptions

NanoQLException

Always.

SwapletPrice(FloatingRateCoupon, EvaluationContext)

Not available: QuantLib's pricer throws.

public override double SwapletPrice(FloatingRateCoupon coupon, EvaluationContext context)

Parameters

coupon FloatingRateCoupon

The coupon.

context EvaluationContext

The evaluation context.

Returns

double

Never returns.

Exceptions

NanoQLException

Always.

SwapletRate(FloatingRateCoupon, EvaluationContext)

The swaplet's rate: the coupon's rate.

public override double SwapletRate(FloatingRateCoupon coupon, EvaluationContext context)

Parameters

coupon FloatingRateCoupon

The coupon.

context EvaluationContext

The evaluation context.

Returns

double

The rate.