Stock market prediction, COVID-19 pandemic and neural networks: an SCG algorithm application

Himanshu Goel (Jagan Institute of Management Studies, Delhi, India)
Bhupender Kumar Som (Department of Management, Jagan Institute of Management Studies, Delhi, India)


ISSN: 1517-7580

Article publication date: 28 April 2023

Issue publication date: 10 July 2023




This study aims to predict the Indian stock market (Nifty 50) by employing macroeconomic variables as input variables identified from the literature for two sub periods, i.e. the pre-coronavirus disease 2019 (COVID-19) (June 2011–February 2020) and during the COVID-19 (March 2020–June 2021).


Secondary data on macroeconomic variables and Nifty 50 index spanning a period of last ten years starting from 2011 to 2021 have been from various government and regulatory websites. Also, an artificial neural network (ANN) model was trained with the scaled conjugate gradient algorithm for predicting the National Stock exchange's (NSE) flagship index Nifty 50.


The findings of the study reveal that Scaled Conjugate Gradient (SCG) algorithm achieved 96.99% accuracy in predicting the Indian stock market in the pre-COVID-19 scenario. On the contrary, the proposed ANN model achieved 99.85% accuracy in during the COVID-19 period. The findings of this study have implications for investors, portfolio managers, domestic and foreign institution investors, etc.


The novelty of this study lies in the fact that are hardly any studies that forecasts the Indian stock market using artificial neural networks in the pre and during COVID-19 periods.



Goel, H. and Som, B.K. (2023), "Stock market prediction, COVID-19 pandemic and neural networks: an SCG algorithm application", EconomiA, Vol. 24 No. 1, pp. 134-146.



Emerald Publishing Limited

Copyright © 2023, Himanshu Goel and Bhupender Kumar Som


Published in EconomiA. Published by Emerald Publishing Limited. This article is published under the Creative Commons Attribution (CC BY 4.0) licence. Anyone may reproduce, distribute, translate and create derivative works of this article (for both commercial and non-commercial purposes), subject to full attribution to the original publication and authors. The full terms of this licence may be seen at

1. Introduction

Stock market prediction has always been a topic of immense interest to various investors, practitioners and researchers. A precise prediction of stocks is a complex process due to the presence of an inherent noisy and highly volatile environment (Ticknor, 2013). There is extensive literature available on the factors affecting the stock market. However, some of the factors that exist in literature are a mix of the macroeconomic variables and global stock market variables. These are the Foreign Exchange rate (Srivastava, 2010; Akter, Rana, & Anik, 2020); Index of Industrial Production (Srivastava, 2010); Consumer Price Index; Long Term Interest Rates (Srivastava, 2010; Mohammed and Rumman, 2018); Gold (Jain & Biswal, 2016; Bouri, Jain, Biswal, & Roubaud, 2017); Crude oil prices (Basher, Haug, & Sadorsky, 2011), Indian Volatility Index (Shahani & Bansal, 2020) and Morgan Stanley Capital International (MSCI) World Index (Srivastava, 2010; Mensi, Hammoudeh, Yoon, & Balcilar, 2016). In addition to the above mentioned factors, this study considers MSCI emerging market index as a new variable for predicting the Indian stock market in pre and during COVID-19 periods. Since the majority of trades takes place in USD. Therefore, we have considered USD/INR exchange rate. If the dollar makes a strong gain, the imports would probably rise which may increase the stock prices of Indian export companies thereby affecting the Indian stock market. Weak index of industrial production (IIP) results in fall in the stock market as the consumer's demand falls thereby impacting the overall profitability of the firm and vice versa. Change in long-term interest rates (LTINTs) impacts the stock market because the higher the interest rate, less attractive shall be the equity investment and vice versa. Increase in crude oil prices leads to increase in production cost thereby decrease in profit margins and vice versa. When the gold prices rise, the stock market falls and vice versa. Whenever there is huge flow of foreign institutional investors (FIIs), the Indian stock market tends to rise and vice versa. Rise in inflation lowers the demand of the consumers thereby impacting the profitability of the firm and vice versa. Higher value of India volatility index (IVIX) indicates high volatility, i.e. significant change in Nifty and vice versa. Indian stock market may be integrated with the major emerging markets and developed markets in the long run. Therefore, this study takes MSCI emerging market index (EMI) and MSCI World Index for explaining the movement of Indian stock market.

The outbreak of coronavirus disease (COVID-19) pandemic – a severe respiratory syndrome- has turned into the most contagious event throughout the world history. The first case of novel coronavirus was reported from Wuhan City of China on 31st December 2019. This deadly virus was declared as a global pandemic by the World Health Organization (WHO) on 11th March 2020. The outbreak of this global pandemic had a serious impact on the people's life as it resulted in imposing of stringent measures such as closing of national borders, sealing of cities and lockdown to contain the spread of the virus. Also, the enforcement of lockdown in countries resulted in the crashing of stock markets, a major drop in oil prices, falls in production and exports, an increase in unemployment levels and the downfall of economic activities. Moreover, due to this pandemic the global stock markets erased about US6$ trillion from 24th February to 28th February 2020 (Ozili & Arun, 2020). The COVID-19 pandemic has majorly hit the economies across the globe including India (Singh, Goel, & Kumari, 2021). Therefore, it is imperative to study the impact of COVID-19 on prediction of stock market thereby guarding the interest of stakeholders.

It can be discerned from the survey of previous studies that a wide range of models and techniques have been employed by various scholars for time series forecasting including stock market prediction (Singh, Som, Komalavalli, & Goel, 2021). Broadly, two kinds of model surface from the review, i.e. statistical models and artificial intelligence (AI)-based models. Under the statistical model category, the widely used models are autoregressive integrated moving average (Banerjee, 2014; Babu & Reddy, 2014) and regression methods (Dutta, Bandopadhyay, & Sengupta, 2012). Under AI technique, primarily machine learning algorithms and artificial neural network (ANN) which have been rarely used to forecast time series or the Indian stock market. Therefore, in this study we have employed Scaled conjugate gradient algorithm ANN model to forecast the Indian stock market in pre and during COVID-19 periods. The major advantage of Scaled Conjugate Gradient (SCG) algorithm is that it does not line search iteration wise, unlike other conjugate algorithms. In the line search, the responses of each network of all training inputs are computed for every search which is computationally expensive. Therefore, SCG is much faster and accurate in terms of prediction (Moller, 1993).

Our study makes following contribution to the previous or existing literature. First, in terms of the factors that have been considered to predict the Indian stock market. Second, our study compares the stock market forecast accuracy of SCG in pre and during COVID-19 periods as we know that the COVID-19 had a very bad impact on the stock markets across the globe. Thus, it is imperative to forecast the stock in during COVID-19 and pre-COVID-19 scenarios. It makes our study one of its kind. Therefore, we are motivated to take up this study. This study intends to forecast the Indian stock market using macroeconomic and global stock market variables identified from the literature by employing the SCG Neural Networks algorithm which is faster than the other conjugate algorithms (Moller, 1993).

The rest of the study proceeds in the following sections. Section two illustrates the literature review of relevant studies. Section three represents the description of the data and research methodology used for analysis. Section four shows empirical findings and discussion. Section five gives a brief account of the conclusion and future scope of this study.

2. Literature review

The literature review is divided into two sections, section 2.1 list down the studies on ANN models, whereas section 2.2 list down the studies on macroeconomic variables.

2.1 Artificial neural network (ANN) models

Precise prediction of stocks is an imperative phenomenon as investors thrive for gaining higher profits. Therefore, to fulfill the need of investors, academicians and researchers across the globe have developed several models for predicting the stock market. However, models can be bifurcated into two categories, i.e. statistical models such as the Auto-Regressive Integrated Moving Average (ARIMA), Generalized Autoregressive Conditional Heteroskedasticity (GARCH), etc. and the models based on artificial intelligence such as ANNs. Ariyo, Adewumi, and Ayo (2014) forecasted the New York Stock Exchange (NYSE) and Nigeria Stock Exchange (NSE). Their empirical findings reveal that the ARIMA model is a strong candidate for the short-term stock market prediction than the most popular ANN models. Similarly, Mondal, Shit, and Goswami (2014) also used ARIMA to forecasting the closing price of fifty-six companies from seven sectors listed on the NSE. The authors report that ARIMA achieved 85% accuracy in predicting stock prices of the chosen companies. Therefore, a conclusion can be made that statistical models such as ARIMA have achieved a reasonably good amount of accuracy in predicting stock market time series data especially in the case of short-term prediction. However, no final conclusions can be made without looking at the literature on ANNs that have shown potential in precise prediction of stock prices particularly when the predictions have to be made for the long term.

The research on ANN models started in the year 1969 when Minsky and Papert discovered two critical issues with the Artificial Neural Network technique. The first one was the ability of the machine to solve complex problems and the second was the incapability of the computers to run large ANN models efficiently. This brought a slowdown in research on ANNs till the machines got fast processing circuit boards. However, these critical issues were resolved automatically with the advent of technology as fast computers came into the picture. In 2001, Chen et al. showed that Probability Neural Networks (PNNs) have shown great potential in forecasting stock price movement as compared to the GMM (Gaussian mixture model)-kalman filter and the random walk model. Moreover, the results of their study reveal that Probability Neural Network (PNN)-guided trading strategies have obtained higher returns in comparison to strategies suggested by other models. They also recommend that PNNs capability can be increased by including the threshold levels (Chen, Daouk, & Leung, 2001). Three years later, Kim and Lee (2004) proposed a genetically transformed ANN for stock market prediction. Their results reveal that the proposed methodology is significantly better than the models considered for comparison in this study. A few years later, Zhang and Wu (2009) proposed an integrated model consisting of Improved Bee Colony Optimization (IBCO) and Back Propagation Neural Network (BPNN) for the prediction of various stock indices. They used the IBCO algorithm to adjust the weights of the BPNN network and achieved better results than the traditional BPNN model. One year later, Hadavandi, Shavandi, and Ghanbari (2010) proposed a novel methodology that was based on Genetic Fuzzy System and Self-Organizing Maps (SOM) clustering for predicting stock price. In their study, the authors used the three-stage method to model the proposed structure. In the first stage, they used stepwise regression to choose significant variables then in the second stage they categorized the data into k clusters by SOM method and in the last stage, they fed the clusters into a genetic fuzzy network to build the proposed model and validated the results using real-life datasets. In the end, they concluded that the proposed method outperforms all other models held for comparison.

As time progressed and technology moved at a faster pace, the literature on ANN models became wide. Researchers combined the ANN model with a variety of algorithms. For instance, Ghasemiyeh, Moghdani, and Sana (2017) combined the ANN model and various other metaheuristic algorithms for predicting the stock market. The empirical results indicate the swarm optimization algorithm outperformed all other algorithms considered for study. Moreover, the authors deploy various ANN model architectures for improving the predictive ability of proposed ANN technique. Similarly, Alonso, Batres-Estrada, and Moulin (2018) used various ANN models to predict the time series data. The findings reveal that the LSTMs outperformed all other models under study. However, Altman's ANN model performed good but LSTMs were found to be the best in predicting time series data. Later, Menon et al. employed Convolutional Neural Network (CNN) and various other ANN models for predicting the NSE and NYSE. However, the empirical results reveal that the CNN model outperformed all other techniques under study.

Selvamuthu, Kumar, and Mishra (2019) compared three different algorithms, i.e. Levenberg–Marquardt (LM), SCG and Bayesian Regularization (BR) for predicting the stock market. The findings of the study indicate that all three algorithms were able to achieve 99.9% accuracy using tick data. However, the prediction accuracy dropped to 96.2%, 97% and 98.9% for LM, SCG and BR respectively. In the same year, Chopra, Yadav, and Chopra (2019) also employed LM algorithm for predicting the Indian stock market pre and post demonetization. The empirical findings indicated that the ANN model with the LM algorithm was able to produce reasonably good amount of accuracy in the pre and post demonetization scenario. Mehtab, Sen, and Dutta (2020) used a hybrid model for predicting the Nifty 50 index. The findings reveal the proposed model outperformed all other models under study. However, the proposed technique is not appropriate for multivariate analysis. Yadav, Jha, and Sharan (2020) examined the prediction accuracy of the stateful and stateless Long Short-Term Memory (LSTM) model. Their empirical findings revealed that the stateless LSTM model was more accurate than the stateful LSTM model because of higher stability. Moreover, the authors experimented with different hidden layers from one to seven. Their results showed that the model with one hidden layer was able to produce the best forecasting results. With this backdrop, we conclude that ANNs have great potential in predicting the stock market. However, no specific model or algorithm can be best suited for predicting the stock market. Researchers have to adopt trial and error approach for finding the best model and architecture for their data. Anand (2021) predicted the Indian stock market using linear models such as ARIMA and non-linear models such as CNN, LSTM etc. The finding of the study reveal that the CNN model outperformed all other models under study. Moreover, the model trained with one data set was applicable to other markets due to the presence of cointegration factor between them. Similarly, Ajoku, Nwokonkwo, John-Otumu, and Oleji (2021) used ensemble ANN model to predict the stock market. The study reports that the proposed predictive model outperformed four traditional algorithms of ANN model under study. The data was applied through Neurophstudio software. One year later, Al-Najjar (2022) investigated the relationship between Amman Stock Exchange Index (ASEI) and the other international indices such as S&P 500 (Standard & Poor's 500), NASDAQ (National Association of Securities Dealers Automated Quotations), Nikkei, DAX (Deutscher Aktienindex), CAC and HSI (Hang Seng Index). The authors employed various tools such as correlation, stepwise regression and ANN model. However, ANN model achieved highest accuracy in finding the relationship between markets. In the same year, Fuchs, Wahl, Zagst, and Zheng (2022) predicted the financial crisis by incorporation micro, macro and financial factors as input variables. The findings of the study reveal that the proposed methodology for selecting the significant variables of the ANN model outperformed the model with set of input factors taken from the literature. Sharma, Hota, Brown, and Handa (2022) introduced a hybrid methodology by combining the Genetic Algorithm (GA) and ANN model. The finding of the study the proposed model was better in forecasting stock indices in comparison to conventional BPNN.

2.2 Literature review on macroeconomic variables

Macroeconomic variables are the most significant factors in determining the movement of the stock market. However, apart from macroeconomic variables there are technical indicators as well that impact the stock market. But, this study employs macroeconomic variables for predicting the Indian stock market as none of the studies in the literature have used macroeconomic variables as input variables in ANN model. Mensi et al. (2016) examined the relationship between country risk ratings, macroeconomic factors and GCC countries. Their results revealed that the MSCI global Islamic index and oil prices had a positive impact on the GCC countries. On the contrary, gold prices, the 3-month US Treasury bill rate and the US Treasury bond rate had a negative impact on the GCC countries' stock markets. Later, using Autoregressive Distributed Lag (ARDL) bound test, Vector Error Correction Model (VECM) and variance decomposition, Giri and Joshi (2017) documented that economic growth, inflation and the exchange rate has a positive impact on the stock market. Moreover, short run and long run unidirectional causality was running from economic growth and exchange rate to the Indian stock market. Using correlation and multiple regression tests, Mohammed and Rumman (2018) examined the impact of macroeconomic indicators on the Qatar Stock Exchange Index (QEI) and Al Rayyan Islamic Index (RII). Their results suggested that the interest rate had a negative significant relationship with both the indices. Moreover, gas prices and money supply had a negative relationship with QEI. However, the oil price had a positive relationship and the producer price index had a negative relation with RII. They documented that in the long-run exchange rate had a significant and positive impact on the select stock markets. However, inflation was found to have a negative and insignificant impact on the markets under study. However, in the short, no significant relationship existed between the select variables and stock indices.

To search for more macroeconomic variables that impact the stock market, more literature was searched. Using structural Vector Autoregression (VAR) and Impulse Response Function (IRF) Basher et al. (2011) reported that positive shock to crude oil prices led to a decrease in the stock price of emerging markets and exchange rates. Also, an increase in crude oil production tended to decrease oil prices and an increase in emerging market stock prices increases oil prices. However, later on, data was divided into three phases to have better insights. The phase wise results showed cointegration in phase III. Furthermore, the results of the causality test revealed unidirectional causality running from crude oil to the Indian stock market. On the contrary, Nath Sahu, Bandopadhyay, and Mondal (2014) documented the existence of significant long-run cointegration and causality between the oil and Indian stock market. However, no short run causality was found between the aforesaid variables.

Jain and Biswal (2016) examined the linkages among gold, crude oil and Sensex. Their results indicated that the decrease in the commodities, i.e. gold and crude oil led to the depreciation of the Indian rupee (INR) and Sensex. The results of the symmetric causality test reflect that the one-way causality was running from gold price to exchange rate and exchange rate to Sensex. Furthermore, the asymmetric causality test showed unidirectional causality running between crude oil and INR and crude oil and Sensex and bidirectional causality between gold and Sensex. Similarly, Singh and Sharma (2018a, b) also examined the relationship between gold, crude oil, exchange rate and the stock market in the pre, post and during crisis periods. They found that long-run cointegration exists between GODS (Gold, Oil, Dollar, and Stock Market) in the pre and during crisis periods. Moreover, their results of VECM and Granger causality showed evidence of long-run and short-run causality respectively in the pre-crisis period. Using ARDL bound test and the Kyrtsou-Labys symmetric and asymmetric causality test Bouri et al. (2017) reported the presence of cointegration between the selected implied volatilities. Also, significant one-way causality was running from gold and oil implied volatilities to the implied volatility of the Indian stock market. On the contrary, vice versa was not true. Later, Shahani and Bansal (2020) concluded that India VIX can act as a safe haven or hedge against Nifty while gold fails to do so. However, their results provided evidence that gold and India VIX may act as a safe haven against different instruments. Furthermore, India VIX and gold may act as a hedge against crude oil and Nifty respectively.

Using Johansen's cointegration, Akter et al. (2020) reported that the macroeconomic variables namely the Exchange rate, Index of Industrial production and reserve have significant cointegration with the Dhaka Stock Exchange (DSE). However, they did not find any significant long-run relationship between the chosen macroeconomic variables and the DSE. They reported that the sampled stock indices lead to inflation and industrial production in all four countries. On the contrary, no significant lead lag relationship was found between the interest rate and stock indices. However, interest rates and money supply led to the stock indices of Germany, France and Portugal. Their findings indicated that the exchange rate had a positive impact on the stock market, whereas the consumer price index had a negative impact. However, oil prices were found to be insignificant. Later, Baranidharan and Dhivya (2020) reported that the macroeconomic indicators had a positive impact on the BSE (Bombay stock index) Sensex in the long run. However, no significant relationship was found in the short run. Therefore, they quote Investor's community of manufacturing sectors are required to consider macroeconomic indicators before making investments.

It is evident from the literature that the majority of studies have used technical indicators for predicting the stock market. Moreover, a few studies have employed the ANN model to predict the Indian stock market. Therefore, the study tends to fill this research gap by forecasting the Indian stock market using ANN by employing macroeconomic indicators as input variables.

3. Data and research methodology

3.1 Data

Data has been collected from various secondary sources. Monthly data spanning a period of last ten years starting from July 2011 to June 2021 has been considered for the empirical investigation. Data on Nifty 50 has been downloaded from the NSE official website; data on inflation, foreign institutional investors and exchange rate has been retrieved from the official website of the Reserve Bank of India. Data on industrial production and the interest rate has been retrieved from Organization for Economic Co-operation and Development (OECD) official website and data on the MSCI World Index and MSCI emerging market index has been obtained from the official website of MSCI. Data on crude oil and gold have been retrieved from the official website of Multi Commodity Exchange (MCX).

Artificial Neural Network (ANN) is capable of modeling a predictive model for the dependent variable based on the function of predictor or explanatory variables (Singh, Som et al., 2021). NSE's Nifty 50 index is considered as the dependent variable and the proxy for the stock market, whereas IIP, Consumer Price Index (CPI), MSCI world index, FIIs, FX, LTINT, gold, crude oil and India VIX (IVIX) and MSCI emerging market index which has been as new variable are the explanatory variables in this study. These are the most common macroeconomic and world stock market factors impacting the stock market that have been identified from the literature (see Table 1).

3.2 Scaled conjugate gradient algorithm (SCG)

In the backpropagation algorithm, the weights are adjusted in the steepest descent direction as the performance rapidly decreases in this direction. But the rapid reduction in performance does not necessarily imply the fastest convergence always. Therefore, unlike the backpropagation algorithm, the search is done along with the conjugate in the majority of the conjugate gradient algorithms thereby producing faster convergence than the steepest descent direction. Moreover, most of the algorithms employ the learning rate to modify the step size. On the contrary, conjugate algorithms modify the step size in each iteration (Selvamuthu et al., 2019).

A Scaled Conjugate Algorithm (SCG) is a type of conjugate algorithm which is supervised fully automated algorithm designed by Moller (1993). It does not require prior user dependent critical parameters. This algorithm can be used on any data set if the weights, input and activation function have a derivative function. The biggest advantage of SCG is that it does not line search iteration wise, unlike other conjugate algorithms. In the line search, the responses of each network of all training inputs are computed for every search which is computationally expensive. “For each iteration there is one call or E(w) and two calls of E(w) which gives a calculation complexity per iteration of O(7N2). When the algorithm is implemented, this complexity can be reduced to O(6N2) because the calculation of E(w) can be built into one of the calculations of E(w). In comparison with BP, SCG involves twice as much calculation work per iteration since BP has a calculation complexity of O(3N2) per iteration. Where, we assume that a global error function E(w) depending on all the weights and biases is attached to the neural network. E(w) could be the standard least square function or any other appropriate error function. E(w) can be calculated with one forward pass and the gradient E(w) with one forward and one backward pass and N represents the number of weights and biases” (Moller, 1993). Therefore, to avoid the time-consuming line search scaled conjugate algorithm was employed.

4. Empirical findings

Forecasting is done for pre-COVID-19 (June 2011 – February 2020) and during COVID-19 (March 2020 – June 2021) for the Indian stock market. In the end, a comparison has been done to check which period gives you the most appropriate accuracy.

Figure 1 represents the architecture of the ANN model. It is visible that the ANN model consists of 3 consecutive layers Input, Hidden and Output layer. The input layer has ten nodes which imply there are ten input variables or predictor variables (macroeconomic variables identified from the literature). The hidden layer comprises ten nodes which are chosen at random. The output layer comprises one node which is the target or dependent variable, NSE's flagship index Nifty 50. The architecture remains the same for all sub periods.

4.1 Performance plots

The performance plot helps to identify the total number of epochs or iterations at which the performance function, i.e. mean squared error (MSE) becomes least or stops changing. The number of epochs does not represent the time required to train the network. The blue line represents the training dataset which is approximately 70% of the total dataset, green line represents the validation dataset which 15% of the total data. Similarly, red line represents the test data which is the rest 15%. Figure 2 reveals the results of performance plots of SCG algorithm in both pre and during COVID-19 periods. Scaled conjugate gradient algorithm gives best results in 9 epochs in the pre-COVID-19 period. On the contrary, SCG algorithm provides provide best results in 17 epochs in the during COVID-19 period. However, epochs don’t represent the time taken by the model for training, testing and validation purpose.

4.2 Regression plots

The network performance is validated using the regression plots shown in Figure 3. The regression plots show the accuracy percentage of training, validation, testing and overall datasets. The performance of LM was measured by one performance measure, i.e. Mean Squared Error (MSE). SCG algorithm shows 96.99% accuracy in overall dataset, 96.32% accuracy in test dataset, 97.61% accuracy in validation dataset and 97.16% accuracy in training dataset in the pre-COVID-19 period. On the contrary, ANN model trained with SCG algorithm shows 99.85% accuracy in overall dataset and 100% accuracy in testing and validation datasets, whereas 99.88% accuracy was achieved in the training data set. Therefore, the authors conclude that the SCG algorithm performed better in predicting the Indian stock market in the during COVID-19 period.

4.3 Error histograms

In Figure 4, blue bars represent the training data set, whereas red bars represent the testing dataset and green bars represent the validation data set. The error range, i.e. the maximum positive to the maximum negative is divided into 20 bins. Error histogram helps us to identify the outliers in the dataset. Therefore, the data points where fit is notably poor than the other data points are termed as outliers. Moreover, the error histogram is made of one performance metric, i.e. Mean Squared Error (MSE). Figure 4 shows that the errors in SCG algorithm are scattered into bigger bins in the pre-COVID-19 period, whereas the errors in SCG are divided into smaller bins in the during COVID-19 period. Therefore, the authors conclude that the SCG algorithm performed better in the during COVID-19 period in comparison to the pre-COVID-19 period.

Table 2 shows the comparison between the pre and during COVID-19 periods. The results of Table 2 reveal that the ANN model trained with SCG algorithm performed better in predicting the Indian stock market (Nifty 50) in the during COVID-19 period as ANN model trained with SCG algorithm achieved 99.85% accuracy, whereas 96.99% of the accuracy was achieved in the pre-COVID-19 period. Also, the ANN model performed better in the during COVID-19 period in training, testing and validation datasets. Therefore, the authors conclude that the COVID-19 had a less impact on the ANN's model prediction accuracy.

5. Conclusion

The present study employs the ANN using SCG algorithm to predict the Indian stock market (NSE's Nifty 50 Index). The macroeconomic variables namely IIP, LTINT, CPI, MSCI world index, FX, MSCI-EF, Gold, Crude oil, FIIs and IVIX are identified from the literature have been used as input variables for both sub periods Pre and during COVID-19. Monthly data spanning a period of the past ten years from 2011 to 2021 has been used for analysis. However, later data set was divided into subperiods, i.e. pre-COVID-19 (June 2011 – Feb 2020) and during COVID-19 (March 2020 – June 2021). The findings of the study reveal that the ANN model trained with SCG algorithm performed better in predicting the Indian stock market (Nifty 50) in the during COVID-19 period in comparison to the pre COVID-19 period. The proposed ANN model achieved 99.85% accuracy in the during COVID-19 period, whereas 97.99% of the accuracy was achieved in the pre-COVID-19 period. Therefore, the authors conclude that the COVID-19 had a less bad impact on the ANN's model prediction accuracy. The novelty of this study lies in the fact that none of the studies in the literature have employed macroeconomic variables to predict the Indian stock market. Studies quoted in the literature have employed technical indicators used by traders for predicting the stock market. Therefore, this study is one of its kind which employs macroeconomic indicators as input variables for predicting the Indian stock market in pre and during COVID-19 periods.

The results of the present study have implications for all categories of investors such as portfolio managers, investment houses, High Net worth Investors (HNIs), Domestic Institutional Investors (DIIs), etc. in predicting the stock price more precisely. Moreover, the investors and traders use technical and fundamental analysis for the prediction of stock prices which is a time-consuming and less reliable process. Therefore, machine learning algorithms can prove to be more robust. Also, the ANN model employed in this study will help the investors and traders to make a precise prediction to gain higher profits in less time. The present study has future scope for more comprehensive results. Future studies can focus on adding other macroeconomic indicators such as treasury bill rate, foreign portfolio investment, federal fund rate etc. therefore, this is the limitation of this study Moreover, the study can be extended to a longer duration or intraday data can be used for better results. Also, a comparative analysis can be done by employing other machine learning algorithms such as LSTMs and CNNs.


Architecture of neural network model

Figure 1

Architecture of neural network model

(a) Pre-COVID-19 and (b) during COVID-19

Figure 2

(a) Pre-COVID-19 and (b) during COVID-19

(a) Pre-COVID-19 (b) during COVID-19

Figure 3

(a) Pre-COVID-19 (b) during COVID-19

(a) Pre-COVID-19 and (b) during COVID-19

Figure 4

(a) Pre-COVID-19 and (b) during COVID-19

Variables identified from the literature

1Foreign Exchange rate (FX)Srivastava (2010), Akter et al. (2020)
2Index of Industrial Production (IIP)Srivastava (2010), Camilleri et al. (2019)
3Consumer Price Index (CPI)Megaravalli et al. (2018), Areli Bermudez Delgado et al. (2018)
4Long-Term Interest Rates (LTINT)Srivastava (2010), Mohammed and Rumman (2018)
5Morgan Stanley Capital International World Index (MSCI-WI)Srivastava (2010), Mensi et al. (2016)
6Crude OilBasher et al. (2011), Ghosh and Kanjilal (2016), Nath Sahu et al. (2014), Jain and Biswal (2016), Bouri et al. (2017)
7GoldJain and Biswal (2016), Bouri et al. (2017), Shahani and Bansal (2020), Singh and Sharma (2018a, b)
8India VIXShahani and Bansal (2020)
9Foreign Institutional Investors (FIIs)Baranidharan and Dhivya (2020)
10Morgan Stanley Capital International Emerging Market Index (MSCI – EMI)New Variable Added

Source(s): Authors' own compilation

Comparison between pre and during COVID-19 periods

No.AlgorithmPre-COVID-19 periodDuring COVID-19 period

Source(s): Authors' own calculations


Ajoku, K. K., Nwokonkwo, O. C., John-Otumu, A. M., & Oleji, C. P. (2021). A model for stock market value forecasting using ensemble artificial neural network. Journal of Advances in Computing, Communications and Information Technology, 2, 113. doi: 10.37121/jaccit.v2.162.

Akter, S., Rana, M. S., & Anik, T. H. (2020). The dynamic relationship between stock market returns and macroeconomic variables: An empirical study from Bangladesh. Journal of Management, Economics, and Industrial Organization, 4062.

Al-Najjar, D. (2022). The Co-movement between international and emerging stock markets using ANN and stepwise models: Evidence from selected indices. Complexity, 2022, 114. doi: 10.1155/2022/7103553.

Alonso, M. N., Batres-Estrada, G., & Moulin, A. (2018). Deep learning in finance: Prediction of stock returns with long short-term memory networks. Big Data and Machine Learning in Quantitative Investment, 251277.

Anand, C. (2021). Comparison of stock price prediction models using pre-trained neural networks. Journal of Ubiquitous Computing and Communication Technologies, 3(2), 122134. doi: 10.36548/jucct.2021.2.005.

Areli Bermudez Delgado, N., Bermudez Delgado, E., & Saucedo, E. (2018). The relationship between oil prices, the stock market and the exchange rate: Evidence from Mexico. The North American Journal of Economics and Finance, 45, 266275.

Ariyo, A. A., Adewumi, A. O., & Ayo, C. K. (2014). Stock price prediction using the ARIMA model. In 2014 UKSim-AMSS 16th International Conference on Computer Modelling and Simulation. doi: 10.1109/uksim.2014.67.

Babu, C. N., & Reddy, B. E. (2014). Selected Indian stock predictions using a hybrid ARIMA-GARCH model. In 2014 International Conference on Advances in Electronics Computers and Communications. doi: 10.1109/icaecc.2014.7002382.

Banerjee, D. (2014). Forecasting of Indian stock market using time-series ARIMA model. In 2014 2nd International Conference on Business and Information Management (ICBIM). doi: 10.1109/icbim.2014.6970973.

Baranidharan, S., & Dhivya, N. (2020). Causal influence of macroeconomics factors shock on Indian stock market: Evidence from BSE index. Asian Journal of Economics, Finance and Management, 2(2), 3948.

Basher, S., Haug, A. A., & Sadorsky, P. (2011). Oil prices, exchange rates and emerging stock markets. SSRN Electronic Journal. doi: 10.2139/ssrn.1852828.

Bouri, E., Jain, A., Biswal, P., & Roubaud, D. (2017). Cointegration and nonlinear causality amongst gold, oil, and the Indian stock market: Evidence from implied volatility indices. Resources Policy, 52, 201206.

Camilleri, S. J., Scicluna, N., & Bai, Y. (2019). Do stock markets lead or lag macroeconomic variables? Evidence from select European countries. The North American Journal of Economics and Finance, 48, 170186.

Chen, A., Daouk, H., & Leung, M. T. (2001). Application of neural networks to an emerging financial market: Forecasting and trading the Taiwan stock index. SSRN Electronic Journal.

Chopra, S., Yadav, D., & Chopra, A. N. (2019). Artificial neural networks based Indian stock market price prediction: Before and after demonetization. Journal of Swarm Intelligence and Evolutionary Computation, 8(1), 27.

Dutta, A., Bandopadhyay, G., & Sengupta, S. (2012). Prediction of stock performance in indian stock market using logistic regression. International Journal of Business and Information, 7(1).

Fuchs, F., Wahl, M., Zagst, R., & Zheng, X. (2022). Stock market crisis forecasting using neural networks with input factor selection. Applied Sciences, 12(4), 1952. doi: 10.3390/app12041952.

Ghasemiyeh, R., Moghdani, R., & Sana, S. S. (2017). A hybrid artificial neural network with metaheuristic algorithms for predicting stock price. Cybernetics and Systems, 48(4), 365392.

Ghosh, S., & Kanjilal, K. (2016). Co-movement of international crude oil price and Indian stock market: Evidences from nonlinear cointegration tests. Energy Economics, 53, 111117.

Giri, A. K., & Joshi, P. (2017). The impact of macroeconomic indicators on Indian stock prices: An empirical analysis. Studies in Business and Economics, 12(1), 6178.

Hadavandi, E., Shavandi, H., & Ghanbari, A. (2010). Integration of genetic fuzzy systems and artificial neural networks for stock price forecasting. Knowledge-Based Systems, 23(8), 800808.

Jain, A., & Biswal, P. (2016). Dynamic linkages among oil price, gold price, exchange rate, and stock market in India. Resources Policy, 49, 179185.

Kim, K., & Lee, W. B. (2004). Stock market prediction using artificial neural networks with optimal feature transformation. Neural Computing and Applications, 13(3), 255260.

Megaravalli, A. V., Sampagnaro, G., & Murray, L. (2018). Macroeconomic indicators and their impact on stock markets in ASIAN 3: A pooled mean group approach. Cogent Economics and Finance, 6(1).

Mehtab, S., Sen, J., & Dutta, A. (2020). Stock price prediction using machine learning and LSTM-based deep learning models. arXiv preprint arXiv:2009.10819.

Mensi, W., Hammoudeh, S., Yoon, S., & Balcilar, M. (2016). Impact of macroeconomic factors and country risk ratings on GCC stock markets: Evidence from a dynamic panel threshold model with regime switching. Applied Economics, 49(13), 12551272.

Møller, M. F. (1993). A scaled conjugate gradient algorithm for fast supervised learning. Neural Networks, 6(4), 525533. doi: 10.1016/s0893-6080(05)80056-5.

Mohammed, H. Y., & Abu Rumman, A. A. (2018). The impact of macroeconomic indicators on Qatar stock exchange: A comparative study between Qatar exchange index and Al Rayyan islamic index. Journal of Transnational Management, 23(4), 154177.

Mondal, P., Shit, L., & Goswami, S. (2014). Study of effectiveness of time series modeling (Arima) in forecasting stock prices. International Journal of Computer Science, Engineering and Applications, 4(2), 1329.

Nath Sahu, T., Bandopadhyay, K., & Mondal, D. (2014). An empirical study on the dynamic relationship between oil prices and Indian stock market. Managerial Finance, 40(2), 200215.

Ozili, P. K., & Arun, T. (2020). Spillover of COVID-19: Impact on the global economy. SSRN Electronic Journal. doi: 10.2139/ssrn.3562570.

Selvamuthu, D., Kumar, V., & Mishra, A. (2019). Indian stock market prediction using artificial neural networks on tick data. Financial Innovation, 5(1).

Shahani, R., & Bansal, A. (2020). Gold vs. India VIX: A comparative assessment of their capacity to act as a hedge and/or safe haven against stocks, crude and rupee-dollar rate. SSRN Electronic Journal. doi: 10.2139/ssrn.3597889.

Sharma, D. K., Hota, H. S., Brown, K., & Handa, R. (2022). Integration of genetic algorithm with artificial neural network for stock market forecasting. International Journal of System Assurance Engineering and Management, 13(S2), 828841. doi: 10.1007/s13198-021-01209-5.

Singh, N. P., & Sharma, S. (2018a). Cointegration and causality among dollar, oil, gold and Sensex across global financial crisis. Vision: The Journal of Business Perspective, 22(4), 365376.

Singh, N. P., & Sharma, S. (2018b). Phase-wise analysis of dynamic relationship among gold, crude oil, US dollar and stock market. Journal of Advances in Management Research, 15(4), 480499.

Singh, N. P., Goel, H., & Kumari, S. (2021). Impact of the COVID-19, lockdown and unlock on the Indian stock market and its international linkage with the Chinese stock market. International Journal of Monetary Economics and Finance, 14(3), 249264. doi: 10.1504/ijmef.2021.116545.

Singh, N. P., Som, B. K., Komalavalli, C., & Goel, H. (2021). A meta-analysis of the application of ANNs in accounting and finance. SCMS Journal of Indian Management, 18(1), 521.

Srivastava, A. (2010). Relevance of macro economic factors for the Indian stock market. Decision, 37(3).

Ticknor, J. L. (2013). A Bayesian regularized artificial neural network for stock market forecasting. Expert Systems with Applications, 40(14), 55015506.

Yadav, A., Jha, C. K., & Sharan, A. (2020). Optimizing LSTM for time series prediction in Indian stock market. Procedia Computer Science, 167, 20912100.

Zhang, Y., & Wu, L. (2009). Stock market prediction of S&P 500 via combination of improved BCO approach and BP neural network. Expert Systems with Applications, 36(5), 88498854.

Corresponding author

Himanshu Goel can be contacted at:

Related articles