IDEAS home Printed from https://ideas.repec.org/a/gam/jrisks/v3y2015i4p455-473d58009.html
   My bibliography  Save this article

Hidden Markov Model for Stock Selection

Author

Listed:
  • Nguyet Nguyen

    (Faculty of Mathematics and Statistics, Youngstown State University, 1 University Plaza, Youngstown, OH 44555, USA)

  • Dung Nguyen

    (Quantitative Researcher, Ned Davis Research Group, 600 Bird Bay Drive West, Venice, FL 34285, USA)

Abstract

The hidden Markov model (HMM) is typically used to predict the hidden regimes of observation data. Therefore, this model finds applications in many different areas, such as speech recognition systems, computational molecular biology and financial market predictions. In this paper, we use HMM for stock selection. We first use HMM to make monthly regime predictions for the four macroeconomic variables: inflation (consumer price index (CPI)), industrial production index (INDPRO), stock market index (S&P 500) and market volatility (VIX). At the end of each month, we calibrate HMM’s parameters for each of these economic variables and predict its regimes for the next month. We then look back into historical data to find the time periods for which the four variables had similar regimes with the forecasted regimes. Within those similar periods, we analyze all of the S&P 500 stocks to identify which stock characteristics have been well rewarded during the time periods and assign scores and corresponding weights for each of the stock characteristics. A composite score of each stock is calculated based on the scores and weights of its features. Based on this algorithm, we choose the 50 top ranking stocks to buy. We compare the performances of the portfolio with the benchmark index, S&P 500. With an initial investment of $100 in December 1999, over 15 years, in December 2014, our portfolio had an average gain per annum of 14.9% versus 2.3% for the S&P 500.

Suggested Citation

  • Nguyet Nguyen & Dung Nguyen, 2015. "Hidden Markov Model for Stock Selection," Risks, MDPI, vol. 3(4), pages 1-19, October.
  • Handle: RePEc:gam:jrisks:v:3:y:2015:i:4:p:455-473:d:58009
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-9091/3/4/455/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-9091/3/4/455/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Andrew Ang & Geert Bekaert, 2002. "International Asset Allocation With Regime Shifts," The Review of Financial Studies, Society for Financial Studies, vol. 15(4), pages 1137-1187.
    2. Guidolin, Massimo & Timmermann, Allan, 2007. "Asset allocation under multivariate regime switching," Journal of Economic Dynamics and Control, Elsevier, vol. 31(11), pages 3503-3544, November.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Anton Gerunov, 2023. "Stock Returns Under Different Market Regimes: An Application of Markov Switching Models to 24 European Indices," Economic Studies journal, Bulgarian Academy of Sciences - Economic Research Institute, issue 1, pages 18-35.
    2. José Carlos Ramírez & Francisco Ortiz-Arango & Leovardo Mata, 2021. "The Markovian Pattern of Social Deprivation for Mexicans with Diabetes," Mathematics, MDPI, vol. 9(7), pages 1-17, April.
    3. Matthew Wang & Yi-Hong Lin & Ilya Mikhelson, 2020. "Regime-Switching Factor Investing with Hidden Markov Models," JRFM, MDPI, vol. 13(12), pages 1-15, December.
    4. Nguyet Nguyen, 2017. "An Analysis and Implementation of the Hidden Markov Model to Technology Stock Prediction," Risks, MDPI, vol. 5(4), pages 1-16, November.
    5. De Gooijer, Jan G. & Henter, Gustav Eje & Yuan, Ao, 2022. "Kernel-based hidden Markov conditional densities," Computational Statistics & Data Analysis, Elsevier, vol. 169(C).
    6. Reetam Majumder & Qing Ji & Nagaraj K. Neerchal, 2023. "Optimal Stock Portfolio Selection with a Multivariate Hidden Markov Model," Sankhya B: The Indian Journal of Statistics, Springer;Indian Statistical Institute, vol. 85(1), pages 177-198, May.
    7. Nguyet Nguyen, 2018. "Hidden Markov Model for Stock Trading," IJFS, MDPI, vol. 6(2), pages 1-17, March.
    8. Nguyet Nguyen & Dung Nguyen, 2020. "Global Stock Selection with Hidden Markov Model," Risks, MDPI, vol. 9(1), pages 1-18, December.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Meenagh, David & Minford, Patrick & Peel, David, 2007. "Simulating stock returns under switching regimes - A new test of market efficiency," Economics Letters, Elsevier, vol. 94(2), pages 235-239, February.
    2. Jia Liu & John M. Maheu & Yong Song, 2024. "Identification and forecasting of bull and bear markets using multivariate returns," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 39(5), pages 723-745, August.
    3. Lee, Hsiang-Tai, 2022. "Regime-switching angular correlation diversification," Finance Research Letters, Elsevier, vol. 50(C).
    4. Bernardi, Mauro & Catania, Leopoldo, 2018. "Portfolio optimisation under flexible dynamic dependence modelling," Journal of Empirical Finance, Elsevier, vol. 48(C), pages 1-18.
    5. Erik Kole & Dick Dijk, 2017. "How to Identify and Forecast Bull and Bear Markets?," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 32(1), pages 120-139, January.
    6. Guidolin, Massimo & Hyde, Stuart, 2012. "Can VAR models capture regime shifts in asset returns? A long-horizon strategic asset allocation perspective," Journal of Banking & Finance, Elsevier, vol. 36(3), pages 695-716.
    7. Engsted, Tom & Pedersen, Thomas Q., 2012. "Return predictability and intertemporal asset allocation: Evidence from a bias-adjusted VAR model," Journal of Empirical Finance, Elsevier, vol. 19(2), pages 241-253.
    8. Kole, Erik & van Dijk, Dick, 2023. "Moments, shocks and spillovers in Markov-switching VAR models," Journal of Econometrics, Elsevier, vol. 236(2).
    9. Guidolin, Massimo & Hyde, Stuart, 2008. "Equity portfolio diversification under time-varying predictability: Evidence from Ireland, the US, and the UK," Journal of Multinational Financial Management, Elsevier, vol. 18(4), pages 293-312, October.
    10. Poshakwale, Sunil S. & Mandal, Anandadeep, 2016. "Determinants of asymmetric return comovements of gold and other financial assets," International Review of Financial Analysis, Elsevier, vol. 47(C), pages 229-242.
    11. Dias, José G. & Ramos, Sofia B., 2013. "A core–periphery framework in stock markets of the euro zone," Economic Modelling, Elsevier, vol. 35(C), pages 320-329.
    12. Branger, Nicole & Kraft, Holger & Meinerding, Christoph, 2009. "What is the impact of stock market contagion on an investor's portfolio choice?," Insurance: Mathematics and Economics, Elsevier, vol. 45(1), pages 94-112, August.
    13. Nguyet Nguyen, 2017. "An Analysis and Implementation of the Hidden Markov Model to Technology Stock Prediction," Risks, MDPI, vol. 5(4), pages 1-16, November.
    14. Daniele Bianchi & Massimo Guidolin, 2014. "Can Linear Predictability Models Time Bull and Bear Real Estate Markets? Out-of-Sample Evidence from REIT Portfolios," The Journal of Real Estate Finance and Economics, Springer, vol. 49(1), pages 116-164, July.
    15. Guidolin, Massimo & Liu, Hening, 2016. "Ambiguity Aversion and Underdiversification," Journal of Financial and Quantitative Analysis, Cambridge University Press, vol. 51(4), pages 1297-1323, August.
    16. Branger, Nicole & Kraft, Holger & Meinerding, Christoph, 2014. "Partial information about contagion risk, self-exciting processes and portfolio optimization," Journal of Economic Dynamics and Control, Elsevier, vol. 39(C), pages 18-36.
    17. Thomas Q. Pedersen, 2015. "Predictable Return Distributions," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 34(2), pages 114-132, March.
    18. Massimo Guidolin & Stuart Hyde, 2008. "Equity portfolio diversification under time-varying predictability and comovements: evidence from Ireland, the US, and the UK," Working Papers 2008-005, Federal Reserve Bank of St. Louis.
    19. Suthawan Prukumpai, 2015. "Time-varying Industrial Portfolio Betas under the Regime-switching Model: Evidence from the Stock Exchange of Thailand," Applied Economics Journal, Kasetsart University, Faculty of Economics, Center for Applied Economic Research, vol. 22(2), pages 54-76, December.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jrisks:v:3:y:2015:i:4:p:455-473:d:58009. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.