Machine Learning, Valuation Signals, and Portfolio Return Forecasting: Evidence from the Pakistan Stock Exchange
DOI:
https://doi.org/10.62843/jssr.v6i4.764Keywords:
Machine Learning, Asset Pricing, Portfolio Return Forecasting, XGBoost, LightGBM, Fama-French Five-Factor Model, Earnings Yield, Price-To-Dividend Ratio, Pakistan Stock Exchange, Emerging MarketsAbstract
This study aims to analyze whether the use of machine-learning models provides better out-of-sample forecasts for the returns on characteristic-sorted portfolios on the Pakistan Stock Exchange (PSX) and to determine whether the E/P ratio and P/D ratio offer incremental predictability beyond the Fama-French five-factor (FF5) model. This study uses 264 months of data (July 2003-June 2025) on non-financial KSE-100 constituents to benchmark FF5/OLS regression models against the XGBoost and LightGBM gradient-boosting models in 18 size-by-B/M portfolios using a 22-variable feature set (FF5 factors and lags, macroeconomic variables, and valuation ratios) under five-fold walk-forward validation approach. XGBoost and LightGBM generate significantly lower out-of-sample forecast errors relative to the FF5/OLS benchmark model; Diebold-Mariano tests support significant improvement in 14 of 18 portfolios for XGBoost and 15 of 18 for LightGBM. FF5 captures a small amount of variation in return (average R² = 24.1%). However, including E/P and P/D increases R² to 24.8%, where E/P is the second most significant explanatory variable in the XGBoost regression model. This study demonstrates that machine learning algorithms can supplement traditional asset pricing models based on factors in an emerging market economy and that valuation variables still have some predictive power.
References
Ali, M., Khan, D. M., Aamir, M., Ali, A., & Ahmad, Z. (2021). Predicting the direction movement of financial time series using artificial neural network and support vector machine. Complexity, 2021, Article 2906463. https://doi.org/10.1155/2021/2906463
Ballings, M., Van den Poel, D., Hespeels, N., & Gryp, R. (2015). Evaluating multiple classifiers for stock price direction prediction. Expert Systems with Applications, 42(20), 7046–7056. https://doi.org/10.1016/j.eswa.2015.05.013
Bryzgalova, S., Pelger, M., & Zhu, J. (2023). Forest through the trees: Building cross-sections of stock returns. The Journal of Finance, 78(5), 2835–2883. https://doi.org/10.1111/jofi.13477
Carhart, M. M. (1997). On persistence in mutual fund performance. The Journal of Finance, 52(1), 57–82. https://doi.org/10.1111/j.1540-6261.1997.tb03808.x
Chen, L., Pelger, M., & Zhu, J. (2021). Deep learning in asset pricing. Management Science, 67(12), 7149–7176. https://doi.org/10.1287/mnsc.2023.4695
Dezhkam, A., et al. (2023). Forecasting stock market for an efficient portfolio by combining XGBoost and Hilbert–Huang transform. Engineering Applications of Artificial Intelligence, 118, Article 105616. https://doi.org/10.1016/j.engappai.2022.105616
Fama, E. F., & French, K. R. (1993). Common risk factors in the returns on stocks and bonds. Journal of Financial Economics, 33(1), 3–56. https://doi.org/10.1016/0304-405X(93)90023-5
Fama, E. F., & French, K. R. (2015). A five-factor asset pricing model. Journal of Financial Economics, 116(1), 1–22. https://doi.org/10.1016/j.jfineco.2014.10.010
Fang, M., & Taylor, S. (2021). A machine learning based asset pricing factor model comparison on anomaly portfolios. Economics Letters, 204, Article 109919. https://doi.org/10.1016/j.econlet.2021.109919
Fang, Y., Chen, Y., & Ren, H. (2023). A factor pricing model based on machine learning algorithm. International Review of Economics & Finance, 88, 280–297. https://doi.org/10.1016/j.iref.2023.06.012
Feng, G., Giglio, S., & Xiu, D. (2020). Taming the factor zoo: A test of new factors. The Journal of Finance, 75(3), 1327–1370. https://doi.org/10.1111/jofi.12883
Fischer, T., & Krauss, C. (2018). Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research, 270(2), 654–669. https://doi.org/10.1016/j.ejor.2017.11.054
Gu, S., Kelly, B., & Xiu, D. (2018). Empirical asset pricing via machine learning. National Bureau of Economic Research Working Paper Series, Article 25398. https://doi.org/10.3386/w25398
Gu, S., Kelly, B., & Xiu, D. (2020). Empirical asset pricing via machine learning. The Review of Financial Studies, 33(5), 2223–2273. https://doi.org/10.1093/rfs/hhaa009
Guennioui, O., et al. (2024). Improving global stock market prediction with XGBoost and LightGBM machine learning models. Review of Economics and Finance, 21, 2603–2610. https://doi.org/10.55365/1923.x2023.21.278
Huang, W., Nakamori, Y., & Wang, S.-Y. (2005). Forecasting stock market movement direction with support vector machine. Computers & Operations Research, 32(10), 2513–2522. https://doi.org/10.1016/j.cor.2004.03.016
Iftikhar, H., Khan, M., Turpo-Chaparro, J. E., Canas Rodrigues, P., & López-Gonzales, J. L. (2024). Forecasting stock prices using a novel filtering-combination technique: Application to the Pakistan stock exchange. AIMS Mathematics, 9(2), 3264–3288. https://doi.org/10.3934/math.2024159
Jadoon, A. K., Mahmood, T., Sarwar, A., Javaid, M. F., & Iqbal, M. (2024). Prediction of stock market movement using Long Short-Term Memory (LSTM) artificial neural network: Analysis of KSE 100 index. Pakistan Journal of Life and Social Sciences, 22(1), 107–119. https://doi.org/10.57239/PJLSS-2024-22.1.009
Jan, M. N., & Ayub, U. (2019). Do the Fama and French five-factor model forecast well using ANN? Journal of Business Economics and Management, 20(1), 168–191. https://doi.org/10.3846/jbem.2019.8250
Kelly, B., Pruitt, S., & Su, Y. (2019). Characteristics are covariances: A unified model of risk and return. Journal of Financial Economics, 134(3), 501–524. https://doi.org/10.1016/j.jfineco.2019.05.001
Kozak, S., Nagel, S., & Santosh, S. (2020). Shrinking the cross-section. Journal of Financial Economics, 135(2), 271–292. https://doi.org/10.1016/j.jfineco.2019.06.008
Manogna, R. L., & Kulkarni, N. (2025). Portfolio optimization model for stock price prediction using machine learning. Journal of Statistical Theory and Applications, 24, 1091–1108. https://doi.org/10.1007/s44199-025-00140-z
Merton, R. C. (1973). An intertemporal capital asset pricing model. Econometrica, 41(5), 867–887. https://doi.org/10.2307/1913811
Munir, T., Mamlook, R. E. A., Rahman, A. R., Alrashidi, A., & Yaseen, A. M. (2024). COVID-19's influence on Karachi Stock Exchange: A comparative machine learning algorithms study for forecasting. Heliyon, 10(7), Article e33190. https://doi.org/10.1016/j.heliyon.2024.e33190
Pagliaro, A. (2026). Regime-aware LightGBM for stock market forecasting: A validated walk-forward framework with statistical rigor and explainable AI analysis. Electronics, 15(6), Article 1334. https://doi.org/10.3390/electronics15061334
Poudel, S. R. (2025). Macroeconomic variables and common stock returns in Nepalese capital market. The Journal of Business and Management, 9(1), 73–87. https://doi.org/10.3126/jbm.v9i1.81186
Raza, H., & Akhtar, Z. (2024). Predicting stock prices in the Pakistan market using machine learning and technical indicators. Modern Finance, 2(2), 46–63. https://doi.org/10.61351/mf.v2i2.167
Ross, S. A. (1976). The arbitrage theory of capital asset pricing. Journal of Economic Theory, 13(3), 341–360. https://doi.org/10.1016/0022-0531(76)90046-6
Sak, H., Huang, T., & Chng, M. T. (2024). Exploring the factor zoo with a machine-learning portfolio. International Review of Financial Analysis, 96, Article 103599. https://doi.org/10.1016/j.irfa.2024.103599
Sarıoğlu Duran, E., Korkmaz, T., & Ersöz Kaya, I. (2025). Machine learning for out-of-sample prediction of industry portfolio returns within multi-factor asset pricing models. Applied Sciences, 15(24), Article 12866. https://doi.org/10.3390/app152412866
Shakya, L. (2024). Impact of macroeconomic factors and firm characteristics on stock returns in Nepalese insurance companies. Nepalese Journal of Economics, 8(4), 232–249. https://doi.org/10.3126/nje.v8i4.79758
Sharpe, W. F. (1964). Capital asset prices: A theory of market equilibrium under conditions of risk. The Journal of Finance, 19(3), 425–442. https://doi.org/10.1111/j.1540-6261.1964.tb02865.x
Siddiqui, O., Khan, N., & Bhatti, A. A. (2025). Human capital in asset pricing: A machine learning perspective on the six-factor model for Pakistan's equity market. Modern Finance, 3(4), 96–117. https://doi.org/10.61351/mf.v3i4.416
Wang, H., Stefanidis, A., Jiang, Z., Su, J., et al. (2025). SSCL-GBM: A semi-supervised stock prediction approach with custom loss function. Journal of Mathematics, 2025, Article 5991303. https://doi.org/10.1155/jom/5991303
Zada, H., Khan, N., Woo, K.-Y., & Chortane, S. G. (2025). Asset pricing: A comparative analysis of Fama-French five-factor with human capital-based six-factor model. Advances in Decision Sciences, 29(4), 1–37. https://doi.org/10.47654/v29y2025i4p1-37
Zafar, Q., Farid, S., Ashraf, M. A., & Ashraf, Z. (2025). Forecasting stock index movement using tree based classifiers: Evidence from an emerging economy. Review of Applied Management and Social Sciences, 8(2), 847–871. https://doi.org/10.47067/ramss.v8i2.522
Zhang, A., Pan, M., & Zhang, X. (2025). The pricing ability of factor model based on machine learning: Evidence from high-frequency data in China. International Review of Economics & Finance, 101, Article 104153. https://doi.org/10.1016/j.iref.2025.104153
Zhu, H. (2025). LGBM on stock returns prediction and portfolio construction. In Proceedings of the 2nd International Conference on Data Science and Engineering (ICDSE 2025) (pp. 521–526). SCITEPRESS. https://doi.org/10.5220/0013s701300004670
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Copyright in the Journal of Social Sciences Review is retained by the author(s). Authors also grant any third party the right to use the article freely as long as its integrity is maintained and its original authors, citation details and publisher are identified.

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
JSSR's Editorial Board shares the vision of providing free access to information, education, and science for everyone, thus promoting its content through an OPEN ACCESS POLICY, fulfilling the DOAJ definition of open access. The JSSR adheres to an Open Access and Copyright Licensing Policy based on the belief that making research freely accessible to the public promotes greater global knowledge sharing.
The JSSR uses the Creative Commons Attribution-NonCommercial 4.0 International License. The authors who apply and publish in JSSR consent to abide by the copyright policy set out in the Creative Commons 4.0 license (Attribution-NonCommercial 4.0 International license).
- Copyright in the Journal of Social Sciences Review is retained by the author(s).
- Authors also grant any third party the right to use the article freely as long as its integrity is maintained and its original authors, citation details and publisher are identified.
While "By 'open access' to this literature, we mean its free availability on the public internet, permitting any users to read, download, copy, distribute, print, search, or link to the full texts of these articles, crawl them for indexing, pass them as data to software, or use them for any other lawful purpose, without financial, legal, or technical barriers other than those inseparable from gaining access to the internet itself."




