LONG SHORT-TERM MEMORY ON BITCOIN PRICE FORECASTING

In modern times, many people rely on sophisticated technology to meet their needs. Already many technologies today can replace the role and function of society in the field of investment. There are many ways to fulfill the lives of these people, such as Bitcoin investment. Bitcoin is a digital asset that only exists in digital form by means of peer-to-peer work. To maximize profits, it is necessary to forecast Bitcoin prices when it will go up or down. This study tries to address the changes in Bitcoin prices whether to go up or down the next day with an artificial neural network model. The editor used in this study is the LSTM method. The data used is the Bitcoin blockchain data, namely time-series data in a one-day period from 1 January 2018 to 31 May 2019. Obtained forecasting results in June 2019 for Bitcoin to rise slowly and an accuracy value of 97.5% based on MAPE with the first day worth $8901.50.


INTRODUCTION
In modern times, many people rely on advanced technology to meet their needs [1]. Already many technologies today can replace the role and function of humans in the field of investment [2]. Many ways to meet the needs of human life, such as investing in Bitcoin [3]- [7] and Ethereum [8]- [11]. The development of technology in Indonesia brings the pattern of human life in meeting their needs with positive and negative impacts [12]. Investment is one of the positive effects of technological progress [13]. By investing, people can prepare financially in the future. Based on Roychowdhury et al in 2019 [14] investment is one or more assets that are owned and usually long-term in the hope of gaining profits in the future. Bitcoin was created by someone from Japan named Satoshi Nakamoto in 2009 [15]. Bitcoin is a digital asset that only exists in digital form and has an exchange rate sometimes up or down [16]. The workings of Bitcoin are based on peer-to-peer that can be sent directly to other parties without going through financial institutions. Bitcoin is not included in the banking system and all exchanges will be listed on a blockchain [5]. Within a few years Bitcoin became very popular with humans because of its ease of use. The price of Bitcoin which sometimes goes up and down makes users have to know when the price will go up or down to invest. In 2010 Bitcoin traded at a price of 1 Bitcoin around $0.08. And in 2018 it increases to $13439.42 per 1 Bitcoin, but Bitcoin itself has not been recognized in Indonesia as a means of payment. In this study, the author wants to try to predict changes in Bitcoin prices in the future by using the LSTM architecture [17]. If you already know the Bitcoin price prediction, users can find out the lowest price and the highest price on the forecast. In addition, the user can also estimate when to buy the Bitcoin and when the customer is. The data used is the Bitcoin blockchain data, namely data-time-series in a one-day period from January 2018 to May 2019.

A. Bitcoin
Bitcoin is a digital asset created in 2009 by a Japanese person named Satoshi Nakamoto [18]. Bitcoin is an investment with advanced technology and has an exchange rate that will continue to increase [6]. The workings of Bitcoin using per-to-peer technology are technologies that run without having a central server [14]. Bitcoin can be controlled by anyone, so user can take part in developing Bitcoin. Bitcoin uses a blockchain database and is not controlled by institutions or government. All transactions are recorded live, transparent and spread to millions of servers. The number of Bitcoins in the world is only 21 million Bitcoin.

B. Long Short-Term Memory
Long Short-Term Memory (LSTM) was created in 1997 by Hochreiter and Schmidhuber [19], then many researchers developed it. Cell LSTM has different processing than ordinary RNN modules [20]. The difference is the addition of the signal given from one time step to the next time step, namely the memory cell or cell state. a. Processing in LSTM Cell LSTM has 2 outputs, the first is the actual output which is passed back to the next cell and becomes the output of the cell, and the second is the memory cell [17]. The equation tanh is described as follows. (1)

b. LSTM Key Mechanism
The key to LSTM is the path that connects the old memory cell to the new memory cell. Memory cell is a horizontal line that connects all output layers to LSTM. With this path, an old memory cell value will be easily forwarded to the new memory cell with very few modifications. With the sigmoid gate, LSTM can regulate how much information from being included becomes. The sigmoid equation is described as follows. (2)

C. Memory Cell and Gate Unit
The There are four processes of activation functions at each gate unit, namely the forget gate, input gate, cell gate, and output gate [21]. Gate units come from each neuron input, hereinafter referred to as the gate unit. The sigmoid gate forgets gate functions to decide what information will be removed from the memory cell. This gate produces a number between 0 and 1. If the output is 1 then all data will be stored and if the output is 0 then all data will be discarded. With the formula as follows: The input gate will decide what new information will be used in the new memory cell. There are two parts in the gate input process, namely the neuron layer with the sigmoid activation function and which has an activation function. With the formula as follows: In cell gate will update the old memory cell to a new memory cell. Where this value is obtained from combining the values contained in the forget gate and input gate. With the formula as follows: (6) At the output gate there are two gates, the first value will be decided on which part of the memory cell will be released using the sigmoid activation function. Then the value is placed in the memory cell by using the activation function tanh. Then the two gates are multiplied and produce the value that will be issued.

D. The System Building
In building the system on the LSTM method there are several steps taken, namely pre-processing, LSTM training, and testing of testing data [22]. The dataset that has been obtained is first normalized with the min max scaling normalization technique. Initialization of each parameter is carried out, then training is carried out with parameters that have been determined. Next, a test on the model that has been obtained from the training process for testing data is carried out. The process is carried out repeatedly to get a model with acceptable accuracy.

METHODS
The population used in this study is data on the sale price of Bitcoin. The sample taken in this study is the Bitcoin price data for the last 1 year on January 1, 2018 to May 31, 2019. Distribution of training data and testing data with a ratio of 80:20 from the total data amount. Data collection in research is intended to obtain appropriate and accurate data. This study uses secondary data collection methods taken through the website www.coindesk.com.

RESULT AND DISCUSSIONS A. Average of Bitcoin Price
Based on Figure 2 is the average price of Bitcoin sales per 3 months.

B. Distribution of Training and Testing Data
there is no determination of the amount of training or testing data. In this study, the data obtained was divided into 80% training data and 20% testing data. The amount of training data is greater because the learning machine is better trained to learn the model.

C. Analyzing the Number of Hidden Neuros
In this study networks are formed with 1 input layer, 1 hidden layer and 1 output layer. The number of hidden neurons used in this study is 5, 10, 15, and 20. From Table 1 shows that the best accuracy value on the number of hidden 15 neurons with more optimal results than the number of other hidden neurons. Hidden neurons process input values which then connect with output neurons, so the number of hidden neurons determines the output value. So, to get the best results, the number of hidden neurons is used with the smallest MSE.

E. Forecasting Results
From the results of the experiment on the number of hidden neurons and the number of epochs that have been done, the graph of the comparison of the actual data of Bitcoin prices with forecasting Bitcoin prices is found in Figure 3. Where the testing data is blue and forecasting data is orange.

Fig. 3. Graph of Comparison of Data Testing and Forecasting of Bitcoin Prices
Based on Figure 3 it can be concluded that the formed model can produce the appropriate output, where the testing data line and forecasting data are not much different. The prediction results obtained with the most optimal error value in June 2019 are as follows: In Table 3. is the result of the Bitcoin price prediction in June 2019. At the Bitcoin price prediction in June 2019 the lowest price prediction is found on June 1 and 2 2019, which is estimated at $ 89.01.50 and for the highest price prediction on the 30th June 2019, which is estimated at the price of $ 10674.57. The following in Figure 4 is a Bitcoin price prediction in June 2019 in the form of a graph.