Professional Documents
Culture Documents
Effectivnessof Monte Carlosimulationand ARIMAmodelinpredictingstockprices
Effectivnessof Monte Carlosimulationand ARIMAmodelinpredictingstockprices
net/publication/347948296
CITATIONS READS
0 2,101
3 authors:
Nedzmija Turbo-Merdan
3 PUBLICATIONS 0 CITATIONS
SEE PROFILE
All content following this page was uploaded by Azra Zaimovic on 22 May 2021.
University of Tuzla
Faculty of Economics
CONFERENCE
PROCEEDINGS
Tuzla, December 7th-9th, 2017
e os
EKONOMSKI FAKULTET PODGORICA
5th International Scientific Conference
“Economy of Integration”
ICEI 2017
“The Role of Economic Thought in Modern Environment”
CONFERENCE PROCEEDINGS
Editors:
Emira Kozarević
Jasmina Okičić
University of Tuzla
Faculty of Economics
7th-9th December, 2017
Tuzla, Bosnia and Herzegovina
Almira Arnaut-Berilo, PhD
Sarajevo School of Economics and Business, University of Sarajevo, BiH
E-mail: almira.arnaut@efsa.unsa.ba
Nedžmija Turbo-Merdan, MA
E-mail: nedzmija_t@hotmail.com
Abstract
The efficient market hypothesis states that stock prices are a reflection of information
and rational expectations, and all new information about the issuer are almost
immediately reflected in the current stock price. Stock prices should not be accurately
predicted by looking at the historical prices. Stock prices could be described by
statistical process called “random walk”, i.e. single day’s deviations from the central
value are random and unpredictable.
The aim of this research is to test the effectiveness of Monte Carlo simulation model and
Autoregressive Integrated Moving Average model (ARIMA) in predicting stock prices.
Selected methods use different input data in predicting stock prices, including different
time horizons; ARIMA model uses time series data to predict future prices, while Monte
Carlo simulation uses random walk component. We compare daily predictions of stock
prices estimated by both methods for five companies from Dow Jones Industrial Average
(DJIA) index. Predictions have been generated for one month period, from 10th March
2016 until 10th April 2016. For the purpose of evaluation of prediction models we use
Mean Absolute Error (MAE), Mean Absolute Percent Error (MAPE), Mean Square
Error (MSE) and Root Mean Square Error (RMSE) methods.
We came to the conclusion that there is a slight advantage in accuracy of predictions
of ARIMA model for shorter periods (5 days), while Monte Carlo simulation has
undoubted advantage for longer periods (21 days). Also, we noticed linkages between
946
single stock’s predictions for periods of 5, 10 and 15 days for both models. Our results
show that in shorter periods stock prices have elements of predictability, what questions
the level of efficiency of the world leading stock exchange. In longer periods (21 days)
results indicate market efficiency, i.e. model with random walk component (Monte Carlo
simulation) has advantage compared to the model based on historical prices (ARIMA).
Sažetak
947
1. Introduction
The aim of this research is to test the effectiveness of Monte Carlo (MC)
simulation model and autoregressive integrated moving average model
(ARIMA) in predicting stock prices. Selected methods use different input
data in predicting stock prices, including different time horizons; ARIMA
model uses time series data to predict future prices, while Monte Carlo
simulation uses random walk component. Monte Carlo simulation model
is being used for valuation of options, while due to high volatility it is not
widely accepted for stock prices predictions. The aim of our research is to
test whether the MC model can be competitive to one of widely used models
for short-term forecasting of stock prices, namely ARIMA model. The basic
idea of this research is to compare different models; the sample selection, we
think, doesn’t diminish the importance of the research.
For an initial insight into the dynamics of stock prices, daily prices for all five
companies are used in the period from March 2006 till March 2016. In the next
step, we forecasted stock prices by both models for one month period from
10th March till 10thApril 2016, i.e. 21 active trading days on NYSE. Individual
forecasted prices are compared with actual prices, and then forecasted prices
by both models are compared to each other.
For comparison were used statistical tools for evaluating the accuracy of
forecasting models (mean absolute error, mean absolute percentage error and
root mean square error).Vertical analysis is done for deriving conclusions
regarding the forecasting power of two models for time horizons of 5, 10, 15
and 21 days. The paper is divided into five parts. Section 2 Literature review
948
provides an overview of theoretical background of the research on efficient
markets and forecasting models, and shows the results on previously conducted
researches. Section 3 explains the methodology and data used for the analysis.
Section 4 gives the results of ARIMA and MC forecasting process. Finally,
brief summary and concluding remarks are given in Section 5.
2. Literature review
Efficient market hypothesis (EMH) states that asset’s prices fully reflect all
available information in the market, so it is not possible to beat the market,
since prices change only due to new information or changes in investors’
required rates of return (Malkiel & Fama, 1970). An implication of EMH is
that stocks are always in equilibrium, i.e. stocks trade at their fair value. It
is impossible to gain excessive returns or to outperform the market through
fundamental or technical analysis and market timing. Above average returns
are connected with investments in riskier securities.
Random walk theory is stock market theory that stats that stock price changes
are random, i.e. next price changes are random from previous price. According
to this theory stock price changes have the same distribution and they are
independent from each other, meaning that past movements of stock prices
or direction of stock prices cannot be used to predict future prices. The idea
is that information flow unhindered and all new information are immediately
embedded in stock price, so tomorrow’s stock price changes will reflect only
tomorrow’s information, independent from today’s price change. The idea is
also referred to as the weak form of efficient market hypothesis. Dupernex
(2007) on the other hand states that random walk theory does not imply that
stock market is efficient with rational investors, as efficient market theory stats.
Dai and Zhang (2013) find US stock market semi-strong efficient, meaning
that all publicly available information is included in the current price. They
used machine learning theory to confirm the semi-strong efficiency; prediction
of 3M stock next day price had low accuracy of 50%, while the accuracy
increased to 79% when authors tried to predict long-term trend.
Xu and Berkely (2012) used information from Yahoo Finance and Google
Trend to simplify the process of evaluation of online news. The author
analyses Apple Inc. and combines the conventional time series analysis
technique (ARMA - autoregressive moving average) with the information
949
from the Internet to predict weekly changes in stock price. Important news
related to a selected stock over a five-year period are recorded and the weekly
Google trend index values on this stock are used to provide a measure of
the magnitude of these events. The result of this experiment has shown
significant correlation between the changes in weekly stock prices and the
values of important news computed from the Google trend website. Author
concludes that algorithm proposed in this study can potentially outperform
the conventional time series analysis in stock price forecasting.
Boyle (1976) shows that MC simulation is useful for option pricing when
underlying stock returns are generated as join of continues as well as sudden
processes, and that it can be used for numerical forecasting of European stock
call options that pay dividends. Jabbour and Liu (2005) find that the accuracy
of MC simulation is increased by larger number of attempts in simulations.
Clewlow and Strickland (1998) and Hull (2012) state that MC is computer
inadequate because of the high generated variances. Landauskas (2011) in his
950
paper compares standard MC simulation with Markov chain MC simulation
(MCMC). After 300 executed trajectories, average stock price after 50 trades
was very similar in both methods ($ 18.08 and $ 18.10). Author also states
that larger number of intervals used in model development leads to higher
accuracy, but also demands more time to get result.
ARIMA model as one of the most prominent models for financial forecasting
can be described as follows:
Yt = φ0 + φ1Yt-1 + φ2Yt-2 + ... + φpYt-p + εt ‒ θ1εt-1 ‒ θ2εt-2 ‒ θqεt-q, (1)
Where symbols represent:
■■ Yt– forecasted stock price in period t (day, month, year or similar);
■■ Yt-p– real stock price in period t‒p ;
■■ φp and θq – coefficients;
■■ p and q – order of autoregressive component and moving average,
respectively.
The main task of time series analysis is discovering of model that will
appropriately describe the process that is being generated by time series.
Box-Jenkins approach to model selection is one of the most often used
methods for time-series analysis. This approach is characterized by four
stages: identification stage, estimation stage, diagnostic checking stage and
forecasting stage (Bahovec & Erjavec, 2009). The application of the ARIMA
methodology for time series analysis is due to Box and Jenkins (1970).
951
According to Crnjac-Milić and Masle (2013) MC simulation was found
useful when stock returns have been generated from continuous and discrete
returns. MC simulation model is being derived from Markov process, Wiener
process and Brownian motion. If we analyze discrete time period, model can
be presented as follows:
For the comparison of the forecasts obtained through the Monte Carlo
simulation and ARIMA model, price movements for next five companies
are analyzed: Pfizer, Coca-Cola, General Electric, Exxon and 3M. These
companies are part of Dow Jones Industrial Average (DJIA) index and they
are also quoted on the New York Stock Exchange (NYSE). The historical
prices of all five companies are analyzed in the period from March 2006 to
March 2016. The aim is to test how the results of the ARIMA model and
Monte Carlo simulation are changed if the actual stock prices of companies
vary in different ways, regardless of the industry to which the company
belongs. For each model, a set of steps is implemented by using Eviews 9
SV and MS Excel 2010. The prices are forecasted at the daily level for the
period from 10 March to 10 April 2016, or 21 days of active trading. The
observation period is divided into four parts: 5, 10, 15 and 21 trading days.
First, the individual forecasted prices for both models are compared with the
actual ones. Then, forecasted prices by both models are compared with each
other. To help with the comparison, statistics are used to evaluate the accuracy
of prognostic models: mean absolute error (MAE), mean absolute percentage
error (MAPE) and root of a mean square error (RMSE).
952
4. Results
Pfizer stock data used in this study cover the period from March 2006 to
March 2016 having a total number of 2507 observations. Figure 1 shows the
original pattern of the series and gives a general overview whether the time
series is stationary or not. From the graph below we can see that the time
series have random walk pattern.
953
Figure 2. ADF unit root test for D(PFIZERCL)
In the analyzed case, the ADF test value is -37.84941, which is far less than
the critical value of the test (-3.43; -2.86; -2.56), which leads to a strong
rejection of the zero hypothesis that D(PFIZERCL) has a unit root, and
accepting an alternative hypothesis that D(PFIZERCL) has no unit root with
the usual level of significance.
The parameter I in the ARIMA model measures the integrations of the model
(I between AR and MA) and in the case of the observed model it is 1, which
means that the series is the first-order differential. Table 1 shows the different
parameters of the autoregressive (p) and moving average (q) among the
several ARIMA model experimented upon. Comparison is made so that the
optimal model is one which has: (1) the highest value of the coefficient of
determination, (2) the lowest value of the Schwarz information criterion and
(3) the lowest standard error of regression. Among the models of integration
of order , the coefficient of determination is the highest for the model (1, 1, 2).
The standard error of regression is the lowest also for the model (1, 1, 2), and
the Schwarz information criterion is approximate to the parameters of other
models of the order of integration, so this model is taken as optimal.
954
(0,1,1) 0.000948 0.537329 0.315689
(2,1,0) 0.002827 0.535448 0.315392
(0,1,2) 0.003088 0.535187 0.315351
(2,1,1) 0.003723 0.537672 0.315313
(1,1,2) 0.003979 0.537416 0.315273
Source: Authors’ research
955
∧
PFIZERt = ‒ 0,029924t-1 ‒ 0,058546 εt-2 + εt. (3)
The subsections below describe the processes of Monte Carlo simulation
development for Pfizer Inc.
4.2. Monte Carlo simulations for forecasting stock prices of Pfizer Inc.
The starting MC model for calculating the input data is presented and
explained earlier (2):
ΔS =μSΔt + σSϵ√Δt
Data on expected annual growth and standard deviation are determined based
on historical prices. We considered a period of 30 years (from 1985 to 2015)
with an average annual return for that period of 16.80% (μ = 0.16794) and a
standard deviation of 33.66% (σ = 0.33665).
The price change is observed at the daily level as the results of the simulation
are compared with real prices within one month period of time. For this model,
it is assumed that Pfizer stocks are traded actively for 254 days a year, so one
year is divided by the number of days in order to get the required parameter.
Thus, Δt = 1/254 or 0.00394, while the second root from Δt is 0.06275.
The real price (S) on 10th March was $ 30.5, so the model can be written as:
After 1000 simulations of the daily prices, the expected value was calculated
and the result obtained is the estimated daily stock price based on the MC
model. The final result is visible in Table 2, in a comparative view with the
results of the ARIMA model predictions.
956
Table 2. Prices obtained through the forecast of two models in relation
to the real prices of the stocks of Pfizer Inc.
We compare the ex post one week ahead forecasts of stock prices using three
different evaluation statistics to ensure that our inferences regarding the
relative efficiency of the forecasting models are not driven by the particular
criterion used in these comparisons. The statistics are the Root Mean Squared
Error (RMSE), the Mean Absolute Error (MAE) and Mean Absolute Percent
Error (MAPE).
957
Table 3. Comparative ARIMA and MC model statistics
for different periods of time for Pfizer Inc.
Time period
Model
5 days 10 days 15 days 21 day
The mean absolute error (MAE)
ARIMA model 0.25829 0.44877 0.51675 1.16276
MC model 1.04480 0.72002 0.63372 0.848865
Mean absolute percent error (MAPE)
ARIMA model 0.87074 1.49505 1.71510 3.67968
MC model 3.55643 2.43679 2.13855 2.74831
The root mean squared error (RMSE)
ARIMA model 0.36007 0.53977 0.61381 1.60025
MC model 1.09947 0.83659 0.749033 1.024226
Advantage ARIMA ARIMA ARIMA MC
Source: Authors’ research
In Table 3 we see that the statistics for the ARIMA model for periods of 5, 10
and 15 days are much lower than the same indicators for the MC simulation.
This means that the ARIMA model gives results closer to the real ones. If the
total period of 21 days is observed, MC simulation gives more precise results.
4.3. Comparative ARIMA model and Monte Carlo simulation model statistics
Coca Cola
∧
ARIMA model COCACOLAt = 29.94265 + 0.999573 COCACOLAt-1 + 0.998660εt-1 + εt.
MC model ΔS = 0.15943 · S · 0.00394 + 0.23938 · S · ϵ · 0.06275
Time horizon
5 days 10 days 15 days 21 days
The mean absolute error (MAE)
ARIMA 0.868828 1.004986 1.338585 1.596852
MC 0.699725 0.784929 1.056698 1.219699
958
Mean absolute percent error (MAPE)
ARIMA 0.019147 0.022095 0.029117 0.034532
MC 0.015418 0.017257 0.022981 0.026378
The root mean squared error (RMSE)
ARIMA 0.901527 1.029633 1.444867 1.714948
MC 0.734412 0.807169 1.148668 1.310382
Advantage MC MC MC MC
Source: Authors’ research
Table 5. Comparative ARIMA and MC model statistics for different periods of time for
General Electric
General Electric
∧
ARIMA model GEt = 27.23002 + 0.998697 GE t-1 − 0.231098εt-1 + εt.
MC model ΔS = 0.14525 · S · 0.00394 + 0.25661 · S · ϵ · 0.06275
Time horizon
5 days 10 days 15 days 21 days
The mean absolute error (MAE)
ARIMA 0.353942 0.686105 1.020895 0.980553
MC 0.387337 0.64592 0.9259 0.814732
Mean absolute percent error (MAPE)
ARIMA 0.011556 0.022173 0.032544 0.031376
MC 0.012662 0.020895 0.029543 0.026057
The root mean squared error (RMSE)
ARIMA 0.455237 0.790311 1.175119 1.103603
MC 0.467556 0.720884 1.044524 0.935381
Advantage ARIMA MC MC MC
Source: Authors’ research
Exxon
∧
ARIMA model EXXONt = 79.03694 + 0.992641 EXXON t-1 − 0.152387εt-1 + εt.
MC model ΔS = 0.13012 · S · 0.00394 + 0.15147 · S · ϵ · 0.06275
Time horizon
5 days 10 days 15 days 21 days
959
The mean absolute error (MAE)
ARIMA 0.51880 0.95413 1.11439 0.86722
MC 0.53117 0.92719 0.94768 0.79938
Mean absolute percent error (MAPE)
ARIMA 0.62197 1.13829 1.32680 1.30333
MC 0.63548 1.10566 1.12809 0.95426
The root mean squared error (RMSE)
ARIMA 0.71518 1.12048 1.28306 0.98519
MC 0.78263 1.10219 1.11170 0.99400
Advantage ARIMA ARIMA ARIMA MC
Source: Authors’ research
3M
∧
ARIMA model 3Mt = 109.4349 + 0.999529 3M t-1 − 0.062219εt-1 + εt.
MC model ΔS = 0.13764 · S · 0.00394 + 0.19119 · S · ϵ · 0.06275
Time horizon
5 days 10 days 15 days 21 days
The mean absolute error (MAE)
ARIMA 2.71791 3.88420 4.83041 5.47981
MC 2.25786 3.11321 3.81109 4.06980
Mean absolute percent error (MAPE)
ARIMA 1.67007 2.36747 2.92442 3.30713
MC 1.38759 1.89775 2.30753 2.45718
The root mean squared error (RMSE)
ARIMA 2.81926 4.09706 5.16102 5.78750
MC 2.32453 3.27595 4.06431 4.26339
Advantage MC MC MC MC
Source: Authors’ research
960
4.4. Discussion of results
TIME HORIZON
Company
5 DAYS 10 DAYS 15 DAYS 21 DAYS
Pfizer Inc. ARIMA ARIMA ARIMA MC
Coca-Cola MC MC MC MC
General Electric ARIMA MC MC MC
Exxon ARIMA ARIMA ARIMA MC
3M MC MC MC MC
Source: Authors’ research
Based on the results of the predicting power of both models, we can conclude
that ARIMA model has same advantage in predicting stock prices in shorter
periods of time (5 days), while there is an undoubted advantage on side of
MC model for longer periods of time (21 days). Also, we noticed linkages
between single stocks predictions in a way that there is only one change in
advantage from one method to another, and that advantage of MC method is
increasing with the lengthening of the time.
961
or some other process of market information absorption, after what they are
being included in the market price.
5. Conclusion
This paper analyzes the effectiveness of Monte Carlo simulations and ARIMA
model in predicting stock prices. Our results show that in shorter period stock
prices have elements of predictability according to historical price, what questions
the level of efficiency of the world leading stock exchange. In longer periods (21
days) results indicate weak-form market efficiency, i.e. model with random walk
component (Monte Carlo simulation) has advantage compared to the model based
on historical prices (ARIMA). A combination of these findings could provide
useful information to investors when to buy or sell stocks and Monte Carlo
simulation could be used to determine which stock to sell short. We consider
that this research can be extend in two ways: (1) for possible generalization of
obtained conclusions about advantages of one or the other method in predicting
stock prices for which we suggest the expansion of sample and (2) further analysis
of time lag needed to absorb new information in market and its’ inclusion in the
stock price as according to MC model which is based on random walk principle.
References
1) Ariyo, A. A., Adewumi, A. O. & Ayo, C. K. (2014) Stock price prediction using
the ARIMA model. In Al-Dabass, D., Orsoni, A., Cant, R., Yunus, J., Ibrahim,
Z. & Saad, I. (Eds.), 2014 UKSim-AMSS 16th International Conference on
Computer Modelling and Simulation (pp. 106-112). Cambridge: IEE.
2) Bahovec, V. & Erjavec, N. (2009) Uvod u ekonometrijsku analizu. Zagreb: Element.
3) Borkar, M., Cevher, V. & McClellan, J. H. (2007) Decentralized state initialization
with delay compensation for multi-modal sensor networks. The Journal of VLSI Signal
Processing Systems for Signal, Image, and Video Technology. 48(1-2), pp. 109-125.
4) Box, G. E. P. & Jenkins, G. M. (1970). Times series Analysis Forecasting and
Control. San Francisco: Holden-Day.
5) Boyle, P. P. (1976) Options: A Monte Carlo Approach. Journal of Financial
Economics. 4, pp. 323-338.
6) Clewlow, L. & Strickland, C. (1998) Pricing interest rate exotics by Monte Carlo
simulation. In Dupire B. (Ed.), Monte Carlo: Methodologies and Applications
for Pricing and Risk Management. London: Risk Books.
7) Crnjac-Milić, D. & Masle, D. (2013) Mogućnost primjene Monte Carlo metode
na primjeru agroekonomskog problema prilikom donošenja odluka u uvjetima
rizika. Ekonomski vjesnik. XXVI(1), pp. 309-313.
962
8) Dai, Y. & Zhang, Y. (2013) Machine learning in stock price trend forecasting.
Available at: http://cs229.stanford.edu/proj2013/DaiZhang-MachineLearningIn
StockPriceTrendForecasting.pdf (Accessed: September 5, 2017).
9) Dupernex, S. (2007) Why might share prices follow a random walk?. Student
Economic Review. 21, pp. 167-179
10) Eckhardt, R. (1987) Stan Ulam, John von Neumann and the Monte Carlo
method. Los Alamos Science. 15, pp. 131-136.
11) Hoesli, M., Jani, E. & Bender, A. (2005) Monte Carlo Simulations for Real
Estate Valuation. Research Paper No. 148. Available at: https://ssrn.com/
abstract=770766 (Accessed: September 25, 2017).
12) Hull, J. (2012) Options, futures and other derivatives. Boston: Pearson Education.
13) Jabbour, G. M. & Liu, Y. K. (2005) Option Pricing and Monte Carlo Simulations.
Journal of Business & Economics Research. 3(9), pp. 1-6.
14) Kyungjoo, L., Sehwan, Y. & John, J. J. (2007) Neural network model vs.
SARIMA model in forecasting Korean stock price index. Issues in Information
Systems. 8(2), pp. 372-378.
15) Landauskas, M. (2011) Modelling Of Stock Prices By The Markov Chain Monte
Carlo Method. Intellectual Economics. 5(10), pp. 244–256.
16) Malkiel, B. G. & Fama, E. F. (1970) Efficient capital markets: A review of theory
and empirical work. The Journal of Finance. 25(2), pp. 383-417.
17) Merh, N., Saxena, V. P. & Pardasani, K. R. (2010) A comparison between hybrid
approaches of ANN and ARIMA for Indian stock trend forecasting. Business
Intelligence Journal. 3(2), pp. 23-43.
18) Mondal, P., Shit, L. & Goswami, S. (2014) Study of effectiveness of time
series modeling (ARIMA) in forecasting stock prices. International Journal of
Computer Science, Engineering and Applications. 4(2), pp. 13-29.
19) Render, B., Stair, R. M. & Hanna, M. E. (2012) Quantitative Analysis for
Management. New York: Pearson.
20) Sterba, J. & Hilovska, K. (2010). The implementation of hybrid ARIMA
neural network prediction model for aggregate water consumption prediction.
Aplimat—Journal of Applied Mathematics. 3(3), pp. 123-131.
21) Tadeu, H. F. B., Silva, J. T. M., Malafaia, G. C. & de Azevedo, D. B. (2012)
Brazilian airport infrastructure: Analysis using the Monte Carlo simulation and
multiple regressions. African Journal of Business Management. 6(15), pp. 52-68.
22) Whiteside, J. D. (2008) A Practical Application of Monte Carlo Simulation in
Forecasting. AACE International transactions EST.04. Available at: http://www.
icoste.org/AACE2008%20Papers/Toronto_est04.pdf (Accessed: September 25,
2017).
23) Xu, S. Y. & Berkely, C. U. (2014) Stock price forecasting using information from
Yahoo Finance and Google trend. Available at: https://www.econ.berkeley.edu/
sites/default/files/Selene%20Yue%20Xu.pdf (Accessed: September 5, 2017).
963
View publication stats