IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2412.18405.html

Generalized Mean Absolute Directional Loss as a Solution to Overfitting and High Transaction Costs in Machine Learning Models Used in High-Frequency Algorithmic Investment Strategies

Author

Listed:
  • Jakub Micha'nk'ow
  • Pawe{l} Sakowski
  • Robert 'Slepaczuk

Abstract

Regardless of the selected asset class and the level of model complexity (Transformer versus LSTM versus Perceptron/RNN), the GMADL loss function produces superior results than standard MSE-type loss functions and has better numerical properties in the context of optimization than MADL. Better results mean the possibility of achieving a higher risk-weighted return based on buy and sell signals built on forecasts generated by a given theoretical model estimated using the GMADL versus MSE or MADL function. In practice, GMADL solves the problem of selecting the most preferable feature in both classification and regression problems, improving the performance of each estimation. What is important is that, through additional parameterization, GMADL also solves the problem of optimizing investment systems on high-frequency data in such a way that they focus on strategy variants that contain fewer transactions so that transaction costs do not reduce the effectiveness of a given strategy to zero. Moreover, the implementation leverages state-of-the-art machine learning tools, including frameworks for hyperparameter tuning, architecture testing, and walk-forward optimization, ensuring robust and scalable solutions for real-world algorithmic trading.

Suggested Citation

  • Jakub Micha'nk'ow & Pawe{l} Sakowski & Robert 'Slepaczuk, 2024. "Generalized Mean Absolute Directional Loss as a Solution to Overfitting and High Transaction Costs in Machine Learning Models Used in High-Frequency Algorithmic Investment Strategies," Papers 2412.18405, arXiv.org.
  • Handle: RePEc:arx:papers:2412.18405
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2412.18405
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Svetlana Borovkova & Ioannis Tsiamas, 2019. "An ensemble of LSTM neural networks for high‐frequency stock market classification," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 38(6), pages 600-619, September.
    2. Minjae Park & Mi Lim Lee & Jinpyo Lee, 2019. "Predicting Stock Market Indices Using Classification Tools," Asian Economic and Financial Review, Asian Economic and Social Society, vol. 9(2), pages 243-256, February.
    3. Gaurang Sonkavde & Deepak Sudhakar Dharrao & Anupkumar M. Bongale & Sarika T. Deokate & Deepak Doreswamy & Subraya Krishna Bhat, 2023. "Forecasting Stock Market Prices Using Machine Learning and Deep Learning Models: A Systematic Review, Performance Analysis and Discussion of Implications," IJFS, MDPI, vol. 11(3), pages 1-22, July.
    4. Minjae Park & Mi Lim Lee & Jinpyo Lee, 2019. "Predicting Stock Market Indices Using Classification Tools," Asian Economic and Financial Review, Asian Economic and Social Society, vol. 9(2), pages 243-256.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Ergenç Cansu & Aktaş Rafet, 2025. "A Supervised Machine Learning in Financial Forecasting: Identifying Effective Models for the BIST100 Index," Review of Economic Perspectives, Sciendo, vol. 25(1), pages 66-90.
    2. Gaoshan Wang & Guangjin Yu & Xiaohong Shen, 2020. "The Effect of Online Investor Sentiment on Stock Movements: An LSTM Approach," Complexity, Hindawi, vol. 2020, pages 1-11, December.
    3. Zeng, Qing & Lu, Xinjie & Xu, Jin & Lin, Yu, 2024. "Macro-Driven Stock Market Volatility Prediction: Insights from a New Hybrid Machine Learning Approach," International Review of Financial Analysis, Elsevier, vol. 96(PB).
    4. Mohammad Zoynul Abedin & Mahmudul Hasan Moon & M. Kabir Hassan & Petr Hajek, 2025. "Deep learning-based exchange rate prediction during the COVID-19 pandemic," Annals of Operations Research, Springer, vol. 345(2), pages 1335-1386, February.
    5. Bernardino, Wilton & Falcão, Rodrigo & Jr., João & Ospina, Raydonal & de Souza, Filipe Costa & Correia, José Jonas Alves, 2025. "A study of asset and liability management applied to Brazilian pension funds," European Journal of Operational Research, Elsevier, vol. 322(3), pages 1059-1076.
    6. Yuanrong Wang & Yinsen Miao & Alexander CY Wong & Nikita P Granger & Christian Michler, 2023. "Domain-adapted Learning and Interpretability: DRL for Gas Trading," Papers 2301.08359, arXiv.org, revised Sep 2023.
    7. Flori, Andrea & Regoli, Daniele, 2021. "Revealing Pairs-trading opportunities with long short-term memory networks," European Journal of Operational Research, Elsevier, vol. 295(2), pages 772-791.
    8. Tölö, Eero, 2020. "Predicting systemic financial crises with recurrent neural networks," Journal of Financial Stability, Elsevier, vol. 49(C).
    9. Zhiyuan Pei & Jianqi Yan & Jin Yan & Bailing Yang & Ziyuan Li & Lin Zhang & Xin Liu & Yang Zhang, 2024. "A Stock Price Prediction Approach Based on Time Series Decomposition and Multi-Scale CNN using OHLCT Images," Papers 2410.19291, arXiv.org, revised Oct 2024.
    10. Yonghong Li & Zhixian Li & Yuting Chen & Yayun Wang & Sidong Xian & Zhiqiang Zhao & Linyan Zhou & Ji Li, 2025. "MLBGK: A Novel Feature Fusion Model for Forecasting Stocks Prices," Computational Economics, Springer;Society for Computational Economics, vol. 66(3), pages 2565-2592, September.
    11. Firuz Kamalov & Linda Smail & Ikhlaas Gurrib, 2021. "Stock price forecast with deep learning," Papers 2103.14081, arXiv.org.
    12. Firuz Kamalov, 2019. "Forecasting significant stock price changes using neural networks," Papers 1912.08791, arXiv.org.
    13. Adam Korniejczuk & Robert Ślepaczuk, 2024. "Statistical arbitrage in multi-pair trading strategy based on graph clustering algorithms in US equities market," Working Papers 2024-09, Faculty of Economic Sciences, University of Warsaw.
    14. Flavio Barboza & Geraldo Nunes Silva & José Augusto Fiorucci, 2023. "A review of artificial intelligence quality in forecasting asset prices," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 42(7), pages 1708-1728, November.
    15. MINAMI, Koutaroh, 2025. "Detecting Bubbles by Machine Learning Prediction," Working Paper Series G-1-30, Hitotsubashi University Center for Financial Research.
    16. Gil Cohen, 2022. "Artificial Intelligence in Trading the Financial Markets," International Journal of Economics & Business Administration (IJEBA), International Journal of Economics & Business Administration (IJEBA), vol. 0(1), pages 101-110.
    17. Hussain, Syed Mujahid & Ahmad, Nisar & Ahmed, Sheraz, 2023. "Applications of high-frequency data in finance: A bibliometric literature review," International Review of Financial Analysis, Elsevier, vol. 89(C).
    18. Prashant Pilla & Raji Mekonen, 2025. "Forecasting S&P 500 Using LSTM Models," Papers 2501.17366, arXiv.org.
    19. Zhang, Lei & Jiang, Peng & Zhang, Yibo & Fan, Yee Van & Geng, Yong, 2024. "Recycling impacts of renewable energy generation-related rare earth resources: A SWOT-based strategical analysis," Energy, Elsevier, vol. 312(C).
    20. Hong Cao & Hao Chen & Yulong Lian & Hong-Kun Zhang, 2025. "Volatility-informed SPY forecasting: From CGR-SPY analysis to DLSTM prediction," PLOS Complex Systems, Public Library of Science, vol. 2(8), pages 1-16, August.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2412.18405. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.