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

The performance of time series forecasting based on classical and machine learning methods for S&P 500 index

Author

Listed:
  • Maudud Hassan Uzzal

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

  • Robert Ślepaczuk

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

Abstract

Based on one step ahead forecasts, this study compares the forecasting abilities of the traditional technique (ARIMA) with recurrent neural network (LSTM). In order to check the possible use of these forecasts in different asset management methods, these forecasts are afterwards included into trading signals of investment strategies. As a benchmark method, the Random Walk model producing naive forecasts has been utilized. This research examines daily data from the S&P 500 index for 20 years, from 2000 to 2020, and it includes information on some significant market turbulence. The methods were tested in terms of robustness to changes in parameters and hyperparameters and evaluated based on various error metrics (MAE, MAPE, RMSE MSE). The results show that ARIMA outperforms LSTM in terms of one step ahead forecasts. Finally, LSTM model with a variety of hyperparameters - including a number of epochs, a loss function, an optimizer, activation functions, a number of units, a batch size, and a learning rate - was tested in order to check its robustness.

Suggested Citation

  • 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.
  • Handle: RePEc:war:wpaper:2023-05
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. 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.
    2. Sidra Mehtab & Jaydip Sen, 2019. "A Robust Predictive Model for Stock Price Prediction Using Deep Learning and Natural Language Processing," Papers 1912.07700, arXiv.org.
    3. Ślepaczuk Robert & Zenkova Maryna, 2018. "Robustness of Support Vector Machines in Algorithmic Trading on Cryptocurrency Market," Central European Economic Journal, Sciendo, vol. 5(52), pages 186-205, January.
    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. Jaydip Sen & Sidra Mehtab & Abhishek Dutta & Saikat Mondal, 2022. "Precise Stock Price Prediction for Optimized Portfolio Design Using an LSTM Model," Papers 2203.01326, arXiv.org.
    2. Sidra Mehtab & Jaydip Sen & Subhasis Dasgupta, 2020. "Robust Analysis of Stock Price Time Series Using CNN and LSTM-Based Deep Learning Models," Papers 2011.08011, arXiv.org, revised Jan 2021.
    3. Jaydip Sen & Sidra Mehtab, 2021. "Design and Analysis of Robust Deep Learning Models for Stock Price Prediction," Papers 2106.09664, arXiv.org.
    4. Jaydip Sen & Ashwin Kumar R S & Geetha Joseph & Kaushik Muthukrishnan & Koushik Tulasi & Praveen Varukolu, 2022. "Precise Stock Price Prediction for Robust Portfolio Design from Selected Sectors of the Indian Stock Market," Papers 2201.05570, arXiv.org.
    5. Jaydip Sen & Subhasis Dasgupta, 2023. "Portfolio Optimization: A Comparative Study," Papers 2307.05048, arXiv.org.
    6. Sidra Mehtab & Jaydip Sen, 2020. "Stock Price Prediction Using CNN and LSTM-Based Deep Learning Models," Papers 2010.13891, arXiv.org.
    7. Federico Mecchia & Marcellino Gaudenzi, 2022. "The dynamics of the prices of the companies of the STOXX Europe 600 Index through the logit model and neural network," Papers 2206.09899, arXiv.org.
    8. Jaydip Sen & Abhishek Dutta & Sidra Mehtab, 2021. "Stock Portfolio Optimization Using a Deep Learning LSTM Model," Papers 2111.04709, arXiv.org.
    9. Sidra Mehtab & Jaydip Sen & Abhishek Dutta, 2020. "Stock Price Prediction Using Machine Learning and LSTM-Based Deep Learning Models," Papers 2009.10819, arXiv.org.
    10. Jaydip Sen & Abhishek Dutta, 2022. "A Comparative Study of Hierarchical Risk Parity Portfolio and Eigen Portfolio on the NIFTY 50 Stocks," Papers 2210.00984, arXiv.org.
    11. Yanzhao Zou & Dorien Herremans, 2022. "PreBit -- A multimodal model with Twitter FinBERT embeddings for extreme price movement prediction of Bitcoin," Papers 2206.00648, arXiv.org, revised Oct 2023.
    12. Jaydip Sen, 2022. "Designing Efficient Pair-Trading Strategies Using Cointegration for the Indian Stock Market," Papers 2211.07080, arXiv.org.
    13. Jaydip Sen & Abhishek Dutta & Sidra Mehtab, 2021. "Profitability Analysis in Stock Investment Using an LSTM-Based Deep Learning Model," Papers 2104.06259, arXiv.org.
    14. Sidra Mehtab & Jaydip Sen, 2020. "Stock Price Prediction Using Convolutional Neural Networks on a Multivariate Timeseries," Papers 2001.09769, arXiv.org.
    15. Jaydip Sen & Rajdeep Sen & Abhishek Dutta, 2021. "Machine Learning in Finance-Emerging Trends and Challenges," Papers 2110.11999, arXiv.org.
    16. Jaydip Sen & Sidra Mehtab & Abhishek Dutta & Saikat Mondal, 2022. "Hierarchical Risk Parity and Minimum Variance Portfolio Design on NIFTY 50 Stocks," Papers 2202.02728, arXiv.org.
    17. Jaydip Sen & Abhishek Dutta, 2022. "Design and Analysis of Optimized Portfolios for Selected Sectors of the Indian Stock Market," Papers 2210.03943, arXiv.org.
    18. Bartosz Bieganowski & Robert Ślepaczuk, 2024. "Supervised Autoencoder MLP for Financial Time Series Forecasting," Working Papers 2024-03, Faculty of Economic Sciences, University of Warsaw.
    19. Jaydip Sen & Saikat Mondal & Sidra Mehtab, 2021. "Analysis of Sectoral Profitability of the Indian Stock Market Using an LSTM Regression Model," Papers 2111.04976, arXiv.org.
    20. Jaydip Sen & Saikat Mondal & Gourab Nath, 2022. "Robust Portfolio Design and Stock Price Prediction Using an Optimized LSTM Model," Papers 2204.01850, arXiv.org.

    More about this item

    Keywords

    deep learning; recurrent neural networks; ARIMA; algorithmic investment strategies; trading systems; LSTM; walk-forward process; optimization;
    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-05. 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.