HYBRID PORTFOLIO OPTIMIZATION WITH PCA, CLUSTERING, AND THE BARZILAI-BORWEIN METHOD

Authors

  • Wei Yeing Pan Department of Mathematics and Actuarial Science, Lee Kong Chian Faculty of Science, University Tunku Abdul Rahman, Sungai Long Campus, Malaysia
  • Kai Shin Chiew Department of Mathematics and Actuarial Science, Lee Kong Chian Faculty of Science, University Tunku Abdul Rahman, Sungai Long Campus, Malaysia
  • Hong Seng Sim Department of Mathematics and Actuarial Science, Lee Kong Chian Faculty of Science, University Tunku Abdul Rahman, Sungai Long Campus, Malaysia
  • Jia Hou Chin School of Accounting and Finance, Faculty of Business and Law, Taylor’s University, 47500 Subang Jaya, Selangor, Malaysia
  • Yap Jia Lee Department of Mathematics and Actuarial Science, Lee Kong Chian Faculty of Science, University Tunku Abdul Rahman, Sungai Long Campus, Malaysia

DOI:

https://doi.org/10.24191/mjoc.vo11i1.9078

Keywords:

Barzilai-Borwein Gradient Method, Hierarchical Clustering, Portfolio Optimization, Principal Component Analysis

Abstract

Portfolio optimization aims to balance risk and return by identifying an effective mix of assets. In this study, we integrate principal component analysis (PCA) and hierarchical clustering for stock selection with the Barzilai–Borwein (BB) gradient method for portfolio optimization. Forty-eight U.S. stocks from the Kaggle fundamental stock dataset were initially collected, and 42 stocks were retained after preprocessing. Financial ratios from 2006 and adjusted closing prices from 2016–2017 were analysed, with one representative stock from each cluster selected using the Sharpe ratio. The BB method was then applied to determine optimal weights, ensuring full capital allocation without short selling. Among the tested approaches, the Barzilai–Borwein gradient method 1 (BB1) step size achieved strong performance, producing an annual return of 25.6% while maintaining relatively low volatility. The portfolio also generated a Jensen’s alpha of 1.55, confirming the presence of positive abnormal returns beyond market expectations. These results suggest that combining PCA-based clustering with the BB optimization method offers a practical and efficient way to construct diversified portfolios. The study highlights the BB algorithm’s potential as a lightweight yet effective alternative to more complex optimization techniques in financial decision-making.

References

Barzilai, J., & Borwein, J. M. (1988). Two-point step size gradient methods. IMA Journal of Numerical Analysis, 8(1), 141–148.

Costa, G., De Angelis, V., & Ievlev, A. (2022). Data-driven distributionally robust risk-parity portfolio optimization. Optimization Methods and Software, 37(6), 1905–1938.

Crisci, S., Rebegoldi, S., Toraldo, G., & Viola, M. (2024). Barzilai–Borwein-like rules in proximal gradient schemes for ℓ 1 -regularized problems. Optimization Methods & Software, 1–33.

Despois, T., Li, J., & al. (2023). Identifying and interpreting the factors in factor models via rotated principal components. Journal of Applied Econometrics. https://doi.org/10.1002/jae.2967

Fan, Z., Li, X., & Xu, H. (2024). Distributionally robust portfolio optimization under marginal and copula ambiguity. Journal of Optimization Theory and Applications. https://doi.org/10.1007/s10957-024-02550-y

Fransisca, D. C., Sukono, Chaerani, D., & Halim, N. A. (2024). Robust mean-variance optimization for capital allocation: A systematic review. Computation, 12(8), 166. https://doi.org/10.3390/computation12080166

Griva, I., Nash, S. G., & Sofer, A. (2009). Linear and nonlinear optimization (2nd ed.). Society for Industrial and Applied Mathematics (SIAM).

Kalayci, C. B., Ertenlice, O., & Akbay, M. A. (2019). A comprehensive review of deterministic models and applications for mean-variance portfolio optimization. Expert Systems with Applications, 125, 345–368.

Kan, R. (2024). In-sample and out-of-sample Sharpe ratios of multi-factor strategies. Journal of Financial Economics, 155, 103837.

Kuhn, D., Esfahani, P. M., Nguyen, V. A., & Shafieezadeh-Abadeh, S. (2025). Distributionally robust optimization. Acta Numerica, 34, 1–212.

Leković, M. M. (2021). Historical development of portfolio theory. Tehnika, 76(2), 220–227.

Lintner, J. (1975). The valuation of risk assets and the selection of risky investments in stock portfolios and capital budgets. In Stochastic Optimization Models in Finance (pp. 131–155). Academic Press.

Markowitz, H. M. (1952). Portfolio selection. The Journal of Finance, 7(1), 77–91.

Mattera, R., Di Nardo, A., & Sessa, S. (2025). Time-series clustering for portfolio selection: A comparative study. Soft Computing, 29, 4219–4231.

Mossin, J. (1966). Equilibrium in a capital asset market. Econometrica: Journal of the Econometric Society, 768–783.

Sáenz, J. V., López-García, M., & Zuluaga, J. (2023). Using clustering models of stocks to improve price prediction and trading returns. International Review of Financial Analysis, 88, 102758.

Sharpe, W. F. (1963). A simplified model for portfolio analysis. Management Science, 9(2), 277–293.

Ou, H., & Themelis, A. (2024). Safeguarding adaptive methods: Global convergence of Barzilai–Borwein and other stepsize choices. arXiv:2404.09617. https://arxiv.org/abs/2404.09617

Waga, M., Valladão, D., & Street, A. (2025). Robust portfolio optimization meets Arbitrage Pricing Theory. European Journal of Operational Research. (In press).

Wu, S., & Zhang, L. (2023). Research on the impact of PCA-LSTM on stock price forecast. In Proceedings of the 2023 7th International Conference on Deep Learning Technologies (pp. 98–102).

Yang, F., Chen, Z., Li, J., & Tang, L. (2019). A novel hybrid stock selection method with stock prediction. Applied Soft Computing, 80, 820–831.

Zanjirdar, M. (2020). Overview of portfolio optimization models. Advances in Mathematical Finance and Applications, 5(4), 419–435.

Zhou, D., Ma, S., & Yang, J. (2025). ADABB: Adaptive Barzilai-Borwein Method for Convex optimization. Mathematics of Operations Research. https://doi.org/10.1287/moor.2024.0510

Downloads

Published

2026-04-01

How to Cite

Pan, W. Y., Chiew, K. S., Sim, H. S., Chin, J. H., & Lee, Y. J. (2026). HYBRID PORTFOLIO OPTIMIZATION WITH PCA, CLUSTERING, AND THE BARZILAI-BORWEIN METHOD. Malaysian Journal of Computing, 11(1), 2391-2406. https://doi.org/10.24191/mjoc.vo11i1.9078