Fun with (Financial) Math: Where is the S&P 500 headed at year end?

How much do you believe this statement? There is a 65% probability that the S&P 500 will be above it's current level (1479: closing at Aug 26th) at the end of the year? If you said, that's a load of crap, you are almost correct! Welcome to the world of Monte Carlo simulations.

With the markets reverting back to the mean of being actually volatile, instead of just kinda volatile, I thought it would be fun to do another Fun with Math post about Monte Carlo simulations and its application to finance.

The question we are trying to answer today is where will the S&P 500 be at end of the year? Will be it higher than it is currently, or will be lower? One purely quantitative way to answer the question is with a Monte Carlo simulation. As the wikipedia article states, these simulations are for "simulating the behavior of various physical and mathematical systems, and for other computations". There are a variety of applications in finance, and today we'll look at trying to estimate stock market returns.

First, we start with daaily S&P500 index data taken from Yahoo Finance, which goes back to 1950 or so. From there, we calcualate the daily returns of the index. Once we have that, we can say, if history repeats itself (randomly at that) we can kind of guess as to what the daily path of the S&P500 will look like. Here are two examples of what I mean.



The green line to the left is the actual index values and right where the green line and red line meets are the simulated values on the index based on the prior historical returns of the index. You can see that the green line ultimately diverges from the red line and ends up higher than the most recent close while the red line ends up lower.

Now, you run this simulation 100 times and get this result:



Once you're done with the simulations, you can then try to see what it's telling you. In these particular simulations, there were 65 scenarios where the ending value of the index was greater than the closing value of 1479 (hence the 65% probability mentioned earlier). Here is a graph of the % change from the current close.



Stats are as followed:
avg: 4.48%
median: 3.90%
std dev: 12.9%
max: 43%
min: -23%

So based on my simulation, I can say that the probability of the S&P500 ending up from its current value is 65%. Now the question becomes, how much stock (get it, hehe) should I put in these results? The results themselves aren't completely crap, but should be taken with a large dosage of salt possibly with a side of some more salt.

This was a rather unsophisticated simulation that didn't take into account the current economic landscape, interest rates, inflation or anything like that. It just threw some stuff on a wall to see what will take place. Not only that, but it was only done 100 times. It's hard to tease out any meaningful conclusions from a simulation that was only done 100 times. However, that's not to say that if I ran the simulation 1,000 or even 10,000 times that I would be 100x more confidence in the results, but it would be useful to start generating some conclusions from the output. But you would still suffer from the garbage in garbage out issue with any model/simulation.

All this is to say that your initial intuition with respect to the 65% was right all along :P.

3 comments:

Miserly Bastard said...

Hi Frank, one thing that quant types always forget about Monte Carlo simulations is that because the inputs are based on historical data, while they do a good job of projecting "standard" events, they do a poor job of modelling for extreme events (often 5 or 6 sigma). You saw this with quant/statistical arb funds during July and August, where their models went haywire when the positions started behaving in ways never before seen. Hurricane forecasting is another area where "tail risk" clearly exists, but is exceedingly difficult to project.

Frank said...

Grrr, spam

Dan said...

Hi Frank,

How did you perform the simulations after you calculated the daily returns?

Thanks!

SAMEDAYMUSIC

Designed by Posicionamiento Web | Bloggerized by GosuBlogger | Blue Business Blogger