Learn R Programming

derivmkts (version 0.2.5.1)

implied: Black-Scholes implied volatility and price

Description

bscallimpvol and bsputimpvol compute Black-Scholes implied volatilties. The functions bscallimps and bsputimps, compute stock prices implied by a given option price, volatility and option characteristics.

Usage

bscallimpvol(s, k, r, tt, d, price, lowvol, highvol,
.tol=.Machine$double.eps^0.5)
bsputimpvol(s, k, r, tt, d, price, lowvol, highvol,
.tol=.Machine$double.eps^0.5)
bscallimps(s, k, v, r, tt, d, price, lower=0.0001, upper=1e06,
.tol=.Machine$double.eps^0.5)
bsputimps(s, k, v, r, tt, d, price, lower=0.0001, upper=1e06,
.tol=.Machine$double.eps^0.5)

Value

Implied volatility (for the "impvol" functions) or implied stock price (for the "impS") functions.

Arguments

s

Stock price

k

Strike price of the option

r

Annual continuously-compounded risk-free interest rate

tt

Time to maturity in years

d

Dividend yield, annualized, continuously-compounded

price

Option price when computing an implied value

lowvol

minimum implied volatility

highvol

maximum implied volatility

.tol

numerical tolerance for zero-finding function `uniroot`

v

Volatility of the stock, defined as the annualized standard deviation of the continuously-compounded return

lower

minimum stock price in implied price calculation

upper

maximum stock price in implied price calculation

Details

Returns a scalar or vector of option prices, depending on the inputs

Examples

Run this code
s=40; k=40; v=0.30; r=0.08; tt=0.25; d=0;
bscallimpvol(s, k, r, tt, d, 4)
bsputimpvol(s, k, r, tt, d, 4)
bscallimps(s, k, v, r, tt, d, 4, )
bsputimps(s, k, v, r, tt, d, 4)

Run the code above in your browser using DataLab