AUTHOR=Omar Abdullah Bin , Huang Shuai , Salameh Anas A. , Khurram Haris , Fareed Muhammad TITLE=Stock Market Forecasting Using the Random Forest and Deep Neural Network Models Before and During the COVID-19 Period JOURNAL=Frontiers in Environmental Science VOLUME=Volume 10 - 2022 YEAR=2022 URL=https://www.frontiersin.org/journals/environmental-science/articles/10.3389/fenvs.2022.917047 DOI=10.3389/fenvs.2022.917047 ISSN=2296-665X ABSTRACT=Stock market forecasting is considered to be the most challenging problem to solve for analysts. In past two years, Covid-19 severely affects stock markets globally which, in turn, creates a great problem for investors. The prime objective of this study is to use a machine learning model to effectively forecast stock index prices in three timeframes: the whole period, the pre-Covid-19 period, and the Covid-19 period. The model accuracy testing results of MAE, RMSE, MAPE, and r2 suggest that the proposed machine learning models autoregressive deep neural network (AR-DNN(1,3,10)), autoregressive deep neural network (AR-DNN(3,3,10)), and autoregressive random forest (AR-RF(1)) are the best forecasting models for stock index price forecasting for the whole period, pre-Covid-19 period and during Covid-19 period respectively under high stock price fluctuations compared to traditional time-series forecasting models such as autoregressive moving average models. In particular, AR-DNN(1,3,10) is suggested when the number of observations is large, whereas AR-RF(1) is suggested for a series with a low number of observations. Our study has a practical implication as they can be used by investors and policy makers in their investment decisions as well as formulating financial decisions and policies respectively.