REVIEW 5 major objections 6 minor 59 references
Directly Learning Stock Trading Strategies Through Profit Guided Loss Functions
T0 review · 5 major / 6 minor · reviewed 2026-08-06 · deepseek-v4-flash
Pith's one-line read A set of profit-based loss functions lets time-series networks output daily long/short portfolio weights directly, and the best configuration reports 48 to 53 percent backtested annual returns on 50 S&P 500 stocks over 2021 to 2023.
desk verdict A useful idea undercut by a misdefined objective: the 'profit' losses do not actually measure trading P&L, and the headline returns are not grounded. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
They attach these losses to several time-series models, including Crossformer, DeformTime, DLinear, TimesNet, P-sLSTM, and Autoformer, and test on a 50-stock S&P 500 portfolio with 2021, 2022, and 2023 held out. The best configurations, especially Crossformer with the L3 loss using prices, report annual returns around 48 to 53 percent, above the best reinforcement-learning baselines and above buy-and-hold for those years.
Two caveats matter. The profit calculation shown in the paper includes no transaction costs, shorting costs, or slippage, which are large for a daily trading strategy over 50 stocks. Also, the headline numbers are chosen from many models, losses, and settings by looking at validation performance, so part of the reported edge may come from selection rather than from a single stable strategy. The code is available, but the CRSP data is private.
Extended reading notes
Core claim
The paper's load-bearing claim is stated as: 'The results from these loss functions outperform the RL strategies as well, and in some cases quite significantly as in the bear market year of 2022,' with the headline example being Crossformer with StockLoss-L2 and price inputs returning 51.42%, 51.04%, and 48.62% for 2021, 2022, and 2023. If correct, training a time-series network with a profit-based loss produces a long/short strategy that is profitable across three test years and beats RL baselines and buy-and-hold on a 50-stock S&P 500 portfolio.
Load-bearing premise
The evaluation assumes that profits can be measured directly from daily return differences with no transaction costs, shorting costs, or slippage. Equations 1 through 4 and Tables 3, 5 through 12 contain no cost term, yet the strategy rebalances long and short positions across 50 stocks daily. If realistic costs are applied, the reported 48 to 53 percent annual returns would be substantially reduced, possibly below the RL baselines. A second load-bearing choice is selecting the best model/loss per test year on validation data from many configurations, which makes the headline a product of selection rather than a single pre-specified strategy.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes four loss functions intended to let any time-series forecasting network output a direct trading strategy (buy/short/hold weights) by training on a 'profit' signal. The method is evaluated on 50 S&P 500 stocks across three test years (2021, 2022, 2023) and compared against five RL baselines and buy-and-hold, with headline annual profits of 51.42%, 51.04%, and 48.62% for Crossformer with the StockLoss-L2 variant and price inputs. The authors claim that the loss functions 'account for the potential profits or losses' of the suggested positions and that the resulting strategies outperform RL and buy-and-hold.
Significance. If the claims were correct, the paper would offer a simple, architecture-agnostic way to convert forecasting models into profitable long/short strategies, with code provided and experiments spanning multiple models, years, and portfolios. However, the central technical premise is invalid: the loss functions defined in Section 3 do not measure portfolio profit. This undermines the headline numbers regardless of the breadth of the experimental setup. The comparison to RL baselines is further weakened by the absence of transaction costs and by post-hoc model selection.
major comments (5)
- [Section 3.1, Eq. (1) (also Eqs. (2)–(4))] The term V_i·(Ret_{i,t+1}−Ret_{i,t})·sign(O_i) is not the profit of the trade implied by O_i. For a dollar position V_i opened at time t and closed at t+1, the per-dollar P&L is V_i·Ret_{i,t+1}·sign(O_i); the subtracted Ret_{i,t} is the previous day's return and is unrelated to that trade. A correct long on a stock with equal +1% returns on days t and t+1 therefore receives zero reward. The loss is a first-difference/momentum objective, not a profit objective, so the central claim that the loss functions are 'profit guided' is not supported.
- [Section 3.5] Replacing the return difference with (P RC_{i,t+1}−P RC_{i,t}) does not make the loss 'a more direct measure of the actual profit' because positions are dollar-weighted, not share-denominated. The P&L per dollar invested in stock i is (P_{i,t+1}−P_{i,t})/P_{i,t}; a raw price difference is not comparable across stocks with different price levels. This affects all PRC-based results in Tables 3, 6, 8, 10, and 12.
- [Section 6, Tables 3–12] The manuscript never states the formula used to compute 'Profit %'. If the backtest accumulates the training loss expression, the reported percentages are not portfolio returns; if it uses a standard long/short P&L based on daily returns, then training and evaluation optimize different objectives. Either way, the headline returns of 51.42%, 51.04%, and 48.62% do not demonstrate that the proposed loss functions directly maximize profit. The backtest procedure must be specified precisely.
- [Sections 5 and 6] The reported strategy rebalances long and short positions across 50 stocks daily, but no transaction costs, shorting costs, or slippage appear in Eqs. (1)–(4) or in the profit calculations. The stated 48–54% annual returns are therefore not investable, and the comparison with the RL baselines and Buy-and-Hold is not meaningful without a cost model or at least a breakeven transaction-cost analysis.
- [Section 5 (training configuration and results)] All results are selected from 10 repeated runs by best validation performance, and the headline model is additionally chosen across six architectures, four losses, two input types, and two hold settings. This post hoc selection makes the reported profits a product of multiple comparisons rather than a pre-specified strategy; no correction or nested evaluation is provided, so the expected out-of-sample performance is overstated.
minor comments (6)
- [Abstract and Table 3] The stated best RL profits 'around 41%, 2.81% and 41.58%' do not match the table maximums (SAC 43.00% in 2021, PPO 2.81% in 2022, TD3 40.96% in 2023); please align the abstract with the table.
- [Section 5] The text lists '8 numerical features' but enumerates nine items (price, return, bid-ask, spread, turn over, volume change, illiquidity, shares outstanding, market capitalization); please correct.
- [Section 3.3 heading] The heading 'LoST III' should be 'StockLoss-L2'.
- [Section 3.2] 'Subtracting this from Equation 1' is misleading; Eq. (2) is not Eq. (1) minus the normalized term but a new expression starting from 1.
- [Eq. (4)] The numerator uses |O_i| and the denominator uses |O_j| while Eq. (1) uses V_i; the relationship between O and V is defined in Section 3, but the notation should be made consistent in all four losses.
- [Tables 1–12] Several entries are exactly 0.00 or 0, which the authors attribute to the model learning not to trade; a brief explanation or confidence interval would help the reader distinguish zero from a failed run.
Circularity Check
No circularity: the profit-based losses are the training objective by design, but the reported headline results are out-of-sample evaluations on held-out years; the only self-citations are in related work and are not load-bearing.
full rationale
The paper's derivation chain is: define losses (Equations 1–4) that reward positions based on return or price differences, train time-series models with these losses, and then measure the resulting trading strategy's profit on held-out test years (2021, 2022, 2023). Minimizing a profit-based loss maximizes that same training objective at train time, which is tautological, but that is the intended design of a loss function and is not circular. The empirical claim—that the resulting strategies generate positive out-of-sample returns and outperform RL baselines—is evaluated on data not used for training, with validation taken from the year prior to each test year. Selecting the best model on validation data is standard model selection, not a fitted-input-called-prediction step, because the test labels are not used for selection. The paper's self-citations (Kar et al. [16] and Lyu et al. [27]) appear only in related-work discussions of bandit and RNN forecasting methods and are not load-bearing for the proposed loss functions or the evaluation. Concerns that the reported 'Profit %' may not correspond to a realistic portfolio return—for example, because no transaction costs or shorting costs are modeled, or because Equations 1–4 use one-day changes in returns rather than exact per-trade P&L—are correctness and validity concerns, not circularity. Since the backtest computation is not specified in the paper, one cannot exhibit a specific equation-level reduction showing that the reported profits equal the loss expression by construction. Therefore, no circular step can be identified from the manuscript text, and the circularity score is low.
Assumptions & free parameters
free parameters (1)
- smoothing coefficient gamma =
10
assumptions (3)
- domain assumption Portfolio profit equals the sum of daily weighted return differences, with no transaction costs, shorting costs, or slippage.
- domain assumption Next-day realized returns are valid training targets and the train/validation/test year split preserves temporal causality.
- ad hoc to paper Selecting the best model/loss/hold configuration on validation is an acceptable way to report method performance.
Cite this review
Pith. "Pith review of Directly Learning Stock Trading Strategies Through Profit Guided Loss Functions." pith.science (2026). https://pith.science/paper/2QVNCGWB
@misc{pith2026250719639,
author = {Pith},
title = {Pith review of: Directly Learning Stock Trading Strategies Through Profit Guided Loss Functions},
year = {2026},
howpublished = {\url{https://pith.science/paper/2QVNCGWB}},
note = {Machine review of arXiv:2507.19639}
}
read the original abstract
Stock trading has always been a challenging task due to the highly volatile nature of the stock market. Making sound trading decisions to generate profit is particularly difficult under such conditions. To address this, we propose four novel loss functions to drive decision-making for a portfolio of stocks. These functions account for the potential profits or losses based with respect to buying or shorting respective stocks, enabling potentially any artificial neural network to directly learn an effective trading strategy. Despite the high volatility in stock market fluctuations over time, training time-series models such as transformers on these loss functions resulted in trading strategies that generated significant profits on a portfolio of 50 different S&P 500 company stocks as compared to a benchmark reinforcment learning techniques and a baseline buy and hold method. As an example, using 2021, 2022 and 2023 as three test periods, the Crossformer model adapted with our best loss function was most consistent, resulting in returns of 51.42%, 51.04% and 48.62% respectively. In comparison, the best performing state-of-the-art reinforcement learning methods, PPO and DDPG, only delivered maximum profits of around 41%, 2.81% and 41.58% for the same periods. The code is available at https://anonymous.4open.science/r/bandit-stock-trading-58C8/README.md.
Figures
Reference graph
Works this paper leans on
-
[1]
M. Beck, K. Pöppel, M. Spanring, A. Auer, O. Prudnikova, M. Kopp, G. Klambauer, J. Brandstetter, and S. Hochreiter. xlstm: Extended long short-term memory. arXiv preprint arXiv:2405.04517, 2024
arXiv 2024
-
[2]
T. Bollerslev. Generalized autoregressive conditional heteroskedasticity. Journal of economet- rics, 31(3):307–327, 1986
work page 1986
-
[3]
C. Chen, L. Xue, and W. Xing. Research on improved gru-based stock price prediction method. Applied Sciences, 13(15):8813, 2023
work page 2023
-
[4]
J.-c. Chen, C.-x. Chen, L.-j. Duan, and Z. Cai. Ddpg based on multi-scale strokes for financial time series trading strategy. In Proceedings of the 2022 8th International Conference on Computer Technology Applications, pages 22–27, 2022
work page 2022
-
[5]
W. Chen, H. Zhang, M. K. Mehlawat, and L. Jia. Mean–variance portfolio optimization using machine learning-based stock price prediction. Applied Soft Computing, 100:106943, 2021
work page 2021
-
[6]
Fujimoto, H
S. Fujimoto, H. Hoof, and D. Meger. Addressing function approximation error in actor-critic methods. In International conference on machine learning, pages 1587–1596. PMLR, 2018
2018
-
[7]
S. E. Gao, B. S. Lin, and C.-M. Wang. Share price trend prediction using crnn with lstm structure. In 2018 International Symposium on Computer, Consumer and Control (IS3C), pages 10–13. IEEE, 2018
work page 2018
- [8]
Show all 59 references
-
[9]
Gunjan and S
A. Gunjan and S. Bhattacharyya. A brief review of portfolio optimization techniques. Artificial Intelligence Review, 56(5):3847–3886, 2023
2023
-
[10]
Gupta, V
U. Gupta, V . Bhattacharjee, and P. S. Bishnu. Stocknet—gru based stock index prediction. Expert Systems with Applications, 207:117986, 2022. 10
2022
-
[11]
Haarnoja, A
T. Haarnoja, A. Zhou, P. Abbeel, and S. Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In International conference on machine learning, pages 1861–1870. PMLR, 2018
2018
-
[12]
Huang, X
Y . Huang, X. Wan, L. Zhang, and X. Lu. A novel deep reinforcement learning framework with bilstm-attention networks for algorithmic trading. Expert Systems with Applications, 240: 122581, 2024
2024
-
[13]
Huang, C
Y . Huang, C. Zhou, K. Cui, and X. Lu. Improving algorithmic trading consistency via human alignment and imitation learning. Expert Systems with Applications, page 124350, 2024
2024
-
[14]
N. Jing, Z. Wu, and H. Wang. A hybrid model integrating deep learning with investor sentiment analysis for stock price prediction. Expert Systems with Applications, 178:115019, 2021
2021
-
[15]
Kamijo and T
K.-i. Kamijo and T. Tanigawa. Stock price pattern recognition-a recurrent neural network approach. In 1990 IJCNN international joint conference on neural networks, pages 215–221. IEEE, 1990
1990
-
[16]
D. Kar, Z. Lyu, A. G. Ororbia, T. Desell, and D. Krutz. Enabling an informed contextual multi-armed bandit framework for stock trading with neuroevolution. In Proceedings of the Genetic and Evolutionary Computation Conference Companion, pages 1924–1933, 2024
1924
-
[17]
K. M. Kiani and T. L. Kastens. Testing forecast accuracy of foreign exchange rates: Predic- tions from feed forward and various recurrent neural network architectures. Computational Economics, 32:383–406, 2008
2008
-
[18]
Konda and J
V . Konda and J. Tsitsiklis. Actor-critic algorithms.Advances in neural information processing systems, 12, 1999
1999
-
[19]
Y . Kong, Z. Wang, Y . Nie, T. Zhou, S. Zohren, Y . Liang, P. Sun, and Q. Wen. Unlocking the power of lstm for long term time series forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pages 11968–11976, 2025
2025
-
[20]
M. M. Kumbure, C. Lohrmann, P. Luukka, and J. Porras. Machine learning techniques and data for stock market forecasting: A literature review. Expert Systems with Applications, 197: 116659, 2022
2022
-
[21]
Leippold, Q
M. Leippold, Q. Wang, and W. Zhou. Machine learning in the chinese stock market. Journal of Financial Economics, 145(2):64–82, 2022
2022
-
[22]
Lin and P
S. Lin and P. A. Beling. An end-to-end optimal trade execution framework based on prox- imal policy optimization. In Proceedings of the Twenty-Ninth International Conference on International Joint Conferences on Artificial Intelligence, pages 4548–4554, 2021
2021
-
[23]
X.-Y . Liu, H. Yang, Q. Chen, R. Zhang, L. Yang, B. Xiao, and C. D. Wang. Finrl: A deep reinforcement learning library for automated stock trading in quantitative finance.arXiv preprint arXiv:2011.09607, 2020
2011 arXiv
-
[24]
X.-Y . Liu, H. Yang, J. Gao, and C. D. Wang. Finrl: Deep reinforcement learning framework to automate trading in quantitative finance. In Proceedings of the second ACM international conference on AI in finance, pages 1–9, 2021
2021
-
[25]
X.-Y . Liu, Z. Xia, J. Rui, J. Gao, H. Yang, M. Zhu, C. Wang, Z. Wang, and J. Guo. Finrl- meta: Market environments and benchmarks for data-driven financial reinforcement learning. Advances in Neural Information Processing Systems, 35:1835–1849, 2022
2022
-
[26]
X.-Y . Liu, Z. Xia, H. Yang, J. Gao, D. Zha, M. Zhu, C. D. Wang, Z. Wang, and J. Guo. Dynamic datasets and market environments for financial reinforcement learning. Machine Learning, 113 (5):2795–2839, 2024
2024
-
[27]
Z. Lyu, D. Kar, M. Simoni, R. Nadeem, A. Bhojanapalli, H. Zhang, and T. D. Desell. Evolving rnns for stock forecasting: A low parameter efficient alternative to transformers. InInternational Conference on the Applications of Evolutionary Computation (part of EvoStar), 2025. 11
2025
-
[28]
V . Mnih. Asynchronous methods for deep reinforcement learning. arXiv preprint arXiv:1602.01783, 2016
2016 arXiv
-
[29]
Mohammadshafie, A
A. Mohammadshafie, A. Mirzaeinia, H. Jumakhan, and A. Mirzaeinia. Deep reinforcement learning strategies in finance: Insights into asset holding, trading behavior, and purchase diversity. arXiv preprint arXiv:2407.09557, 2024
2024 arXiv
-
[30]
H. Ni, H. Xu, D. Ma, and J. Fan. Contextual combinatorial bandit on portfolio management. Expert Systems with Applications, 221:119677, 2023
2023
-
[31]
Pawar, R
K. Pawar, R. S. Jalem, and V . Tiwari. Stock market price prediction using lstm rnn. InEmerging Trends in Expert Applications and Security: Proceedings of ICETEAS 2018, pages 493–503. Springer, 2019
2018
-
[32]
T.-V . Pricope. Deep reinforcement learning in quantitative algorithmic trading: A review.arXiv preprint arXiv:2106.00123, 2021
2021 arXiv
-
[33]
C. V . Reddy. Predicting the stock market index using stochastic time series arima modelling: The sample of bse and nse. Indian Journal of Finance, 13(8):7–25, 2019
2019
-
[34]
Schulman, F
J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017
2017 arXiv
-
[35]
Shu and V
Y . Shu and V . Lampos. Deformtime: Capturing variable dependencies with deformable attention for time series forecasting. arXiv preprint arXiv:2406.07438, 2024
2024 arXiv
-
[36]
Smith, V
N. Smith, V . Varadharajan, D. Kalla, G. R. Kumar, and F. Samaah. Stock closing price and trend prediction with lstm-rnn. Journal of Artificial Intelligence and Big Data, pages 1–13, 2024
2024
-
[37]
Sonkavde, D
G. Sonkavde, D. S. Dharrao, A. M. Bongale, S. T. Deokate, D. Doreswamy, and S. K. Bhat. Forecasting stock market prices using machine learning and deep learning models: A systematic review, performance analysis and discussion of implications. International Journal of Financial...
2023
-
[38]
Taghian, A
M. Taghian, A. Asadi, and R. Safabakhsh. Learning financial asset-specific trading rules via deep reinforcement learning. Expert Systems with Applications, 195:116523, 2022
2022
-
[39]
H. Tan. Reinforcement learning with deep deterministic policy gradient. In 2021 International Conference on Artificial Intelligence, Big Data and Algorithms (CAIBDA), pages 82–85. IEEE, 2021
2021
-
[40]
Vaswani, N
A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017
2017
-
[41]
C. J. Watkins and P. Dayan. Q-learning. Machine learning, 8:279–292, 1992
1992
-
[42]
H. Wu, J. Xu, J. Wang, and M. Long. Autoformer: Decomposition transformers with auto- correlation for long-term series forecasting. Advances in neural information processing systems, 34:22419–22430, 2021
2021
-
[43]
H. Wu, T. Hu, Y . Liu, H. Zhou, J. Wang, and M. Long. Timesnet: Temporal 2d-variation modeling for general time series analysis. arXiv preprint arXiv:2210.02186, 2022
2022 arXiv
-
[44]
X. Wu, H. Chen, J. Wang, L. Troiano, V . Loia, and H. Fujita. Adaptive stock trading strategies with deep reinforcement learning methods. Information Sciences, 538:142–158, 2020
2020
-
[45]
Xiong, X.-Y
Z. Xiong, X.-Y . Liu, S. Zhong, H. Yang, and A. Walid. Practical deep reinforcement learning approach for stock trading. arXiv preprint arXiv:1811.07522, pages 1–7, 2018
2018 arXiv
-
[46]
Yañez, W
C. Yañez, W. Kristjanpoller, and M. C. Minutolo. Stock market index prediction using trans- former neural network models and frequency decomposition. Neural Computing and Applica- tions, pages 1–21, 2024. 12
2024
-
[47]
B. Yang, T. Liang, J. Xiong, and C. Zhong. Deep reinforcement learning based on transformer and u-net framework for stock trading. Knowledge-Based Systems, 262:110211, 2023
2023
-
[48]
Yang, X.-Y
H. Yang, X.-Y . Liu, S. Zhong, and A. Walid. Deep reinforcement learning for automated stock trading: An ensemble strategy. In Proceedings of the first ACM international conference on AI in finance, pages 1–8, 2020
2020
-
[49]
J. Yang, M. Zhang, R. Fang, W. Zhang, and J. Zhou. Separating the predictable part of returns with cnn-gru-attention from inputs to predict stock returns. Applied Soft Computing , 165: 112116, 2024
2024
-
[50]
S. Yao, L. Luo, and H. Peng. High-frequency stock trend forecast using lstm model. In 2018 13th International Conference on Computer Science & Education (ICCSE), pages 1–4. IEEE, 2018
2018
-
[51]
A. Zeng, M. Chen, L. Zhang, and Q. Xu. Are transformers effective for time series forecasting? In Proceedings of the AAAI conference on artificial intelligence, volume 37, pages 11121–11128, 2023
2023
-
[52]
Zhang, C
Q. Zhang, C. Qin, Y . Zhang, F. Bao, C. Zhang, and P. Liu. Transformer-based attention network for stock movement prediction. Expert Systems with Applications, 202:117239, 2022
2022
-
[53]
Zhang, Z
R. Zhang, Z. Yuan, and X. Shao. A new combined cnn-rnn model for sector stock price analysis. In 2018 IEEE 42nd Annual Computer Software and Applications Conference (COMPSAC) , volume 2, pages 546–551. IEEE, 2018
2018
-
[54]
Zhang, L
W. Zhang, L. Wang, L. Xie, K. Feng, and X. Liu. Tradebot: Bandit learning for hyper-parameters optimization of high frequency trading strategy. Pattern Recognition, 124:108490, 2022
2022
-
[55]
Zhang, N
X. Zhang, N. Gu, J. Chang, and H. Ye. Predicting stock price movement using a dbn-rnn. Applied Artificial Intelligence, 35(12):876–892, 2021
2021
-
[56]
Zhang and J
Y . Zhang and J. Yan. Crossformer: Transformer utilizing cross-dimension dependency for multivariate time series forecasting. In The eleventh international conference on learning representations, 2022
2022
-
[57]
J. Zhao, D. Zeng, S. Liang, H. Kang, and Q. Liu. Prediction model for stock price trend based on recurrent neural network. Journal of Ambient Intelligence and Humanized Computing, 12: 745–753, 2021
2021
-
[58]
J. Zou, J. Lou, B. Wang, and S. Liu. A novel deep reinforcement learning based automated stock trading system using cascaded lstm networks. Expert Systems with Applications, 242: 122801, 2024. 13 Technical Appendices and Supplementary Material Dataset Description The data was ...
2024
-
[2022]
Also, the results with the loss functions are overall higher than any of the RL strategies for each of the testing years, and even the Buy & Hold strategy (Refer Table 3)
For 2021, DLinear performed the best with an annual profit of 50.94% followed by TimesNet with a profit of 46.82%. Also, the results with the loss functions are overall higher than any of the RL strategies for each of the testing years, and even the Buy & Hold strategy (Refer ...
2021
Reviewed August 6, 2026 · model on record in the stance chip above.
Discussion (0). Sign in to comment.