Path Dependent Options Computational Finance School of Mathematics 2018
The Random Walk One of the main assumption of the Black-Scholes framework is that the underlying stock price follows a random walk Using random numbers, we can simulate that random walk, and find the path that the stock price will follow.
The Random Walk One of the main assumption of the Black-Scholes framework is that the underlying stock price follows a random walk Using random numbers, we can simulate that random walk, and find the path that the stock price will follow. The Monte Carlo method takes numerous simulated paths to estimate the expected option price at expiry, which can be discounted back to today.
Monte Carlo techniques Good for options on more than one underlying asset. Convergence is slow, errors are random. Convergence is order N 1 2 where N is the number of sample paths. It is a forward induction technique, which makes valuing path dependent options easy.
Monte Carlo techniques Good for options on more than one underlying asset. Convergence is slow, errors are random. Convergence is order N 1 2 where N is the number of sample paths. It is a forward induction technique, which makes valuing path dependent options easy. However, it is very difficult to value American style options for exactly the same reason.
Note:- The law of large numbers Large Numbers Given a sequence of independent, identically distributed random variables Y n then lim N 1 N N Y n = E[Y n ] n=1
Note:- The law of large numbers Large Numbers Given a sequence of independent, identically distributed random variables Y n then lim N 1 N N Y n = E[Y n ] n=1 So the expectation is exactly like taking a long run average. To decrease errors increase N. We wish to evaluate E[f(Y T )].
Application to options Let S t be the share price at time t, then the option value V (S t, t) is or if r is constant, V (S t, t) = E Q t [e T t r(s)ds V (S T, T )] e r(t t) E Q t [V (S T, T )] where Q is the risk-neutral measure, E t denotes taking the expectation at time t, and V (S T, T ) is the payoff at expiry.
Application to options Let S t be the share price at time t, then the option value V (S t, t) is or if r is constant, V (S t, t) = E Q t [e T t r(s)ds V (S T, T )] e r(t t) E Q t [V (S T, T )] where Q is the risk-neutral measure, E t denotes taking the expectation at time t, and V (S T, T ) is the payoff at expiry. Option value is discounted expected price.
Example - GBM Assume we are risk-neutral and S follows a geometric Brownian motion. Under the real-world measure ds t = µs t dt + σs t dx and under the risk-neutral measure ds t = rs t dt + σs t dw where W and X are both Brownian motions under the respective measures.
Example - GBM The above stochastic differential equation can be solved exactly to yield: S T = S t exp[(r 1 2 σ2 )(T t) + σφ T t] where φ here is a variable drawn at random from the Normal distribution N(0, 1).
Example - GBM The above stochastic differential equation can be solved exactly to yield: S T = S t exp[(r 1 2 σ2 )(T t) + σφ T t] where φ here is a variable drawn at random from the Normal distribution N(0, 1). So given a random number φ n and a starting stock price S t, we can calculate the stock price at time T, S (n) T.
Example - GBM Thus if the nth draw from the normal distribution gives V n (S T ) then by the law of large numbers: 1 N N V (ST n ) E Q t [V (S T )] as N n=1
Example - GBM Thus if the nth draw from the normal distribution gives V n (S T ) then by the law of large numbers: 1 N N V (ST n ) E Q t [V (S T )] as N n=1 Now if we define the error from the nth sample path as ɛ n then ɛ n = V (S n T ) E Q t [V (S T )] Then ɛ N(0, ν/n)
European Option For a European call option the payoff at maturity V (S T ) is given by V (S T ) = max(s T X, 0) Simulate N possible paths for S T with N independent draws from N(0, 1) (φ n )
European Option For a European call option the payoff at maturity V (S T ) is given by V (S T ) = max(s T X, 0) Simulate N possible paths for S T with N independent draws from N(0, 1) (φ n ) Then for 1 n N S n T = S t exp[(r 1 2 σ2 )(T t) + σφ n T t] V (S n T ) = max(s n T X, 0) V (S t, t) = e r(t t) 1 N N V (St n ) n=1
Psuedo code Path Dependent Options double monte carlo() { double sum=0.; for(int n = 0;n<N;n++) { stock T = stock 0*exp( (r-0.5*sigma*sigma)*t + sigma*phi()*sqrt(t)) sum+=payoff(stock T)*exp(-interest rate*t); } return sum/n; }
Path Dependent Options Framework Example Asian Options A path dependent option is one whose payoff depends on the path followed by the underlying asset The terminal condition may depend on the path (Asian, lookback, etc.) or there may exist a condition at time t (barrier options).
Path Dependent Options Framework Example Asian Options A path dependent option is one whose payoff depends on the path followed by the underlying asset The terminal condition may depend on the path (Asian, lookback, etc.) or there may exist a condition at time t (barrier options). Assume the share price is observed at M + 1 points in time S(t 0 ), S(t 1 ),..., S(t M ) If the terminal boundary condition depends on the path the payoff becomes V (S(t 0 ), S(t 1 ),..., S(t M ), T )
Creating a Path Framework Example Asian Options The procedure is as follows:
Creating a Path Framework Example Asian Options The procedure is as follows: Initialise S(t 0 ) Simulate the stock price at each sampling time t i S (n) t i = S (n) t i 1 exp[(r 1 2 σ2 )(t i t i 1 ) + σ t i t i 1 φ i ] Use the path generated to calculate the payoff Then repeat this procedure N times to get the option value: V (t) = e r(t t) 1 N N V (S(t 0 ), S(t 1 ),..., S(t M ), T ) n=1
Asian options Path Dependent Options Framework Example Asian Options An Asian option is an option whose payoff is a function of the average price of the underlying asset The share price is observed at M points in time Consider an Asian option whose payoff is where V (T ) = max(a S T, 0) A = 1 M M S(t i ) and S(t i ) are the share prices at the M sampling times t 1,..., t M. i=1
Normal from uniform Random Numbers All programming languauges have a random number generator usually it will only generate random numbers that are uniformly distributed on [0, 1]. We will need to transform them to obtain normally distributed random numbers
Normal from uniform Random Numbers All programming languauges have a random number generator usually it will only generate random numbers that are uniformly distributed on [0, 1]. We will need to transform them to obtain normally distributed random numbers Most straightforward way: - let F 1 denote inverse of Normal distribution function If x is uniformly distributed on [0, 1], then y = F 1 (x) is a standard variable from the normal distribution.
The Box-Muller method Random Numbers If we had the function F 1 then we could invert the uniform distribution. However F 1 is not known in closed form, so this approach is expensive.
The Box-Muller method Random Numbers If we had the function F 1 then we could invert the uniform distribution. However F 1 is not known in closed form, so this approach is expensive. A simple technique for generating normally distributed random numbers is the Box-Muller method Given two uniformly distributed random numbers x 1, x 2, two Normally distributed random numbers, y 1 and y 2 are given by: y 1 = cos(2πx 2 ) 2 log(x 1 ) y 2 = sin(2πx 1 ) 2 log(x 2 )
Monte-Carlo Methods Random Numbers Simple to program and to understand Convergence is slow, extrapolation impossible. Forward looking method ideal for path dependent derivatives Good for derivatives where there are multiple sources of uncertainty, as the computational effort only increases linearly. To simulate the paths we typically use the solution to the SDE or the Euler approximation, along with a decent generator of Normally distributed random variables. Check the notes for how to generate multi-asset paths.