IDEAS home Printed from https://ideas.repec.org/a/gam/jjrfmx/v17y2024i7p293-d1431830.html
   My bibliography  Save this article

Assessing the Predictive Power of Transformers, ARIMA, and LSTM in Forecasting Stock Prices of Moroccan Credit Companies

Author

Listed:
  • Karima Lahboub

    (Laboratory of Research and Studies in Management, Entrepreneurship and Finance (LAREMEF), Nation School of Commerce and Management of Fez, Sidi Mohamed Ben Abdellah University, Fes 30050, Morocco)

  • Mimoun Benali

    (Laboratory of Research and Studies in Management, Entrepreneurship and Finance (LAREMEF), Nation School of Commerce and Management of Fez, Sidi Mohamed Ben Abdellah University, Fes 30050, Morocco)

Abstract

In this paper, we present a data-driven approach to forecasting stock prices in the Moroccan Stock Exchange. Our study tests three predictive models: ARIMA, LSTM, and transformers, applied to the historical stock price data of three prominent credit companies (EQD, LES, and SLF) listed on the Casablanca Stock Exchange. We carefully selected and optimized hyperparameters for each model to achieve optimal performance. Our results showed that the LSTM model achieved high accuracy, with R-squared values exceeding 0.99 for EQD and LES and surpassing 0.95 for SLF. These findings highlighted the effectiveness of LSTM in stock price forecasting. Our study offers practical insights for traders and investors in the Moroccan Stock Exchange, demonstrating how predictive modeling can aid in making informed decisions. This research contributes to advancing stock market forecasting in Morocco, providing valuable tools for navigating the Casablanca Stock Exchange.

Suggested Citation

  • Karima Lahboub & Mimoun Benali, 2024. "Assessing the Predictive Power of Transformers, ARIMA, and LSTM in Forecasting Stock Prices of Moroccan Credit Companies," JRFM, MDPI, vol. 17(7), pages 1-16, July.
  • Handle: RePEc:gam:jjrfmx:v:17:y:2024:i:7:p:293-:d:1431830
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1911-8074/17/7/293/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1911-8074/17/7/293/
    Download Restriction: no
    ---><---

    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:gam:jjrfmx:v:17:y:2024:i:7:p:293-:d:1431830. 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.

    We have no bibliographic references for this item. You can help adding them by using 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: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    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.