DESIMAL: JURNAL MATEMATIKA

The COVID-19 pandemic impacted various activities in Indonesia, including the stock market. Despite the declining economic condition, people are increasingly interested in investing. Among other companies available on the Indonesia Stock Exchange, companies in the health sector have a particular appeal to potential investors, one of which is pharmaceutical companies. This research used a Markov Average-Based Weighted Fuzzy Time Series model applied to PT Kimia Farma Tbk stock price data. This model develops the previous Markov chain–Fuzzy Time Series model, which has not calculated the weights for recurring events and used the Sturgess rule to determine the interval length. In this research, each recurring event has given a different weight that provides different probability values for transitions from one state to another. The Average-Based method is used to determine the interval length that can reflect the fluctuation of the data used. The stock price prediction of PT Kimia Farma Tbk using this model is categorized as very accurate with a MAPE of 2.632%.


INTRODUCTION
At the end of 2019, the world was shocked by the discovering of a new type of virus, SARS-CoV-2 (known as , which was later designated as a pandemic by the World Health Organization (WHO).The spread of COVID-19 is still ongoing in Indonesia, impacting various activities, including the stock market.In their research, Liu et al. (2020) concluded that an increase in COVID-19 cases does diminish the country's stock performance.However, public interest in investment products has increased despite the declining economic condition.This is encouraged by public awareness to start investing and looking for additional income due to uncertain economic conditions (Otoritas Jasa Keuangan, 2021).During this pandemic, companies in the health sector have more attracted investors compared to other companies available on the Indonesia Stock Exchange (Utami & Aliyansah, 2020).This is also proven by Yunpeng et al. (2021) which expressed there is a trusting investor attitude toward the health sector industry, which plays a crucial part in preventing this unusual infectious disease.As a stateowned pharmaceutical company in Indonesia, PT Kimia Farma Tbk is currently responsible for handling this pandemic.The company's stock price tends to rise significantly after the news of the vaccine began to emerge so that it is considered interesting to analyze.
Stock price data is time-series data.Many methods can be used to analyze this type of data, but some methods require the satisfaction of basic assumptions.One method that can be used to analyze time-series data without requiring basic assumptions is the Fuzzy Time Series (FTS) (Aladag, 2012).FTS can handle uncertain and incomplete data well, even though it is done by ignoring basic assumptions.
FTS has been used in several previous researches.Susilowati and Sulistijanti (2018) predicted the number of inpatients using FTS, and Jatipaningrum et al. (2019) predicted the Rupiah exchange rate against the Dollar with FTS combined with the Markov chains method.The accuracy of the results obtained is satisfying enough.However, in the previous FTS, the determination of the partition interval length is only based on the number of data used and not considered to reflect the variation in the data.In their research, Sun and Li (2008) stated that the data fluctuation could be expressed as the absolute value of the difference between the two-consecutive data.Moreover, the previous FTS still ignores the repeated transitions that happened, whereas the higher the number of repetitions, the greater the probability of that event occurring again in the future (Yu, 2005).
This research discusses the Markov Average-Based Weighted Fuzzy Time Series Model, which developed the previous Markov FTS model.Mean Absolute Percentage Error is used to measure PT Kimia Farma Tbk stock price prediction accuracy obtained using this model.

METHOD
The two main differences raised in this research are the method to define the interval length and giving weight to the recurrence event of the FTS.The previous FTS used the Sturgess method, which only considers how much data is used for the research, and the interval length will adjust to the number of classes formed.This does not match Sun and Li (2008) who stated in their research that the calculation still cannot effectively reflect fluctuations in the data.Hence, this research uses the Average-Based method, which calculates the average difference between two consecutive data at times  and  + 1 and is considered to reflect the data's actual fluctuation.
Ignoring repeated transitions in FTS could result in data information loss.The event that keeps repeating is assumed to have the same opportunities to happen again in the future as events that only occur once.Therefore, the weighting procedure gives different probability values for each event (Yu, 2005).By considering these two things, the Markov Average-Based Weighted FTS Model is studied to complete the weaknesses that exist in the previous model.
The steps conducted as follows: 1. Determine the universal set  from the data used using the following equation: where   is the lowest data value,   is the highest data value, where  1 and  2 arbitrary positive numbers used for interval adjustment.(Tsaur, 2012).
2. Divide  into several partitions following the Average-Based method steps below: a. Determine the length of the initial interval ( 1 ) with  is the number of data used.
b.According to  1 , determine the base for the interval length based on Table 1. 3. Determine the fuzzy set   for the universal set , with: where the value will be positive when  <  and negative for  > . Rule The accuracy level of the prediction results based on the MAPE value can be seen in Table 2.

RESULTS AND DISCUSSION
The data used in this research is the stock price of PT Kimia Farma Tbk from March 09, 2020, to May 31, 2021, collected from the Indonesia Stock Exchange official site (https://www.idx.co.id).The number of data used () is 293, with the highest stock price was on January 12, 2021, and the lowest stock price can be seen on the 9 th data (March 19, 2020).Thus, from the data above, we get   = 6.975 and   = 600.Using  1 = 0 and  2 = 25, obtained the universal set  = [600, 7.000].The interval length determination was carried out using the Average-Based method.Using Equation ( 2), we obtained the initial interval length  1 = 50,667.This value is in the interval of 11-100, hence according to Table 1, base 10 is used to determine the final interval length () and got  = 50.
Furthermore,  is partitioned with the interval length of each class is 50.Thus, there are 128 partition classes as follows.
The next step is determining the fuzzy sets using Equation (3).The number of fuzzy sets formed is 128, as much as the number of partitions formed in the previous step.The fuzzy set formed is as follows.After the fuzzy set is formed, the stock price data is fuzzified and the weighting process is carried out for each repetition that occurs in each fuzzy set.Table 4 shows the results of fuzzification and weighting for each transition.To construct a Markov chain transition probability matrix P, calculate the probability values for each state i transitions to state  using Equation (4) Below is the calculation of  , : • Since  1 transitions to  1 and  2 , thus: • Since  2 transitions to  1,  3 and  5 , thus: • Since  3 transitions to  2 and  5 , thus: and so on, until we obtained all elements values for the 128x128 matrix P.

𝐏
From the matrix P above, it can be seen that there are some  , with a value of 0. It means that no transition occurs from state  to state .
The defuzzification process calculates the initial prediction value using Equations ( 5) and ( 6).After calculating the prediction adjustment value by Equations ( 7) and ( 8), then obtained the final prediction results calculate following Equation ( 9) or (10).The results of defuzzification and the final prediction result can be seen in Table 5.To predict the stock price for 02-07 June 2021, consider the fuzzification of the previous data ( = 293).Follow the defuzzification process until obtained the initial prediction value  * ().Do the same steps as before to gain the final prediction result  ̂().Table 6 shows the prediction stock price and the error with the actual prices.The comparison of the two can be seen in Figure 1.

Table 1 .
Interval Length Base (Sun & Li, 2008)c.Rounding  1 according to the basis obtained from Table1and get the length of the final interval used ().d.Divide  into several partitions with interval length .
. Define Weighted Fuzzy Logical Relationship (Weighted FLR) Let  , be the weight of the transition from state  to state ,  , =  where  is the  th repetition of transition  to another state.  →  1 ,  2 , … ,   ,  = 1,2, … , ) and ( − 1) is a data on the previous time ( − 1), then: () = [ 1 ,  2 , … , ( − 1), … ,   ] If state   communicate with its own state (  ↔   ) and experiences an increasing transition for  <  or a decreasing to state   at time , the adjustment value can be measured by: (Díaz-Cortés et al., 2017).If the observation data is the element of the interval   , then the data is fuzzified to the   fuzzy set.5Copyright © 2021, Desimal, Print ISSN: 2613-9073, Online ISSN: 2613-9081  * 2: If state   is a state at time  − 1 and experience the increasing transition to the state of  ± at time , then:

Table 5 .
Defuzzification and Final Prediction Result