Research Article

MA200 and HMM in Regime - Specific Stock Markets Prediction

Mengrui Wei*
The University of Hong Kong

* Corresponding author: [email protected]

Abstract

This study investigates how using regime-dependent forecasting in stock market prediction will affect the prediction accuracy compared with traditional methods that ignore market states. In this paper, we are interested in predicting the rise and fall of stock prices and using the log return for each day as a criterion for this. We assume there are two regimes: Bull and Bear, and two methods are used for including them in forecasting. The MA200 method directly classifies each day into bull or bear regimes and estimates separate transition matrices to calculate the probability for the next day being up or down. While the Hidden Markov Model (HMM) uses the Expectation–Maximisation(EM) algorithm to estimate regime transitions and assumes regime-dependent normal distributions for log returns to find the probability. Afterwards, we make a prediction to label each day as “Up” or “Down” and compare with the actual data to find the hitting rate as accuracy. This paper has used 3 different stock markets and found out that both methods perform better than the traditional one. Additionally, HMM outperforms in one-step forecasts, while due to the complexity of this method, MA200 will be good to perform N-step forecasts by getting the nth power of P until n = 10.

Keywords: Stock Market Regimes; Hidden Markov Chain; MA200; Transition Matrix; Stock Market Prediction
Published: October 14, 2025
DOI: 10.54254/2753-8818/2025.DL27621
Volume: TNS Vol.132
pp. 169-175
Download PDF

References

  1. Fama, E.F. (1965) The Behavior of Stock-Market Prices. Journal of Business, 38(1), 34–105.Bootorabi, F.
  2. Gonzalez, L., Hoang, P., Powell, J. G., & Shi, J. (2006). Defining and dating bull and bear markets: Two centuries of evidence. Multinational Finance Journal, 10(1/2), 81–116.
  3. Chen, M., Li, N., Zheng, L., Huang, D., & Wu, B. (2022). Dynamic correlation of market connectivity, risk spillover and abnormal volatility in stock price. Physica A: Statistical Mechanics and its Applications, 587, 126506.
  4. Öztürk, C. (2025). Bear and Bull Regimes in Financial Markets: Insights from Markov Regime-Switching Models. SSRN.
  5. Fan, J., & Yao, Q. (2017). The elements of financial econometrics. Cambridge University Press.
  6. Larkin, P., & Warachka, M. (2017). Leverage for the long run: A systematic approach to managing risk and magnifying returns in stocks (SSRN Scholarly Paper No. 2741701). Social Science Research Network.
  7. Christensen, H., Godsill, S., & Turner, R. E. (2020). Hidden Markov models applied to intraday momentum trading with side information. arXiv. https: //doi.org/10.48550/arXiv.2006.08307
  8. Nystrup, Peter; Madsen, Henrik; Lindström, Erik. (2016). Long Memory of Financial Time Series and Hidden Markov Models with Time-Varying Parameters. Journal of Forecasting, 36(8), 989–1002. DOI: 10.1002/for.2447.
  9. Churbanov, A., & Winters-Hilt, S. (2008). Implementing EM and Viterbi algorithms for hidden Markov model in linear memory. BMC Bioinformatics, 9, 224.
  10. Ross, S. M. (2014). Introduction to probability models (11th ed.). Academic Press.
  11. Hamilton, J. D. (1994). Time series analysis. Princeton University Press
  12. Gneiting, T., & Raftery, A. E. (2007). Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477), 359–378.