Appendix [Code]

Black-Scholes Hedging
Asset price model Underlying asset prices S are modeled by a GBM process.

dS(t) = µS(t)dt + σS(t)dWt (1)

The risk free interest rate is r.

Consider a single asset following the GBM dynamics (see Eq 1). Simulate the
option values and the value of a delta hedge set up to replicate the option.
Plot the error in the PnL for the option trader when the option is not hedged
(absence of replicating portfolio), and when the option is hedged. Show how
the hedge error would depend upon the time step used in the simulation. The
paramter values for the GBM process are

r = 0.06, T = 1, σ = 0.2, payoff is g(ST ) = max(K − ST , 0), K = 40, S0 = 36.

1. Asset Pricing Model

The underlying asset prices are modelled using the Geometric Brownian Motion. It is given by the equation- dS(t) = µS(t)dt + σS(t)dWt (1) Solving the above equation by Ito's calculas, we get- ST=Ste(r−12σ2)(dt)+σdt√Z Where z ~ N(0,1)

We can know generate paths using the equation of St.

2. Monte Carlo Simulation

  1. Black Scholes Formula

$ S_T = S_t e^{(r-\frac{1}{2}\sigma^2)(dt)+\sigma\sqrt{dt} Z} $
Where
z ~ N(0,1)

Monte Carlo simulation

Black Scholes formula based

Capture.PNG

Option price for every time step and simulated delta

PnL Error

Plot the error in the PnL for the option trader when the option is not hedged (absence of replicating portfolio), and when the option is hedged. Show how the hedge error would depend upon the time step used in the simulation. The paramter values for the GBM process are

No hedge


Put option

Call option

With Delta Hedging PnL

Call option

Put option