Bridging finance and technology: Machine learning-based portfolio construction in the Indonesian market (International Journal of Management and Sustainability, 2025)
This study investigates the effectiveness of machine learning models in forecasting stock prices and constructing investment portfolios, with a specific focus on the integration of macroeconomic and technical indicators in the Indonesian stock market. Using Random Forest, Support Vector Regression, and Bagging models, the study forecasts three-month-ahead stock prices for 33 large-cap Indonesian firms, covering the period from 2022 to 2024. Forecast accuracy is evaluated using MAE, RMSE, and MAPE, while portfolio performance is assessed based on returns and risks, benchmarked against both traditional methods and key Indonesian indexes. Model interpretability is further enhanced through the use of SHAP, which helps identify the influence of individual variables on the predictions. Results show that machine learning models incorporating macroeconomic and technical indicators are able to effectively forecast long-term stock prices with strong predictive performance. Portfolios constructed using machine learning forecasts, particularly those weighted using mean-variance and inverse MAPE strategies, outperformed traditional benchmarks in terms of return at maturity. Furthermore, SHAP analysis reveals that macroeconomic indicators, particularly global market indices and bond yields, have a stronger influence on stock price predictions than most technical indicators, with the 3-month EMA being the only technical indicator with consistent predictive value. These findings demonstrate the practical value of integrating macroeconomic context into predictive modeling and highlight the potential of machine learning-driven strategies for investors seeking adaptable portfolio solutions. However, the study is limited to a single market and quarter; future research may extend the framework to broader settings to validate its generalizability.