Monte Carlo methods are used in corporate finance and mathematical finance to value and analyze (complex) instruments, portfolios and investments by simulating the various sources of uncertainty affecting their value, and then determining the distribution of their value over the range of resultant outcomes.[1][2] This is usually done by help of stochastic asset models. The advantage of Monte Carlo methods over other techniques increases as the dimensions (sources of uncertainty) of the problem increase.
Monte Carlo methods were first introduced to finance in 1964 by David B. Hertz through his Harvard Business Review article,[3] discussing their application in Corporate Finance. In 1977, Phelim Boyle pioneered the use of simulation in derivative valuation in his seminal Journal of Financial Economics paper.[4]
This article discusses typical financial problems in which Monte Carlo methods are used. It also touches on the use of so-called 'quasi-random' methods such as the use of Sobol sequences.
Overview[edit]
The Monte Carlo method encompasses any technique of statistical sampling employed to approximate solutions to quantitative problems.[5] Essentially, the Monte Carlo method solves a problem by directly simulating the underlying (physical) process and then calculating the (average) result of the process.[1] This very general approach is valid in areas such as physics, chemistry, computer science etc.
In finance, the Monte Carlo method is used to simulate the various sources of uncertainty that affect the value of the instrument, portfolio or investment in question, and to then calculate a representative value given these possible values of the underlying inputs.[1] ('Covering all conceivable real world contingencies in proportion to their likelihood.' [6]) In terms of financial theory, this, essentially, is an application of risk neutral valuation;[7] see also risk neutrality.
Some examples:
Although Monte Carlo methods provide flexibility, and can handle multiple sources of uncertainty, the use of these techniques is nevertheless not always appropriate. In general, simulation methods are preferred to other valuation techniques only when there are several state variables (i.e. several sources of uncertainty).[1] These techniques are also of limited use in valuing American style derivatives. See below.
Applicability[edit]Level of complexity[edit]
Many problems in mathematical finance entail the computation of a particular integral (for instance the problem of finding the arbitrage-free value of a particular derivative). In many cases these integrals can be valued analytically, and in still more cases they can be valued using numerical integration, or computed using a partial differential equation (PDE). However, when the number of dimensions (or degrees of freedom) in the problem is large, PDEs and numerical integrals become intractable, and in these cases Monte Carlo methods often give better results.
For more than three or four state variables, formulae such as BlackâScholes (i.e. analytic solutions) do not exist, while other numerical methods such as the Binomial options pricing model and finite difference methods face several difficulties and are not practical. In these cases, Monte Carlo methods converge to the solution more quickly than numerical methods, require less memory and are easier to program. For simpler situations, however, simulation is not the better solution because it is very time-consuming and computationally intensive.
Monte Carlo methods can deal with derivatives which have path dependent payoffs in a fairly straightforward manner. On the other hand, Finite Difference (PDE) solvers struggle with path dependence.
American options[edit]
Monte-Carlo methods are harder to use with American options. This is because, in contrast to a partial differential equation, the Monte Carlo method really only estimates the option value assuming a given starting point and time.
However, for early exercise, we would also need to know the option value at the intermediate times between the simulation start time and the option expiry time. In the BlackâScholes PDE approach these prices are easily obtained, because the simulation runs backwards from the expiry date. In Monte-Carlo this information is harder to obtain, but it can be done for example using the least squares algorithm of Carriere (see link to original paper) which was made popular a few years later by Longstaff and Schwartz (see link to original paper).
Monte Carlo methods[edit]Mathematically[edit]
The fundamental theorem of arbitrage-free pricing states that the value of a derivative is equal to the discounted expected value of the derivative payoff where the expectation is taken under the risk-neutral measure[1]. An expectation is, in the language of pure mathematics, simply an integral with respect to the measure. Monte Carlo methods are ideally suited to evaluating difficult integrals (see also Monte Carlo method).
Thus if we suppose that our risk-neutral probability space is P{displaystyle mathbb {P} } and that we have a derivative H that depends on a set of underlying instrumentsS1,...,Sn{displaystyle S_{1},..,S_{n}}. Then given a sample Ï{displaystyle omega } from the probability space the value of the derivative is H(S1(Ï),S2(Ï),â¦,Sn(Ï))=:H(Ï){displaystyle H(S_{1}(omega ),S_{2}(omega ),dots ,S_{n}(omega ))=:H(omega )}. Today's value of the derivative is found by taking the expectation over all possible samples and discounting at the risk-free rate. I.e. the derivative has value:
where DFT{displaystyle {DF}_{T}} is the discount factor corresponding to the risk-free rate to the final maturity date T years into the future.
Now suppose the integral is hard to compute. We can approximate the integral by generating sample paths and then taking an average. Suppose we generate N samples then
which is much easier to compute.
Sample paths for standard models[edit]
In finance, underlying random variables (such as an underlying stock price) are usually assumed to follow a path that is a function of a Brownian motion2. For example, in the standard BlackâScholes model, the stock price evolves as
To sample a path following this distribution from time 0 to T, we chop the time interval into M units of length δt{displaystyle delta t}, and approximate the Brownian motion over the interval dt{displaystyle dt} by a single normal variable of mean 0 and variance δt{displaystyle delta t}. This leads to a sample path of
for each k between 1 and M. Here each εi{displaystyle varepsilon _{i}} is a draw from a standard normal distribution.
Let us suppose that a derivative H pays the average value of S between 0 and T then a sample path Ï{displaystyle omega } corresponds to a set {ε1,â¦,εM}{displaystyle {varepsilon _{1},dots ,varepsilon _{M}}} and
We obtain the Monte-Carlo value of this derivative by generating N lots of M normal variables, creating N sample paths and so N values of H, and then taking the average.Commonly the derivative will depend on two or more (possibly correlated) underlyings. The method here can be extended to generate sample paths of several variables, where the normal variables building up the sample paths are appropriately correlated.
It follows from the central limit theorem that quadrupling the number of sample paths approximately halves the error in the simulated price (i.e. the error has order ϵ=O(Nâ1/2){displaystyle epsilon ={mathcal {O}}left(N^{-1/2}right)} convergence in the sense of standard deviation of the solution).
In practice Monte Carlo methods are used for European-style derivatives involving at least three variables (more direct methods involving numerical integration can usually be used for those problems with only one or two underlyings. SeeMonte Carlo option model.
Greeks[edit]
Estimates for the 'Greeks' of an option i.e. the (mathematical) derivatives of option value with respect to input parameters, can be obtained by numerical differentiation. This can be a time-consuming process (an entire Monte Carlo run must be performed for each 'bump' or small change in input parameters). Further, taking numerical derivatives tends to emphasize the error (or noise) in the Monte Carlo value - making it necessary to simulate with a large number of sample paths. Practitioners regard these points as a key problem with using Monte Carlo methods.
Variance reduction[edit]
Square root convergence is slow, and so using the naive approach described above requires using a very large number of sample paths (1 million, say, for a typical problem) in order to obtain an accurate result. Remember that an estimator for the price of a derivative is a random variable, and in the framework of a risk-management activity, uncertainty on the price of a portfolio of derivatives and/or on its risks can lead to suboptimal risk-management decisions.
This state of affairs can be mitigated by variance reduction techniques.
Antithetic paths[edit]
A simple technique is, for every sample path obtained, to take its antithetic path â that is given a path {ε1,â¦,εM}{displaystyle {varepsilon _{1},dots ,varepsilon _{M}}} to also take {âε1,â¦,âεM}{displaystyle {-varepsilon _{1},dots ,-varepsilon _{M}}}. Since the variables εi{displaystyle varepsilon _{i}} and âεi{displaystyle -varepsilon _{i}} form an antithetic pair, a large value of one is accompanied by a small value of the other. This suggests that an unusually large or small output computed from the first path may be balanced by the value computed from the antithetic path, resulting in a reduction in variance.[22] Not only does this reduce the number of normal samples to be taken to generate N paths, but also, under same conditions, such as negative correlation between two estimates, reduces the variance of the sample paths, improving the accuracy.
Control variate method[edit]
It is also natural to use a control variate. Let us suppose that we wish to obtain the Monte Carlo value of a derivative H, but know the value analytically of a similar derivative I. Then H* = (Value of H according to Monte Carlo) + B*[(Value of I analytically) â (Value of I according to same Monte Carlo paths)] is a better estimate, where B is covar(H,I)/var(H).
The intuition behind that technique, when applied to derivatives, is the following: note that the source of the variance of a derivative will be directly dependent on the risks (e.g. delta, vega) of this derivative. This is because any error on, say, the estimator for the forward value of an underlier, will generate a corresponding error depending on the delta of the derivative with respect to this forward value. The simplest example to demonstrate this consists in comparing the error when pricing an at-the-money call and an at-the-money straddle (i.e. call+put), which has a much lower delta.
Therefore, a standard way of choosing the derivative I consists in choosing a replicating portfolios of options for H. In practice, one will price H without variance reduction, calculate deltas and vegas, and then use a combination of calls and puts that have the same deltas and vegas as control variate.
Importance sampling[edit]What Is Monte Carlo Simulation Model
Importance sampling consists of simulating the Monte Carlo paths using a different probability distribution (also known as a change of measure) that will give more likelihood for the simulated underlier to be located in the area where the derivative's payoff has the most convexity (for example, close to the strike in the case of a simple option). The simulated payoffs are then not simply averaged as in the case of a simple Monte Carlo, but are first multiplied by the likelihood ratio between the modified probability distribution and the original one (which is obtained by analytical formulas specific for the probability distribution). This will ensure that paths whose probability have been arbitrarily enhanced by the change of probability distribution are weighted with a low weight (this is how the variance gets reduced).
This technique can be particularly useful when calculating risks on a derivative. When calculating the delta using a Monte Carlo method, the most straightforward way is the black-box technique consisting in doing a Monte Carlo on the original market data and another one on the changed market data, and calculate the risk by doing the difference. Instead, the importance sampling method consists in doing a Monte Carlo in an arbitrary reference market data (ideally one in which the variance is as low as possible), and calculate the prices using the weight-changing technique described above. This results in a risk that will be much more stable than the one obtained through the black-box approach.
Quasi-random (low-discrepancy) methods[edit]
Instead of generating sample paths randomly, it is possible to systematically (and in fact completely deterministically, despite the 'quasi-random' in the name) select points in a probability spaces so as to optimally 'fill up' the space. The selection of points is a low-discrepancy sequence such as a Sobol sequence. Taking averages of derivative payoffs at points in a low-discrepancy sequence is often more efficient than taking averages of payoffs at random points.
Notes[edit]
See also[edit]References[edit]Notes[edit]
Articles[edit]
Books[edit]
External links[edit]
General
Derivative valuation
What Is Monte Carlo Simulation In Matlab
Corporate Finance
Value at Risk and portfolio analysis
Personal finance
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Monte_Carlo_methods_in_finance&oldid=887749470'
This article was adapted from Microsoft Excel Data Analysis and Business Modeling by Wayne L. Winston. Overview
We would like to accurately estimate the probabilities of uncertain events. For example, what is the probability that a new productâs cash flows will have a positive net present value (NPV)? What is the risk factor of our investment portfolio? Monte Carlo simulation enables us to model situations that present uncertainty and then play them out on a computer thousands of times.
Note: The name Monte Carlo simulation comes from the computer simulations performed during the 1930s and 1940s to estimate the probability that the chain reaction needed for an atom bomb to detonate would work successfully. The physicists involved in this work were big fans of gambling, so they gave the simulations the code name Monte Carlo.
In the next five chapters, you will see examples of how you can use Excel to perform Monte Carlo simulations.
Who uses Monte Carlo simulation?
Many companies use Monte Carlo simulation as an important part of their decision-making process. Here are some examples.
What happens when you type =RAND() in a cell?
When you type the formula =RAND() in a cell, you get a number that is equally likely to assume any value between 0 and 1. Thus, around 25 percent of the time, you should get a number less than or equal to 0.25; around 10 percent of the time you should get a number that is at least 0.90, and so on. To demonstrate how the RAND function works, take a look at the file Randdemo.xlsx, shown in Figure 60-1.
Note: When you open the file Randdemo.xlsx, you will not see the same random numbers shown in Figure 60-1. The RAND function always automatically recalculates the numbers it generates when a worksheet is opened or when new information is entered into the worksheet.
First, copy from cell C3 to C4:C402 the formula =RAND(). Then you name the range C3:C402 Data. Then, in column F, you can track the average of the 400 random numbers (cell F2) and use the COUNTIF function to determine the fractions that are between 0 and 0.25, 0.25 and 0.50, 0.50 and 0.75, and 0.75 and 1. When you press the F9 key, the random numbers are recalculated. Notice that the average of the 400 numbers is always approximately 0.5, and that around 25 percent of the results are in intervals of 0.25. These results are consistent with the definition of a random number. Also note that the values generated by RAND in different cells are independent. For example, if the random number generated in cell C3 is a large number (for example, 0.99), it tells us nothing about the values of the other random numbers generated.
How can you simulate values of a discrete random variable?
Suppose the demand for a calendar is governed by the following discrete random variable:
How can we have Excel play out, or simulate, this demand for calendars many times? The trick is to associate each possible value of the RAND function with a possible demand for calendars. The following assignment ensures that a demand of 10,000 will occur 10 percent of the time, and so on.
To demonstrate the simulation of demand, look at the file Discretesim.xlsx, shown in Figure 60-2 on the next page.
The key to our simulation is to use a random number to initiate a lookup from the table range F2:G5 (named lookup). Random numbers greater than or equal to 0 and less than 0.10 will yield a demand of 10,000; random numbers greater than or equal to 0.10 and less than 0.45 will yield a demand of 20,000; random numbers greater than or equal to 0.45 and less than 0.75 will yield a demand of 40,000; and random numbers greater than or equal to 0.75 will yield a demand of 60,000. You generate 400 random numbers by copying from C3 to C4:C402 the formula RAND(). You then generate 400 trials, or iterations, of calendar demand by copying from B3 to B4:B402 the formula VLOOKUP(C3,lookup,2). This formula ensures that any random number less than 0.10 generates a demand of 10,000, any random number between 0.10 and 0.45 generates a demand of 20,000, and so on. In the cell range F8:F11, use the COUNTIF function to determine the fraction of our 400 iterations yielding each demand. When we press F9 to recalculate the random numbers, the simulated probabilities are close to our assumed demand probabilities.
How can you simulate values of a normal random variable?
If you type in any cell the formula NORMINV(rand(),mu,sigma), you will generate a simulated value of a normal random variable having a mean mu and standard deviation sigma. This procedure is illustrated in the file Normalsim.xlsx, shown in Figure 60-3.
Letâs suppose we want to simulate 400 trials, or iterations, for a normal random variable with a mean of 40,000 and a standard deviation of 10,000. (You can type these values in cells E1 and E2, and name these cells mean and sigma, respectively.) Copying the formula =RAND() from C4 to C5:C403 generates 400 different random numbers. Copying from B4 to B5:B403 the formula NORMINV(C4,mean,sigma) generates 400 different trial values from a normal random variable with a mean of 40,000 and a standard deviation of 10,000. When we press the F9 key to recalculate the random numbers, the mean remains close to 40,000 and the standard deviation close to 10,000.
Essentially, for a random number x, the formula NORMINV(p,mu,sigma) generates the pth percentile of a normal random variable with a mean mu and a standard deviation sigma. For example, the random number 0.77 in cell C4 (see Figure 60-3) generates in cell B4 approximately the 77th percentile of a normal random variable with a mean of 40,000 and a standard deviation of 10,000.
How can a greeting card company determine how many cards to produce?
In this section, you will see how Monte Carlo simulation can be used as a decision-making tool. Suppose that the demand for a Valentineâs Day card is governed by the following discrete random variable:
The greeting card sells for $4.00, and the variable cost of producing each card is $1.50. Leftover cards must be disposed of at a cost of $0.20 per card. How many cards should be printed?
Basically, we simulate each possible production quantity (10,000, 20,000, 40,000, or 60,000) many times (for example, 1000 iterations). Then we determine which order quantity yields the maximum average profit over the 1000 iterations. You can find the data for this section in the file Valentine.xlsx, shown in Figure 60-4. You assign the range names in cells B1:B11 to cells C1:C11. The cell range G3:H6 is assigned the name lookup. Our sales price and cost parameters are entered in cells C4:C6.
You can enter a trial production quantity (40,000 in this example) in cell C1. Next, create a random number in cell C2 with the formula =RAND(). As previously described, you simulate demand for the card in cell C3 with the formula VLOOKUP(rand,lookup,2). (In the VLOOKUP formula, rand is the cell name assigned to cell C3, not the RAND function.)
The number of units sold is the smaller of our production quantity and demand. In cell C8, you compute our revenue with the formula MIN(produced,demand)*unit_price. In cell C9, you compute total production cost with the formula produced*unit_prod_cost.
If we produce more cards than are in demand, the number of units left over equals production minus demand; otherwise no units are left over. We compute our disposal cost in cell C10 with the formula unit_disp_cost*IF(produced>demand,producedâdemand,0). Finally, in cell C11, we compute our profit as revenueâ total_var_cost-total_disposing_cost.
We would like an efficient way to press F9 many times (for example, 1000) for each production quantity and tally our expected profit for each quantity. This situation is one in which a two-way data table comes to our rescue. (See Chapter 15, 'Sensitivity Analysis with Data Tables,' for details about data tables.) The data table used in this example is shown in Figure 60-5.
In the cell range A16:A1015, enter the numbers 1â1000 (corresponding to our 1000 trials). One easy way to create these values is to start by entering 1 in cell A16. Select the cell, and then on the Home tab in the Editing group, click Fill, and select Series to display the Series dialog box. In the Series dialog box, shown in Figure 60-6, enter a Step Value of 1 and a Stop Value of 1000. In the Series In area, select the Columns option, and then click OK. The numbers 1â1000 will be entered in column A starting in cell A16.
Next we enter our possible production quantities (10,000, 20,000, 40,000, 60,000) in cells B15:E15. We want to calculate profit for each trial number (1 through 1000) and each production quantity. We refer to the formula for profit (calculated in cell C11) in the upper-left cell of our data table (A15) by entering =C11.
We are now ready to trick Excel into simulating 1000 iterations of demand for each production quantity. Select the table range (A15:E1014), and then in the Data Tools group on the Data tab, click What If Analysis, and then select Data Table. To set up a two-way data table, choose our production quantity (cell C1) as the Row Input Cell and select any blank cell (we chose cell I14) as the Column Input Cell. After clicking OK, Excel simulates 1000 demand values for each order quantity.
To understand why this works, consider the values placed by the data table in the cell range C16:C1015. For each of these cells, Excel will use a value of 20,000 in cell C1. In C16, the column input cell value of 1 is placed in a blank cell and the random number in cell C2 recalculates. The corresponding profit is then recorded in cell C16. Then the column cell input value of 2 is placed in a blank cell, and the random number in C2 again recalculates. The corresponding profit is entered in cell C17.
By copying from cell B13 to C13:E13 the formula AVERAGE(B16:B1015), we compute average simulated profit for each production quantity. By copying from cell B14 to C14:E14 the formula STDEV(B16:B1015), we compute the standard deviation of our simulated profits for each order quantity. Each time we press F9, 1000 iterations of demand are simulated for each order quantity. Producing 40,000 cards always yields the largest expected profit. Therefore, it appears that producing 40,000 cards is the proper decision.
The Impact of Risk on Our Decision If we produced 20,000 instead of 40,000 cards, our expected profit drops approximately 22 percent, but our risk (as measured by the standard deviation of profit) drops almost 73 percent. Therefore, if we are extremely averse to risk, producing 20,000 cards might be the right decision. Incidentally, producing 10,000 cards always has a standard deviation of 0 cards because if we produce 10,000 cards, we will always sell all of them without any leftovers.
Note: In this workbook, the Calculation option is set to Automatic Except For Tables. (Use the Calculation command in the Calculation group on the Formulas tab.) This setting ensures that our data table will not recalculate unless we press F9, which is a good idea because a large data table will slow down your work if it recalculates every time you type something into your worksheet. Note that in this example, whenever you press F9, the mean profit will change. This happens because each time you press F9, a different sequence of 1000 random numbers is used to generate demands for each order quantity.
Confidence Interval for Mean Profit A natural question to ask in this situation is, into what interval are we 95 percent sure the true mean profit will fall? This interval is called the 95 percent confidence interval for mean profit. A 95 percent confidence interval for the mean of any simulation output is computed by the following formula:
Monte Carlo Simulation Excel Example
In cell J11, you compute the lower limit for the 95 percent confidence interval on mean profit when 40,000 calendars are produced with the formula D13â1.96*D14/SQRT(1000). In cell J12, you compute the upper limit for our 95 percent confidence interval with the formula D13+1.96*D14/SQRT(1000). These calculations are shown in Figure 60-7.
We are 95 percent sure that our mean profit when 40,000 calendars are ordered is between $56,687 and $62,589.
Problems
Need more help?You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice. Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |