# On Evaluating Loss Functions for Stock Ranking: An Empirical Analysis With Transformer Model

arXiv: https://arxiv.org/abs/2510.14156 · HTML: https://mlsanity.com/paper/2510.14156/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 11 of its 43 references that are in the map.
- First posted on arXiv 15 Oct 2025.

## Builds on (most cited first, 11 of 11)

- [Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting](https://mlsanity.com/paper/2012.07436/) (2020)
- [iTransformer: Inverted Transformers Are Effective for Time Series Forecasting](https://mlsanity.com/paper/2310.06625/) (2023)
- [Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecasting](https://mlsanity.com/paper/1912.09363/) (2019)
- [Forecasting Economics and Financial Time Series: ARIMA vs. LSTM](https://mlsanity.com/paper/1803.06386/) (2018)
- [MASTER: Market-Guided Stock Transformer for Stock Price Forecasting](https://mlsanity.com/paper/2312.15235/) (2023)
- [Hedge Fund Portfolio Construction Using PolyModel Theory and iTransformer](https://mlsanity.com/paper/2408.03320/) (2024)
- [Machine Learning Optimization Algorithms & Portfolio Allocation](https://mlsanity.com/paper/1909.10233/) (2019)
- [Quantformer: from attention to profit with a quantitative transformer trading strategy](https://mlsanity.com/paper/2404.00424/) (2024)
- [Applying Informer for Option Pricing: A Transformer-Based Approach](https://mlsanity.com/paper/2506.05565/) (2025)
- [Hidformer: Transformer-Style Neural Network in Stock Price Forecasting](https://mlsanity.com/paper/2412.19932/) (2024)
- [DeltaHedge: A Multi-Agent Framework for Portfolio Options Optimization](https://mlsanity.com/paper/2509.12753/) (2025)

## Built on by (most cited first, 3 of 3)

- [Modeling Decisions in Blockchain Analytics: A Leakage-Aware Evaluation of Tree-Based vs. Sequential Models](https://mlsanity.com/paper/2607.27350/) (2026)
- [Compression-Based Behavioral Similarity for Open-World Sybil Discovery on Ethereum](https://mlsanity.com/paper/2607.27370/) (2026)
- [Loss Choice or Model Choice? The Role of Forecast Level in Cryptocurrency Volatility Forecasting](https://mlsanity.com/paper/2609.27024/) (2026)

## Abstract (arXiv)

Quantitative trading strategies rely on accurately ranking stocks to identify profitable investments. Effective portfolio management requires models that can reliably order future stock returns. Transformer models are promising for understanding financial time series, but how different training loss functions affect their ability to rank stocks well is not yet fully understood. Financial markets are challenging due to their changing nature and complex relationships between stocks. Standard loss functions, which aim for simple prediction accuracy, often aren't enough. They don't directly teach models to learn the correct order of stock returns. While many advanced ranking losses exist from fields such as information retrieval, there hasn't been a thorough comparison to see how well they work for ranking financial returns, especially when used with modern Transformer models for stock selection. This paper addresses this gap by systematically evaluating a diverse set of advanced loss functions including pointwise, pairwise, listwise for daily stock return forecasting to facilitate rank-based portfolio selection on S&P 500 data. We focus on assessing how each loss function influences the model's ability to discern profitable relative orderings among assets. Our research contributes a comprehensive benchmark revealing how different loss functions impact a model's ability to learn cross-sectional and temporal patterns crucial for portfolio selection, thereby offering practical guidance for optimizing ranking-based trading strategies.
