The Dynamics of Stock Price Change Motion Effected by Covid-19 Pandemic and the Stock Price Prediction Using Multi-layered Neural Network

—In this paper, we work on the analysis of dynamical change on stock price during Covid-19 pandemic using nonlinear deterministic motion equation. The model is given by the second- order differential equation with constant coefﬁcient over time with some consideration under stock market structure. This coef- ﬁcient shows the rate of change of stock price throughout Covid-19. Thus, the Least Square estimator is derived to determine the constant factor. Further, we conduct the Multi-layered Neural Network algorithm to predict the future stock price. To provide accurate forecasting results, the algorithm used in this paper has to be able to recognize stock price data pattern which has dynamic characteristics. Multi-layered Neural Network solve the data with dynamic characteristics by using more than one hidden layer. The input layers of this network are not directly connected to the output layers of the network. Therefore, this algorithm is expected to provide accurate forecasting results. We use the Jakarta Composite Stock Price Index (IHSG) and Waskita Karya Company stock price’s data for the subject of observation.


I. INTRODUCTION
S TOCK is one of the most popular financial instrument among investors since it gives a number of financial benefits. When the stock prices are on the bullish position, the profits are also high. However, the stock prices are also very volatile which is influenced by supply and demand flows. Therefore, at a certain time the stock has decreased in price due to several factors. The main factors changing stock prices are discussed in [1]. In the global issue of corona viruses, the Covid-19 pandemic is currently in the midst of a global economy that has resulted in significant changes in demand and supply of shares. This causes the Global Stock Price Index to decline and have an impact on a significant price decline in the stock market.
The significant change of stock is a concern for some researchers to find the common trend of the Covid-19 pandemic impact to the stock price. In this paper, we study the stock price change trend during this pandemic with differential equation approach. In [2], [3], [4] describe the possible use of differential equation to examine the fall in market value of commodity price. Thus, the differential equation is adopted to the case of stock price. In this work, we use the Indonesian Composite Stock Price Index (IHSG) and Waskita Karya Company stock price. The fall in stocks price is analyzed using the second-order differential equation such as described on [2], [3], [4] under some consideration. Further, we estimate the coefficient in the solution of second-order differential equation using Least Square estimation parameter. The work on parameter estimation can be seen on [5].
Forecasting time series data using the classical model requires several assumptions such as the assumption of stationarity and the assumption of linearity. If the stationarity assumptions are not satisfied, the time series data should be transformed [6]. The Multi-Layered Neural Network model does not require stationary assumptions because the model to be built has the ability to adapt well to recognize data patterns. Furthermore, stock price data has a non-linear pattern, because the data fluctuates. The existence of non-linear patterns indicates that the linear model will not be good enough for modeling and forecasting data, so that the non-linear Multi-Layered Neural Network model is expected to provide good forecasting results.
In the previous study, [7] is discussing the depreciation model for Cacao and Cars commodity using the secondorder differential equation. It also discusses to expect the parameter on the solution of the depreciation model using Linear Quadratic Estimator. Thus, the magnitude of the depreciation value of the commodities can be obtained. Further, this method is applied to the change of stock prices to analyze its behaviour.

II. LITERATURE REVIEW A. Stock Market during Covid-19 Pandemic
Shares are a proof of ownership of the assets of companies that issue shares [8]. Investment in the form of shares, or commonly referred to as stock investments is the purchase or inclusion or ownership of shares of other companies for the purpose of obtaining profits and others [9]. Share price is the value of a stock that reflects the wealth of the company that issued the stock, where changes or fluctuations are determined by the strength of demand and supply that occurs in the stock market (secondary market). The more investors who want to buy or save shares, the price goes up. Conversely, the more investors who want to sell or release a stock, the more the price moves down [10].
In the implementation of a country's national economic development, financing is needed from both the government and the community. The capital market is one alternative source of funding for both the government and the private sector [11]. The world economy, including Indonesia, is inseparable from the capital market [12], in which there are traded shares that help support the economy.
Covid-19 has dealt a major blow to the Indonesian economy. The Indonesian Stock Exchange's stock index fell 33 percent compared to early 2020, which is the worst since 2015. The exchange rate of the rupiah against the US dollar fell to the level of 16,273, that is the lowest since June 1998. Foreign investors in the money market and capital market continue to withdraw funds from the Indonesian market. This situation will not stop because the corona outbreak in Indonesia is still widespread. Cases and victims of Covid-19 also continue to grow [12].
Covid-19 has an impact on all financial markets around the world in a certain share. Trends in stock prices have dropped significantly and continuously. Even Dow Jones and S&P experienced a decline in share prices in various US companies by 20% [13].
Investor's sentiments influence the stock markets significantly. When the market is trending upwards and there is less perceived risk then investor behaves more optimistically. When the market is trending downwards then investors' sentiments become relatively pessimistic and investors will tend to wait to enter the market until a revival begins [14]. Another thing that also influenced investors' policy in making decisions at the Covid-19 was news in the media. The more news related to unexpected things, the greater the number of shares that investors will release [15], [16], [17].
Covid-19 pandemic has a significant negative effect on stock market price returns in all affected countries and regions. Covid-19 has a significant side effect on the performance of major stock indexes in Asian stock markets, where stocks experience abnormally larger declines. This is due to investor sentiment of being a mediator and complete transmission channel for the effects of the Covid-19 plague on the stock market. Current stock prices are a picture of potential future earnings, and investors see the Covid-19 pandemic very disturbing economic activity and its effects are so alarming. Before something worse happens, a reasonable step taken by investors is to sell shares [18].
In line with the above research, Liu also believes that currently, it is estimated that stock price trends are still very volatile. There is still a room for stock prices to continue to decline. Selling shares at this time is a profitable step until we get a more stable market signal [19].

B. Second-order Differential Equations
The second order linear differential equation can be shown as the form where P , Q, R and S are continuous functions. Further, it can be divided into two different cases [20]. First, the so called homogeneous linear equation where the right hand of (1) is given by S(x) = 0. Then the second case is given by S(x) = 0 such that (1) can be expressed as non homogeneous differential equation.
In the practical use of (1), it given an initial value problem to find the output solution y of the differential equation which satisfying boundary conditions y(x 0 ) = y 0 and y(x 1 ) = y 1 . In contrast with the initial value problems, the boundary value problem does not always have a solution.

C. Linear Least Square Estimation
In the purpose of multi responses linear regression model, Linear least squares estimation can be used to predict parameters. First, we assumed that there are N measurements for output vector y i ; i = 1, 2, . . . , N with m-dimensional output [5]. Further, the parameter can be estimated by minimizing the objective function of least squares which is shown by Using the stationary criteria, yields a linear form such that the optimal parameter estimation can be obtained as follows

D. Multi-Layered Neural Network
Neural network is an algorithm that is inspired by the working of neurons in the human brain. Each neuron will transmit information and connected to each synopsis. The simplest type of neural network is Single-layered Neural Network. There is no hidden layer in the architecture and the input layer is directly connected to the output layer. Singlelayered Neural Network is an advanced feed network or feed forward [21], whereas a multi-layer neural network is a neural network that contains at least one input layer, one hidden layer, and one output layer. The input layer will receive input data and send the weighted input to the output layer via the hidden layer.
Each Multi-layered Neural Network neuron is associated with linear or non-linear function, called activation function. It is converting the input signal into an output signal which will be sent to another unit [22]. Activation functions that can be used as Multi-Layered Neural Network activators are divided into 2 types, i.e. linear activation functions and nonlinear activation function. In the linear activation functions showed by Fig. 1, the output value is the same as the input value. It is formulated as follows.
The complexity and variety of the data, as the neural network input, usually does not match using linear activation  function. Therefore, the nonlinear activation function is widely used as activation function in neural network. One of the nonlinear activation functions is logistic activation function [23]. It is mathematically defined as follows Another nonlinear activation function is tanh activation function. It is similar to the logistic activation function. The difference is in the range of output values, which can be seen on Fig. 1. The output value of logistic activation function ranges between 0 and 1, while the output value of tanh activation functions ranges between -1 and 1. Tanh activation function is formulated as follows III. DYNAMICAL CHANGE ON STOCK PRICE DURING COVID-19 PANDEMIC ANALYSIS USING SECOND-ORDER DIFFERENTIAL EQUATIONS In the middle of Covid-19 pandemic, as stated before that the global economy has decline in all fields. One of the economic instruments effected by this pandemic is stock price. There is a significant change to the price compared with the price before pandemic. By this observation, we need to analyze the stock price movement.
The stock price change over time t can be described as a dynamical movement. This gave by the continuous second order time varying differential equation. The acceleration of stock price movements equal to the rate of stock price movements which can be stated by the equation below where S(t) is the stock price at time t for t ∈ (t 0 , t N ) and α represents the stock price movement coefficient.
In this case, we assumed that there is a lot of buyers and sellers in the market, where each of them has a good knowledge about the market information and we cannot influence the market about the stock prices.
The solution of (3) with the given initial condition S(t 0 ) = S 0 and dS(t0) dt = v 0 can be written as where β = v0 α . In this discussion, we take The Jakarta Composite Stock Price Index (IHSG) and Waskita Karya Company stock price which showed a sharp decline in national stock prices since March to June 2020. The stock prices experienced uncertain changes due to market sentiment towards the pandemic. Hence, the study of dynamics changing stock prices model can be applied for this case. Further discussion is given in the following sub-section.

A. Dynamical Analysis of Jakarta Composite Stock Price Index (IHSG)
The magnitude of stock price changes has dynamic properties. It also has a relationship with the acceleration rate of price changes that is described by (6) which can be rewritten as where IH-indexes represents the stock price for IHSG at time t and α IH work as coefficient movement of IHSG stock price magnitude. Then the solution of (5) can be given by ) As for analytical purposes, we take IHSG stock price data from investing.com starts from March 2nd to June 19th, 2020. Thus, the data is drawn in Fig. 3. Figure 3 showed that IHSG prices keep decreasing and it is softly increasing at the end of July 2020. Thus, the magnitude of price changes is drawn in Fig. 4. Therefore, we can determine the analytical solution of (8) using initial magnitude v 0 that is about -1.28%. Hence, from the data above, the solution of (8) can be written as t0) ). Further, to analyze IHSG stock price behaviour, (2) is applied to approximate coefficient magnitude α IH . The result is, we get the approximation coefficient α IH about 15.65%. Therefore, IHSG stock price along Covid-19 pandemic is given by   In the Fig. 5 above, by using Linear quadratic estimator, we can analyze that during Covid-19 pandemic, IHSG stock prices fall in under Rp. 4000,00 per share. Although, using this model approximation, IHSG stock price is predicted to rebound at the end of June 2020.

B. Dynamical Analysis of Waskita Karya Company Stock Price
The stock price changes of Waskita Karya Company can be explained by second order differential equation in the relationship between its magnitude and acceleration. The model given by equation below  where WK indices figure out Waskita Karya Company stock over time t and the coefficient α W K represents the movement coefficient. Solving (10) we have dynamical stock price model as below In this section, the stock price data of Waskita Karya Company was taken from investing.com. The data is shown in Fig. 6. Figure 6 indicates that Waskita Karya stock price decreases since March 2020 effected by Covid-19 pandemic. Moreover, the magnitude of stock price changes can be obtained from Fig. 6 which is expressed in Fig. 7 Using the data and the form on (8) with the initial magnitude v 0 = −0.67, Waskita Karya stock price at time t can be obtained as The magnitude coefficient α W K can be obtained by estimating (11) using (2). Therefore, we got α W K = 0.1147 and the stock price on (11) can be written as S W K (t) = −1.97 − 5.84(1 − e 11.47(t−t0) ) From Fig. 8, we can analyze that Waskita Karya Company stock price showed a declining price since March 2020 effected by Covid-19 pandemic, but it grows up starts from the middle of June 2020.

IV. STOCK PRICE PREDICTION USING MULTI-LAYERED NEURAL NETWORK
Indonesian Composite Stock Price Index (IHSG) data and Waskita Karya Company (WSKT) stock price's data have a dynamic characteristic. The data is fluctuating with varying magnitude of fluctuations. In most modeling, especially classic models, it requires stationary assumptions, whereas in Multi-Layered Neural Network model does not require stationary assumptions because the built model has the ability to adapt well to recognize data patterns.
Data complexity represents nonlinear data. The assumption of non-linearity can be test by using the Terasvista Neural Network Test. This test uses a Taylor series expansion of the activation function. The results of checking data non-linearity assumptions using the Teraesvista Neural Network Test can be seen in Table I. The result of χ 2 , df and p-value are respectively 7.3333, 2, and 0.002556 for IHSG, and 35.1117, 2, and 2.386 × 10 −8 for WSKT. The χ 2 value of IHSG and WKST are greater than the Chi-Square critical value (both using α = 0.05 and α = 0.1), so it can be concluded that the data contain nonlinear patterns. The existence of nonlinear patterns indicates that the linear model will not be good enough for modeling and forecasting, so that the nonlinear Multi-Layered Neural Network model will be more appropriate.

A. Multi-Layered Neural Network for Indonesian Composite Stock Price Index Prediction
The architecture of the Multi-Layered Neural Network for Indonesian Composite Stock Price Index (IHSG) prediction was conducted by logistic activation function with 3 input layers, i.e. IHSG Low Price, IHSG High Price, and IHSG Open Price, while the output layer is IHSG Close Price. The hidden
By using architecture in Fig. 9, the prediction for one day ahead (June, 25 2020) is 4917.211. Table III

Number of neurons MSE
(5,3,5) 0.005938236 (6,7,8) 0.00585358 (7,10,15) 0.005751494 (9,9,4) 0.005594167 (13,4,5) 0.005457839 (15,15,2) 0.005624055 (20,10,5) 0.005535085  used is 3 hidden layers with the number neurons was chosen by trial step which can be seen on Table IV. The least MSE was automatically chosen as the best model. As the MSE value of the model with neuron trial is almost the same, we choose the simplest model, namely (5,3,5) number of neurons in the hidden layers. It means that the hidden layers use 3 layers with the number of neurons are respectively 5, 3 and 5. Thus, the architecture for WSKT can be seen in Fig. 10.
By using architecture in Fig. 10, the prediction for one day ahead (June, 25 2020) is 733. Table V shows the actual close price WSKT data and the prediction.

V. CONCLUSIONS
The dynamical stock price changes through Covid-19 pandemic can be expressed with the second order continuous time varying differential equation where its acceleration of price changes equals to its magnitude. The solution of this differential equation represents the stock price prediction at time t. To achieve this solution, the coefficient of magnitude price changes calculates by estimating the general solution using Least Square estimator. In this work, we took Jakarta Composite Stock Price Index and Waskita Karya Company stock price as the object of observations. The results show that the stock prices decrease since March 2020 effected by Covid-19 pandemic and it starts to grow up again in the middle of June 2020.
Further, the Multi layered Neural Network used to predict the future price of those shares since it gave better prediction than linear model. The experimental results showed that the future shares predicted to be higher than the closed price before where IHSG predicted on 4917.211 and WSKT predicted on 733 which is higher than the closed price before.
However, those two methods can be used to analyze stock price movements and predict the future price. For the future work, those two methods can be improved to predicting the future stock prices in general.