Alternative Loss Function in Evaluation of Transformer Models

Jakub Michańków, Paweł Sakowski, Robert Ślepaczuk
7/22/2025
q-fin.CPcs.LGq-fin.TR

No confident code implementation found for this paper.

Abstract

The proper design and architecture of testing machine learning models, especially in their application to quantitative finance problems, is crucial. The most important aspect of this process is selecting an adequate loss function for training, validation, estimation purposes, and hyperparameter tuning. Therefore, in this research, through empirical experiments on equity and cryptocurrency assets, we apply the Mean Absolute Directional Loss (MADL) function, which is more adequate for optimizing forecast-generating models used in algorithmic investment strategies. The MADL function results are compared between Transformer and LSTM models, and we show that in almost every case, Transformer results are significantly better than those obtained with LSTM.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{michakw2025alternative,
  title  = {Alternative Loss Function in Evaluation of Transformer Models},
  author = {Jakub Michańków and Paweł Sakowski and Robert Ślepaczuk},
  year   = {2025},
  eprint = {2507.16548},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.16548v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.16548.svg)](https://codeofpaper.com/paper/2507.16548)

Discussion