This program calculates the price of European double-barrier knock-out calls by the use of binomial trees and Monte Carlo Simulations.
For this program, we have:
- Inputs: S (stock price), X (strike price), H (high barrier), L (low barrier), t (year), s (volatility in %), r (continuously compounded interest rate in %), and n (number of periods).
- Output: Prices given by both the binomial tree and the Monte Carlo simulation.
We need to assume L < S < H, i.e., the stock price is always between the lower and high barrier.
In MatLab, just run the given file.
Suppose S = 95, X = 100, H = 140, L = 90, t = 1 (year), s = 25 (%), r = 10 (%), and n = 1000: 1. The price given by the tree is 1.457 2. The price given by the 1.94 (varies depending on the amount of paths of the Monte Carlo simulation).
Because the second value is given by a Monte Carlo simulation, it will vary from run to run, as seen when comparing the image above with the image below.
In the previous two images we can see that the value of the Monte Carlo simulations shifted from 1.9460 to 1.5205.