Directly Learning Stock Trading Strategies Through Profit Guided Loss Functions
- URL: http://arxiv.org/abs/2507.19639v1
- Date: Fri, 25 Jul 2025 19:22:05 GMT
- Title: Directly Learning Stock Trading Strategies Through Profit Guided Loss Functions
- Authors: Devroop Kar, Zimeng Lyu, Sheeraja Rajakrishnan, Hao Zhang, Alex Ororbia, Travis Desell, Daniel Krutz,
- Abstract summary: We propose four novel loss functions to drive decision-making for a portfolio of stocks.<n>These functions account for the potential profits or losses based with respect to buying or shorting respective stocks.<n>Despite the high volatility in stock market fluctuations over time, training time-series models resulted in trading strategies that generated significant profits.
- Score: 6.209778959431366
- License: http://creativecommons.org/licenses/by/4.0/
- 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.
Related papers
- Building crypto portfolios with agentic AI [46.348283638884425]
The rapid growth of crypto markets has opened new opportunities for investors, but at the same time exposed them to high volatility.<n>This paper presents a practical application of a multi-agent system designed to autonomously construct and evaluate crypto-asset allocations.
arXiv Detail & Related papers (2025-07-11T18:03:51Z) - Predicting Stock Prices using Permutation Decision Trees and Strategic Trailing [2.7309692684728617]
We focus on high-frequency data using 5-minute candlesticks for the top 50 stocks listed in the NIFTY 50 index.<n>We implement a trading strategy that aims to buy stocks at lower prices and sell them at higher prices, capitalizing on short-term market fluctuations.
arXiv Detail & Related papers (2025-04-17T10:42:38Z) - When AI Meets Finance (StockAgent): Large Language Model-based Stock Trading in Simulated Real-world Environments [55.19252983108372]
We have developed a multi-agent AI system called StockAgent, driven by LLMs.
The StockAgent allows users to evaluate the impact of different external factors on investor trading.
It avoids the test set leakage issue present in existing trading simulation systems based on AI Agents.
arXiv Detail & Related papers (2024-07-15T06:49:30Z) - Combining Deep Learning on Order Books with Reinforcement Learning for
Profitable Trading [0.0]
This work focuses on forecasting returns across multiple horizons using order flow and training three temporal-difference imbalance learning models for five financial instruments.
The results prove potential but require further minimal modifications for consistently profitable trading to fully handle retail trading costs, slippage, and spread fluctuation.
arXiv Detail & Related papers (2023-10-24T15:58:58Z) - Diffusion Variational Autoencoder for Tackling Stochasticity in
Multi-Step Regression Stock Price Prediction [54.21695754082441]
Multi-step stock price prediction over a long-term horizon is crucial for forecasting its volatility.
Current solutions to multi-step stock price prediction are mostly designed for single-step, classification-based predictions.
We combine a deep hierarchical variational-autoencoder (VAE) and diffusion probabilistic techniques to do seq2seq stock prediction.
Our model is shown to outperform state-of-the-art solutions in terms of its prediction accuracy and variance.
arXiv Detail & Related papers (2023-08-18T16:21:15Z) - Agent Performing Autonomous Stock Trading under Good and Bad Situations [0.0]
We have developed a pipeline that simulates the stock trading environment.<n>We have trained an agent to automate the stock trading process with deep reinforcement learning methods.<n>We evaluate our platform during relatively good (before 2021) and bad ( 2021 - 2022) situations.
arXiv Detail & Related papers (2023-06-06T19:44:37Z) - Spatiotemporal Transformer for Stock Movement Prediction [2.792030485253753]
We propose STST, a novel approach using a Spatiotemporal Transformer-LSTM model for stock movement prediction.
Our model obtains accuracies of 63.707 and 56.879 percent against the ACL18 and KDD17 datasets, respectively.
It obtained a minimum of 10.41% higher profit than the S&P500 stock index, with a minimum annualized return of 31.24%.
arXiv Detail & Related papers (2023-05-05T20:30:30Z) - Can Perturbations Help Reduce Investment Risks? Risk-Aware Stock
Recommendation via Split Variational Adversarial Training [44.7991257631318]
We propose a novel Split Variational Adrial Training (SVAT) method for risk-aware stock recommendation.
By lowering the volatility of the stock recommendation model, SVAT effectively reduces investment risks and outperforms state-of-the-art baselines by more than 30% in terms of risk-adjusted profits.
arXiv Detail & Related papers (2023-04-20T12:10:12Z) - Can ChatGPT Forecast Stock Price Movements? Return Predictability and Large Language Models [51.3422222472898]
We document the capability of large language models (LLMs) like ChatGPT to predict stock price movements using news headlines.
We develop a theoretical model incorporating information capacity constraints, underreaction, limits-to-arbitrage, and LLMs.
arXiv Detail & Related papers (2023-04-15T19:22:37Z) - Stock Price Prediction Under Anomalous Circumstances [81.37657557441649]
This paper aims to capture the movement pattern of stock prices under anomalous circumstances.
We train ARIMA and LSTM models at the single-stock level, industry level, and general market level.
Based on 100 companies' stock prices in the period of 2016 to 2020, the models achieve an average prediction accuracy of 98%.
arXiv Detail & Related papers (2021-09-14T18:50:38Z) - Combining Machine Learning Classifiers for Stock Trading with Effective
Feature Extraction [0.4199844472131921]
A machine learning model can make a significant profit in the US stock market by performing live trading.
Our work showcased that mixtures of weighted classifiers perform better than any individual predictor of making trading decisions in the stock market.
arXiv Detail & Related papers (2021-07-28T03:22:58Z) - Deep Stock Predictions [58.720142291102135]
We consider the design of a trading strategy that performs portfolio optimization using Long Short Term Memory (LSTM) neural networks.
We then customize the loss function used to train the LSTM to increase the profit earned.
We find the LSTM model with the customized loss function to have an improved performance in the training bot over a regressive baseline such as ARIMA.
arXiv Detail & Related papers (2020-06-08T23:37:47Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.