You are on page 1of 2

Macros: Abukar M Ali 2003

Black -Scholes Option pricing inputs


SIMPLE VISUAL BASIC CODE
Share Price (S) 100
Function BSCallValues(S, E, rate, q, T, sigma)
Strike Price (E) 95 Function BSCallValues(S, E, rate, q, T, sigma)
' returns Black-sholes call value (allowing for q=div yld)
Short term interest rate [r] 8.00% ' returns Black-sholes call value (allowing for q=div yld)
Dim ert, eqt
Dim ert, eqt
Dim DOne, DTwo, NDOne, NDTwo
Dim DOne, DTwo, NDOne, NDTwo
Dividend Yield (q) 0.49% ert = Exp(-rate * T) 'exp is the VBA function for 'e'
ert = Exp(-rate * T) 'exp is the VBA function for 'e'
eqt = Exp(-q * T) 'div yld effect
eqt = Exp(-q * T) 'div yld effect
Time now (0, years) 12/07/21 DOne = (Log(S / E) + (rate - q + 0.5 * sigma ^ 2) * T) / (sigma * S
DOne = (Log(S / E) + (rate - q + 0.5 * sigma ^ 2) * T) / (sigma *
DTwo = (Log(S / E) + (rate - q - 0.5 * sigma ^ 2) * T) / (sigma * S
Time Maturity (T, years) 06/05/22 DTwo = (Log(S / E) + (rate - q - 0.5 * sigma ^ 2) * T) / (sigma *
NDOne = Application.NormSDist(DOne)
Option life (T, years) 0.5 NDOne = Application.NormSDist(DOne)
NDTwo = Application.NormSDist(DTwo)
Volatility (σ) 20.00% NDTwo = Application.NormSDist(DTwo)
BSCallValues = (S * eqt * NDOne - E * ert * NDTwo)
BSCallValues = (S * eqt * NDOne - E * ert * NDTwo)
End Function
End Function
Exp[-rT] 0.960789
Exp[-qT] 0.997553

CALL Premium ###


e, q, T, sigma)
ate, q, T, sigma)
e (allowing for q=div yld)
ue (allowing for q=div yld)
Two
DTwo
e VBA function for 'e'
he VBA function for 'e'
fect
effect
+ 0.5 * sigma ^ 2) * T) / (sigma * Sqr(T))
+ 0.5 * sigma ^ 2) * T) / (sigma * Sqr(T))
0.5 * sigma ^ 2) * T) / (sigma * Sqr(T))
- 0.5 * sigma ^ 2) * T) / (sigma * Sqr(T))
st(DOne)
Dist(DOne)
ist(DTwo)
Dist(DTwo)
ne - E * ert * NDTwo)
One - E * ert * NDTwo)

You might also like