English

Alternative Loss Function in Evaluation of Transformer Models

Computational Finance 2025-07-25 v2 Machine Learning Trading and Market Microstructure

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.

Keywords

Cite

@article{arxiv.2507.16548,
  title  = {Alternative Loss Function in Evaluation of Transformer Models},
  author = {Jakub Michańków and Paweł Sakowski and Robert Ślepaczuk},
  journal= {arXiv preprint arXiv:2507.16548},
  year   = {2025}
}

Comments

12 pages, fixed grammar, typos and minor error in tables

R2 v1 2026-07-01T04:13:22.012Z