top of page
  • Sampat kumar

Cryptocurrency (Ethereum) Price Prediction Using Python

Updated: May 23, 2021

Recently the word cryptocurrency is being popular all over the internet and has got so much attention all over the place.

What is a cryptocurrency and why it's prediction important ?

A cryptocurrency is a virtual or digital currency that is secured with the aid of using cryptography, which makes it almost not possible to counterfeit or double-spend.

Over the past few years, Ethereum has received a lot of attention from the Media and the public due to its recent price hike. As Ethereum Has been viewed as a financial asset and is traded through many cryptocurrency exchanges like a stock market, many researchers Have studied various factors that affect the price of Ethereum and the patterns behind its fluctuations using various analytical and predictive methods.

Predicting the price of this coin will have an idea of the growth in the upcoming years.

Here is what we are going to cover in this article,

1. Collecting the required data about Ethereum Cryptocurrency

2. Scraping data from Yahoo Finance website using inbuilt libraries of python.

3. With machine learning, by using the Facebook Prophet Library. Predicting the future pricing over the years of Ethereum.

Importing Libraries And Collecting The Required Data:

The first step is to import the required libraries which are going to be used in this process. Libraries in python namely Pandas, Matplotlib, Datetime, and other requirements are imported.

To scrap the data, we are going to use an inbuilt library in pandas called ‘get_data_yahoo’.This library scrapes the data directly from

Yahoo Finance website. As we are going to predict ethereum. We are going to give the syntax as follows.

df = reader.get_data_yahoo('ETH-USD')

After loading the data, let's check if the data is imported correctly.

The data has been imported successfully and we can do some Feature Engineering accordingly if needed.

Facebook Prophet Library:

Several predictive methods have been studied and compared for the task Ethereum price prediction using machine learning.

The Facebook Prophet Library is an open-source additive regression model made available by Facebook for time-series predictions. While there is a more advanced version of the Prophet like NeuralProphet Which is based on neural networks, I will be using the simplified Version which uses machine learning techniques for the Ethereum Price prediction task.

To install this library, use a pip command,

pip install fbprophet

Now let’s import the library.

from fbprophet import Prophet

The Facebook Prophet model only works with data that contains a string time-series format in a column called “ds” and continuous values in a column called “y”. So we need to create the data accordingly.

Now let's fit the data into our model.


Let’s make predictions. The make_future_dataframe method in the Prophet model has a parameter named ‘periods’, we can use it to set the amount of time we need to make predictions. Now let’s make predictions for the next 365 days.

future = model.make_future_dataframe(periods=365)

Now we have set the amount of time period for the data,

Let’s Forecast and Visualise the data accordingly.

forecast = model.predict(future)
plt.xlabel("Time Period")
plt.ylabel("Price In USD")

After executing the code, we get a picture of how the trend of Ethereum is going to be in the next upcoming year.

The Prophet Library for time-series predictions has been giving accurate results and predictions in various research fields in Machine Learning and other aspects related to time series.


There are several interpretations of the forecasts calculated by the Facebook prophet model like the current momentum for the Ethereum prices has sky-rocketed, and still, we are likely to see a very rapid increase in the prices of Ethereum.

I hope you liked this article on Ethereum Price Prediction with Python using Machine Learning. Feel free to ask your valuable questions in the comments section below.

For any suggestions, you can always reach out to me on LinkedIn :

Disclaimer: The article on Ethereum price analysis model demonstrates our capability in python programming. The article neither suggest any financial advice, nor do we claim any responsibility for the financial risks of our readers.

Recent Posts

See All


Post: Blog2_Post
bottom of page