From Point Prediction to Pairwise Ranking in Cross-Sectional Stock Selection: A Decision-Focused, Hyperparameter-Optimized LSTM–RankNet Framework

Document Type : Original Article

Authors
1 Department of Finance, Qo.C., Islamic Azad University, Qom, Iran.
2 Department of Finance, Esf.C., Islamic Azad University, Esfarayen, Iran.
3 Department of Accounting, Qo.C., Islamic Azad University, Qom, Iran.
Abstract
Objective: This study examines the gap between the statistical loss function and the economic objective of stock selection, and assesses whether pairwise RankNet ranking—in a controlled comparison with pointwise mean squared error regression—improves cross-sectional selection quality and net portfolio performance. The roles of the financial loss function, hyperparameter optimization, and the components of the LSTM–RankNet architecture are also disentangled.

Methodology: The data comprise 46 symbols from the Iranian stock market over 2,618 trading days, from March 25, 2015 to February 25, 2026. The stock universe was not selected from an end-of-period list; at each formation date, the following criteria were applied using same-date information: a minimum tradable-days ratio of 80%, a maximum consecutive gap of 30 trading days, membership in the top two market-capitalization deciles, a minimum free float of 15%, and a 25% cap on the share of any single industry. The union of eligible symbols formed the parent universe, and a daily mask kept membership and tradability time-varying. Four objectives—MSE, RankNet, Sharpe-only, and Combined—were compared under a 0.4% transaction cost and ten shared seeds.

Findings: The average net Sharpe ratio of RankNet was 1.314, versus 1.108 for MSE. RankNet outperformed MSE in all ten seeds, and the 0.206-unit difference was significant at p = 0.002. The Combined model also outperformed both MSE and RankNet; however, Sharpe-only, with a Sharpe ratio of 3.819, surpassed Combined’s 2.784. In the single-run sensitivity analysis, removing HPO reduced the test Sharpe ratio from 2.750 to 1.030; yet, since this comparison was not replicated across independent seeds, the result is descriptive and does not suffice for generalizable inference about the HPO effect. The conservative DSR also did not fully rule out multiple-selection risk.

Originality/Value: The study’s contribution lies in providing a controlled comparison among pointwise, pairwise, and financial objectives in an emerging market, and in separating the “objective-alignment value” from the “architectural-complexity value.” The results indicate that the shift from pointwise prediction to decision-oriented learning is warranted, but that combining all deep components is not necessarily the optimal solution.
Keywords

  1. Akiba, T., Sano, S., Yanase, T., Ohta, T., & Koyama, M. (2019). Optuna: A next-generation hyperparameter optimization framework. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (pp. 2623–2631). ACM.
  2. Alzaman, C. (2024). Deep learning in stock portfolio selection and predictions. Expert Systems with Applications, 237, 121404.
  3. Alzaman, C. (2025). Optimizing portfolio selection through stock ranking and matching: A reinforcement learning approach. Expert Systems with Applications, 269, 126430.
  4. Bae, H., Park, M., Jeon, H., & Kim, W. C. (2026). A decision-focused learning framework for goal-based investing. Quantitative Finance, 26(1), 1–13.
  5. Bailey, D. H., & López de Prado, M. (2014). The deflated Sharpe ratio: Correcting for selection bias, backtest overfitting, and non-normality. The Journal of Portfolio Management, 40(5), 94–107.
  6. Bergstra, J., & Bengio, Y. (2012). Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13, 281–305.
  7. Best, M. J., & Grauer, R. R. (1991). On the sensitivity of mean-variance-efficient portfolios to changes in asset means. The Review of Financial Studies, 4(2), 315–342.
  8. Brown, S. J., Goetzmann, W. N., Ibbotson, R. G., & Ross, S. A. (1992). Survivorship bias in performance studies. The Review of Financial Studies, 5(4), 553–580.
  9. Burges, C., Shaked, T., Renshaw, E., Lazier, A., Deeds, M., Hamilton, N., & Hullender, G. (2005). Learning to rank using gradient descent. In Proceedings of the 22nd International Conference on Machine Learning (pp. 89–96). ACM.
  10. Cao, Z., Qin, T., Liu, T.-Y., Tsai, M.-F., & Li, H. (2007). Learning to rank: From pairwise approach to listwise approach. In Proceedings of the 24th International Conference on Machine Learning (pp. 129–136). ACM.
  11. Cont, R. (2001). Empirical properties of asset returns: Stylized facts and statistical issues. Quantitative Finance, 1(2), 223–236.
  12. DeMiguel, V., Garlappi, L., & Uppal, R. (2009). Optimal versus naive diversification: How inefficient is the 1/N portfolio strategy? The Review of Financial Studies, 22(5), 1915–1953.
  13. Donti, P., Amos, B., & Kolter, J. Z. (2017). Task-based end-to-end model learning in stochastic optimization. In Advances in Neural Information Processing Systems 30 (pp. 5490–5500).
  14. Elmachtoub, A. N., & Grigas, P. (2022). Smart predict, then optimize. Management Science, 68(1), 9–26.
  15. 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.
  16. Gu, S., Kelly, B., & Xiu, D. (2020). Empirical asset pricing via machine learning. The Review of Financial Studies, 33(5), 2223–2273.
  17. Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735–1780.
  18. Li, Y., & Tan, Z. (2021). Stock portfolio selection with Deep RankNet. The Journal of Financial Data Science, 3(3), 108–120.
  19. Lo, A. W. (2004). The adaptive markets hypothesis. The Journal of Portfolio Management, 30(5), 15–29.
  20. López de Prado, M. (2018). Advances in financial machine learning. Wiley.
  21. Ma, Y., Mao, R., Lin, Q., Wu, P., & Cambria, E. (2024). Quantitative stock portfolio optimization by multi-task learning risk and return. Information Fusion, 104, 102165.
  22. Markowitz, H. (1952). Portfolio selection. The Journal of Finance, 7(1), 77–91.
  23. Michaud, R. O. (1989). The Markowitz optimization enigma: Is optimized optimal? Financial Analysts Journal, 45(1), 31–42.
  24. Poh, D., Lim, B., Zohren, S., & Roberts, S. (2021). Building cross-sectional systematic strategies by learning to rank. The Journal of Financial Data Science, 3(2), 70–86.
  25. Shumway, T. (1997). The delisting bias in CRSP data. The Journal of Finance, 52(1), 327–340.
  26. Snoek, J., Larochelle, H., & Adams, R. P. (2012). Practical Bayesian optimization of machine learning algorithms. In Advances in Neural Information Processing Systems 25 (pp. 2951–2959).
  27. Zhang, Z., Zohren, S., & Roberts, S. (2020). Deep learning for portfolio optimization. The Journal of Financial Data Science, 2(4), 8–20.