Adaptive Portfolio Optimization Using MVF with Machine Learning Forecasting and Regime Switching: Evidence from LQ45 Stocks

Fadly Ramdhani, Deni Saepudin

Abstract


This study proposes an adaptive portfolio optimization framework that integrates Random Forest(RF)-based return forecasting into a Mean-Variance-Forecast Error (MVF) model, augmented by a Hidden Markov Model (HMM) for market regime identification. Using weekly historical return data from 40 LQ45-listed stocks spanning January 2014 to January 2025, the framework dynamically adjusts portfolio allocations in response to bull and bear market conditions detected by a two-state HMM. The primary methodological contribution lies in addressing the static limitation of conventional MVF under shifting market regimes. Out-of-sample evaluation over a 138-week test period demonstrates that regime-switching MVF achieves Sharpe ratios above 1.30, substantially lower maximum drawdowns than the MVF-only portfolio, and cumulative returns of 291.96%. Bootstrap-validated 95% confidence intervals confirm the statistical robustness of these improvements. Nevertheless, portfolio turnover remains high during active reallocations. These findings indicate that combining machine-learning-based predictive modelling with adaptive, regime-driven allocation enhances portfolio stability, mitigates extreme losses, and improves risk-return efficiency under dynamic emerging-market conditions.


Keywords


HMM; LQ45 Portfolio; MVF; Random Forest; Regime Switching.

Full Text:

PDF

References


J. Behera and P. Kumar, “An approach to portfolio optimization with time series forecasting algorithms and machine learning techniques,” Applied Soft Computing, vol. 170, p. 112741, Feb. 2025. [Online]. Available: https://doi.org/10.1016/j.asoc.2025.112741.

F. J. Fabozzi, H. M. Markowitz, and F. Gupta, “Portfolio selection,” in Handbook of Finance, vol. 2, 2008, pp. 3–13.

F. D. Freitas, A. F. De Souza, and A. R. de Almeida, “Prediction-based portfolio optimization model using neural networks,” Neurocomputing, vol. 72, no. 10–12, pp. 2155–2170, Jun. 2009. [Online]. Available: https://doi.org/10.1016/j.neucom.2008.08.019.

P. N. Kolm, R. Tütüncü, and F. J. Fabozzi, “60 years of portfolio optimization: Practical challenges and current trends,” European Journal of Operational Research, vol. 234, no. 2, pp. 356–371, Apr. 2014. [Online]. Available: https://doi.org/10.1016/j.ejor.2013.10.060.

V. DeMiguel, L. Garlappi, and R. Uppal, “Optimal versus naive diversification: How inefficient is the 1/N portfolio strategy?” Review of Financial Studies, vol. 22, no. 5, pp. 1915–1953, May 2009. [Online]. Available: https://doi.org/10.1093/rfs/hhm075.

Y. Wang, “Stock prediction using Bi-LSTM and RoBERTa sentiment analysis,” Applied and Computational Engineering, vol. 69, no. 1, pp. 193–199, Jul. 2024. [Online]. Available: https://doi.org/10.54254/2755-2721/69/20241474.

M. Saberironaghi, J. Ren, and A. Saberironaghi, “Stock market prediction using machine learning and deep learning techniques: a review,” AppliedMath, vol. 5, no. 3, p. 76, Sep. 2025. [Online]. Available: https://doi.org/10.3390/appliedmath5030076.

C. Breitung, “Automated stock picking using random forests,” Journal of Empirical Finance, vol. 72, pp. 532–556, Jun. 2023. [Online]. Available: https://doi.org/10.1016/j.jempfin.2023.05.001.

O. Ustun and R. Kasimbeyli, “Combined forecasts in portfolio optimization: A generalized approach,” Computers and Operations Research, vol. 39, no. 4, pp. 805–819, Apr. 2012. [Online]. Available: https://doi.org/10.1016/j.cor.2010.09.008.

J. R. Yu, W. J. Paul Chiou, W. Y. Lee, and S. J. Lin, “Portfolio models with return forecasting and transaction costs,” International Review of Economics & Finance, vol. 66, pp. 118–130, Mar. 2020. [Online]. Available: https://doi.org/10.1016/j.iref.2019.11.002.

Y. Ma, R. Han, and W. Wang, “Portfolio optimization with return prediction using deep learning and machine learning,” Expert Systems with Applications, vol. 165, p. 113973, Mar. 2021. [Online]. Available: https://doi.org/10.1016/j.eswa.2020.113973.

M. Huang, S. Dang, and M. A. Bhuiyan, “Multi-objective portfolio optimization for stock return prediction using machine learning,” Expert Systems with Applications, vol. 298, p. 129672, Mar. 2025. [Online]. Available: https://doi.org/10.1016/j.eswa.2025.129672.

I. Indra, S. Supian, Sukono, Riaman, M. P. A. Saputra, A. S. Azahra, and D. I. Pirdaus, “Stock return prediction on the LQ45 market index in the Indonesia Stock Exchange using a machine learning algorithm based on technical indicators,” Journal of Risk and Financial Management, vol. 18, no. 12, p. 714, Dec. 2025. [Online]. Available: https://doi.org/10.3390/jrfm18120714.

X. Shi and Z. Q. Xu, “Optimal mean–variance portfolio selection under regime-switching-induced stock price shocks,” Systems and Control Letters, vol. 204, p. 106200, Oct. 2025. [Online]. Available: https://doi.org/10.1016/j.sysconle.2025.106200.

M. Wang, Y. H. Lin, and I. Mikhelson, “Regime-switching factor investing with hidden markov models,” Journal of Risk and Financial Management, vol. 13, no. 12, p. 311, Dec. 2020. [Online]. Available: https://doi.org/10.3390/jrfm13120311.

A. Kijkarncharoensin, “Identifying risk regimes in a sectoral stock index through a multivariate hidden markov framework,” Risks, vol. 13, no. 7, p. 135, Jul. 2025. [Online]. Available: https://doi.org/10.3390/risks13070135.

A. Tampouris and C. Dritsaki, “Adaptive hierarchical hidden markov models for structural market change,” Journal of Risk and Financial Management, vol. 19, no. 1, p. 15, Dec. 2025. [Online]. Available: https://doi.org/10.3390/jrfm19010015.

T. K. Ho, “Random decision forests,” in Proc. Conf. Document Analysis and Recognition, ICDAR, vol. 1, 1995, pp. 278–282. [Online]. Available: https://doi.org/10.1109/icdar.1995.598994.

L. Breiman, “Random forests,” Machine Learning, vol. 45, no. 1, pp. 5–32, Oct. 2001. [Online]. Available: https://doi.org/10.1023/A:1010933404324.

J. Patel, S. Shah, P. Thakkar, and K. Kotecha, “Predicting stock and stock price index movement using Trend Deterministic Data Preparation and machine learning techniques,” Expert Systems with Applications, vol. 42, no. 1, pp. 259–268, Jan. 2015. [Online]. Available: https://doi.org/10.1016/j.eswa.2014.07.040.

M. Ballings, D. Van Den Poel, N. Hespeels, and R. Gryp, “Evaluating multiple classifiers for stock price direction prediction,” Expert Systems with Applications, vol. 42, no. 20, pp. 7046–7056, Jun. 2015. [Online]. Available: https://doi.org/10.1016/j.eswa.2015.05.013.

X. Zhao, N. Zhang, Y. Zhang, C. Xu, and P. Shang, “Equity markets volatility clustering: a multiscale analysis of intraday and overnight returns,” Journal of Empirical Finance, vol. 77, p. 101487, Jun. 2024. [Online]. Available: https://doi.org/10.1016/j.jempfin.2024.101487.

K. Daniel and T. J. Moskowitz, “Momentum crashes,” Journal of Financial Economics, vol. 122, no. 2, pp. 221–247, Nov. 2016. [Online]. Available: https://doi.org/10.1016/j.jfineco.2015.12.002.

D. P. Gandhmal and K. Kumar, “Systematic analysis and review of stock market prediction techniques,” Computer Science Review, vol. 34, p. 100190, Nov. 2019. [Online]. Available: https://doi.org/10.1016/j.cosrev.2019.08.001.

O. Ledoit and M. Wolf, “Robust performance hypothesis testing with the Sharpe ratio,” Journal of Empirical Finance, vol. 15, no. 5, pp. 850–895, Dec. 2008. [Online]. Available: https://doi.org/10.1016/j.jempfin.2008.03.002.




DOI: http://dx.doi.org/10.30829/zero.v10i2.29447

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

 
 
✉  Contact & Indexing
Get in touch with ZERO: Jurnal Sains, Matematika dan Terapan
Email
zero_journal@uinsu.ac.id
WhatsApp · Admin Official
085270009767