IDEAS home Printed from https://ideas.repec.org/p/war/wpaper/2023-15.html
   My bibliography  Save this paper

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

Author

Listed:
  • Karol Chojnacki

    (University of Warsaw, Faculty of Economic Sciences)

  • Robert Ślepaczuk

    (University of Warsaw, Quantitative Finance Research Group, Department of Quantitative Finance, Faculty of Economic Sciences)

Abstract

No abstract is available for this item.

Suggested Citation

  • Karol Chojnacki & Robert Ślepaczuk, 2023. "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 ense," Working Papers 2023-15, Faculty of Economic Sciences, University of Warsaw.
  • Handle: RePEc:war:wpaper:2023-15
    as

    Download full text from publisher

    File URL: https://www.wne.uw.edu.pl/download_file/2922/0
    File Function: First version, 2023
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Andrea Frattini & Ilaria Bianchini & Alessio Garzonio & Lorenzo Mercuri, 2022. "Financial Technical Indicator and Algorithmic Trading Strategy Based on Machine Learning and Alternative Data," Risks, MDPI, vol. 10(12), pages 1-24, November.
    2. Chlebus Marcin & Dyczko Michał & Woźniak Michał, 2021. "Nvidia's Stock Returns Prediction Using Machine Learning Techniques for Time Series Forecasting Problem," Central European Economic Journal, Sciendo, vol. 8(55), pages 44-62, January.
    3. Huang, Jing-Zhi & Huang, Zhijian (James), 2020. "Testing moving average trading strategies on ETFs," Journal of Empirical Finance, Elsevier, vol. 57(C), pages 16-32.
    4. James, F. E., 1968. "Monthly Moving Averages—An Effective Investment Tool?*," Journal of Financial and Quantitative Analysis, Cambridge University Press, vol. 3(3), pages 315-326, September.
    5. Sergio Castellano Gómez & Robert Ślepaczuk, 2021. "Robust optimisation in algorithmic investment strategies," Working Papers 2021-27, Faculty of Economic Sciences, University of Warsaw.
    6. Katarzyna Kryńska & Robert Ślepaczuk, 2022. "Daily and intraday application of various architectures of the LSTM model in algorithmic investment strategies on Bitcoin and the S&P 500 Index," Working Papers 2022-25, Faculty of Economic Sciences, University of Warsaw.
    7. Yizhuo Li & Peng Zhou & Fangyi Li & Xiao Yang, 2021. "An Improved Reinforcement Learning Model Based on Sentiment Analysis," Papers 2111.15354, arXiv.org.
    8. Jakub Drahokoupil, 2022. "Application of the XGBoost algorithm and Bayesian optimization for the Bitcoin price prediction during the COVID-19 period," FFA Working Papers 4.006, Prague University of Economics and Business, revised 09 May 2022.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Andreas Thomann, 2021. "Multi-asset scenario building for trend-following trading strategies," Annals of Operations Research, Springer, vol. 299(1), pages 293-315, April.
    2. Jin, Xiaoye, 2022. "Testing technical trading strategies on China's equity ETFs: A skewness perspective," Emerging Markets Review, Elsevier, vol. 51(PA).
    3. Chan Kyu Paik & Jinhee Choi & Ivan Ureta Vaquero, 2024. "Algorithm-Based Low-Frequency Trading Using a Stochastic Oscillator and William%R: A Case Study on the U.S. and Korean Indices," JRFM, MDPI, vol. 17(3), pages 1-18, February.
    4. Kung, James J. & Wu, E-Ching, 2013. "An evaluation of some popular investment strategies under stochastic interest rates," Mathematics and Computers in Simulation (MATCOM), Elsevier, vol. 94(C), pages 96-108.
    5. Xiaoye Jin, 2022. "Evaluating the predictive power of intraday technical trading in China's crude oil market," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 41(7), pages 1416-1432, November.
    6. Urquhart, Andrew & Gebka, Bartosz & Hudson, Robert, 2015. "How exactly do markets adapt? Evidence from the moving average rule in three developed markets," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 38(C), pages 127-147.
    7. Roy Hayes & Jingwei Wu & Ruijra Chaysiri & Jean Bae & Peter Beling & William Scherer, 2016. "Effects of time horizon and asset condition on the profitability of technical trading rules," Journal of Economics and Finance, Springer;Academy of Economics and Finance, vol. 40(1), pages 41-59, January.
    8. Jaime Alberto Gómez Vilchis & Federico Hernández Álvarez & Luis Ignacio Román de la Sancha, 2021. "Autómata Evolutivo (AE) para el mercado accionario usando Martingalas y un Algoritmo Genético," Remef - Revista Mexicana de Economía y Finanzas Nueva Época REMEF (The Mexican Journal of Economics and Finance), Instituto Mexicano de Ejecutivos de Finanzas, IMEF, vol. 16(4), pages 1-22, Octubre -.
    9. Agosto, Arianna & Cerchiello, Paola & Pagnottoni, Paolo, 2022. "Sentiment, Google queries and explosivity in the cryptocurrency market," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 605(C).
    10. Gunasekarage, Abeyratna & Power, David M., 2001. "The profitability of moving average trading rules in South Asian stock markets," Emerging Markets Review, Elsevier, vol. 2(1), pages 17-33, March.
    11. Kung, James J., 2009. "Predictability of Technical Trading Rules: Evidence from the Taiwan Stock Market," Review of Applied Economics, Lincoln University, Department of Financial and Business Systems, vol. 5(1-2), pages 1-17, March.
    12. Matthew Lorig & Zhou Zhou & Bin Zou, 2017. "A Mathematical Analysis of Technical Analysis," Papers 1710.09476, arXiv.org, revised Feb 2019.
    13. Marcus Davidsson, 2014. "Tactic Asset Allocation and Conditional Return Expectations," Journal of Statistical and Econometric Methods, SCIENPRESS Ltd, vol. 3(2), pages 1-1.
    14. Han, Yufeng & Hu, Ting & Yang, Jian, 2016. "Are there exploitable trends in commodity futures prices?," Journal of Banking & Finance, Elsevier, vol. 70(C), pages 214-234.
    15. Jason F. Nicholls & Andries P. Engelbrecht, 2019. "Co‐evolved genetic programs for stock market trading," Intelligent Systems in Accounting, Finance and Management, John Wiley & Sons, Ltd., vol. 26(3), pages 117-136, July.
    16. Maudud Hassan Uzzal & Robert Ślepaczuk, 2023. "The performance of time series forecasting based on classical and machine learning methods for S&P 500 index," Working Papers 2023-05, Faculty of Economic Sciences, University of Warsaw.
    17. Jin, Xiaoye, 2022. "Performance of intraday technical trading in China’s gold market," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 76(C).
    18. Yu, Hao & Nartea, Gilbert V. & Gan, Christopher & Yao, Lee J., 2013. "Predictive ability and profitability of simple technical trading rules: Recent evidence from Southeast Asian stock markets," International Review of Economics & Finance, Elsevier, vol. 25(C), pages 356-371.

    More about this item

    Keywords

    Algorithmic Investment Strategies; Machine Learning; Recurrent Neural Networks; Long Short-Term Memory; XGBoost; Walk Forward Optimization; Trading algorithms; Technical Analysis Indicators;
    All these keywords.

    JEL classification:

    • C4 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics
    • C14 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General - - - Semiparametric and Nonparametric Methods: General
    • C45 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics - - - Neural Networks and Related Topics
    • C53 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Forecasting and Prediction Models; Simulation Methods
    • C58 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Financial Econometrics
    • G13 - Financial Economics - - General Financial Markets - - - Contingent Pricing; Futures Pricing

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:war:wpaper:2023-15. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Marcin Bąba (email available below). General contact details of provider: https://edirc.repec.org/data/fesuwpl.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.