Comparing Prediction Methods of Artificial Neural Networks in Extracting Financial Cycles of Tehran Stock Exchange based on Markov Switching and Ant Colony Algorithm

Document Type: Original Article


1 PhD Candidate, Department of Industrial Management, Central Tehran Branch, Islamic Azad University, Tehran, Iran.

2 Prof., Department of Finance, Faculty of Management, Islamic Azad University, Central Tehran Branch, Tehran, Iran.

3 Assistant Prof., Department of Industrial Management, Central Tehran Branch, Islamic Azad University, Tehran, Iran.

4 Assistant Prof., Department of Management, Medical Science Branch, Islamic Azad University, Tehran, Iran.



The stock exchange is considered to be an important establishment to finance long term projects, on one hand, and to collect savings and finance of private section. The stock exchange can be a safe and secure place to invest surplus funds to purchase corporate stocks. As recession and prosperity in this market can have a great role in stockholders` decision-making, it becomes vital to predict these cycles. In this paper, using model MSMH(4)AR(2), we extract the financial cycles of the market. Then, using the ant colony algorithm, we determine the most significant predictors and predict the market financial cycles using neural networks. The results show that the PNN model performs better in predicting the future market with respect to the criteria of mean squared error, the root mean squared error, the model accuracy and kappa coefficient.


Al Janabi, M. A., Hatemi-J, A., & Irandoust, M. (2010). An empirical investigation of the informational efficiency of the GCC equity markets: evidence from bootstrap simulation. International Review of Financial Analysis, 19(1), 47-54.
Apergis, N., & Miller, S. M. (2009). Do structural oil-market shocks affect stock prices? Energy economics, 31(4), 569-575.
Barakchian, S. M., Nasiri, L., & Ebrahimnejad, A. (2016). “Valuation Ratios and Stock Return Predictability; Evidence from TSE”. Journal of Risk Modeling and Financial Engineering. 1(2), 145-165.
Barbee Jr, W. C., Mukherji, S., & Raines, G. A. (1996). Do Sales–Price and Debt–Equity Explain Stock Returns Better than Book–Market and Firm Size? Financial Analysts Journal, 52(2), 56-60.
Barghi Oskoei, M. M., Motafaker Azad, M. A., Shahbazzadeh Khiyavi, A. (2014). Modeling nonlinear effects of the changes in real exchange rate and crude oil prices on Tehran stock exchange (The Markov Switching approach). Journal of Economic Modeling Research, 4(14), 85-109.
Baur, D. G., & Lucey, B. M. (2010). Is gold a hedge or a safe haven? An analysis of stocks, bonds and gold. Financial Review, 45(2), 217-229
Bordbar, N. , Heidari, E. (2017). The Effect of World Oil Price Fluctuations on the Return of the Energy Intensive Industries Stock in Iran. Journal of Economic Modeling Research, 7(27), 177-205.
Candelon, B., Piplack, J., & Straetmans, S. (2008). On measuring synchronization of bulls and bears: The case of East Asia. Journal of Banking & Finance, 32(6), 1022-1035.
Capie, F., Mills, T. C., & Wood, G. (2005). Gold as a hedge against the dollar. Journal of International Financial Markets, Institutions and Money, 15(4), 343-352.
Chen, N.-K., Chen, S.-S., & Chou, Y.-H. (2017). Further evidence on bear market predictability: The role of the external finance premium. International Review of Economics & Finance, 50, 106-121.
Chiou, J.-S., & Lee, Y.-H. (2009). Jump dynamics and volatility: Oil and the stock markets. Energy, 34(6), 788-796.
Dorigo, M., Stuzzle,T. (2004). Ant colony optimization, England: MIT Press.
El-Sharif, I., Brown, D., Burton, B., Nixon, B., & Russell, A. (2005). Evidence on the nature and extent of the relationship between oil prices and equity values in the UK. Energy economics, 27(6), 819-830.
Fama, E. F., & French, K. R. (1992). The cross‐section of expected stock returns. The Journal of Finance, 47(2), 427-465.
Gonzalez, L., Powell, J. G., Shi, J., & Wilson, A. (2005). Two centuries of bull and bear market cycles. International Review of Economics & Finance, 14(4), 469-486.
Güler, I., & Übeyli, E. D. (2005). Adaptive neuro-fuzzy inference system for classification of EEG signals using wavelet coefficients. Journal of neuroscience methods, 148(2), 113-121.
Hamilton, J. D. (2011). Calling recessions in real time. International journal of forecasting, 27(4), 1006-1026.
Hanna, A. J.(2018). A top-down approach to identifying bull and bear market states. International Review of Financial Analysis, 55, 93-110.
Hejazi, R., Fatemi, M. (2005). Predicting Stock Returns by Using Financial Ratios. EmpiricalStudies in Financial Accounting Quarterly, 3(12), 83-111.
Jammazi, R., & Aloui, C. (2010). Wavelet decomposition and regime shifts: Assessing the effects of crude oil shocks on stock market returns. Energy Policy, 38(3), 1415-1435.
Khoshtinat, M., Sarebanha, M.,R. (2003), The Effect of Dividend on Common Stock Prices, EmpiricalStudies in Financial Accounting Quarterly, 1(2), 107-139.
Kia, S. M. (2016). Neural Networks in MATLAB, Fifth Edition, Kian University, Tehran.
Kilian, L., & Park, C. (2009). The impact of oil price shocks on the US stock market. International Economic Review, 50(4), 1267-1287.
Kole, E., & van Dijk, D. (2017). How to identify and forecast bull and bear markets? Journal of Applied Econometrics, 32(1), 120-139.
Lewellen, J. (1999). The time-series relations among expected return, risk, and book-to-market. Journal of Financial Economics, 54(1), 5-43.
Lunde, A., & Timmermann, A. (2004). Duration dependence in stock prices: An analysis of bull and bear markets. Journal of Business & Economic Statistics, 22(3), 253-273.
Miller, J. I., & Ratti, R. A. (2009). Crude oil and stock markets: Stability, instability, and bubbles. Energy economics, 31(4), 559-568.
Nademi, Y. (2017). Budget in Research and Economic Growth in Iran: Markov Switching Approach, Quarterly Journal of Economic Research and Policies, 25(82), 197-231.
Narayan, P. K., & Narayan, S. (2010). Modelling the impact of oil prices on Vietnam’s stock prices. Applied energy, 87(1), 356-361.
Nyberg, H. (2013). Predicting bear and bull stock markets with dynamic binary time series models. Journal of Banking & Finance, 37(9), 3351-3363.
Pagan, A. R., & Sossounov, K. A. (2003). A simple framework for analysing bull and bear markets. Journal of Applied Econometrics, 18(1), 23-46
Park, J., & Ratti, R. A. (2008). Oil price shocks and stock markets in the US and 13 European countries. Energy economics, 30(5), 2587-2608.
Pontiff, J., & Schall, L. D. (1998). Book-to-market ratios as predictors of market returns1. Journal of Financial Economics, 49(2), 141-160.
Pourebadolahan, M., Asgharpour, H., Zolghadr, H. (2014). Examining Relationship Between Stock Prices and Exchange Rate in Oil-Exporting Countries. Journal of Economic Development Policy. 2(4), 61-86.
Saleh, G. (2008). The dynamic relation between stock prices and exchange rates in Egypt, Saudi Arabia and UAE: University of Illinois at Chicago.
Samadi, S., & Bayani, O. (2011). “Investigating the Relationship between Macroeconomic Variables and Stock Returns in the Stock Exchange". Financial Economics.5(16), 91-112.
Samadi, S., Shirani fakhr, Z., Davarzadeh, M. (2007). Evaluation of the effect of stock price index of Tehran Stock Exchange, the price of gold and oil (modeling and forecasting). economic review, 2 (4), 25-47.
Sias, R. W., & Whidbee, D. A. (2010). Insider trades and demand by institutional and individual investors. The Review of Financial Studies, 23(4), 1544-1595.
Souri, A. (2013). Econometrics (Advanced) Volume II. Tehran: Cultural publication, first edition.
Stehman, S. V. (1997). Selecting and interpreting measures of thematic classification accuracy. Remote sensing of Environment, 62(1), 77-89.
Torabi, T., & Hooman, T. (2010). The effects of macroeconomic variables on the output indicators of Tehran Stock Exchange. Journal of Economic Modeling. 4(1), 121-144.