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.
翻译:本文探讨了在构建算法投资策略(AIS)的金融时间序列预测任务中,机器学习模型优化所面临的损失函数适配性问题。我们提出均值绝对方向损失(MADL)函数,有效解决了经典预测误差函数在从预测结果中提取有效买卖信号以构建算法投资策略时的关键缺陷。基于两类不同资产(加密货币:比特币;大宗商品:原油)的实证数据表明,采用该新型损失函数能够为LSTM模型选取更优超参数,并在样本外数据上获得以风险调整后收益衡量的更高效投资策略。