Learn R Programming

derivmkts (version 0.2.5)

blksch: Black-Scholes option pricing

Description

bscall and bsput compute Black-Scholes call and put prices. The functions assetcall, assetput, cashcall, and cashput provide the prices of binary options that pay one share (the asset options) or $1 (the cash options) if at expiration the asset price exceeds the strike (the calls) or is below the strike (the puts). We have the identities

bscall(s, k, v, r, tt, d) = assetcall(s, k, v, r, tt, d) - k*cashcall(s, k, v, r, tt, d)

bsput(s, k, v, r, tt, d) = k*cashput(s, k, v, r, tt, d) - assetput(s, k, v, r, tt, d)

Usage

bscall(s, k, v, r, tt, d)
bsput(s, k, v, r, tt, d)
assetcall(s, k, v, r, tt, d)
cashcall(s, k, v, r, tt, d)
assetput(s, k, v, r, tt, d)
cashput(s, k, v, r, tt, d)

Arguments

s

Price of the underlying asset

k

Strike price

v

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

r

Annual continuously-compounded risk-free interest rate

tt

Time to maturity in years

d

Dividend yield, annualized, continuously-compounded

Value

A Black-Scholes option price. If more than one argument is a vector, the recycling rule determines the handling of the inputs

Details

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

Examples

Run this code
# NOT RUN {
s=40; k=40; v=0.30; r=0.08; tt=0.25; d=0;
bscall(s, k, v, r, tt, d)

## following returns the same price as previous
assetcall(s, k, v, r, tt, d) - k*cashcall(s, k, v, r, tt, d)

## return option prices for different strikes
bsput(s, k=38:42, v, r, tt, d)
# }

Run the code above in your browser using DataLab