## March 17, 2009

### Delta of an European Option using VBA

The delta of an option is the sensitivity of an option price relative to changes in the price of the underlying asset. It tells option traders how fast the price of the option will change as the underlying stock/future moves. In matematical terms it will be given as - $\inline \frac{\partial \mathrm{C}}{\partial \mathrm{S}}$. In the Black Scholes model this is given by - $\inline N(d1)$ Here is a short VBA snippet to calculate the delta of a european option.
Function BSOptionDelta(S, X, r, q, mat, sigma, CallPut As String)
Dim eqt, NDOne
NDOne = Application.NormSDist(BSDOne(S, X, r, q, mat, sigma))
eqt = Exp(-q * mat)
Select Case CallPut
Case "Call": BSOptionDelta = NDOne
Case "Put": BSOptionDelta = NDOne - 1
Case Else: MsgBox ("You can only specify 'Call' or 'Put'")
End Select
BSOptionDelta = eqt * BSOptionDelta
End Function

Private Function BSDOne(S, X, r, q, mat, sigma)
'   Returns Black-Scholes d1 value
BSDOne = (Log(S / X) + (r - q + 0.5 * sigma ^ 2) * mat) / (sigma * Sqr(mat))
End Function


## March 16, 2009

### Black Scholes Assumptions

The Black-Scholes model of the market for an equity makes the following explicit assumptions:
• It is possible to borrow and lend cash at a known constant risk-free interest rate.
• The stock price follows a geometric Brownian motion with constant drift and constant volatility and they are lognormally distributed.
• There are no transaction costs.
• The stock does not pay a dividend (this was modified by Merton later on).
• All securities are perfectly divisible (i.e. it is possible to buy any fraction of a share).
• There are no restrictions on short selling.
• Markets are efficient.

## March 5, 2009

### How to Post VBA Code on Blogger

1. Prerequisite: