SlideShare a Scribd company logo
1 of 5
Download to read offline
Analysing 2018's Bitcoin Blood Moon in 5
Minutes with Python
A quick guide to start investigating Bitcoin’s blood bath
with Python
Rafael
Pierre
Jan 3 · 4 min read
uly 495was the last time many people around the world were able to see a lunar
eclipse — an event popularly known in the media as a “blood moon”.
Many ancient civilisations looked at the “blood moon” with a fearful perspective. Inca
people used to interpret the deep red phenomenon as a jaguar attacking and eating the
moon. They believed the jaguar might attack the Earth next, so their people would
shout, shake their spears and make their dogs bark and howl, in hopes to make enough
noise to drive the evil jaguar away.
The year of 495also marked Bitcoin’s 10 years anniversary. Last year, the
cryptocurrency has also had its worse yearly performance in its short history, amassing
a 70% loss. While the Incans are no longer around us, many bitcoin investors have
been certainly barking and howling.
J
Towards Data Science
Get startedDATA SCIENCE MACHINE LEARNING PROGRAMMING VISUALIZATION AI JOURNALISM PICKS
In 2017, bitcoin investors had their honey moon. Has 2018’s bitcoin blood moon
finally marked the end of the line for an investment that was once touted as the
new money?
Investigating Bitcoin Losses with Python
I decided to use Python and Data Science to analyse the losses amassed by bitcoin
(BTC). Python gives freedom and flexibility to visualize bitcoin’s behaviour, calculate
technical indicators, perform fundamentals analysis, run some simulations and most
importantly, act upon obtained insights.
As in any investigation task, we will ask some questions. To answer these questions,
we need to achieve some milestones.
Our main milestones and associated questions are listed below:
Obtaining and Visualizing Bitcoin Price Data: How to use Python to Retrieve
BTC Prices?
Looking at Other Cryptocurrencies: Are other cryptocurrencies correlated with
BTC?
Fundamentals Analysis: How factors such as miners revenue, market cap,
blockchain difficulty and others have influenced BTC price?
Technical Indicators Analysis: Are charts useful for understanding the BTC
losses?
Creating a Performance Dashboard: Can we create a dashboard to monitor all
these insights?
Creating an Alert System: Can we create a platform to generate alerts for BTC
prices and act upon them?
In this post, we will focus on Obtaining Bitcoin Price Data.
Obtaining Bitcoin Price Data
•
•
•
•
•
•
Obtaining Bitcoin Price Data
Quandl is the easiest way of retrieving bitcoin data from the mainstream exchanges.
They provide a Python package that allows easy access to their API with a single line of
code.
The Quandl package can be installed using Python’s package manager:
pip install quandl
It can also be installed using the Anaconda Command Line tool (recommended):
conda install quandl
Once it is installed, using it is as simple as this:
import quandl as qdl
import pandas as pd
btc_usd_bitfinex = qdl.get(‘BITFINEX/BTCUSD’, start_date=’01/01/2018', end_date=’31/12/2018')
Running the above line of code returns a Pandas Dataframe and assigns it to our
btc_usd_bitfinex variable.
As the variable name indicates, in this variable we are storing bitcoin prices from the
Bitfinex exchange obtained from January 1st 2018 until December 31st 2018.
If everything went down correctly, one should get a Pandas DataFrame that looks like
the following:
If you are not familiar with Pandas, do not worry, it is a very friendly Python library for
data analysis. The documentation can be found here.
Visualizing Bitcoin Price Data
Now that we have a Pandas Dataframe with our bitcoin price data, we can easily
visualize it using matplotlib.
In the code below, we will:
Set matplotlib’s theme to dark, resembling charts generated through Bloomberg
terminals
Set our chart size to (20,7)
Set out chart title
Generate our plot using BTC Closing Prices (“Last”)
import matplotlib.pyplot as plt
plt.style.use(‘dark_background’)
plt.figure(figsize=(20,7))
plt.grid(linewidth=0.2)
plt.title(‘BTC x USD (Bitfinex)’)
plt.plot(btc_usd_bitfinex.index, btc_usd_bitfinex.Last)
From the chart, we can notice that:
Data obtained from Bitfinex is good — we don’t have any date with missing data,
which is usual for some other crypto exchanges
We can see that the worst period for BTC in terms of losses was from the beginning
of January to mid February
In mid February, BTC bounced up to approximately USD 12K, reverting part of the
losses
Apparently pronounced resistance levels can be seen in early March, early May and
late July, depicting a downward trend. In mid November, another significant drop
can be spotted
Main Takeaways and Next Steps
In this post, we discussed how to use Python, Quandl and Matplotlib to obtain and
analyse Bitcoin Price data for 2018.
We did some pretty basic, high level analysis of the price of Bitcoin throughout last
year.
•
•
•
•
•
•
•
•
►►► Lisbon bitcoin ethereum and
block chain lissabon portugal
In the next posts, we will deepen our analysis in order to try to understand why this has
happened and how this has happened.
Last, we will try to create a platform to visualize and act upon these insights in an easy,
efficient way.
Rafael V. Pierre is a Data Scientist based in Amsterdam, NL. He is currently an MSc.
candidate in Information Studies, Data Science at the University of Amsterdam. He is
also a Data Science, AI & Analytics Consultant at Weet Analytics, a company helping
companies unlock unique business opportunities out of data.
Bitcoin Python
Data
Science
Towards Data
Science Cryptocurrency
FollowRafael Pierre
Medium member since Dec 2018
Data Science & Analytics Consultant at Weet Analytics.
https://www.linkedin.com/in/rafaelpierre
FollowTowards Data Science
Sharing concepts, ideas, and
codes.
495claps

More Related Content

More from Yulya Smirnova

Fin 403 week 5 flashcards
Fin 403 week 5 flashcards Fin 403 week 5 flashcards
Fin 403 week 5 flashcards Yulya Smirnova
 
Gen 499 general education capstone complete course flashcards
Gen 499 general education capstone complete course flashcards Gen 499 general education capstone complete course flashcards
Gen 499 general education capstone complete course flashcards Yulya Smirnova
 
Eng 221 week 1 dq 1 and dq 2 (uop)
Eng 221 week 1 dq 1 and dq 2 (uop)Eng 221 week 1 dq 1 and dq 2 (uop)
Eng 221 week 1 dq 1 and dq 2 (uop)Yulya Smirnova
 
Hum 176 week 7 individual news media
Hum 176 week 7 individual news mediaHum 176 week 7 individual news media
Hum 176 week 7 individual news mediaYulya Smirnova
 
Bshs 312 models of effective helping
Bshs 312 models of effective helping Bshs 312 models of effective helping
Bshs 312 models of effective helping Yulya Smirnova
 
Checkpoint accounting assumptions
Checkpoint accounting assumptions Checkpoint accounting assumptions
Checkpoint accounting assumptions Yulya Smirnova
 
Psy 301 salinas exam 2
Psy 301 salinas exam 2Psy 301 salinas exam 2
Psy 301 salinas exam 2Yulya Smirnova
 
Centurylink field section 340
Centurylink field section 340 Centurylink field section 340
Centurylink field section 340 Yulya Smirnova
 
Centurylink field lower 340 seat views
Centurylink field lower 340 seat views Centurylink field lower 340 seat views
Centurylink field lower 340 seat views Yulya Smirnova
 
Hcs 341 reading feeds the imagination
Hcs 341 reading feeds the imaginationHcs 341 reading feeds the imagination
Hcs 341 reading feeds the imaginationYulya Smirnova
 
Mgt 311 motivational plan
Mgt 311 motivational planMgt 311 motivational plan
Mgt 311 motivational planYulya Smirnova
 
university of idaho's guide for transfer students
 university of idaho's guide for transfer students university of idaho's guide for transfer students
university of idaho's guide for transfer studentsYulya Smirnova
 
Cmgt 430 (2020) week 3
Cmgt 430 (2020) week 3 Cmgt 430 (2020) week 3
Cmgt 430 (2020) week 3 Yulya Smirnova
 
Section 340 of the code of criminal procedure, 1973
Section 340 of the code of criminal procedure, 1973Section 340 of the code of criminal procedure, 1973
Section 340 of the code of criminal procedure, 1973Yulya Smirnova
 
Ashford his 204 week 1 quiz
Ashford his 204 week 1 quiz Ashford his 204 week 1 quiz
Ashford his 204 week 1 quiz Yulya Smirnova
 
Neurological research brochure psy 340
Neurological research brochure psy 340 Neurological research brochure psy 340
Neurological research brochure psy 340 Yulya Smirnova
 

More from Yulya Smirnova (20)

Fin 403 week 5 flashcards
Fin 403 week 5 flashcards Fin 403 week 5 flashcards
Fin 403 week 5 flashcards
 
Gen 499 general education capstone complete course flashcards
Gen 499 general education capstone complete course flashcards Gen 499 general education capstone complete course flashcards
Gen 499 general education capstone complete course flashcards
 
Eng 221 week 1 dq 1 and dq 2 (uop)
Eng 221 week 1 dq 1 and dq 2 (uop)Eng 221 week 1 dq 1 and dq 2 (uop)
Eng 221 week 1 dq 1 and dq 2 (uop)
 
Hum 176 week 7 individual news media
Hum 176 week 7 individual news mediaHum 176 week 7 individual news media
Hum 176 week 7 individual news media
 
Bshs 312 models of effective helping
Bshs 312 models of effective helping Bshs 312 models of effective helping
Bshs 312 models of effective helping
 
Checkpoint accounting assumptions
Checkpoint accounting assumptions Checkpoint accounting assumptions
Checkpoint accounting assumptions
 
Psyc 3402 flashcards
Psyc 3402 flashcards Psyc 3402 flashcards
Psyc 3402 flashcards
 
Psy 301 salinas exam 2
Psy 301 salinas exam 2Psy 301 salinas exam 2
Psy 301 salinas exam 2
 
Centurylink field section 340
Centurylink field section 340 Centurylink field section 340
Centurylink field section 340
 
Centurylink field lower 340 seat views
Centurylink field lower 340 seat views Centurylink field lower 340 seat views
Centurylink field lower 340 seat views
 
Hcs 341 reading feeds the imagination
Hcs 341 reading feeds the imaginationHcs 341 reading feeds the imagination
Hcs 341 reading feeds the imagination
 
Mgt 311 motivational plan
Mgt 311 motivational planMgt 311 motivational plan
Mgt 311 motivational plan
 
university of idaho's guide for transfer students
 university of idaho's guide for transfer students university of idaho's guide for transfer students
university of idaho's guide for transfer students
 
Mgmt 404 week 5
Mgmt 404 week 5 Mgmt 404 week 5
Mgmt 404 week 5
 
Cmgt 430 (2020) week 3
Cmgt 430 (2020) week 3 Cmgt 430 (2020) week 3
Cmgt 430 (2020) week 3
 
Fin 571 week 4 dq
Fin 571 week 4 dq Fin 571 week 4 dq
Fin 571 week 4 dq
 
Section 340 of the code of criminal procedure, 1973
Section 340 of the code of criminal procedure, 1973Section 340 of the code of criminal procedure, 1973
Section 340 of the code of criminal procedure, 1973
 
Ashford his 204 week 1 quiz
Ashford his 204 week 1 quiz Ashford his 204 week 1 quiz
Ashford his 204 week 1 quiz
 
Hcs 539 career begins
Hcs 539 career beginsHcs 539 career begins
Hcs 539 career begins
 
Neurological research brochure psy 340
Neurological research brochure psy 340 Neurological research brochure psy 340
Neurological research brochure psy 340
 

Recently uploaded

Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...ShrutiBose4
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCRashishs7044
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyotictsugar
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckHajeJanKamps
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCRashishs7044
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africaictsugar
 
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu MenzaYouth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menzaictsugar
 
India Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample ReportIndia Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample ReportMintel Group
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Anamaria Contreras
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCRashishs7044
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCRashishs7044
 
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / NcrCall Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncrdollysharma2066
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Pereraictsugar
 
Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03DallasHaselhorst
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfJos Voskuil
 
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCRashishs7044
 
International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...ssuserf63bd7
 

Recently uploaded (20)

Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyot
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africa
 
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu MenzaYouth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
 
India Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample ReportIndia Consumer 2024 Redacted Sample Report
India Consumer 2024 Redacted Sample Report
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR
 
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / NcrCall Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Perera
 
Call Us ➥9319373153▻Call Girls In North Goa
Call Us ➥9319373153▻Call Girls In North GoaCall Us ➥9319373153▻Call Girls In North Goa
Call Us ➥9319373153▻Call Girls In North Goa
 
Corporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information TechnologyCorporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information Technology
 
Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdf
 
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
 
Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)
 
International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...
 

Lisbon bitcoin, ethereum and block chain lissabon, portugal

  • 1. Analysing 2018's Bitcoin Blood Moon in 5 Minutes with Python A quick guide to start investigating Bitcoin’s blood bath with Python Rafael Pierre Jan 3 · 4 min read uly 495was the last time many people around the world were able to see a lunar eclipse — an event popularly known in the media as a “blood moon”. Many ancient civilisations looked at the “blood moon” with a fearful perspective. Inca people used to interpret the deep red phenomenon as a jaguar attacking and eating the moon. They believed the jaguar might attack the Earth next, so their people would shout, shake their spears and make their dogs bark and howl, in hopes to make enough noise to drive the evil jaguar away. The year of 495also marked Bitcoin’s 10 years anniversary. Last year, the cryptocurrency has also had its worse yearly performance in its short history, amassing a 70% loss. While the Incans are no longer around us, many bitcoin investors have been certainly barking and howling. J Towards Data Science Get startedDATA SCIENCE MACHINE LEARNING PROGRAMMING VISUALIZATION AI JOURNALISM PICKS
  • 2. In 2017, bitcoin investors had their honey moon. Has 2018’s bitcoin blood moon finally marked the end of the line for an investment that was once touted as the new money? Investigating Bitcoin Losses with Python I decided to use Python and Data Science to analyse the losses amassed by bitcoin (BTC). Python gives freedom and flexibility to visualize bitcoin’s behaviour, calculate technical indicators, perform fundamentals analysis, run some simulations and most importantly, act upon obtained insights. As in any investigation task, we will ask some questions. To answer these questions, we need to achieve some milestones. Our main milestones and associated questions are listed below: Obtaining and Visualizing Bitcoin Price Data: How to use Python to Retrieve BTC Prices? Looking at Other Cryptocurrencies: Are other cryptocurrencies correlated with BTC? Fundamentals Analysis: How factors such as miners revenue, market cap, blockchain difficulty and others have influenced BTC price? Technical Indicators Analysis: Are charts useful for understanding the BTC losses? Creating a Performance Dashboard: Can we create a dashboard to monitor all these insights? Creating an Alert System: Can we create a platform to generate alerts for BTC prices and act upon them? In this post, we will focus on Obtaining Bitcoin Price Data. Obtaining Bitcoin Price Data • • • • • •
  • 3. Obtaining Bitcoin Price Data Quandl is the easiest way of retrieving bitcoin data from the mainstream exchanges. They provide a Python package that allows easy access to their API with a single line of code. The Quandl package can be installed using Python’s package manager: pip install quandl It can also be installed using the Anaconda Command Line tool (recommended): conda install quandl Once it is installed, using it is as simple as this: import quandl as qdl import pandas as pd btc_usd_bitfinex = qdl.get(‘BITFINEX/BTCUSD’, start_date=’01/01/2018', end_date=’31/12/2018') Running the above line of code returns a Pandas Dataframe and assigns it to our btc_usd_bitfinex variable. As the variable name indicates, in this variable we are storing bitcoin prices from the Bitfinex exchange obtained from January 1st 2018 until December 31st 2018. If everything went down correctly, one should get a Pandas DataFrame that looks like the following: If you are not familiar with Pandas, do not worry, it is a very friendly Python library for data analysis. The documentation can be found here. Visualizing Bitcoin Price Data Now that we have a Pandas Dataframe with our bitcoin price data, we can easily visualize it using matplotlib. In the code below, we will:
  • 4. Set matplotlib’s theme to dark, resembling charts generated through Bloomberg terminals Set our chart size to (20,7) Set out chart title Generate our plot using BTC Closing Prices (“Last”) import matplotlib.pyplot as plt plt.style.use(‘dark_background’) plt.figure(figsize=(20,7)) plt.grid(linewidth=0.2) plt.title(‘BTC x USD (Bitfinex)’) plt.plot(btc_usd_bitfinex.index, btc_usd_bitfinex.Last) From the chart, we can notice that: Data obtained from Bitfinex is good — we don’t have any date with missing data, which is usual for some other crypto exchanges We can see that the worst period for BTC in terms of losses was from the beginning of January to mid February In mid February, BTC bounced up to approximately USD 12K, reverting part of the losses Apparently pronounced resistance levels can be seen in early March, early May and late July, depicting a downward trend. In mid November, another significant drop can be spotted Main Takeaways and Next Steps In this post, we discussed how to use Python, Quandl and Matplotlib to obtain and analyse Bitcoin Price data for 2018. We did some pretty basic, high level analysis of the price of Bitcoin throughout last year. • • • • • • • •
  • 5. ►►► Lisbon bitcoin ethereum and block chain lissabon portugal In the next posts, we will deepen our analysis in order to try to understand why this has happened and how this has happened. Last, we will try to create a platform to visualize and act upon these insights in an easy, efficient way. Rafael V. Pierre is a Data Scientist based in Amsterdam, NL. He is currently an MSc. candidate in Information Studies, Data Science at the University of Amsterdam. He is also a Data Science, AI & Analytics Consultant at Weet Analytics, a company helping companies unlock unique business opportunities out of data. Bitcoin Python Data Science Towards Data Science Cryptocurrency FollowRafael Pierre Medium member since Dec 2018 Data Science & Analytics Consultant at Weet Analytics. https://www.linkedin.com/in/rafaelpierre FollowTowards Data Science Sharing concepts, ideas, and codes. 495claps