public static double huntKennedyCMSOptionValue(
			double forwardSwaprate,
			double volatility,
			double swapAnnuity,
			double optionMaturity,
			double swapMaturity,
			double payoffUnit,
			double optionStrike)
	{
		double a = 1.0/swapMaturity;
		double b = (payoffUnit / swapAnnuity - a) / forwardSwaprate;
		double convexityAdjustment = Math.exp(volatility*volatility*optionMaturity);

		double valueUnadjusted	= blackModelSwaptionValue(forwardSwaprate, volatility, optionMaturity, optionStrike, swapAnnuity);
		double valueAdjusted	= blackModelSwaptionValue(forwardSwaprate * convexityAdjustment, volatility, optionMaturity, optionStrike, swapAnnuity);

		return a * valueUnadjusted + b * forwardSwaprate * valueAdjusted;
	}
public static double huntKennedyCMSOptionValue ( double forwardSwaprate , double volatility , double swapAnnuity , double optionMaturity , double swapMaturity , double payoffUnit , double optionStrike ) { double a = 1.0 / swapMaturity ; double b = ( payoffUnit / swapAnnuity - a ) / forwardSwaprate ; double convexityAdjustment = Math . exp ( volatility * volatility * optionMaturity ) ; double valueUnadjusted = blackModelSwaptionValue ( forwardSwaprate , volatility , optionMaturity , optionStrike , swapAnnuity ) ; double valueAdjusted = blackModelSwaptionValue ( forwardSwaprate * convexityAdjustment , volatility , optionMaturity , optionStrike , swapAnnuity ) ; return a * valueUnadjusted + b * forwardSwaprate * valueAdjusted ; }
Calculate the value of a CMS option using the Black-Scholes model for the swap rate together with
the Hunt-Kennedy convexity adjustment.

@param forwardSwaprate The forward swap rate
@param volatility Volatility of the log of the swap rate
@param swapAnnuity The swap annuity
@param optionMaturity The option maturity
@param swapMaturity The swap maturity
@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date
@param optionStrike The option strike
@return Value of the CMS option