Prediction Calculation of PT. Indofood Sukses Makmur Tbk. Stock using R Studio with Autoregressive Integrated Moving Average (ARIMA) Method

PT. Indofood Sukses Makmur Tbk is one of the consumer stocks with a parent company, namely PT. Indofood Sukses Makmur Tbk (INDF) is also in the consumer sector. In 2020, the impact of the coronavirus pandemic will be felt by the public and the government, one of which also has a significant effect on the economic sector. Macro companies show stock prices dropping drastically in early 2020 due to the pandemic. And that's where investors are tempted to buy shares. However, until now, the price of macro companies' claims, including INDF's shares, still fluctuates. So it is difficult to determine the future stock price. Therefore, research is needed to predict INDF stock prices in the future. This study aims to provide information about INDF stock prices in the future based on prediction results which investors can then use to read INDF stock charts in the future so that they do not experience capital loss. This research uses R Studio with Autoregressive Integrated Moving Average (ARIMA) method. Based on the research method carried out in input and data processing, checking stationarity, model specifications, parameter estimation, residual analysis, and forecasting, the results obtained regarding the prediction of INDF stock prices show fairly accurate results. This can be seen from the results of stock price predictions in February – April 2021 with the actual data available. Figures from the


INTRODUCTION
In Indonesia, one type of market is currently developing and has a significant impact on the global economy, namely, the capital market.The capital market or stock exchange is a form of private company activity in the form of investment.Investment is allocating assets or funds by a company or individual for a certain period to achieve greater returns in the future (Pardiansyah, 2017).There are several forms of investment, and one of them is stocks.Stocks are one of the public's most well-known and widely used forms of investment.The number of retail investors in the capital market has reached 4.16 million, with a ratio of about 2.2 percent.
Stocks that can be traded are listed on the Indonesia Stock Exchange, and their existence is monitored according to applicable regulations.The buying and selling of stocks cause stock prices to fluctuate by percent.Stocks do not move linearly; they often change and are not bound by a specific time, which results in various risks.The risks involved in stock investment can be minimized, and investors must know how to analyze and predict stock movements in the stock market.Due to the numerous factors that can influence stock prices, it is impossible to determine when stocks will rise or fall.At best, investors can only predict stock prices.These predictions are usually based on trends at that time and are not guaranteed to be accurate.
PT. Indofood CBP Sukses Makmur Tbk is one of the consumer goods (Budialim, 2013) stocks, with its parent company being PT.Indofood Sukses Makmur Tbk (INDF) operates in the same field.There is a desire by PT.Indofood Sukses Makmur Tbk to acquire all or a majority stake in Pinehill Company, which resulted in a decline in its stock price due to the funds used for the acquisition and the financing, which can also be referred to as debt.This caused the stock price to plummet to the lower auto reject (ARB) level.Currently, the world is facing the coronavirus outbreak, which has impacted many countries' economic and financial sectors.The stock performance of PT.Indofood Sukses Makmur Tbk still appeared positive in March 2020, as INDF stocks rebounded and strengthened by 18.32%, reaching Rp 5,975 per share on Thursday, March 26, 2020.At the beginning of April 2020, the stock of PT.Indofood Sukses Makmur Tbk can still be considered resilient or defensive, despite the surge of the coronavirus in April, affecting almost all countries, including Indonesia.However, in mid-April 2020, the stock price of PT.Indofood Sukses Makmur Tbk started to decline along with the decrease in the Composite Stock Price Index (Lumempow et al., 2021).
Given the uncertainty of the current situation, it is essential to conduct an analysis that can predict the stock movements of PT.Indofood Sukses Makmur Tbk.This analysis is based on the price movements of the stock, which exhibit specific patterns that can be used to predict future trends (Sukamto and Setiawan, 2018).This allows for the analysis of stock price movements.One approach that can be used is R Studio (Allaire, 2012) with the Autoregressive Integrated Moving Average (ARIMA) method.This research aims to predict future stock prices, making it easier for investors to make investment decisions in the capital market (Fadilah, et al., 2020).
actual data are still included in the upper and lower limits of the predicted results.

METHOD
The writing of this scientific paper is also conducted through research to address the issues that will be discussed.The research includes analyzing future stock predictions using R Studio with the ARIMA technique.This research is applied research (Didiharyono et al., 2018) with the concept of Identify, Review, Clarify, Define Terms and Concepts, and Define the Populations.The reason for using this research concept is because it has advantages seen from its systematic working procedure, where each step to be taken refers to the previous step that has been improved, resulting in a more effective outcome.The following are the steps involved: The research methodology contains a detailed explanation of how the research is conducted.Each paragraph can consist of several subparagraphs, indicated by the following sections.
1. Identify the Problem

•
During this pandemic, many people are flocking to investments.
• Novice investors often struggle with predicting charts.

Review the Literature
• A literature search was conducted to support the research being conducted.The literature search focused on finding relevant studies related to stocks and investments and data analysis techniques using R Studio.

Clarify the Problem
• Statistical analysis of the collected stock price data was conducted.

Define Terms and Concepts
• Stock is proof of ownership of a company's value.

•
The ARIMA model is a group of time series models that establish statistically significant relationships between the variables being forecasted and their historical values (Shumway and Stoffer, 2017;Nelson 1998).

•
The data collected consists of 61 stock price data points from April 2016 to April 2021.

Study Literature
A literature review was conducted to gather relevant research studies that support this scientific writing.The literature review utilized trusted sources.The main topics covered in the literature review include: 1. Stock prediction techniques 2. The application of digitization in mathematics and statistics.
3. Using the ARIMA method, R studio is an application for predicting future data.

Data gathering
The data for this research was collected from the website investing.com.The data collected consists of Indofood (INDF) stock price data from April 2016 to April 2021, spanning 5 years.The following is the Indofood stock price data (in Indonesian Rupiah) from April 2016 to April 2021, presented in Microsoft Excel format.

Data processing
The data processing technique employed in this research utilized R Studio with the Autoregressive Integrated Moving Average (ARIMA) method.(Lilipaly, et al., 2014) The steps involved in this method are as follows: 1

Input and data processing
The data was imported into R Studio based on the collected Indofood stock price data.

Figure 2. Data Plotting Algorithm in R Studio
Figure 3 shows a monthly stock price graph of INDF for the past 5 years.The chart can be seen in the following image (Hamonangan and Sulistyawati, 2012).

Figure 3. Indofood Stock Price Graphic
The stock price of Indofood over the past 5 years has shown relatively high volatility.This can be observed from the significant increases and decreases that occur monthly.The graph above shows a decrease in stock price from mid-2017 to mid-2018 and from late 2019 to early 2020.The stock price graph can be decomposed into four components: random, seasonal, trend, and observed (Nofsinger and Sias, 1999).The decomposition of the Indofood stock price graph can be seen in the image below.p-ISSN 2774-1656 e-ISSN 2774-1699

Checking for stationarity
The next step is to check for stationarity in the Indofood stock price data (Sukamto and Setiawan, 2018).This is done to determine whether the time series data is stationary in terms of both mean and variance.A data series is considered stationary if the p-value of the data is less than 0.05.This can be achieved using the Augmented Dickey-Fuller Test (ADF Test).

Figure 5. Before Differencing
In picture 5, the obtained p-value is larger than 0.05.Therefore, differencing is needed to reduce the p-value below 0.05.

Figure 6. After Differencing
After one round of differencing, the p-value becomes smaller than 0.05.This indicates that the available data is now stationary.The number of differencing performed at this stage represents the value of d in the ARIMA(p,d,q) model.

Model specification
After differencing, the Indofood stock price graph also undergoes differentiation.The differentiated chart can be seen in the following picture.

Figure 7. Indofood Stock Price Graphic After Differencing
To determine the values of p and q in the ARIMA(p,d,q) model, we need to examine the values of the ACF and PACF.The ACF has cut-offs at lag 6 and 13, while the PACF has a cutoff only at lag 6.The values of ACF and PACF can be seen in the graph below.After obtaining the values of p, d, and q, we can generate several ARIMA Models.

Parameter estimation
Estimating parameters is done to obtain the best ARIMA model (Deviana et al., 2021).There are 49 ARIMA models obtained from combinations of values for p, d, and q.Therefore, parameter estimation is performed using AIC (Akaike Information Criterion), Shapiro-Wilk test, and Box-Ljung test (Cavanaugh and Neath, 2019;González-Estrada and Cosmes, 2019).From picture 13, the best ARIMA model is ARIMA (6,1,3) with an AIC of 895.96,Shapiro-Wilk test value of 0.7852, and Box-Ljung test values that are all greater than 0.05.

Forecasting
The predicted values for Indofood's stock price using the ARIMA(6,1,3) model can be seen in the following table (Harell and Frak, 2015;Taylor and Letham, 2018).Predicting Indofood's stock price for the next 12 months using ARIMA (6,1,3) show fairly accurate results (Hartati, 2017).The actual stock price data for February, March, and April 2021 are still within the lower and upper bounds of the prediction.This indicates a high likelihood that the actual stock prices from May 2021 to January 2022 will not exceed the upper and lower bounds of the prediction.

CONCLUSION
The prediction of PT.Indofood Sukses Makmur, Tbk's stock using R Studio with the Autoregressive Integrated Moving Average method shows relatively accurate results.This can be seen from the predicted stock prices for February to April 2021 compared to the actual data.The actual data values are still within the upper and lower bounds of the prediction.With stock price predictions, investors can make informed decisions.If the stock price decreases, investors can buy stocks from companies with good prospects.Conversely, investors can sell stocks to companies with good prospects to gain capital gains if the stock price increases.

Table 1 .
Indofood Stock Price Forecast Result