Investment Portfolio Optimization Using Machine Learning and Reinforcement Learning Methods
Abstract
This paper proposes an integrated framework for investment portfolio optimization that combines gradient boosting prediction models (LightGBM), volatility forecasting via the Heterogeneous Autoregressive Realized Volatility model (HAR-RV), market regime detection via Hidden Markov Models (HMM), and reinforcement learning agents. The system was implemented as an interactive web application (Streamlit) and evaluated on a diversified portfolio of 30 assets spanning six economic sectors, automatically selected from a universe of 530 tickers with a 40% sector concentration cap enforced at each rebalancing step to ensure structural diversification. Four reinforcement learning algorithms - PPO, SAC, TD3, and A2C - were evaluated under strictly identical experimental conditions to provide a comprehensive algorithmic comparison. The LightGBM return direction model achieved a walk-forward out-of-fold directional accuracy of 64.8%, while HAR-RV demonstrated consistent volatility forecasting superiority over LightGBM on 49 of 51 evaluated assets, motivating its adoption in the Black-Litterman-HRP covariance adjustment. Over the full 2015-2024 period, SAC achieved the highest Sharpe ratio (1.193) and Jensen's Alpha (+10.58% annual), followed by PPO (Sharpe 1.157). Out-of-sample (2021-2024), SAC maintained dominance (Sharpe 1.002, Alpha +6.33%), confirmed robust across eight distinct evaluation windows in a temporal sensitivity analysis. Deflated Sharpe Ratio analysis (p_DSR = 1.000 for all strategies) highlights the inherent statistical limitation of ~2.5-year evaluation horizons, motivating the presented framework as a validated software architecture for integrated ML+RL portfolio management rather than a definitively proven superior strategy.