Submitted:
19 May 2024
Posted:
20 May 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Literature Review
3. Overview of the Moroccan and Bahraini Stock Markets
3.1. Casablanca Stock Exchange (CSE)
3.2. Bahrain Bourse (BHB)
4. Materials and Methods
4.1. Econometric Approach
4.1.1. The Autoregressive Conditional Heteroscedastic (ARCH) model

4.1.2. The Generalized Autoregressive Conditional Heteroscedastic (GARCH) Model

4.2. Deep Learning Approach
4.2.1. LSTM Network
4.2.2.1. D-CNN Network
| Network Parameters | Values |
|---|---|
| Data standardization formula | |
| Optimization Algorithm | Adam |
| Activation function | ReLU |
| Number of Iterations (Epochs) | 1000 |
| Gradient Threshold | ReLU |
| Number of filter units | 64 |
| Number of kernels | 2 |
| Batch size | 32 |
| Dense units | 1 |
| Training Rate | 0,9 |
| Testing Rate | 0,1 |
4.2. Forecast Performance Metrics
- Root Mean Square Error (RMSE):
- Mean Absolute Error (MAE):
- Mean Absolute Percentage Error (MAPE):
5. Data and Descriptive Statistics

| Statistics | Variables | |
|---|---|---|
| BAX | MASI | |
| Number of observations | 1 226 | 1 247 |
| Mean | 0,000321 | 5,39E-05 |
| Median | 0,000391 | 0,000211 |
| Maximum | 0,034233 | 0,053054 |
| Minimum | -0,060013 | -0,092317 |
| Std. Dev. | 0,005505 | 0,008083 |
| Skewness | -1,636707 | -1,892897 |
| Kurtosis | 21,89118 | 28,00946 |
| Jarque-Bera | 18777,81 | 33243,21 |
| Probability | 0,000000 | 0,000000 |
| Normality hypothesis | Rejected | Rejected |
6. Empirical Results and Discussion
6.1. Empirical Results
6.1.1. Testing for Stationarity
| Variables | ADF Test | T-Statistics | P-Values | Hypothesis |
|---|---|---|---|---|
| BAX | Intercept | -15,88660* | 0,0000 | Null hypothesis rejected |
| Trend and intercept | -15,88105* | 0,0000 | Null hypothesis rejected | |
| None | -15,81436* | 0,0000 | Null hypothesis rejected | |
| MASI | Intercept | -21,16787* | 0,0000 | Null hypothesis rejected |
| Trend and intercept | -21,15932* | 0,0000 | Null hypothesis rejected | |
| None | -21,17456* | 0,0000 | Null hypothesis rejected |
6.1.2. Testing for Heteroscedasticity
| F-Statistics | Prob. | Chi Square-Statistics | Prob. | Hypothesis | |
|---|---|---|---|---|---|
| BAX | 182,6009* | 0,0000 | 159,1391* | 0,0000 | Null hypothesis rejected |
| MASI | 37,99301* | 0,0000 | 36,92633* | 0,0000 | Null hypothesis rejected |
6.1.3. Estimation Results
| ARCH (1) | GARCH (1,1) | LSTM | 1D CNN | |||||
|---|---|---|---|---|---|---|---|---|
| BAX | MASI | BAX | MASI | BAX | MASI | BAX | MASI | |
| RMSE | 0,0055 | 0,0081 | 0,0055 | 0,0081 | 0,0447 | 0,0810 | 0,0447 | 0,0812 |
| MAE | 0,0033 | 0,0049 | 0,0034 | 0,0049 | 0,0346 | 0,0453 | 0,0346 | 0,0455 |
| MAPE (%) | 154,913 | 166,035 | 161,52 | 157,854 | 86,638 | 88,013 | 86,145 | 89,399 |
6.1. Discussion
7. Conclusion and Perspective
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Abdalla, S.Z.S. , Winker, P. Modelling Stock Market Volatility Using Univariate GARCH Models: Evidence from Sudan and Egypt. IJEF 2012, 4, p161. [Google Scholar] [CrossRef]
- Alberg, D. , Shalit, H. , Yosef, R. Estimating stock market volatility using asymmetric GARCH models. Applied Financial Economics 2008, 18, 1201–1208. [Google Scholar] [CrossRef]
- Aminimehr, Amin, Raoofi, A., Aminimehr, Akbar, Aminimehr, Amirhossein, 2022. A Comprehensive Study of Market Prediction from Efficient Market Hypothesis up to Late Intelligent Market Prediction Approaches. Comput Econ 60, 781–815. [CrossRef]
- Bhowmik, R. , Wang, S. Stock Market Volatility and Return Analysis: A Systematic Literature Review. Entropy 2020, 22, 522. [Google Scholar] [CrossRef]
- Bollerslev, T. Generalized autoregressive conditional heteroskedasticity. Journal of Econometrics 1986, 31, 307–327. [Google Scholar] [CrossRef]
- BURTNIAK, I. , Suduk, N. MОDEL OF DETERMINING STOCK MARKET VOTALITY. Herald of Khmelnytskyi National University 2022, 302, 316–320. [Google Scholar] [CrossRef]
- Cai, W. , Liu, K. , Lu, K. Forecasting Daily Stock Volatility: A Comparison between GARCH and Recurrent Neuro-networks. BCP Business & Management 2023, 38, 427–436. [Google Scholar] [CrossRef]
- Calamanti, A. The Stock Exchange and the Securities Market in Morocco / La Bourse Et Le Marche Mobilier Au Maroc. Savings and Development 1980, 4, 266–302. [Google Scholar]
- Engle, R. The Use of ARCH/GARCH Models in Applied Econometrics. The Journal of Economic Perspectives 2001, 15, 157–168. [Google Scholar] [CrossRef]
- Engle, R.F. Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation. Econometrica 1982, 50, 987–1007. [Google Scholar] [CrossRef]
- Engle, R.F. , Ghysels, E. , Sohn, B. Stock Market Volatility and Macroeconomic Fundamentals. The Review of Economics and Statistics 2013, 95, 776–797. [Google Scholar] [CrossRef]
- Francq, C. , Zakoian, J.-M., 2019. GARCH Models: Structure, Statistical Inference and Financial Applications. John Wiley & Sons.
- Ge, W. , Lalbakhsh, P., Isai, L., Lensky, A., Suominen, H., 2023. Comparing Deep Learning Models for the Task of Volatility Prediction Using Multivariate Data. [CrossRef]
- Joshi, P. MODELING VOLATILITY IN EMERGING STOCK MARKETS OF INDIA AND CHINA. Journal of Quantitative Economics 2010, 8. [Google Scholar]
- Kanai, S. , Fujiwara, Y., Iwamura, S., 2017. Preventing Gradient Explosions in Gated Recurrent Units, in: Advances in Neural Information Processing Systems. Curran Associates, Inc.
- Li, Z. Financial market volatility based on complex network and fuzzy logic theory. Journal of Intelligent & Fuzzy Systems 2021, 1–10. [CrossRef]
- Lin, Z. Modelling and forecasting the stock market volatility of SSE Composite Index using GARCH models. Future Generation Computer Systems 2018, 79, 960–972. [Google Scholar] [CrossRef]
- Liu, Y. Novel volatility forecasting using deep learning–Long Short Term Memory Recurrent Neural Networks. Expert Systems with Applications 2019, 132, 99–109. [Google Scholar] [CrossRef]
- Livieris, I.E. , Pintelas, E. , Pintelas, P. A CNN–LSTM model for gold price time-series forecasting. Neural Comput & Applic 2020, 32, 17351–17360. [Google Scholar] [CrossRef]
- Markova, M. Convolutional neural networks for forex time series forecasting. AIP Conference Proceedings 2022, 2459, 030024. [Google Scholar] [CrossRef]
- Narula, I. Dynamics of Indian stock market volatility. International Journal of Innovation and Sustainable Development 2022, 16, 155–171. [Google Scholar] [CrossRef]
- Petrozziello, A. , Troiano, L. , Serra, A., Jordanov, I., Storti, G., Tagliaferri, R., La Rocca, M. Deep learning for volatility forecasting in asset management. Soft Comput 2022, 26, 8553–8574. [Google Scholar] [CrossRef]
- Sahiner, M. , McMillan, D. G., Kambouroudis, D. Do artificial neural networks provide improved volatility forecasts: Evidence from Asian markets. J Econ Finan 2023, 47, 723–762. [Google Scholar] [CrossRef]
- Schwert, G.W. Stock Market Volatility. Financial Analysts Journal 1990, 46, 23–34. [Google Scholar] [CrossRef]
- Thakkar, A. , Chaudhari, K. A comprehensive survey on deep neural networks for stock market: The need, challenges, and future directions. Expert Systems with Applications 2021, 177, 114800. [Google Scholar] [CrossRef]
- Yu, Y. , Lin, Y. , Hou, X., Zhang, X. Novel optimization approach for realized volatility forecast of stock price index based on deep reinforcement learning model. Expert Systems with Applications 2023, 233, 120880. [Google Scholar] [CrossRef]
- Yu, Y. , Si, X. , Hu, C., Zhang, J. A Review of Recurrent Neural Networks: LSTM Cells and Network Architectures. Neural Computation 2019, 31, 1235–1270. [Google Scholar] [CrossRef] [PubMed]
| Network Parameters | Values |
|---|---|
| Data standardization formula | |
| Optimization Algorithm | Adam |
| Number of Iterations (Epochs) | 250 |
| Gradient Threshold | 1 |
| Initial Learning Rate | 0.005 |
| Learning Rate Drop Period | 125 |
| Learning Rate Drop Factor | 0.2 |
| Number of Hidden Layers | 100 |
| Training Rate | 0,9 |
| Testing Rate | 0,1 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).