Comparative Study of ARIMA and LSTM Models in Stock Price Prediction (Casablanca Stock Exchange)
摘要
This study compares the effectiveness of ARIMA (Auto-Regressive Integrated Moving Average) and LSTM (Long Short-Term Memory) models for stock price prediction on the Casablanca Stock Exchange. The analysis focuses on the five most volatile stocks in the market, selected from 73 listed securities, over a period extending to October 15, 2024. The study aims to evaluate and compare the predictive performance of ARIMA and LSTM models under different market volatility conditions to determine their respective strengths and weaknesses. The sample includes five securities with volatilities between 42.16 and 53.46%. ARIMA models were parameterized through a systematic approach combining stationarity tests and the Akaike information criterion. The LSTM model was implemented with a three-layer architecture using 128, 64, and 32 units respectively, with a dropout rate of 20%. The results show an inverse correlation between stock volatility and prediction accuracy for both models. ARIMA demonstrates better performance on stable securities with MAPE of 1.35% to 1.58% for the least volatile stocks, while LSTM excels in capturing general trends but may present systematic biases. Both models show limitations in predicting high-amplitude movements. This study suggests that model selection should be guided by the stock's volatility level and prediction horizon. A hybrid approach combining the strengths of both models could offer a more robust solution for stock price prediction.