/
Monte Carlo Simulation Brett Foster Monte Carlo Simulation Brett Foster

Monte Carlo Simulation Brett Foster - PowerPoint Presentation

test
test . @test
Follow
354 views
Uploaded On 2018-11-03

Monte Carlo Simulation Brett Foster - PPT Presentation

Monte Carlo In A Nutshell Using a large number of simulated trials in order to approximate a solution to a problem Generating random numbers Computer not required though extremely helpful A Brief History ID: 712834

random stock monte option stock random option monte carlo price estimate payoff normal standard 450 trials variance simulation return variable variables rate

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Monte Carlo Simulation Brett Foster" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Monte Carlo Simulation

Brett FosterSlide2

Monte Carlo In A Nutshell

Using a large number of simulated trials in order to approximate a solution to a problem

Generating random numbersComputer not required, though extremely helpful Slide3

A Brief History

Earliest well documented use of Monte Carlo:

Late 18th Century FranceComte de Buffon performed an experiment involving the repeated tossing of a needle onto a planeWanted to determine probability of needle intersecting a stringSlide4

Modern Monte Carlo Method

Named after Monte Carlo Casino in 1940’s by a group of men working on the nuclear bomb

John von Neumann, Stanislaw Ulam and Nicholas MetropolisUlam’s Uncle supposedly often frequented this CasinoSlide5

Onset of Computers

Invention and popularization of computer

Much more practical to implement Monte CarloPopularity has taken off since 1950’sSlide6

Random Numbers

Key aspect of computers: allow us to quickly generate thousands of “random” numbers.

Food for thought:Computers are ultimately deterministic devicesHow then can the numbers be “random?”We will leave this thought for the philosophers and assume that we do actually have random numbersSlide7

A Simple Example

Using Monte Carlo to approximate pi

Will give us a better understanding of how to implement and analyze a Monte Carlo SimulationObviously, there are more efficient ways to figure out digits of piThis example will help build a conceptual understanding before looking at another exampleSlide8

Consider a unit circle inscribed within a square

The ratio of the area of the circle to the area of the square is π/4

We will use this key fact in order to estimate π by randomly selecting points with the square, and checking whether they are within the circleSlide9

We will generate n points uniformly distributed within the square

Let X denote a binomial random variable which takes the value 1 if a randomly generated point falls within the circle and 0 if the point falls outside of the circle

X is a Bernoulli R.V. with p = π/4Notice: E(X) = π/4

 E(4X) =

π

For convenience, let Y = 4X. Now, we estimate

π

with Slide10

The Simulation:

This simulation can easily be programmed into a computer:

I used VBA in Excel to write a short function to run our simulationWe input n, number of trials, and function will repeatedly select points uniformly distributed within the square and determine how many fall within the circleFunction computes sample mean and returns our estimate for

π

:Slide11

VBA Code:Slide12

How accurate is this method?

Consider the variance of our estimate:

Since X is a Bernoulli R.V. with p = π/4, Var(X) = (

π

/4)(1-

π

/4), however we will assume we don’t know

π

. Hence, we shall compute the sample variance of X.Slide13

Sample Variance of X

We can calculate this retrospectively, since X is a Bernoulli R.V:

Ex: When n = 1000, we estimate pi to be 3.188. That is, Hence, 797 of our points fell within the circle, making x = 1 for 797 of our trials, and zero for the other 203 Now, can be easily calculated Slide14

Confidence Intervals

Central limit theorem: tells us that is

approximately normal (for large n)Then, the (1 – α

) Confidence Interval is given by

where is the inverse of the standard normal cumulative distribution function Slide15

A note on variance

The variance of our estimate decreases with n, since

As n changes, we have For large n, this gets very small

What are the implications for Monte Carlo?Slide16

Results

For n = 10,000,000 our estimate is accurate to three decimal places when compared with

πNot exactly efficientSlide17

Hypothetically…

With this method for estimating π

, how many trials are necessary for us to be at least 95% sure that our error is less than 1x10-10?About 1.036

x10

21Slide18

Clearly, Monte Carlo is not best method for figuring out digits of pi

So what is a practical

application???Slide19

A Real World Example: Valuing a Financial Option

An option is a financial derivative

Its value is derived from some other object, such as a stockPayoff is dependent upon the value of the stock at the expiration date of the optionFor a call option, the owner has the right to buy or sell the underlying asset at a specified price, known as the “Strike Price,” at the “expiration date” specified in the option contractSlide20

Example

Consider a call option written on Apple stock with a strike price of $450 and an expiration date in 6 months.

In 6 months, if the stock price is above $450 (say $475 perhaps), the owner will exercise the option and purchase the stock for $450 (getting a payoff of $25)If the stock price is below $450, the owner will simply let the option expire, making a payoff of $0Slide21

More succinctly, the payoff at expiration is given by

Payoff = Max{0, S – 450}

Where S is the stock price and 450 is the strike priceNote that the payoff is never negative!How can we value this sort of derivative?Requires some assumptions about the behavior of stock prices:

Rate of return on a stock is normally distributed

Implies that stock prices are Lognormal

If X is a normal random variable, then exp(X) is a lognormal random variableSlide22

Specifically, we say

Where we define:

is the current stock price is the stock price at time t > 0 is the expected rate of return on the stock

is the variance of the annual rate of return on the stock and its square root is called volatility

is a standard normal random variableSlide23

Using historical data, one can easily obtain estimates for the expected return and volatility of a stock

Under the lognormal stock price model, predicting a future stock price boils down to generating a standard normal random variableSlide24

The Black-Scholes

Equation

Most options (such as the one which we examined earlier) can easily be valued using the Black-Scholes equationSo why would we want to use Monte-Carlo?Not all options can be valued with Black-

Scholes

Why not???Slide25

A rough description

Recall, the payoff function for a call option discussed previously was given by

Payoff = Max{0, S-450}If S is lognormal, the payoff of the option has to do with the probability that S > 450 (and by how much)What if instead of a strike price of 450, we have a strike price that is also a random variable? What if that random variable is not lognormal?

Slide26

Consider an option which gives the owner the right (but not the obligation) to purchase a share of stock A for the average of the prices of stock B and stock C

Then, our payoff function is given by

This is called a “basket option” and no formula exists to calculate its value

Slide27

Enter…. Monte Carlo!

Scenario:Suppose that Apple would like to encourage innovation and dedication by issuing its employees a stock option which pays off if the price of Apple stock exceeds the average of Google and Amazon stock 1 year from now

Why value this option?Accounting purposes: what is this worth?Employee interest: what is the value of this option?Slide28

The payoff is that of a basket option:

Payoff = Max{0, Sapple

- .5(Sgoogle + SAmazon

)

}

How can we value this?

Monte Carlo Simulation:

Run many trials where we calculate the average future value of the option for these trials. Then discount this to the present value using the risk free rateSlide29

Parameters

In order to run the simulation, we need to estimate the expected return and annual volatility for each of the three stocks

For expected return, we can use the CAPM modelVolatility is calculated using historical dataNeed starting price (end of day November 4

th

)

Need risk free rate of return: LIBOR = 0.95%

t = 1Slide30

Standard Normal

In our first example, we only needed to generate uniform random variables on (0,1)

We now need to generate standard normal random variables to simulate future stock pricesGenerate uniform random variables on (0,1)Treat as a percentile from standard normal distribution, and take the inverseThis gives you a random draw from the standard normal distributionSlide31

Another Issue

Stock prices do not move independently of one another

We will need to calculate the correlation coefficient for the returns on Apple, Google and Amazon stock. Again, we can use historical data:Slide32

How do we generate correlated R.V.’s?

Let Z(

ap), Z(g), and Z(az) be the standard normal random variables used to

simuate

the future stock prices of Apple, Google, and Amazon respectively. Let ‘s be independent standard normal random variables Now, define:Slide33

One can easily verify that Z(

ap), Z(g) and Z(az) are all standard normal random variables, with

Corr(Z(ap), Z(g)) =

Corr

(Z(g), Z(

az)) =

Corr

(Z(

ap

), Z(

az

)) =Slide34

The Simulation

We now have all the information necessary to run our simulation. The procedure can roughly be described as follows:

Simulate the future stock price for each of the companies

Compute the option’s payoff for the simulated future stock prices

Repeat steps 1 and 2 until you have reached the desired number of trials

Compute the sample mean of the option payoff

Discount at the risk free rate to determine our estimate for the value of the optionSlide35

As before, this can be done using VBA in Excel:Slide36

Analyzing the results:

As in our pi example, the results are much more meaningful if we have some idea of their accuracy

Define V as the value of the option for a single trial. Then, our estimate is given by CLT  is approximately normal

Also,

How do we calculate

Var

(V)? Slide37

Recall how we previously retrospectively determined the sample variance

Since X was Bernoulli, we could recover the values of X and estimate S2

(X)That approach does not work here, since V is certainly not Bernoulli. Need to store each V as we go, and calculate S2(V) lastMy solution: Estimate S

2

(V) using 1,000,000 trials with n = 1, and use to compute sample variance for simulations with n>1

Estimated S

2

(V) = 2293.63Slide38

Results

With n = 1,000,000 we are about 95% sure that the actual value is within $0.10 of $29.99

Probably accurate enough for most practical purposesSlide39

Conclusion

Monte Carlo provides a numerical method to obtain an estimate for a solution that needs to be close, but not necessarily exact

We showed two specific examples, but the applications of Monte Carlo are very diverseQuestions???Slide40

Sources:

Bodie

, Zvi, Alex Kane, and Alan Marcus. Essentials of Investments. Eighth Edition. New York: Mcgraw

-Hill, 2010.

Kalos

,

Malvin

H., and Paula A. Whitlock.

Monte Carlo Methods Volume 1: Basics

. New York: John Wiley & Sons, 1986.

McDonald, Robert

obert

Lynch.

Derivatives Markets

. 2nd. Boston: Pearson Education Inc., 2006. Print.

Sobol

,

IIya

.

A Primer for the Monte Carlo Method

. Boca Raton: CRC Press, 1994.