Cryptocurrency Price Prediction Using Machine Learning Algorithm
Cryptocurrency Price Prediction Using Machine Learning Algorithm
2022 10th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions) (ICRITO) | 978-1-6654-7433-7/22/$31.00 ©2022 IEEE | DOI: 10.1109/ICRITO56286.2022.9964870
Abstract - In today’s world we can see the trend of Ethereum is a decentralized & open source blockchain
cryptocurrency is constantly increasing every day. In the system that has its own cryptocurrency called Ether. The
financial sector, cryptocurrency has become a huge topic and the Ethereum was launched on July 30, 2015. The team who
right prediction has become more important to gain profits. For created Ethereum are known individuals which include Mihai
determining the right prediction with good accuracy, we Alise, Anthony di Lorio, Charles Hoskinson, Joseph Lubin,
performed deep analysis on dataset to understand the market Gavin Wood, and Jeffrey Wilke. How Ethereum was different
behavior by using different machine learning algorithms like from bitcoin because Ethereum is making this possible by
Linear Regression, Random Forest Regressor, Gradient Boosting providing developers the tools to build decentralized
Regressor, and XGBoost to predict the daily price behavior of
applications. Ethereum is an open software platform based on
top 4 cryptocurrencies like Bitcoin, XRP, Ethereum, and Stellar
blockchain technology that enables developers to build &
using these machine learning algorithms. Our experimental
result reaches to 95-97 percent validation accuracy.
deploy decentralized applications.
XRP called Ripple is a Cryptocurrency and a digital
Index Terms – Cryptocurrency, Machine Learning. payment network for financial transactions. Ripple company
and the network, and XRP is the cryptocurrency token. It uses
I. INTRODUCTION a centralized system with the help of a banking system, but its
Cryptocurrency are the virtual currencies which uses transaction is recorded on a public ledger. Ripple was built for
cryptography to achieve security. This is decentralized as well Global Payment & it allows users to send money at a very low
as open source and uses the peer-to-peer functionality. cost & fast. It was released in 2012 & was co-founded by Chris
Cryptocurrencies typically employ a very sophisticated Larsen and Jed McCaleb.
cryptographic algorithm which requires a computer-connected Stellar Lumens (XLM) is the built-in token of the stellar
network to perform costly mathematical operations [1]. blockchain and open-sourced distributed & community-owned
Cryptocurrencies usually have built-in cryptography network used to facilitate cross-asset transfers. It runs on a
applications in their design. Currently, people are using network of decentralized servers which is based on distributed
cryptocurrencies to exploit a new type of economy, because of ledger that is updated every few seconds. The founder of stellar
the cheaper, online, and anonymous trading methods. was Jed McCaleb & who launched in 2014. It was also built
Cryptocurrencies and their prices can be found at for Global Payment as like Ripple (XRP) & it allows users to
coinmarketcap website, which lists more than 2175 exchange fiat-based currencies and between cryptocurrencies.
cryptocurrencies of various types. Cryptocurrencies include The user can send any currency that they own to anyone else in
certain computer agreements outside of any government a different currency.
regulation. These currencies are unregulated and highly
volatile. As a result, it can immediately lower the price Prediction of cryptocurrency returns using machine
overnight. These currencies have strong volatility in their learning by E. Akyildirim, A. Goncu, and A. Sensoy [3]. In this
prices, as they are largely based on public perception. It is study, the estimates of twelve liquid cryptocurrency are
therefore very difficult to perform a related risk assessment at analysed on daily level and minute waves using algorithms to
any time with rising prices [2]. separate machine learning that includes support vector
machines, logistic regression, and artificial neural networks,
Bitcoin is a decentralized digital currency that is based on and random forests with past price information and technology.
peer-to-peer networks & cryptography. It was created in 2008 Indicators of as model features. The accuracy level of the four
by a person or a group of people, using the name of Satoshi algorithms total more than 50% of the total limit for all
Nakamoto & later launched in January 2009, it was the first cryptocurrency and at all times indicating that there is a
cryptocurrency at that time. Bitcoin was created for people to trending speculation of prices at some level in the
send money using the internet. Bitcoin uses a proof of work cryptocurrency market. Machine division algorithms achieve
algorithm to verify the transactions & the users who take approximately predictive accuracy of 55–65% on average
participate to validate the transactions will get some reward as frequencies at daily level or minute .
bitcoin.
Authorized licensed use limited to: SHIV NADAR UNIVERSITY. Downloaded on December 09,2022 at 11:11:48 UTC from IEEE Xplore. Restrictions apply.
Price prediction using machine learning: An approach to to current pricing. Three details from historical cryptocurrency
sample dimension engineering by Z. Chen, C. Li, and W. data, including Bitcoin (BTC), Litecoin (LTC), and Ethereum
SunBitcoin [4]. Bitcoin daily price forecast, while the (ETH), were used to test our proposed algorithm. The DRL
fundamental trading functionalities found in cryptocurrency application's Bitcoin testing reveals that the investor made
trading are used to predict price interval for 5 minutes. 14.4% profit in one month. Similarly, the Litecoin and
Mathematical methods that include Logistic retrospective and Ethereum tests were also completed with 74% and 41% profit,
Bitcoin Previous Disclosure evaluation for daily price respectively.
predictions with high-quality features reach 66% accuracy,
exceeding the efficiency of the most sophisticated machine. II. PROPOSED WORK
We do better in comparison to the benchmark daily price
predicting results, with the maximum accuracy of mathematical The dataset is taken from the kaggle.com name as (Every
techniques and machine learning algorithms of 66% and cryptocurrency market price). Which contains the data of 13
65.3%, respectively. Machine learning models include Random cryptocurrencies in the market, but we take top 4
Forest, XGBoost, Quadratic Discriminant Analysis, Vector cryptocurrency according to its rank given in the dataset itself.
Support Machine and 5 Minute Bitcoin Short Term These are the top 4 cryptocurrency -Bitcoin, XRP, Ethereum,
Predictability Prediction is higher than mathematical methods, and Stellar. And on the top of it we have applied 4 machine
with accuracy up to 67.2% . algorithms such as Linear Regression, Random Forest
Regressor, Gradient Boosting Regressor and XGBoost to build
Forecasting and trading cryptocurrencies with machine a model for accurate prediction of daily price. In order to get
learning under changing market conditions by H. Sebastião and better results, we have added 2 more columns in our dataset
P. Godinho [5]. In this study, the forecasts for three significant under data pre-processing step hlc_average and ohlc_average
cryptocurrencies—Bitcoin, Ethereum, and Litecoin Models— in our deep analysis we found a significant improvement in our
are examined that are validated in an unpredictable period and results.
tested in the bear market period, allowing for positive
predictions or market guidance changes between validation and In our Dataset, we have 13 columns. These are slug,
test times. Scheduling methods and retrospective methods use symbol, name, date, ranknow, open, high, low, close, volume,
specifications from trading activity and network activity from market, close_ratio, and spread. The short description of these
August 15, 2015 to March 03, 2019, with a test sample starting columns slug is another name of a particular currency, the
April 13, 2018. During the test, five of the 18 models were symbol is an identifier symbol, ranknow is the current rank of
successful. prices less than 50%. Trading strategies are built on cryptocurrency, open is starting price of a particular date, high
combining models. The collection assumes that five models is the highest price of a particular date, close is the value at end
that produce the same signals (Ensemble 5) achieve the optimal of the day, volume is the quantity of transaction in a day, the
performance of Ethereum and Litecoin, with Sharpe annual market is the total value of the market in a day, close_ratio is
rates of 80.17% and 91.35% with annual return (after the the daily close rate, min-maxed with the high and low values
estimated trading costs for round trip. -0.5%) of 9.62% and for the day. close_ratio = (close-low)/(high-low), spread is the
5.73%, respectively. difference between the high and low value in day. Along with
these 13 columns we also add 2 more columns and with both
Stochastic neural networks for cryptocurrency price columns, we really find significant differences in our
prediction by P. Jay, V. Kalariya, P. Parmar, S. Tanwar, N. experimental result. The first one is hlc_average this is the
Kumar, and M. Alazab [6]. In this paper, the number of average of high, low, and close values of a day
Cryptocurrencies using a stochastic neural network model was hlc_average=(high+low+close)/3. Another one is ohlc_average
predicted. They had introduced a strategy to dynamically read this is the average of the open, high, low, and close values of a
the market response pattern for any updated information. The day ohlc_average=(open+high+low+close)/4. After doing data
results show that the proposed hypothesis was not only pre-processing we have separated the top 4 cryptocurrencies,
effective but also effective in eliminating market volatility. we extract top 4 cryptocurrencies from the dataset which are
Almost all stochastic versions of neural net models work much Bitcoin, XRP, Ethereum, and Stellar.
better than deterministic versions. The development rate
associated with using stochastic neural networks in normal Once the data pre-processing and the separation of the top 4
neural networks is 1.56% in Norm database = = 0: 1, 1.73% in crypto-currencies is done then in all cases, we firstly divide our
= 0:12 and 1.76% if set as readable parameter. Improvement is dataset into two-parts- train and test data in a ratio of 80% and
most important in the UN database where the related 20% respectively second step is to apply machine learning
development rate is 3.91% in = 0: 1, 4.52% in = 0:12 and algorithms in order to train our cryptocurrency ml model. For
7.41% when set as readable parameter. that, we have applied four different machine learning
algorithms Linear Regression, Random Forest Regressor,
Recommending cryptocurrency trading points with deep Gradient Boosting Regressor, and XGBoost. For every
reinforcement learning approach by O. Sattarov [7] The stock algorithm, we have calculated R-square, Mean Absolute Error,
market requires adequate research, which can give investors and Mean Squared Error for checking the performance and
further assurance of success. We have attempted to apply a accuracy of our trained model. After finding the R-square,
machine learning technique called deep reinforcement learning Mean Absolute Error, and Mean Squared Error for all the
(DRL) in the stock market to solve this problem. As a result, algorithms we have performed the comparison and evaluation
we created an app that tracks past price changes and responds to check which one of the algorithms is giving us the best
Authorized licensed use limited to: SHIV NADAR UNIVERSITY. Downloaded on December 09,2022 at 11:11:48 UTC from IEEE Xplore. Restrictions apply.
result. This whole architecture was applied over all four Figure 2 shows the actual value in blue colour and
cryptocurrencies and in every crypto. predicted value in orange colour between value on y axis and
days on x axis by using Random Forest prediction of Bitcoin
III. EXPERIMENTAL RESULTS daily price.
Authorized licensed use limited to: SHIV NADAR UNIVERSITY. Downloaded on December 09,2022 at 11:11:48 UTC from IEEE Xplore. Restrictions apply.
TABLE IV. STELLAR EVALUATION METRICS IV. CONCULSION
Algorithm R- Mean Absolute Mean Squared In this study, we have made the architecture of
Square Error Error cryptocurrency daily price prediction by using many
Linear Regression 0.50 0.08 0.02 cryptocurrencies. Our technical analysis journey is starting
Random Forest 0.95 0.02 0.00 from the data collection and data pre-processing ending up
Regressor with building a cryptocurrency price prediction ml model
Gradient Boosting 0.94 0.03 0.00
which reaches up to 95-97% prediction accuracy benchmark
Regressor
XGBoost Regressor 0.95 0.02 0.00
and performing a comparison between several algorithms. Our
analysis shows by adding 2 columns average of high, low, and
close & average of open, high, low, and close make a
significant difference in predicting accurate price prediction by
From Table 4 it clear that Random Forest Regressor and using the Random Forest algorithm. As we all know
giving us best result with 95% accuracy along with high R2 cryptocurrency trends are constantly increasing and predicting
score, low Mean Absolute Error, and low Mean Squared Error. correct prediction is crucial for earning profits. Now we can
Figure 4 shows the actual value in blue colour and see governments are also recognizing cryptocurrency trade and
predicted value in orange colour between value on y axis and they are also making crypto mining centers to earn money and
days on x axis by using Random Forest prediction of Bitcoin gain profits. So, predicting the right price of the currency will
daily price. make a huge difference in gaining profits. And our
experimental analysis will improve the existing system and
The analysis and results show that Random Forest people will get an accurate prediction. This study shows that
Regressor is giving the best results in the case of every Random Forest Regressor model is predicting the price of a
cryptocurrency. Table 1 show the evaluation metrics of a cryptocurrency with very high accuracy.
Bitcoin through this, It is clear that Random Forest gives us
97% accuracy. Table 2 show the evaluation metrics of an XRP REFERENCES
through this, It is clear that Random Forest gives us 97%
[1] K.-K. R. Choo, “Cryptocurrency and virtual currency: Corruption and
accuracy. Table 3 show the evaluation metrics of Ethereum money laundering/terrorism financing risks?,” in Handbook of digital
through this, It is clear that Random Forest gives us 95% currency, Elsevier, 2015, pp. 283–307.
accuracy. Table 4 show the evaluation metrics of a Stellar [2] R. Chowdhury, M. A. Rahman, M. S. Rahman, and M. R. C. Mahdy,
through this, It is clear that Random Forest gives us 95% “An approach to predict and forecast the price of constituents and
accuracy. Overall, the cryptocurrency prediction accuracy of index of cryptocurrency using machine learning,” Phys. A Stat. Mech.
its Appl., vol. 551, p. 124569, 2020.
Random Forest is 95-97%. [3] E. Akyildirim, A. Goncu, and A. Sensoy, “Prediction of cryptocurrency
returns using machine learning,” Ann. Oper. Res., vol. 297, no. 1, pp.
3–36, 2021.
[4] Z. Chen, C. Li, and W. Sun, “Bitcoin price prediction using machine
learning: An approach to sample dimension engineering,” J. Comput.
Appl. Math., vol. 365, p. 112395, 2020.
[5] H. Sebastião and P. Godinho, “Forecasting and trading
cryptocurrencies with machine learning under changing market
conditions,” Financ. Innov., vol. 7, no. 1, pp. 1–30, 2021.
[6] P. Jay, V. Kalariya, P. Parmar, S. Tanwar, N. Kumar, and M. Alazab,
“Stochastic neural networks for cryptocurrency price prediction,” Ieee
access, vol. 8, pp. 82804–82818, 2020.
[7] O. Sattarov et al., “Recommending cryptocurrency trading points with
deep reinforcement learning approach,” Appl. Sci., vol. 10, no. 4, p.
1506, 2020.
Authorized licensed use limited to: SHIV NADAR UNIVERSITY. Downloaded on December 09,2022 at 11:11:48 UTC from IEEE Xplore. Restrictions apply.