Comparison of Artificial Neural Network Backpropagation and Garch Methods in Predicting Stock Price (Case Study: Indosat Shares 2012-2022)

: One of the problems encountered in the forecasting process is the problem of heteroscedasticity. Heteroscedasticity occurs a lot, especially in stock data. PT Share Price Indosat (tbk) from March 6, 2012 – January 18 2022 has fluctuated from time to time, so the variance is heteroscedasticity. The Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model and Artificial Neural Network Backpropagation (ANNBP) are methods that can be used on data with heteroscedasticity. The aim of this research is to obtain models and forecasting results from GARCH and ANN Backpropagation. In this study, the two models were compared based on the smallest MAPE value. This study uses daily data on the closing of Indosat shares. Forecasting is done on Indosat stock closing data, the total data is 2453 data divided into two parts, namely 80% training data totaling 1962 data and 20% training data totaling 491 data. Forecasting results from the GARCH model obtained a MAPE value of 11.04%, and the ANN Backpropagation model with 7 input layers, 20 hidden layers, obtained a MAPE value of 7.01%. Thus, the best model for predicting Indosat's share price in this study is the backpropagation model.


Introduction
Shares can be defined as certificates showing proof of ownership in an industry and the shareholder has the right to the income and inheritance of the industry.Stock price is a very important aspect to be observed by investors.Stock prices fluctuate, so that the addition of the value of the stock price is also called the movement of the value of the stock price.In practice, the stock price of each company on the stock exchange is expressed by the stock price index.If the value of the stock price index increases, it means that each index has an increased share value and vice versa.The stock price index is a measure that measures changes in the price of the stock market.The movement of the stock price index guides investors in monitoring the development of income without following the ups and downs of each stock.
The author takes PT.Indosat, Tbk as an object of research, where the company was founded in 1967 as a company that provides international communication services in Indonesia and the company has experienced very rapid development, especially from its financial structure which is supported by the issuance of shares.At this time PT.Indosat Tbk, is a communications service provider company that ranks second as a cellular operator in Indonesia.Where in 2012 there was a decline due to external factors, macroeconomic fundamental conditions where Indosat shares were still listed on the American Stock Exchange and the panic factor from the company.In 2013 Indosat shares changed their name from Qtel to Indosat Ooredoo, in the first quarter of 2013 Indosat shares increased due to the company's excellent performance, but in the second and third quarters of 2013 Indosat shares decreased due to factors such as increased operational costs and loss of value.foreign exchange (foreign exchange losses) that occur due to the high portion of debt in dollars.
In 2019 to the 2nd quarter of 2021 PT Indosat Ooredoo experienced a decline in shares caused by Covid-19, reaching the lowest point of Rp. 1,200/share occurred on March 24 2020, but in December 2020 PT Indosat Ooredoo and PT Hutchison signed an agreement for cooperation and a memorandum of understanding containing plans for potential transactions to combine two telecommunications companies in Indonesia, namely Indosat and Tri, and change their name to PT Indosat Ooredoo Hutchison, the collaboration shows that PT Indosat Ooredoo Hutchison's shares have increased until the end of 2021, where on November 30 2011 Indosat shares touched a price of Rp. 8,150/sheet.In fact, the share price of PT.Indosat shares have increased and decreased (fluctuated), this may be related to the value of the return on assets, the amount of retained earnings and the dividend payout ratio.
Stock price movements fluctuate so that this information has a change in variance that is not constant.One suitable method for forecasting fluctuating stock information is the Generalized Autoregressive Conditional Heteroscedasticity (GARCH) model, which is a development of the Autoregressive Conditional Heteroscedasticity (ARCH) model.The ARCH model was first introduced by Engle in 1982.This model is able to describe all the characteristics of financial market variables.However, in financial problems with a greater level of volatility, this model requires a large order to get the right model.To avoid this, Bollerslev (1986)  GARCH is a nonlinear model of time series data (Donaldson and Kamstra 1997), because the GARCH method is able to solve non-linear time series.Therefore, Tealab (2018) suggests another nonlinear mathematical model, namely the Artificial Neural Network (ANN) scheme.
Artificial Neural Network is an information processing paradigm that is inspired by the biological nervous system, such as information processing in the human brain.The key element of this paradigm is the structure of an information processing system consisting of a large number of interconnected processing elements (neurons), working in unison to solve a specific problem.The way Artificial Neural Networks work is like how humans work, namely learning by example.Artificial Neural Network is a system of parallel processors connected to each other in the form of directed graphs.according to the chart each neuron of the network is represented as a node.These connections provide a hierarchical structure that attempts to mimic brain physiology, seeking new models of processing to solve specific real-world problems.An important issue in the development of Artificial Neural Network techniques is that useful behavior must be learned, recognized and applied between objects and object frames in the real world (Freeman et al., 1992).The layers that make up the Artificial Neural Network are divided into 3, namely the input layer, the hidden layer, and the output layer (Sutojo, 2010).
One of the Artificial Neural Network methods used for stock price forecasting is the Backpropagation model, Rong et al, (2005).This model is used because in most cases recognizing patterns requires identifying when facts or phenomena will occur again before they occur.Artificial Neural Network Backpropagation has one hidden layer, although basically it can have more than one hidden layer according to system requirements.While the number of connected layers to the hidden layer and the output layer is determined by the number of hidden layer patterns and the number of output layer patterns.Training on Neural Networks is training to determine the appropriate weight values.Training on Artificial Neural Network Backpropagation consists of three stages, namely; feedforward, backforward and weight adjustment training.The advantages of the Backpropagation Algorithm are that it can be applied to solving a problem related to identification, prediction, forecasting, pattern recognition and so on (Dessy and Irawan, 2012), its ability to learn (adaptive) and immune to errors (Fault Tolerance) so that it can create a system that damage resistant (robust) and work consistently (Dessy and Irawan, 2012).
Artificial Neural Network Backpropagation is an information processing system that is designed to mimic how the human brain works in solving a problem through a learning process with changing weights.Artificial Neural Network Backpropagation identifies data patterns from stock prices with learning or training and testing approaches.In Azadeh's research, et al. (2012) compared the two methods between Artificial Neural Network and fuzzy regression to predict oil prices, concluding that the Artificial Neural Network model has the smallest mean absolute percentage error (MAPE).Research conducted by Hasanah, et al (2019) on solving the problem

Generalized Autoregressive Conditional Heteroskedasticity (GARCH)
The GARCH (Generalized Autoregressive Conditional Heteroscedasticity) model was put forward by Bollerslev in 1986 which is a generalization of the ARCH model.GARCH is considered to provide simpler results because it uses fewer parameters, thereby reducing the error rate in calculations.The GARCH model is used to overcome orders that are too large in the ARCH model.according to (Tsay, 2010) the GARCH model used is: Where σ t 2 the variance of the residual at time , α 0 the constant component, α i parameter from ARCH, e t−i 2 the square of the residual at time t − i, β j parameter from GARCH and σ t−i 2 the variance of the residual at time t − j
During forward propagation, the enter signal (   ) is propagated to the hidden layer the use of the desired activation function.The output from every unit of the hidden layer (   ) is then propagated ahead once more to the hidden layer above it the use of the desired activation function.And so on till it produces a community output (  ).
Next, the community output (  ) is in comparison with the goal to be achieved (  ).Difference   -  is an blunders that occurs.If this mistake is smaller than the desired tolerance limit, then the new release is stopped.However, if the mistake continues to be more than the tolerance limit, then the load of every line withinside the community might be changed to lessen the mistakes that occur.

Stage II: Backpropagation
Based at the   −   , error, we calculate the component   ( = 1,2 , . . ., ) error, we calculate the component   .  is likewise used to extrade the road weight that's at once associated with the output unit.In the equal way, the thing   is calculated for every unit withinside the hidden layer as the idea for converting the load of all traces originating from the hidden unit withinside the layer below.And so on till all of the δ elements withinside the hidden unit at once associated with the enter unit are calculated.

Stage III: Change in weight
After all the δ factors are calculated, the weights of all lines are modified together.The change in the weight of a line is based on the δ factor of the neurons in the upper layer.For example, the change in weight of the line leading to the output layer is based on the δ_k in the output unit.
The general form of the output of backpropagation is as follows (Fausett, 1994:292) (2) Research conducted by Ilyas, N., et al ( 2022), Sharma and Vipul (2015) the activation function used is the binary sigmoid activation function.The activation function in Artificial Neural Network Backpropagation is used to formulate the output of each neuron.In Artificial Neural Networks that are often used is the binary sigmoid activation function.

Methods
In this study the software used to analyze Indosat Rstudio stock data for GARCH and for the backpropagation neural network method uses Matlab software.where from the two methods it is seen whether the ACF and PACF plots made in the Rstudio software are stationary or not by looking at the ADF test, where the two methods will be compared by looking at the forecasting results through the smallest MSE value.

Results and Discussions
The first step to modeling time series data is to identify its stationarity.The data used in conducting the stationary test is Indosat closing data for March 2012 -January 2022, because closing data is the dependent variable that will be predicted.Identification of data stationarity can be done by making time series plots, ACF and PACF plots, and carrying out the ADF test.The first step is to plot the data to see whether the data satisfies the stationarity of both the mean and variance.The Indosat Share closing plot is shown in Figure 1  Figure 1 shows Indosat Stock Closing data after being normalized showing the occurrence of up-and-down (fluctuating) movement patterns so that Indosat stock closing data is said to be non-stationary data with respect to the average, to find out the stationarity of stock data in the average, it is necessary to check the stationarity using the test ADF (Augmented Dickey-Fuller).
Figure 2. Plots of ACF and PACF Figure 2 The stationarity of the data can be seen from the ACF and PACF plots, the plots show that the data tends not to be stationary, because the ACF plot decreases slowly towards zero.This can be continued by carrying out a unit root test to see clearer data stationarity.The commonly used unit root test is the Augmented Dickey-Fuller (ADF) test with the results shown in table 2: Table 2 shows the  −  = 0.6374 >  = 0.05, stating that Indosat's stock closing data is not stationary on average.This shows that it is necessary to do the differencing process so that the data becomes stationary.
After the process of differencing lag 1, the following time series plots are obtained:  Before modeling ARCH-GARCH, it is necessary to test the ARCH effect to find out whether there is an element of heteroscedasticity in the model.The following is a hypothesis test using the Lagrange Multiplier test.4, it shows that the results of the Lagrange Multiplier test were obtained for all ARIMA models with a p-value of 0.0000, which means that it is smaller than the significant level α = 0.05.This states that the model has an ARCH-GARCH effect so that there is sufficient evidence for GARCH modeling to be carried out.Then the autocorrelation test is carried out, to see the autocorrelation model then proceed to the next stage, namely forecasting.show that the ARIMA model has autocorrelation in ARIMA (0,1,1), ARIMA (4,1,0), ARIMA (5,1,0), ARIMA (6,1,0 ), ARIMA (7,1,0), ARIMA (8,1,0), ARIMA (9,1,0), ARIMA (10,1,0), with the results of all p-values greater than the significant level α = 0.05.This means that H_0 is rejected, then the model is declared autocorrelated and GARCH modeling is carried out.ARIMA (0,1,1) has the smallest MSE value and is autocorrelated, so this model is suitable for GARCH modeling.
ARCH-GARCH modeling, seen from the smallest MSE value from the ARCH-GARCH effect test, namely the ARIMA model (0,1,1) has the smallest MSE value, namely 0.0012 and the order of AR and MA is taken, namely (0.1), so that the selection of a temporary tentative model from GARCH namely GARCH (0,1), GARCH (1,0) and GARCH (1,1).After obtaining the tentative model, then the parameters of the model are seen with the smallest error value with the MSE value.Based on Figure 5, it shows that the blue graph explains the actual data and the orange color chart explains the prediction results, where the x-axis (horizontal) shows the amount of data totaling 484 data while the y-axis (vertical) shows the closing price of shares in rupiah.Forecasting with GARCH (1.0) the forecasting results on data between 50 to 150 are greater than the actual data and occur on June 5, 2020, with the forecasting result of Rp. 4835.1240 and the actual is Rp.2240, the error value is Rp.2595124.

Artificial Neural Network Backpropagation
The ANN Backpropagation method can complete forecasting of Indosat stock prices, where the backpropagation model training process uses machine learning, and the results can be compared with the GARCH model.
The process in learning Neural Network Backpropagation, determines  −   , where   = output value and   = target value, then the weight is minimized by the number of squared errors, the formula for the number of squared errors as in the following equation: In the hidden layer, the formula applies as in the equation: At the output layer the formula applies as in the equation:

Analysis of Artificial Neural Network Backpropagation
in progress to complete the Backpropagation Neural Network model at the input layer cannot be determined at the final limit, therefore the author refers to the ACF and PACF plots in Figure 4.The ACF and PACF plots are truncated at lag 10, so we will test lag 1 to lag 10.Then the dimensions of the input, output, and test data matrices use the sliding window method as shown in table 8. (5) Table 8 shows that if the number of days is input (H1), then the input training data and output data will be reduced by 1 and so on.Where the results of the training show that the best model is 7 days before the trading day, the input data at the training stage is 1955, the test data is 484 data, from the results of table 8 it is given a yellow color indicating that there are 7 training data input layers and 484 test data inputs.the smallest MSE value.
The training and testing process at this stage uses 6 variations, because the process of creating training data in Matlab is done in multiples of 5 in the hidden layer, so the number of neurons in the hidden layer is 5, 10, 15, 20, 25 and 30 neurons.The model resulting from the training of variations in the number of hidden layers is used to test the test data.The test results are shown in table 9. Table 9 shows the smallest MSE value in each hidden layer with the number of input days given a yellow color where, hidden layer 5 has the smallest MSE value on the second day of input, hidden layer 10 has the smallest MSE value on the eighth day of input, hidden layer 15 has a value The smallest MSE is on the fourth day of input, hidden layer 20 has the smallest MSE value on the seventh day of input, hidden layer 25 has the smallest MSE value on the ninth day of input and hidden layer 30 has the smallest MSE value on the first day of input and the conclusion is the smallest MSE value at closing stock Indosat with lots of input 7 days before the trading day, with 20 neurons in the hidden layer, namely 0.0004161.7 input layers 20 hidden layers, calculations are carried out because they have the smallest MSE value.

Initialize Weight
Weight initialization is the initial stage before predicting the closing price of Indosat shares, the results of the training data are initial weight initialization.In random initialization of weights, weights are initialized randomly without using a scale factor (Kholis & Rofii, 2017).In this study, researchers used the technique used to conduct training with Matlab.The initial weight and initial bias from the input layer to the hidden layer, the hidden layer to the output layer, which in this study uses the input layer to the hidden layer X1 to X7 because the input layer of the network training process has the smallest.MSE values at 7 input layers, 20 hidden layers, the formula used to determine the initial weights and bias is the Nguyen Widrow method, as follows: Table 10 shows that X1 to X7 are the initial weights of the input layer while the hidden layer is 20, where the value is determined by the range between (0-1) and the initial bias of the input layer to the hidden layer, the weight and bias are calculated using the backpropagation model with 1 iteration, The next iteration is carried out using the Matlab program. = 0.7 .√  Table 11 shows that the hidden layer's initial weight and bias to the output layer, where  0 is the initial bias from the hidden layer to the output layer, while  1−20 is the initial weight of the hidden layer to the output layer, calculations will be made from these values backpropagation model with 1 iteration.

Doing Training with Backpropagation
Conduct training with training data input using the backpropagation algorithm, where the algorithm is an algorithm with a supervised learning process.After getting the initial weights and initial biases, the next step is the training process on the network that has been architecturally designed and has been parameterized using predetermined training data, namely 80% of the total data.There are three phases of the training process for the backpropagation algorithm, namely forward propagation, backward propagation, and weight initialization.

Phase 1: Feedforward
In this first stage, errors in the error output will be searched in the forward direction.Each input unit   ( ∶ 1, . . ., ) will receive the input signal from xi and forward it to the hidden unit.Then the input signal that has been given a weight including the bias in each hidden unit   ( ∶ 1, . . ., ) will be calculated.After the output layer receives the input signal from the hidden layer, the input signal is activated using the activation function as follows: Table 12 shows that the output results in the feedforward process, from the output results will be used in calculating the backpropagtion process to find the value of the weight and bias in the hidden layer against the output layer.

Model Determination
Various models have been built with the closing price of Indosat shares, the number of inputs and the number of hidden neurons varies, so the number of prediction models built in this study is 60 models.The best model obtained in this study is the number of inputs 7 days before the sales day with 20 neurons in the hidden layer, as follows: )) Based on Figure 6, it shows that the blue graph is the actual data and the orange graph is the prediction results, where on the x-axis (horizontal) it shows the amount of data totaling 484 while on the y-axis (vertically) it shows the closing price of shares in rupiah.Forecasting results which show that the prediction and actual results with the Artificial Neural Network Backpropagation model at 7 input layers, 20 hidden layers are classified as good because the graph shows that the actual and predicted data tend to be balanced or the same.

Conclusion
The results show that the ANN Backpropagation model is more accurate than the GARCH model (1.0).ANN Backpropagation model with 7 input layers, 20 hidden layers and 1 output layer: The results of forecasting the closing of Indosat shares on June 3 2012-January 18 2022 show that the ANN Backpropagation model with 7 input layers, 20 hidden layers and 1 output produces a forecast with a MAPE value of 7.01143%, while the GARCH method (1.0 ) has a MAPE value of 11.04472 %, Thus the ANN Backpropagation method deserves to be the best model in forecasting Indosat stock closing, having the smallest error value (MAPE) compared to the GARCH model (1.0).with the forecasting value for the next 1 day is Rp.5947.56.
developed the ARCH model into Generalized Autoregressive Conditional Heteroscedasticity (GARCH).Research by kingsley and peter (2019) on Volatility Modeling using Arch and Garch on the nigerian stock exchange shows that the best models are GARCH (0.3), ARCH (3) and GARCH (1.1).Research conducted by Hasanah, et al (2019) on solving the problem of heteroscedasticity in time series data by modeling and analyzing the volatility of gold returns using the GARCH model.The data sample used is return data from January 1 2014 to September 23 2016.The data analysis technique used is stationary test, model identification, model estimation, diagnostic check, heteroscedasticity test, GARCH model estimation, and evaluation.The results showed that ARIMA (3, 0, 3)-GARCH (1.1) was the best.

Figure 1
Figure 1 Plot of Closing of Indosat Shares after Normalization

Figure 3
Figure 3 Plot of Share Closing after differencingFigure3shows that the data has fluctuated around a constant average or there is no trend in the average, so it can be said that Indosat stock data resulting from differencing lag 1 is stationary.The results of differencing lag 1 were checked again with the ADF (Augmented Dickey-Fuller) test.

Table 2
Stationary Test of Stock Data

Table 3
Stationary Test of Differentencing Stock DataBased on table 3, it shows that the results of the ADF Test after differencing, with test criteria, if   < , where in the table the  −  = 0.01 <  = 0.05, which states that the data is stationary in the average.

Table 4
ARCH-GARCH effect test on the model

Table 5
Ljung Box Autocorrelation Test on the Model

Table 6
Estimates of the GARCH Model Parameters , it shows that the estimated parameters of the GARCH model (0.1) parameters  0 and  are not heteroscedastic because the  −  <  = 0.05 .Model GARCH (1,0) parameter  0 and  heteroskedastisitas karena nilai  −  >  = 0.05.GARCH model (1,1) parameters  0 and  1 have heteroscedasticity while parameter  does not have heteroscedasticity, thus it can be concluded that the GARCH model (1,0) is the best model with parameters  0 and  heteroscedasticity as well as having the smallest MSE

Table 6
Estimates of the GARCH Model ParametersFrom the previous analysis data, it was found that the best model is GARCH(1.0)which has the lowest MSE which will then be used to predict the closing price of Indosat shares.Stock price forecasting is calculated based on 20% test data totaling 491 data.The prediction results can be shown in table 4.5 below: August 2023, Volume 4, Issue 2, 15-29 DOI : 10.20885/EKSAKTA.vol4.iss2.art3

Table 8
Matrix Dimensions of closing price of shares

Table 9
Test Results for Indosat stock closing test data Table 10 Initial bias and initial weight of the Input Layer Against the Hidden Layer

Table 11
Weight and bias on the Hidden Layer to the Output Layer