Using Monte Carlo simulations on price predictions
It has been a while since I did some coding exercises.
I came across this medium article on the use of Monte Carlo simulations to predict Bitcoin prices and decided to give it a try while also adapting it to my use.
If you are interested in the code to run the Monte Carlo simulations, please refer to the medium article above. In this article, I will share what I have done and adapted for my own use.
For those who are unfamiliar with Monte Carlo simulations, it is basically a forecasting technique used to produce a set of extreme outcomes based on statistical data. I have shared the use of Monte Carlo simulations in several articles before (for instance, in the area of retirement)
In this particular coding exercise, here are the steps (in layman terms) I took to create these Monte Carlo simulations on the price prediction of SPY (S&P 500 ETF)
1) Reference price data for SPY for a specified time period (in my case, I took the last 7 years data)
2) Calculate the daily returns (percentage change) for these SPY prices over the 7 years period
3) Calculate the mean price of SPY in the last 50 days
4) Calculate the daily volatility of SPY by taking the standard deviation of the daily returns
5) Create 2000 Monte Carlo simulations across 140 days for price predictions through the algorithm using the daily volatility value and mean price of SPY
If you refer to the medium article, you might notice some differences in what I did. For instance, the author of the medium article uses the last price of SPY while I use the mean price of SPY in the last 50 days. This is because I find that the mean price across the last 50 days is a more reliable value to use than a singular value based on last day price.
Here's the results.
I have also included the results at each 10 percentile to give a flavour of how the prices are like across the distribution. The median price at the end of 140 days (~end of the year) is 426. At the most extreme ends, the maximum price is 630 while the minimum price is 245. It's interesting to note that a median price of 426 is actually lower than the current value of 442 so I'm inclined to believe that it is more likely that the S&P 500 will end the year at a lower value than where it is currently.
You may also notice that the average price is slightly higher than the median price, and the median price is also higher than the mode value. This represents a slightly positively skewed distribution. In finance, a positively skewed distribution is usually ideal for investors as it represents more desirable returns through few large gains over frequent small losses. The current one for SPY isn't really the best example, but you will see one if we were to run the same exercise on Bitcoin price prediction.
This is clearly a positively skewed distribution and that's also why it pays off having some of your investments in Bitcoin. Even if there are frequent small losses, a few large gains are more than enough to cover it. Did I also mention no one ever loses money in Bitcoin investment if they hold for a minimum of 3 years, 4 months and 4 days?
Moomoo powered by FUTU SG now has an August promotion! If you haven't signed up for it, check it out here!
I also do share some useful content or articles I have read in my Telegram channel. Do join the channel if you are interested.