Learn R Programming

QFRM (version 1.0.1)

BS_Simple: Black-Scholes formula

Description

Black-Scholes (aka Black-Scholes-Merton, BS, BSM) formula for simple parameters

Usage

BS_Simple(S0 = 42, K = 40, r = 0.1, q = 0, ttm = 0.5, vol = 0.2)

Arguments

S0
The spot price of the underlying security
K
The srike price of the underlying (same currency as S0)
r
The annualized risk free interest rate, as annual percent / 100 (i.e. fractional form. 0.1 is 10 percent per annum)
q
The annualized dividiend yield, same units as r
ttm,
The time to maturity, fraction of a year (annualized)
vol
The volatility, in units of standard deviation.

Value

a list of BS formula elements and BS price, such as d1 for $d_1$, d2 for $d_2$, Nd1 for $N(d_1)$, Nd2 for $N(d_2)$, NCallPxBS for BSM call price, PutPxBS for BSM put price

Details

Uses BS formula to calculate call/put option values and elements of BS model

References

Hull, J.C., Options, Futures and Other Derivatives, 9ed, 2014. Prentice Hall. ISBN 978-0-13-345631-8, http://www-2.rotman.utoronto.ca/~hull/ofod. http://amzn.com/0133456315 http://www.theresearchkitchen.com/archives/106

Examples

Run this code
#See Hull p.339, Ex.15.6.
(o <- BS_Simple(S0=42,K=40,r=.1,q=0,ttm=.5,vol=.2))$Px$Call #returns 4.759422
o$Px$Put # returns 0.8085994 as the price of the put

BS_Simple(100,90,0.05,0,2,0.30)
BS_Simple(50,60,0.1,.2,3,0.25)
BS_Simple(90,90,0.15,0,.5,0.20)
BS_Simple(15,15,.01,0.0,0.5,.5)

Run the code above in your browser using DataLab