A Novel Loss Function for Deep Learning Based Daily Stock Trading System

ArXiv ID: 2502.17493 “View on arXiv”

Authors: Unknown

Abstract

Making consistently profitable financial decisions in a continuously evolving and volatile stock market has always been a difficult task. Professionals from different disciplines have developed foundational theories to anticipate price movement and evaluate securities such as the famed Capital Asset Pricing Model (CAPM). In recent years, the role of artificial intelligence (AI) in asset pricing has been growing. Although the black-box nature of deep learning models lacks interpretability, they have continued to solidify their position in the financial industry. We aim to further enhance AI’s potential and utility by introducing a return-weighted loss function that will drive top growth while providing the ML models a limited amount of information. Using only publicly accessible stock data (open/close/high/low, trading volume, sector information) and several technical indicators constructed from them, we propose an efficient daily trading system that detects top growth opportunities. Our best models achieve 61.73% annual return on daily rebalancing with an annualized Sharpe Ratio of 1.18 over 1340 testing days from 2019 to 2024, and 37.61% annual return with an annualized Sharpe Ratio of 0.97 over 1360 testing days from 2005 to 2010. The main drivers for success, especially independent of any domain knowledge, are the novel return-weighted loss function, the integration of categorical and continuous data, and the ML model architecture. We also demonstrate the superiority of our novel loss function over traditional loss functions via several performance metrics and statistical evidence.

Keywords: Asset Pricing, Deep Learning, Algorithmic Trading, Loss Function Optimization, Quantitative Finance

Complexity vs Empirical Score

  • Math Complexity: 3.5/10
  • Empirical Rigor: 7.5/10
  • Quadrant: Street Traders
  • Why: The mathematical complexity is moderate, primarily involving standard ML components like cross-entropy and embedding layers, without heavy advanced theory or derivations; the empirical rigor is high, as the paper presents detailed backtesting results over two distinct time periods (2019-2024 and 2005-2010) with specific performance metrics (annual return, Sharpe ratio) using publicly available data, demonstrating a practical, implementation-focused trading system.
  flowchart TD
    A["Research Goal: <br>Develop High-Return Daily Stock Trading System"] --> B["Data Input: <br>OHLCV, Sector Info, Technical Indicators"]
    B --> C["Methodology: <br>Novel Return-Weighted Loss Function"]
    C --> D["Computational Process: <br>Deep Learning Model Training"]
    D --> E["Key Finding 1: <br>61.73% Annual Return (2019-2024)"]
    D --> F["Key Finding 2: <br>37.61% Annual Return (2005-2010)"]
    E --> G["Outcome: <br>Superior Performance vs Traditional Loss Functions"]
    F --> G