Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Dr. Gayatri Hegde, Jayashree Arunan, Faseeha Modak, Anushree Nair, Komal Sangal
DOI Link: https://doi.org/10.22214/ijraset.2023.50481
Certificate: View Certificate
Bitcoin is a decentralized digital currency. It is a type of cryptocurrency because it uses cryptography to keep it safe. It is gaining popularity among individuals but it is still not common to use this technique because people still invest in traditional techniques like stock market. Additionally, there are various factors that affect the price of bitcoin such as total circulating supply, production costs, bitcoin mining, rules and regulations, and bitcoin sentiment. These factors and their combinations are used to determine which factor has the greatest influence on the price of bitcoin, and then use the studied factors and the history of the price of bitcoin to predict the evolution of bitcoin prices. Another emerging technique in computer science is deep learning, which is used for trend analysis. The models used are RNN, LSTM, and the model that gives the best result is selected for prediction.
I. INTRODUCTION
Bitcoin is a decentralized digital currency that enables secure peer-to-peer transactions without intermediaries such as banks or authorities. It was created in 2009 by an anonymous person or group using the pseudonym Satoshi Nakamoto. Unlike fiat money (INR, USD, Euro and other fiat currencies), Bitcoin is not regulated by any country. It's sort of the official currency of the Internet, and anyone with an Internet connection can own it. This makes it independent of corporate monopolies because everything in Bitcoin is controlled by a huge community of users like me, you and everyone else who uses it. The best thing about Bitcoin is how easy it is to transfer anywhere in the world with very low fees. For example, it costs only $2-$3 or less to transfer bitcoin from the US to India or Europe. Your event will also remain anonymous. Only the sender and recipient know who is involved in the transaction.
However, as a commodity, Bitcoin has the problem of high volatility. As observed in December 2017, Bitcoin reached an all-time high of nearly $20,000 before the Great Crash before falling to around $3,000 in December 2018. In April 2020, the US Federal Reserve announced a massive stimulus program to support the US economy during the pandemic. encouraging some investors to buy Bitcoin to protect against inflation, due to which it saw a second time high in January 2021, the value of Bitcoin continued to rise, reaching a new all-time high of over $40,000. This led to difficulty in predicting bitcoin prices. Many researchers have tried predicting the bitcoin prices by analysing the trends using different deep learning models, while few others have tried using correlation of different blockchain components for price prediction.
In order to contribute to the above mentioned work, the research chooses different features affecting the bitcoin prices and correlations between them were recorded to find which factors affect the most while determining the price. Using today's timestamp, it considers the previous 90 days price for prediction. In addition to a high-precision forecasting model, this study conducts an in-depth analysis of explanatory variables that determine the significance of Bitcoin prices and the relationship between forecasting accuracy and lags of explanatory variables. The forecasting models that were used are ANN, LSTM and RNN.
II. RELATED WORK
A deep neural network (DNN), a long short-term memory (LSTM) model, a convolutional neural network, a deep residual network, and their combinations are studied and compared for use in this paper in order to predict the price of bitcoin. According to experimental findings, whereas DNN-based models outperformed LSTM-based models significantly better for price classification (ups and downs), LSTM-based models performed slightly better for price regression (regression). Additionally, a straightforward examination of profitability revealed that classification models were superior to regression models for algorithmic trading. Overall, the proposed deep learning-based prediction models' performances were comparable. [1]
The cited study makes use of deep learning methods like RNN, LSTM, GRU, and MLP. The information was gathered in one minute and then reorganised to reflect it in hours. The input was taken into account over a period of 24 hours, and a prediction was made for the next hour. After comparing the models, it was determined that Multi-Layer Perceptron, or MLP, was not appropriate for the model due to lack of memory. [2]
For real-time datasets and models, an optimized RNN implementation employing LSTM was investigated. Deep learning was used to solve the real-time problem of predicting the price of digital currencies. By developing a GUI File Picker for user convenience and a wider range of applications, the implementations of the data pretreatment and filtering to deliver exact, sound, and consistent data were effectively carried out. Effective use of RNN was made utilizing the LSTM method. It was done to accurately depict the system architecture and to provide precise threshold outputs at the display unit. A graph was drawn, and outputs and observations were logged. [5]
Two deep learning methods, LSTM and GRU, are employed as prediction models in this research. According to the study, the GRU model is the more accurate and quicker to compile mechanism for time series bitcoin price prediction. Long-term dependencies are easier to detect with LSTM and GRU models. The root mean square error (RMSE) and mean absolute percentage error (MAPE), which are used to compare the accuracy of the proposed LSTM and GRU models, are found. [7]
The article forecasts the price using an LSTM model and compares it to a machine learning model to understand how accurate it is. In order to provide accurate forecasts, it thoroughly analyses the model. Due to the difficulty in predicting Bitcoin's relevance due to the use of blockchain technology, the authors employed machine learning models for testing and an LSTM model for more precise prediction. [8]
The LSTM deep learning model, which is used in the aforementioned paper and provides a trend accuracy of 93.9, is used. It also demonstrates how the predictive capability of the model is impacted by different cryptocurrencies, including ETH. The exchange trade volume, average transaction volume per block, and daily transaction volume were all considered by the authors as features for estimating the price of bitcoin. The meta-data also included labels for the open, close, high, low, and percentage change. [9]
III. PROPOSED METHODOLOGY
A. Data and Pre-processing
Bitcoin is a decentralized digital currency that enables secure peer-to-peer transactions without intermediaries such as banks or authorities. It was created in 2009 by an anonymous person or group using the pseudonym Satoshi Nakamoto. Unlike fiat money (INR, USD, Euro and other fiat currencies), Bitcoin is not regulated by any country.
It is a sort of the official currency of the Internet, and anyone with an Internet connection can own it. This makes The datasets were collected from various trading venues that provided us with real-time bitcoin prices. The parameters looked at ranged from various blockchain components to the entire daily open and close of the cryptocurrency.
These parameters were applied based on their relationship to two datasets:
B. Exploratory Data Analysis
Both datasets were examined and visualized to better understand the distribution of the data and draw inferences from hidden patterns. As Dataset 2 consist of 23 features, the correlation between them with bitcoin price was found through a heatmap visualization (Figure 2.) that uses the Karl Pearson correlation coefficient to reduce the number of features as to avoid overfitting of the data and improve its quality. Only features with a correlation of >=0.8 were considered predictive of bitcoin price.
These were found to be 8 in number out of which difficulty and hash rate had same correlation value and were highly correlated by their definitions too.
So, only difficulty feature was used instead of hash rate. This resulted in total of 7 features which are listed below. These are:
Graphically, it can be analysed in Figure 3. that all these features show similar trends with the bitcoin price and are positively correlated. The trend line for difficulty and miners revenue show similar behavior.
Figure 5 & 6. below shows that open, low, high and close prices of bitcoin are normally distributed graphically. Since these columns represent the same amount as the price, ‘ANOVA test’ was performed to determine if these characteristics differed significantly from each other by calculating the p-value.
Since the analysis showed a p-value of 0.41844, which is greater than the critical value mentioned above, the null hypothesis is accepted and that there is no significant difference between these properties, and any of them can be used to predict the price of bitcoin.
From the images above, we can see that the data is positively skewed, which infers the number of deviations in bitcoin open, low, high and close prices. This can be attributed to the fact that there has been a huge fluctuation in the price of bitcoin over a very short period. Thus, only close feature was considered in Dataset 1 for the prediction purpose as technical analysis like moving averages or chart patterns often use closing rates to identify trends and patterns in price action.
IV. RESULT AND ANALYSIS
A. ANN
The Dataset 2 was divided into 80% training and 20% testing sets. Because the price range varied so much, we used the StandardScaler Library to scale down the values and the Adam optimizer to optimize them. The summary of the model is as follows:
Table 1. ANN Model’s Summary
Sr. No |
Layers |
Parameters |
Layer 1 |
ANN_1 |
units=6, activation='relu' |
Layer 2 |
ANN_2 |
units=6, activation='relu' |
Layer 3 |
ANN_3 |
units=6, activation='relu' |
Layer 4 |
Dense |
units=1 |
Table 2. ANN Evaluation metrics
Evaluation metric |
Value |
R Square value |
0.9997238985920947 |
RMSE Value |
65.262 |
MSE Value |
4259.126 |
B. LSTM
In this case, Dataset 1 was separated into 90% and 10% training and test sets, respectively. MinMaxScaler library was utilised for price standardisation, while Adam optimizer was employed for optimisation.
The model's window size for the values it would evaluate for predicting the price was 90 days. The model's summary is given below, along with the prediction graph:
Table 3. LSTM Model’s Summary
Sr. No |
Layers |
Parameters |
Layer 1 |
LSTM_1 |
units=80 |
Layer 2 |
LSTM_2 |
units=80 |
Layer 3 |
LSTM_3 |
units=80 |
Layer 4 |
LSTM_4 |
units=80 |
Layer 5 |
Dense |
units=1 |
Table 4. LSTM Evaluation metrics
Evaluation metric |
Value |
R Square value |
0.8750911862141375 |
RMSE Value |
1064.830 |
MAPE Value |
0.043 |
D. Graphical User Interface (GUI)
The GUI for predicting the bitcoin price in real time has been implemented with the help of streamlit app framework and yfinance module available in python.
Web applications are becoming an increasingly popular way to share data projects with other users. This is due to the emergence of easy-to-use Python libraries such as Streamlit and the ease of deploying web applications in the cloud for free.
Streamlit is an open-source Python framework for building machine learning and data science web applications [10]. With Streamlit, you can write an app just like you write python code and view results in a web application seamlessly.
The screenshots of the web app are as follows:
As it can be seen from the above GUI figures which display the price prediction of bitcoin, the model is predicting the price in a very close range with a minimal difference of 260.6 dollars. As the price of bitcoin is volatile in nature, hence fluctuations in the price are often seen due to which not exact prediction can be done.
Deep learning techniques were utilised in this work to handle the real-time challenge of predicting digital currency prices. Several data sets have been explored in order to forecast Bitcoin values. One that analyses multiple components of the blockchain and their link to price to anticipate the price, but because these values are not easily available, developing a perfect forecaster may cost money or require authorisation for scraping. However, this does not mean that such a forecaster cannot be developed in the near future. As previously indicated, for exploratory data analysis, we employed this dataset for price prediction using ANN, which yielded a 99% accuracy. The Open, High, Low, and Close prices of bitcoin are included in the other data set. Exploratory data analysis was performed on this data set to infer the hidden patterns of bitcoin price fluctuations during the covid period, and ANOVA was also performed to conclude that all of these price volumes have no significant difference between them and any column can be used to build a model; additionally, data processing and filtering were performed effectively to obtain accurate, reliable, and consistent information. The RNN and LSTM deep learning models are used to generate a forecast based on the closing price of Bitcoin over a 90-day period. It was shown that the RNN model outperformed the LSTM with accuracy of 0.97 versus 0.87 and RMSE of 504.568 versus 1064.830. Finally, a graphical user interface (GUI) was made available to users, enabling an interactive experience for real-time bitcoin price prediction. To improve the functionalities, the following features can be enhanced and added: 1) Anyone with access to values like the closing price of bitcoin or any other coin can use the forecaster to anticipate the price for the very following day. 2) One can use hourly bitcoin price data to examine a different viewpoint and increase accuracy. 3) A recommendation system for several crypto currencies can be created to help people make smart financial decisions.
[1] Suhwan Ji, Jongmin Kim and Hyeonseung Im \'A Comparative Study of Bitcoin Price Prediction Using Deep Learning\' on 25 September 2019. [2] Xiangxi Jiang ‘Bitcoin Price Prediction Based on Deep Learning Methods’ in February, 2020. [3] Lekkala Sreekanth Reddy and Dr.P. Sriramya \'A Research On Bitcoin Price Prediction Using Machine Learning Algorithms\' on 4 April 2020. [4] Rahmat Albariqi and Edi Winarko ‘Prediction of Bitcoin Price Change using Neural Networks’ on 27 April, 2020. [5] Samiksha Marne, Shweta Churi, Delisa Correia and Joanne Gomes \'Predicting Price of Cryptocurrency - A Deep Learning Approach\' on 22 February, 2021. [6] E. Mahendra, H. Madan, S. Gupta and S. V. Singh ‘Bitcoin Price Prediction Using Deep Learning and Real Time Deployment’ on 1 March, 2021. [7] Temesgen Awoke Muniye, Minakhi Rout, Lipika Mohanty, and Suresh Chandra Satapathy \'Bitcoin Price Prediction and Analysis Using Deep Learning Models\' in 2021. [8] B. Revathi, Meena. M, Monica. S and S. V. Nayana Kumari ‘Bitcoin Price Prediction Using Deep Learning’ in May 2022. [9] Ziyuan Lin, Sheikh Srijon and Jubayer Ibn Hamid ‘Bitcoin Price Prediction’ in 2022. [10] ‘Streamlit Documentation’ -https://docs.streamlit.io/
Copyright © 2023 Dr. Gayatri Hegde, Jayashree Arunan, Faseeha Modak, Anushree Nair, Komal Sangal. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET50481
Publish Date : 2023-04-15
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here