Updated: 31 Mar 2014

Use the scalar function NonRecombiningTreeIV to calculate the implied volatility of American or European options paying discrete dividends using a non-recombining tree as suggested in

SELECT [wctOptions].[wct].[NonRecombiningTreeIV](

<@CallPut, nvarchar(4000),>

,<@AmEur, nvarchar(4000),>

,<@AssetPrice, float,>

,<@StrikePrice, float,>

,<@TimeToMaturity, float,>

,<@RiskFreeRate, float,>

,<@DividendRate, float,>

,<@Dividend_RangeQuery, nvarchar(max),>

,<@Price, float,>

,<@NumberOfSteps, int,>)

identifies the option as being a call ('C') or a put ('P'). *@CallPut* is an expression of type **nvarchar** or of a type that can be implicitly converted to **nvarchar**.

identifies the option as being American ('A') or European ('E'). *@AmEur* is an expression of type **nvarchar** or of a type that can be implicitly converted to **nvarchar**.

the price of the underlying asset.* @AssetPrice* is an expression of type **float** or of a type that can be implicitly converted to **float**.

the exercise price of the option.* @StrikePrice* is an expression of type **float** or of a type that can be implicitly converted to **float**.

the time to expiration of the option, expressed in years. *@TimeToMaturity* is an expression of type **float** or of a type that can be implicitly converted to **float**.

the annualized, continuously compounded zero-coupon risk-free rate over the life of the option. *@RiskFreeRate* is an expression of type **float** or of a type that can be implicitly converted to **float**.

the annualized, continuously compounded zero-coupon dividend rate over the life of the option, used in addition to the discrete dividends. *@DividendRate* is an expression of type **float** or of a type that can be implicitly converted to **float**.

a string containing an SQL statement which, when executed, provides the function with the times and amounts of the dividends to be used in the calculation. The results of the SQL must contain exactly two columns, the first being the time value, as a **float** or as a value that implicitly converts to **float**, and the second being the dividend amount as **float**, or as a value that implicitly converts to **float**. *@Dividend_RangeQuery* is an expression of type **nvarchar** or of a type that can be implicitly converted to **nvarchar**.

the price of the option. *@Price* is an expression of type **float** or of a type that can be implicitly converted to **float**.

the number of steps in the binomial tree. *@NumberOfSteps* is an expression of type **int** or of a type that can be implicitly converted to **int**.

float

· *@Volatility* must be greater than zero (*@Volatility* > 0).

· *@TimeToMaturity* must be greater than zero (*@TimeToMaturity* > 0).

· *@AssetPrice* must be greater than zero (*@AssetPrice* > 0).

· *@StrikePrice* must be greater than zero (*@StrikePrice* > 0).

· *@NumberOfSteps* must be greater than 1 (*@NumberOfSteps* > 1)

· Negative time values returned by *@Dividend_RangeQuery* are ignored*.*

· Time values returned by *@Dividend_RangeQuery* that are greater than *@TimeToMaturity* are ignored*.*

· If *@RiskFreeRate* is NULL then *@RiskFreeRate* is set to zero.

· If *@DividendRate* is NULL then *@DividendRate* is set to zero.

· If *@NumberOfSteps* is NULL then *@NumberOfSteps* is set to 100.

· To calculate the price and/or Greeks of the option us NonRecombiningTree.

· To calculate the implied volatility using proportional dividends (where the dividend is specified with a time and a percentage rather than a monetary value) use ProportionalDividendsIV.

Calculate the volatility for an American call option expiring in one year with asset price of 100, a strike price of 100 and a theoretical value of 11.9444. The risk-free rate is 2.75%. A single dividend of 50 will be paid in 10 months' time. The number of steps is 100.

SELECT wct.NonRecombiningTreeIV(

'C' --Put/Call

,'A' --American/European

,100 --Asset Price

,100 --Strike Price

,1 --Time-to-maturity

,.0275 --Risk-free rate

,NULL --Dividend rate

,'SELECT 0.83333333333, 50' --Discrete Dividends

,11.9444 --Price

,100 --Number of Steps

) as VOLATILITY

This produces the following result.

VOLATILITY

----------------------

0.300002