Class ArithmeticAveragedOvernightIndexedCouponPricer
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
byApproxboolWhether 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
meanReversiondoubleThe Hull-White mean reversion of the convexity adjustment.
volatilitydoubleThe Hull-White volatility of the convexity adjustment; none by default.
byApproxboolWhether to use Katsumi Takada's approximation.
vOptionletVolatilityStructureThe optionlet volatility for caplets and floorlets, or null for none.
effectiveVolatilityInputboolWhether 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
couponFloatingRateCouponThe coupon.
dateDateThe date.
contextEvaluationContextThe 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
couponFloatingRateCouponThe coupon.
effectiveCapdoubleThe effective cap.
contextEvaluationContextThe 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
couponFloatingRateCouponThe coupon.
effectiveCapdoubleThe effective cap.
contextEvaluationContextThe 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
couponFloatingRateCouponThe coupon.
effectiveCapdoubleThe effective cap.
dailyCapFloorboolWhether the cap applies to the daily rates.
contextEvaluationContextThe 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
Returns
- double
The adjustment.
ConvAdj2(double, double)
The approximation's second convexity adjustment.
protected double ConvAdj2(double ts, double te)
Parameters
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
couponFloatingRateCouponThe coupon.
effectiveFloordoubleThe effective floor.
contextEvaluationContextThe 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
couponFloatingRateCouponThe coupon.
effectiveFloordoubleThe effective floor.
contextEvaluationContextThe 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
couponFloatingRateCouponThe coupon.
effectiveFloordoubleThe effective floor.
dailyCapFloorboolWhether the floor applies to the daily rates.
contextEvaluationContextThe 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
couponFloatingRateCouponThe coupon.
contextEvaluationContextThe 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
couponFloatingRateCouponThe coupon.
contextEvaluationContextThe evaluation context.
Returns
- double
The rate.