# impvbyrgw

Determine implied volatility using Roll-Geske-Whaley option pricing model for American call option

## Syntax

``Volatility = impvbyrgw(RateSpec,StockSpec,Settle,Maturity,Strike,OptPrice)``
``Volatility = impvbyrgw(___,Name,Value)``

## Description

example

````Volatility = impvbyrgw(RateSpec,StockSpec,Settle,Maturity,Strike,OptPrice)` computes implied volatility using Roll-Geske-Whaley option pricing model for American call option. Note`impvbyrgw` computes implied volatility of American calls with a single cash dividend using the Roll-Geske-Whaley option pricing model. ```

example

````Volatility = impvbyrgw(___,Name,Value)` adds optional name-value pair arguments.```

## Examples

collapse all

This example shows how to compute the implied volatility using the Roll-Geske-Whaley option pricing model. Assume that on July 1, 2008 a stock is trading at \$13 and pays a single cash dividend of \$0.25 on November 1, 2008. The American call option with a strike price of \$15 expires on July 1, 2009 and is trading at \$1.346. The annualized continuously compounded risk-free rate is 5% per annum. Calculate the implied volatility of the stock using the Roll-Geske-Whaley option pricing model.

```AssetPrice = 13; Strike = 15; Rates = 0.05; Settle = 'July-01-08'; Maturity = 'July-01-09'; % define the RateSpec and StockSpec RateSpec = intenvset('ValuationDate', Settle, 'StartDates', Settle,... 'EndDates', Maturity, 'Rates', Rates, 'Compounding', -1); StockSpec = stockspec(NaN, AssetPrice, {'cash'}, 0.25, {'Nov 1,2008'}); Price = [1.346]; Volatility = impvbyrgw(RateSpec, StockSpec, Settle, Maturity, Strike, Price)```
```Volatility = 0.3539 ```

## Input Arguments

collapse all

Interest-rate term structure (annualized and continuously compounded), specified by the `RateSpec` obtained from `intenvset`. For information on the interest-rate specification, see `intenvset`.

Data Types: `struct`

Stock specification for the underlying asset. For information on the stock specification, see `stockspec`.

`stockspec` handles several types of underlying assets. For example, for physical commodities the price is `StockSpec.Asset`, the volatility is `StockSpec.Sigma`, and the convenience yield is `StockSpec.DividendAmounts`.

Data Types: `struct`

Settlement date, specified as a `NINST`-by-`1` vector of serial date numbers or a date character vectors.

Data Types: `double` | `char`

Maturity date for the American option, specified as a `NINST`-by-`1` vector of serial date numbers or a date character vectors.

Data Types: `double` | `char`

Option strike price value, specified as a nonnegative scalar or `NINST`-by-`1` vector of strike price values. Each row is the schedule for one option.

Data Types: `double`

American option prices from which the implied volatility of the underlying asset is derived, specified as a nonnegative scalar or `NINST`-by-`1` vector.

Data Types: `double`

### Name-Value Arguments

Specify optional comma-separated pairs of `Name,Value` arguments. `Name` is the argument name and `Value` is the corresponding value. `Name` must appear inside quotes. You can specify several name and value pair arguments in any order as `Name1,Value1,...,NameN,ValueN`.

Example: `Volatility = impvbyrgw(RateSpec,StockSpec,Settle,Maturity,OptSpec,Strike,OptPrice,'Limit',5,'Tolerance',1e-5)`

Upper bound of implied volatility search interval, specified as the comma-separated pair consisting of `'Limit'` and a positive scalar.

Data Types: `double`

Implied volatility search termination tolerance, specified as the comma-separated pair consisting of `'Tolerance'` and a positive scalar.

Data Types: `double`

## Output Arguments

collapse all

Expected implied volatility values, returned as a `NINST`-by-`1` vector. If no solution can be found, a `NaN` is returned.