7.3 Numerical Methods
The prices of many financial instruments do not have closed-form analytical solutions. The valuation of these financial instruments relies on a variety of numerical methods. In this section, we discuss the application of Monte Carlo simulation and finite difference methods.
Monte Carlo simulation
Monte Carlo simulation is a method for iteratively evaluating a deterministic model using random numbers with appropriate probabilities as inputs. For derivative pricing, it simulates a large number of price paths of the underlying assets with probability corresponding to the underlying stochastic process (usually under risk-neutral measure), calculates the discounted payoff of the derivative for each path, and averages the discounted payoffs to yield the derivative price. The validity of Monte Carlo simulation relies on the law of large numbers.
Monte-Carlo simulation can be used to estimate derivative prices if the payoffs only depend on the final values of the underlying assets, and it can be adapted to estimate prices if the payoffs are path-dependent as well. Nevertheless, it cannot be directly applied to American options or any other derivatives with early exercise options.
A. Explain how you can use Monte Carlo simulation to price a European call option?
Solution: If we assume that stock price follows a geometric Brownian motion, we can simulate possible stock price paths. We can split the time between and into equally-spaced time steps.10 So and , for . We then simulate the stock price paths under risk-neutral probability using equation , where ’s are IID random variables from standard normal distribution. Let’s say that we simulate paths and each one yields a stock price , where , at maturity date .
185The estimated price of the European call is the present value of the expected payoff, which can be calculated as .
B. How do you generate random variables that follow (normal distribution with mean and variance ) if your computer can only generate random variables that follow continuous uniform distribution between 0 and 1?
Solution: This is a great question to test the basic knowledge of random number generation, the foundation of Monte Carlo simulation. The solution to this question can be dissected to two steps:
- Generate random variable of from uniform random number generator using inverse transform method and rejection method.
- Scale to to generate the final random variables that follow .
The second step is straightforward; the first step deserves some explanations. A popular approach to generating random variables is the inverse transform method: For any continuous random variable with cumulative density function (), the random variable can be defined as the inverse function of : . It is obvious that is a one-to-one function with . So any continuous random variable can be generated using the following process:
- Generate a random number from the standard uniform distribution.
- Compute the value such that as the random number from the distribution described by .
For this model to work, must be computable. For standard normal distribution, . The inverse function has no analytical solution. Theoretically, we can come up with the one-to-one mapping of to as the numeric solution of ordinary differential equation using numerical integration method such as the Euler method.11 Yet this approach is less efficient than the rejection method:
186Some random variables have pdf , but no analytical solution for . In these cases, we can use a random variable with pdf and to help generate random variables with pdf . Assume that is a constant such that . We can implement the following acceptance-rejection method:
- Sampling step: Generate random variable from and a random variable from standard uniform distribution .
- Acceptance/rejection step: If , accept ; otherwise, repeat the sampling step.12
An exponential random variable () with has cdf . So the inverse function has analytical solution and a random variable with exponential distribution can be conveniently simulated. For standard normal distribution, ,
So we can choose and use the acceptance-rejection method to generate random variables and scale them to random variables.
C. Can you explain a few variance reduction techniques to improve the efficiency of Monte Carlo simulation?
Solution: Monte Carlo simulation, in its basic form, is the mean of IID random variables . Since the expected value of each is unbiased, the estimator is unbiased as well. If and we generate IID , then , where is the number of simulations. Not surprisingly, Monte Carlo 187 simulation is computationally intensive if is large. Thousands or even millions of simulations are often required to get the desired accuracy. Depending on the specific problems, a variety of methods have been applied to reduce variance.
Antithetic variable: For each series of ’s, calculate its corresponding payoff . Then reverse the sign of all ’s and calculate the corresponding payoff . When and are negatively correlated, the variance is reduced.
Moment matching: Specific samples of the random variable may not match the population distribution well. We can draw a large set of samples first and then rescale the samples to make the samples’ moments (mean and variance are the most commonly used) match the desired population moments.
Control variate: If we want to price a derivative and there is a closely related derivative that has an analytical solution, we can generate a series of random numbers and use the same random sequences to price both and to yield and . Then can be estimated as . Essentially we use to correct the estimation error of .
Importance sampling: To estimate the expected value of from distribution , instead of drawing from distribution , we can draw from distribution and use Monte Carlo simulation to estimate expected value of :
13If has a smaller variance than , then importance sampling can result in a more efficient estimator. This method is better explained using a deep out-of-the-money option as an example. If we directly use risk-neutral as the distribution, most of the simulated paths will yield and as a result the estimation variance will be large. If we introduce a distribution that has much wider span (fatter tail for ), more simulated paths will have positive . The scaling factor will keep the estimator unbiased, but the approach will have lower variance.
188Low-discrepancy sequence: Instead of using random samples, we can generate a deterministic sequence of “random variable” that represents the distribution. Such low-discrepancy sequences may make the convergence rate .
D. If there is no closed-form pricing formula for an option, how would you estimate its delta and gamma?
Solution: As we have discussed in problem A, the prices of options with or without closed-form pricing formulas can be derived using Monte Carlo simulation. The same methods can also be used to estimate delta and gamma by slightly changing the current underlying price from to , where is a small positive value. Run Monte Carlo simulation for all three starting prices , and , we will get their corresponding option prices , and .
Estimated delta:
Estimated gamma:
To reduce variance, it’s often better to use the same random number sequences to estimate , and .14
E. How do you use Monte Carlo simulation to estimate ?
Solution: Estimation of is a classic example of Monte Carlo simulation. One standard method to estimate is to randomly select points in the unit square ( and are independent uniform random variables between 0 and 1) and determine the ratio of points that are within the circle . For simplicity, we focus on the first quadrant. As shown in Figure 7.1, any points within the circle satisfy the equation . The percentage of the points within the circle is proportional to its area:
So we generate a large number of independent points, estimate the ratio of the points within the circle to the points in the square, and multiply the ratio by 4 to yield an estimation of . Figure 7.1 uses only 1000 points for illustration. With today’s 189 computing power, we can easily generate millions of pairs to estimate with good precision. 1,000 simulations with 1,000,000 points each using Matlab took less than 1 minute on a laptop and gave an average estimation of as 3.1416 with standard deviation 0.0015.
Finite difference method
The finite difference method is another popular numerical technique for derivative pricing. It numerically solves a differential equation to estimate the price of a derivative by discretizing the time and the price of the underlying security. We can convert the Black-Scholes-Merton equation, a second order nonlinear partial differential equation, to a heat diffusion equation (as we did in Chapter 6). This new equation, expressed as a function of (time to maturity) and (a function of the price of the underlying security), is a general differential equation for derivatives. The difference between various derivatives lies in the boundary conditions. By building a grid of and and using the boundary conditions, we can recursively calculate at every and using finite difference methods.
A. Can you briefly explain finite difference methods?
Solution: There are several version of finite difference methods used in practice. Let’s briefly go over the explicit difference method, the implicit difference method and the 190 Crank-Nicolson method. As shown in Figure 7.2, if we divide the range of , , into discrete intervals with increment and divide the range of , , into discrete intervals with increment , the time and the space of can be expressed as a grid of and .
The explicit difference method uses the forward difference at time and the second-order central difference at :
Rearranging terms, we can express as a linear combination of , and : , where . Besides, we often have boundary conditions , , and for all . Combining the boundary 191 conditions and equation , we can estimate all ’s on the grid.
The implicit difference method uses the backward difference at time and the second-order central difference at :
The Crank-Nicolson method uses the central difference at time and the second-order central difference at :
B. If you are solving a parabolic partial differential equation using the explicit finite difference method, is it worse to have too many steps in the time dimension or too many steps in the space dimension?
Solution: The equation for in the explicit finite difference method is , where . For the explicit finite difference method to be stable, we need to have . So a small (i.e., many time steps) is desirable, but a small (too many space steps) may make and the results unstable. In that sense, it is worse to have too many steps in the space dimension. In contrast, the implicit difference method is always stable and convergent.