Mean Absolute Directional Loss as a New Loss Function for Machine Learning Problems in Algorithmic Investment Strategies

12 Pages Posted: 13 Oct 2023

See all articles by Jakub Michańków

Jakub Michańków

University of Warsaw - Faculty of Economic Sciences; Cracow University of Economics

Paweł Sakowski

University of Warsaw - Faculty of Economic Sciences

Robert Ślepaczuk

University of Warsaw - Faculty of Economic Sciences

Date Written: September 19, 2023

Abstract

This paper investigates the issue of an adequate loss function in the optimization of machine learning models used in the forecasting of financial time series for the purpose of algorithmic investment strategies (AIS) construction. We propose the Mean Absolute Directional Loss (MADL) function, solving important problems of classical forecast error functions in extracting information from forecasts to create efficient buy/sell signals in algorithmic investment strategies. Finally, based on the data from two different asset classes (cryptocurrencies: Bitcoin and commodities: Crude Oil), we show that the new loss function enables us to select better hyperparameters for the LSTM model and obtain more efficient investment strategies, with regard to risk-adjusted return metrics on the out-of-sample data.

Keywords: machine learning, recurrent neural networks, long short-term memory, algorithmic investment strategies, loss function

JEL Classification: C4, C14, C45, C53, C58, G13

Suggested Citation

Michańków, Jakub and Sakowski, Paweł and Ślepaczuk, Robert, Mean Absolute Directional Loss as a New Loss Function for Machine Learning Problems in Algorithmic Investment Strategies (September 19, 2023). Available at SSRN: https://ssrn.com/abstract=4575978 or http://dx.doi.org/10.2139/ssrn.4575978

Jakub Michańków (Contact Author)

University of Warsaw - Faculty of Economic Sciences ( email )

Dluga Street 44/50
Warsaw, 00-241
Poland

Cracow University of Economics ( email )

ul. Rakowicka 27
Krakow, 31-510
Poland

Paweł Sakowski

University of Warsaw - Faculty of Economic Sciences ( email )

Dluga Street 44/50
Warsaw, 00-241
Poland

Robert Ślepaczuk

University of Warsaw - Faculty of Economic Sciences ( email )

Dluga Street 44/50
Warsaw, 00-241
Poland

Do you have a job opening that you would like to promote on SSRN?

Paper statistics

Downloads
355
Abstract Views
1,129
Rank
183,611
PlumX Metrics