journal article·2025-05-17Open access

Stock Market Bubble Warning: A Restricted Boltzmann Machine Approach Using Volatility–Return Sequences

Mauricio A. Valle, Jaime Lavín, Felipe Urbina

Applied Sciences· Volume 15· Issue 10

Abstract

Combining unsupervised learning with Restricted Boltzmann Machines and supervised learning with Balanced Random Forest and Feedforward Neural Networks, we propose a warning system for the early detection of stock bubbles by analyzing daily returns and the volatility of a market index. We complement our method by detecting states of high volatility and very low returns, which are market states that immediately follow a stock market’s bubble-bursting point. We trained our detection model using the S&P500 as an empirical case study, using successive samples of well-known crises from 1987 to 2022. Our results achieve area-under-the-curve (AUC) rates of over 70% and false-positive rates of less than 20%. Our model’s generative nature enables the creation of synthetic samples to analyze market periods prone to forming a bubble. The model successfully alerts periods of bubbles and instability in the stock market. Capital markets’ interconnectedness enables the model to be trained with various shocks from other stock markets, providing further detection learning possibilities and improved detection rates. Our work helps investors, regulators, and practitioners in their stock market investment, supervision, and monitoring tasks.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Stock Market Forecasting Methods · Complex Systems and Time Series Analysis · Market Dynamics and Volatility

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Facultad de Ingeniería y Ciencias, Universidad Adolfo Ibáñez, Av. Diag. Las Torres 2640, Santiago 7941169, Chile

Escuela de Negocios, Universidad Adolfo Ibáñez, Av. Diag. Las Torres 2640, Santiago 7941169, Chile

Centro Multidisciplinario de Física, Universidad Mayor, Santiago 8580745, Chile

Funding

ANID FONDECYT REGULAR

References (79)

Show source-provided references
1. Efficient capital markets10.2307/2325486 ↗
2. Asset price bubbles: A survey10.1080/14697688.2012.755266 ↗
3. Noise trader risk in financial markets10.1086/261703 ↗
4. The limits of arbitrage10.1111/j.1540-6261.1997.tb03807.x ↗
5. A survey of behavioral finance10.1016/S1574-0102(03)01027-6 ↗
6. Investor sentiment in the stock market10.1257/jep.21.2.129 ↗
7. Maps of bounded rationality: Psychology for behavioral economics10.1257/000282803322655392 ↗
8. A model of investor sentiment10.1016/S0304-405X(98)00027-0 ↗
9. Stock Prices and Social Dynamics10.2307/2534436 ↗
10. Zhao, D., and Sornette, D. (2025, May 15). Bubbles for Fama from Sornette. Swiss Finance Institute Research Paper No. 21-94. Available online: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3995526.
11. A network-based approach to study returns synchronization of stocks: The case of global equity markets10.1155/2021/7676457 ↗
12. Regime changes and financial markets10.1146/annurev-financial-110311-101808 ↗
13. Stock market pattern recognition using symbol entropy analysis10.1016/j.najef.2024.102161 ↗
14. Valle, M.A., Lavín, J.F., and Magner, N.S. (2021). Equity market description under high and low volatility regimes using maximum entropy pairwise distribution. Entropy, 23.10.3390/e23101307 ↗
15. Flights and contagion—An empirical analysis of stock–bond correlations10.1016/j.jfs.2008.08.001 ↗
16. Flight-to-quality between global stock and bond markets in the covid era10.1016/j.frl.2020.101852 ↗
17. Simple Lessons from Complexity10.1126/science.284.5411.87 ↗
18. A nonlinear super-exponential rational model of speculative financial bubbles10.1142/S0129183102003085 ↗
19. Sornette, D. (2009). Why Stock Markets Crash: Critical Events in Complex Financial Systems, Princeton University Press.10.1515/9781400829552 ↗
20. An early warning system for detection of financial crisis using financial market volatility10.1111/j.1468-0394.2006.00326.x ↗
21. Three learning stages and accuracy–efficiency tradeoff of restricted Boltzmann machines10.1038/s41467-022-33126-x ↗
22. Liang, Q., Rong, W., Zhang, J., Liu, J., and Xiong, Z. (2017, January 14–19). Restricted Boltzmann machine based stock market trend prediction. Proceedings of the 2017 International Joint Conference on Neural Networks (IJCNN), Anchorage, AK, USA.10.1109/IJCNN.2017.7966014 ↗
23. Cai, X., Hu, S., and Lin, X. (2012, January 25–27). Feature extraction using restricted Boltzmann machine for stock price prediction. Proceedings of the 2012 IEEE International Conference on Computer Science and Automation Engineering (CSAE), Zhangjiajie, China.10.1109/CSAE.2012.6272913 ↗
24. Hernandez, J., and Abad, A.G. (2018, January 1–8). Learning from multivariate discrete sequential data using a restricted Boltzmann machine model. Proceedings of the 2018 IEEE 1st Colombian Conference on Applications in Computational Intelligence (ColCACI), Bogotá, Colombia.10.1109/ColCACI.2018.8484854 ↗
25. Dynamic risk exposures in hedge funds10.1016/j.csda.2010.08.015 ↗
26. Chalkis, A., Christoforou, E., Dalamagas, T., and Emiris, I.Z. (2021). Modeling of crisis periods in stock markets. Learning and Intelligent Optimization: 15th International Conference, LION 15, Athens, Greece, June 20–25, 2021, Revised Selected Papers 15, Springer.
27. Calès, L., Chalkis, A., Emiris, I.Z., and Fisikopoulos, V. (2018). Practical volume computation of structured convex bodies, and an application to modeling portfolio dependencies and financial crises. arXiv.
28. Common risk factors in the returns on stocks and bonds10.1016/0304-405X(93)90023-5 ↗
29. The behavior of stock-market prices10.1086/294743 ↗
30. Disagreement and the stock market10.1257/jep.21.2.109 ↗
31. Kindleberger, C.P., Aliber, R.Z., and Solow, R.M. (2005). Manias, Panics, and Crashes: A History of Financial Crises, Palgrave Macmillan.10.1057/9780230628045 ↗
32. Psychological study of human judgment: Implications for investment decision making10.1111/j.1540-6261.1972.tb01311.x ↗
33. De Bondt, W.F., Muradoglu, Y.G., Shefrin, H., and Staikouras, S.K. (2008). Behavioral finance: Quo vadis?. J. Appl. Financ. (Former. Financ. Pract. Educ.), 18, Available online: https://ssrn.com/abstract=2698614.
34. Investor psychology and asset pricing10.1111/0022-1082.00379 ↗
35. Prospect theory: An analysis of decision under risk10.2307/1914185 ↗
36. The adaptive markets hypothesis: Market efficiency from an evolutionary perspective10.3905/jpm.2004.442611 ↗
37. Mullainathan, S., and Thaler, R.H. (2025, May 08). Behavioral Economics. NBER Working Paper 2000. Available online: https://www.nber.org/papers/w7948.10.3386/w7948 ↗
38. The weighing of evidence and the determinants of confidence10.1016/0010-0285(92)90013-R ↗
39. Network-based asset allocation strategies10.1016/j.najef.2018.06.008 ↗
40. A network approach to portfolio selection10.1016/j.jempfin.2016.06.003 ↗
41. When diversification fails10.2469/faj.v74.n3.3 ↗
42. Were there regime switches in us monetary policy?10.1257/000282806776157678 ↗
43. A simple framework for analysing bull and bear markets10.1002/jae.664 ↗
44. Theoretical relations between risk premiums and conditional variances10.1080/07350015.1993.10509946 ↗
45. Asymmetric correlations of equity portfolios10.1016/S0304-405X(02)00068-5 ↗
46. Risk, return, and dividends10.1016/j.jfineco.2007.01.001 ↗
47. Rossi, A.G., and Timmermann, A. (2010, January 3–5). What is the shape of the risk-return relation?. Proceedings of the AFA 2010 Atlanta Meetings, Atlanta, GA, USA.10.2139/ssrn.1364750 ↗
48. Identifying states of a financial market10.1038/srep00644 ↗
49. Measuring critical transitions in financial markets10.1038/s41598-017-11854-1 ↗
50. Flickering in information spreading precedes critical transitions in financial markets10.1038/s41598-019-42223-9 ↗
51. Multifractal early warning signals about sudden changes in the stock exchange states10.1155/2022/8177307 ↗
52. The measurement and early warning of daily financial stability index based on xgboost and shap: Evidence from china10.1016/j.eswa.2023.120375 ↗
53. Forecasting stock market crisis events using deep and statistical machine learning techniques10.1016/j.eswa.2018.06.032 ↗
54. Critical market crashes10.1016/S0370-1573(02)00634-8 ↗
55. Importance of positive feedbacks and overconfidence in a self-fulfilling ising model of financial markets10.1016/j.physa.2006.02.022 ↗
56. Herding behavior, market sentiment and volatility: Will the bubble resume?10.1016/j.najef.2017.07.005 ↗
57. Stock market crashes, precursors and replicas
58. Ausloos, M., Ivanova, K., and Vandewalle, N. (2002). Crashes: Symptoms, diagnoses and remedies. Empirical Science of Financial Fluctuations: The Advent of Econophysics, Springer.10.1007/978-4-431-66993-7_8 ↗
59. Lppls bubble indicators over two centuries of the s&p 500 index10.1016/j.physa.2016.03.103 ↗
60. Clarifications to questions and criticisms on the Johansen–Ledoit–Sornette financial bubble model10.1016/j.physa.2013.05.011 ↗
61. Detection of financial bubbles using a log-periodic power law singularity (LPPLS) model10.1002/wics.1649 ↗
62. Training products of experts by minimizing contrastive divergence10.1162/089976602760128018 ↗
63. Hinton, G.E., Sejnowski, T.J., and Ackley, D.H. (1984). Boltzmann Machines: Constraint Satisfaction Networks That Learn, Carnegie-Mellon University, Department of Computer Science.
64. Dynamical analysis of contrastive divergence learning: Restricted Boltzmann machines with Gaussian visible units10.1016/j.neunet.2016.03.013 ↗
65. Liao, R., Kornblith, S., Ren, M., Fleet, D.J., and Hinton, G. (2022). Gaussian-bernoulli rbms without tears. arXiv.
66. Cho, K., and Bengio, Y. (2011). Gaussian-Bernoulli deep Boltzmann machines. arXiv.
67. Tieleman, T. (2008, January 5–9). Training Restricted Boltzmann Machines using approximations to the likelihood gradient. Proceedings of the 25th International Conference on Machine Learning, Helsinki, Finland.10.1145/1390156.1390290 ↗
68. Ma, X., and Wang, X. (2016). Average contrastive divergence for training restricted boltzmann machines. Entropy, 18.10.3390/e18010035 ↗
69. Tieleman, T., and Hinton, G. (2009, January 14–18). Using fast weights to improve persistent contrastive divergence. Proceedings of the 26th Annual International Conference on Machine Learning, Montreal, QC, Canada.10.1145/1553374.1553506 ↗
70. Valle, M.A. (2023). The capabilities of boltzmann machines to detect and reconstruct ising system’s configurations from a given temperature. Entropy, 25.10.3390/e25121649 ↗
71. Desjardins, G., Courville, A., Bengio, Y., Vincent, P., and Delalleau, O. (2010, January 13–15). Tempered Markov chain Monte Carlo for training of restricted Boltzmann machines. Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics. JMLR Workshop and Conference Proceedings, Sardinia, Italy.
72. Chen, C., Liaw, A., and Breiman, L. (2004). Using Random Forest to Learn Imbalanced Data, University of California. Available online: https://statistics.berkeley.edu/sites/default/files/tech-reports/666.pdf.
73. Customer churn prediction using improved balanced random forests10.1016/j.eswa.2008.06.121 ↗
74. Biased random forest for dealing with the class imbalance problem
75. Lncrna-id: Long non-coding rna identification using balanced random forests10.1093/bioinformatics/btv480 ↗
76. Random forests10.1023/A:1010933404324 ↗
77. Training restricted boltzmann machines: An introduction10.1016/j.patcog.2013.05.025 ↗
78. Forecasting stock market crashes via machine learning10.1016/j.jfs.2022.101099 ↗
79. Salakhutdinov, R., Mnih, A., and Hinton, G. (2007, January 20–24). Restricted boltzmann machines for collaborative filtering. Proceedings of the 24th International Conference on Machine Learning, Corvallis, OR, USA.10.1145/1273496.1273596 ↗