0% found this document useful (0 votes)
33 views5 pages

Final Paper

This study explores the use of LSTM and Prophet algorithms for forecasting Bitcoin prices, highlighting the volatility of the cryptocurrency market. The research indicates that traditional forecasting methods are less effective due to the lack of seasonality in Bitcoin prices, and concludes that the Prophet model outperforms LSTM in predictive accuracy. The paper also discusses the importance of data preprocessing and the evaluation metrics used to assess model performance.

Uploaded by

Abhishek Gaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views5 pages

Final Paper

This study explores the use of LSTM and Prophet algorithms for forecasting Bitcoin prices, highlighting the volatility of the cryptocurrency market. The research indicates that traditional forecasting methods are less effective due to the lack of seasonality in Bitcoin prices, and concludes that the Prophet model outperforms LSTM in predictive accuracy. The paper also discusses the importance of data preprocessing and the evaluation metrics used to assess model performance.

Uploaded by

Abhishek Gaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Bitcoin Forecasting Using LSTM and PROPHET

Abstract— Cryptocurrency, especially Bitcoin, is one assumptions and require data that can be broken down
of the most volatile markets today and has gained a into trend, seasonal and noise to be effective (4). This
lot of attention from investors across the globe. type of methodology is more suitable for a task such as
Cryptocurrency, being a novel technique for forecasting sales where seasonal effects are present. Due
transaction system, has led to a lot of confusion to the lack of seasonality in the Bitcoin market and its
among the investors and any rumors or news on high volatility, these methods are not very effective for
social media has been claimed to significantly affect this task. Given the complexity of the task, deep learning
the prices of cryptocurrencies. This study focuses on makes for an interesting technological solution based on
using the LSTM and Prophet algorithms to forecast its performance in similar areas. Tasks such as natural
Bitcoin prices accurately. By analyzing historical language processing which are also sequential in nature
Bitcoin price data, the study aims to capture patterns and have shown promising results (5). This type of task
and dependencies to provide valuable insights and uses data of a sequential nature and as a result is similar
predictive models for investors, traders, and analysts to a price prediction task. The recurrent neural network
in the volatile cryptocurrency market. The model (RNN) and the long short term memory (LSTM) flavour
was trained and evaluated using performance of artificial neural networks are favoured over the
metrics such as RMSE and MAE, From the result traditional multilayer perceptron (MLP) due to the
analysis we can say that prophet outperforms LSTM. temporal nature of the more advanced algorithms (6).
The aim of this research is to ascertain with what
Keywords—Bitcoin, price prediction, accuracy can the price of Bitcoin be predicted using
forecasting,cryptocurrency , data mining. machine learning.

[Link] PROPHET Forecast Model


Time series prediction is not a new phenomenon.
Prediction of mature financial markets such as the stock PROPHET is an open source software that is available
market has been researched at length (1)(2). Bitcoin in Python and R for forecasting time series data.
presents an interesting parallel to this as it is a time PROPHET is published by Facebook’s Core Data
series prediction problem in a market still in its transient Science team. It depends on a contribution model where
stage. As a result, there is high volatility in the market non-linear trends are fit with weekly and yearly
(3) and this provides an opportunity in terms of seasonality and plus holidays. PROPHET is strong to
prediction. In addition, Bitcoin is the leading missing data, capturing the shifts in the trend and large
cryptocurrency in the world with adoption growing outliers. In addition, it gets a reasonable estimate of the
consistently over time. Due to the open nature of Bitcoin mixed data without spending manual effort [2].
it also poses another paradigm as opposed to traditional
financial markets. It operates on a decentralised, peer-to- Purely automatic prediction techniques are not flexible
peer and trustless system in which all transactions are to combine useful assumptions because they are fragile.
posted to an open ledger called the Blockchain. This Furthermore, high quality estimates are not easy to
type of transparency is unheard of in other financial make, requiring special data science skills. All these are
markets. determined as working motivation for PROPHET
because it wants to make the high-quality predictions
Traditional time series prediction methods such as Holt- easier.
Winters exponential smoothing models rely on linear
PROPHET is optimized for business forecast that are single administrator. Block chain technology is used in
observed on Facebook. For example, time, daily, weekly the cryptocurrency, the cryptocurrency block chain is the
observations of history, within a year, large outliers, chain of the blocks, where each block contains a hash of
trend changes, missing observation and trends that are the preceding block till the top block of the chain. A
non-linear growth curves [8]. network gets formed by the blocks where block chain
represents a public ledger of the transaction happened in
PROPHET framework has its own special data frame to the network. Bitcoin and other cryptocurrencies have
handle time series and seasonality easily. The data frame seen a rise in the attention of different sectors in the last
needs two basic columns. One of these columns is ”ds” few years. It has been in the eyes of everyone for the
and this column stores date time [Link] other column perks. It offers to be comparable to a fiat currency
is ”y” and it stores the corresponding values of the time structure of banking sector, stakeholders, government
series in the data frame. Thus, the framework can work and individual investors. Although research and
on seasonal time series quiet well and it provides some awareness about cryptocurrencies or digital currency are
options to handle seasonality of the dataset. These very less and it is on the initial stage, this paper provides
options are yearly, weekly and daily seasonality. Due to an important look and guide about the different aspects
providing these options, a data analyst can choose the of cryptocurrency. The authenticity of this paper is on
available time granularity for the forecast model on the the discussion at various intervals of law and regulation
dataset [8]. with the consumption of high energy, possibility of
crash collisions and security threat on the network
II. LITERATURE REVIEW attacks. The relative observations on future of
applications of bitcoin can be seen throughout the paper.
In (Monisha Mittal, et al., 2022) [1], Bitcoin is the
world's first decentralized digital crypto currency which In (Grace. LK. Joshila , et. al. 2021) [3], This work aims
does not need an intermediary like a bank and is most to enhance the existing analysis made on bitcoin and
secure because of block chain implementation. The price predict the price of a Bitcoin by taking some parameters
of a single bitcoin has been increasing drastically since into consideration. After a huge research taking all the
2010 as a form of digital gold. Thus, bitcoin is very parameters which affect the price of the bitcoin value
volatile as its price changes every second which is a high and identified daily changes in the bitcoin market. In
risk for investors. The purpose of this paper is to analyse this work all the data consists of different features over
the machine learning algorithms which are of maximum the past few year's daily records. This work is started by
efficiency in predicting the bitcoin price. I have explored gaining all the information that all are needed to predict
many machine learning regression-based algorithms to the bitcoin price. All the information was collected from
build a prediction model for analysing future bitcoin the past few years and implemented the data into this
prices. This paper is based on a deep learning-based work. In this work Support Vector Machine (SVM)
artificial neural network model named GRU (Gated algorithm is used as it gives much more accuracy better
Recurrent Unit) to predict bitcoin future prices than previous algorithms. This study predicts sign of
accurately based on past price information available. change in the price of bitcoin to the investors so that
Root Mean Square Error and Mean Absolute Percent they can invest in this easily and also for the newcomers
Error are the key performance indicators to measure to this market or business.
forecast accuracy.
In (Akhilesh Kumar Singh, et. al. 2022) [2], It has been III PROBLEM DEFINITION
a decade since the formation of the first cryptocurrency
in the world. Bitcoin was The first ever crypto invented Cryptocurrencies such as Bitcoin, Ethereum, etc.
by Satoshi Nag moto in 2008. It is a digital currency or generated significant attention in 2017. Cryptocurrencies
virtual currency which is not controlled by the central have significant volatility as there is rampant
government and operates without a central bank or speculation. Given the high variance in prices, can data
science methods be used to model the market dynamics?

There are many directions this project could


[Link] Strategy Can an effective trading strategy
be found? We are looking for a demonstration of sound
data science principles here.

Market Analysis Given there is now option trading on


certain cryptocurrencies, is it possible to create a
volatility index for cryptocurrencies such as VIX? Is
variance of this market infinite and therefore not
predictable? Are there any rational reasons for investing
that you can justify using data science? Figure 1. Proposed Block diagram

Arbitrage Given the number of different currencies and Our Steps or Algorithm Steps will follow:
different markets, how efficient is the market? Are there
1. Dataset:- we first collect and download the data
arbitrage opportunities? Can evidence be found of
set from publicly available datasets.
arbitrage?
2. Data Preprocessing: Data preprocessing is the
most important phase in prediction models as
The objective of this proposed system is to develop an
the data consists of ambiguities, errors,
application which will predict the bitcoin prices in future
redundancy which needs to be cleaned
with decent accuracy. This allows the investors to invest
beforehand. The data gathered from multiple
wisely in bitcoin trading as the prices of bitcoin have
sources first is aggregated and then cleaned as
gone up to an exaggerating amount in the last ten years.
the complete data collected is not suitable for
modeling purposes. The records with unique
IV PROPOSED WORK values do not have any significance as they do
The Bitcoin’s value varies just like any other stock . not contribute much in predictive modeling.
There are many algorithms used on stock market data Fields with too many null values also need to be
for price forecast. However, the parameters affecting discarded.
Bitcoin are different. Therefore it is necessary to 3. Data Splitting: Data is splitted based on date
foretelling the value of Bitcoin so that correct data till 2020 we keep for training the model and
investment decisions can be made. The price of Bitcoin other for testing.
does not depend on the business events or intervening 4. Prediction: The rule set will let the model
government authorities, unlike the stock market. Thus, trained on historical dataset and Predict the
to forecast the value we feel it is necessary to leverage future price trend of bitcoins.
machine learning technology to predict the price of
Bitcoin.
V EXPERIMENTAL & RESULT ANALYSIS

Running LSTM & Prophet models requires a lot of time,


All of the software is installed on top of the Python,
which enables for Jupyter Notebook that is used to run
the entire code. Dataset (Bitcoin Historical Data) we
have taken from kaggle , we took CSV files for select
bitcoin exchanges for the time period of Jan 2012 to
December March 2021, with minute to minute updates After splitting the data we can train our machine
of OHLC (Open, High, Low, Close), Volume in BTC learning model on training data and once the model
and indicated currency, and weighted bitcoin build completed we can test the model performance on
test data and evaluate the performance.
price. Timestamps are in Unix time. Timestamps
without any trades or activity have their data fields
filled with NaNs.

Figure 2. Loading the Dataset


Figure 5. Performance Measure for LSTM
Once data has been loaded before preprocessing we can
first explore the data by plotting various charts and
graph to understand the data , in figure 3 we are plotting
the graph based on weighted price to understand the
data.
Figure 6. Performance Measure for Prophet

Performance Evaluation

Two metrics we often use to quantify how well a model


fits a dataset are the mean absolute error (MAE) and the
root mean squared error (RMSE), which are calculated
as follows:

Figure 3. Bitcoin Weighted price graph MAE: A metric that tells us the mean absolute
difference between the predicted values and the actual
After understanding the data we can start preprocessing values in a dataset. The lower the MAE, the better a
it and we first check the missing values in the dataset model fits a dataset.
and we fill the missing values while calculating the MAE = 1/n * Σ|yi – ŷi|
values using various functions, we can check for
duplication as well if there are any duplicates records we where:
can remove them and once the data is completely
processed we can split the dataset into training data and Σ is a symbol that means “sum”
testing dataset. yi is the observed value for the ith observation
ŷi is the predicted value for the ith observation
n is the sample size

RMSE: A metric that tells us the square root of the


average squared difference between the predicted values
and the actual values in a dataset. The lower the RMSE,
the better a model fits a dataset.

It is calculated as:
Figure 4. Splitting the dataset
RMSE = √Σ(yi – ŷi)2 / n [02] Akhilesh Kumar Singh; Manish Raj, "A study of
Analytics and Exploration of Bitcoin Challenges and
where: Blockchain" in 2022 IEEE.
Σ is a symbol that means “sum”
ŷi is the predicted value for the ith observation [03] Grace. LK. Joshila; Asha. P; D. Usha Nandini; G.
yi is the observed value for the ith observation Kalaiarasi, "Price Prediction of Bitcoin" in IEEE 2021.
n is the sample size
[04] Raj Gaurang Tiwari; Ambuj Kumar Agarwal;
Rajesh Kumar Kaushal; Naveen Kumar, “Prophetic
Analysis of Bitcoin price using Machine Learning
Approaches”, in IEEE 2021.

[05] Wenhan Hou; Bo Cui; Ru Li, “A Survey on


Table 1. Performance Comparison Blockchain Data Analysis” in IEEE 2021.

[06] Mayukh Samaddar*1, Rishiraj Roy*1, Sayantani


De*1 and Raja Karmakar# ,“ A Comparative Study of
Different Machine Learning Algorithms on Bitcoin
Value Prediction” in IEEE 2021.

[07] Issac Madan, Shaurya Saluja, Aojia


Zhao,“Automated Bitcoin Trading via Machine
Learning Algorithms”,Department of Computer
Science , Stanford University, Stanford , 2015.

Figure 7. Performance Comparison [08] Brian Vockathaler, “ The Bitcoin Boom: An In


Depth Analysis of The Price Of Bitcoins”, Thesis,
V CONCLUSION University Of Ottawa, Ontario, Canada, June 2017

All in all, predicting a price-related variable is difficult [09] Huisu Jang and Jaewook Lee, “An Empirical Study
given the multitude of forces impacting the market. Add on Modelling and Prediction of Bitcoin Prices with
to that, the fact that prices are by a large extent Bayesian Neural Networks based on Blockchain
dependent on future prospects rather than historic data. Information,”in IEEE Early Access Articles, 2017.
We considered previous Bitcoin transaction in which
price and timestamps are the attributes used to predict [10] F. Andrade de Oliveira, L. Enrique Zárate and M.
the bitcoin price for future, The model was trained and de Azevedo Reis; C. Neri Nobre, “The use of artificial
evaluated using performance metrics such as RMSE and neural networks in the analysis and prediction of stock
MAE, From the result analysis we can say that prophet prices,” in IEEE International Conference on Systems,
outperforms LSTM. Man, and Cybernetics, 2011.

REFERENCES [11] M. Daniela and A. BUTOI, “Data mining on


Romanian stock market using neural networks for price
[01] Monisha Mittal; G. Geetha, "Predicting Bitcoin
prediction”. informatica Economica.
Price using Machine Learning" in IEEE 2022.

You might also like