Economics at your fingertips  

Ensembled LSTM with Walk Forward Optimization in Algorithmic Trading

Karol Chojnacki and Robert Ślepaczuk
Additional contact information
Karol Chojnacki: University of Warsaw, Faculty of Economic Sciences

No 2023-15, Working Papers from Faculty of Economic Sciences, University of Warsaw

Abstract: This study compares well-known tools of technical analysis (Moving Average Crossover MAC) with Machine Learning based strategies (LSTM and XGBoost) and Ensembled Machine Learning Strategies (LSTM ensembled with XGBoost and MAC). All models were compared to Buy and Hold benchmark and evaluated using Performance Metrics, that is Annualized Return Compounded, Maximum Drawdown, Maximum Loss Duration, and three types of Information Ratio. This research uses daily S&P 500 index data ranging from 2000 to 2023. Every strategy was optimized with novel walk forward approach consisting of numerous in sample and out of sample periods. MAC and best performing ML methods were subjected to sensitivity analysis. The results show that LSTM ensembled with XGBoost and MAC yields the most promising results in terms of risk-adjusted returns which suggest further research focused on ensembling of individual ML strategies. Finally, we show that classical methods of technical analysis (that is, MAC) are much less robust and indifferent to change in hyperparameters than machine learning based algorithms, especially LSTM.

Keywords: Algorithmic Investment Strategies; Machine Learning; Recurrent Neural Networks; Long Short-Term Memory; XGBoost; Walk Forward Optimization; Trading algorithms; Technical Analysis Indicators (search for similar items in EconPapers)
JEL-codes: C14 C4 C45 C53 C58 G13 (search for similar items in EconPapers)
Pages: 40 pages
Date: 2023
New Economics Papers: this item is included in nep-cmp and nep-fmk
References: View references in EconPapers View complete reference list from CitEc

Downloads: (external link) First version, 2023 (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link:

Access Statistics for this paper

More papers in Working Papers from Faculty of Economic Sciences, University of Warsaw Contact information at EDIRC.
Bibliographic data for series maintained by Marcin Bąba ().

Page updated 2024-06-15
Handle: RePEc:war:wpaper:2023-15