Code Monkey home page Code Monkey logo

bitcoin-prediction's Introduction

Overview


This repository contains 2 iPython (Jupyter) notebook files:

  1. The primary file, BitcoinPricePrediction.ipynb, which serves as a tutorial for predicting the price of Bitcoin (2 days in the future) based on data pulled from the CoinGecko API.
  2. A secondary file, MakingPredictionsWithModel-Demo.ipynb, which further breaks down Step 5 of the primary file (i.e. the code that is used to generate the DataFrame used as the "test data set" for making the actual prediction).

Task:


The task is to train a linear regression model to predict what the price of Bitcoin will in 1-2 days. The features used in the model are mostly historical prices of Bitcoin and other cryptocurrencies (e.g. BTC price from 2 days ago, ETH price from 2 days ago) as well as "community data" (e.g. social media-related statistics) that can be extracted from the CoinGecko API.

This notebook includes examples of various data analysis, modeling, and visualization techniques that can be used to solve the problem using Python. The purpose of this file is not to predict the most accurate price of Bitcoin in the future (cryptocurrency prices are inherently volatile / wildly unpredictable) nor to thoroughly teach financial time series analysis and statistics, but rather to be used as a guide for teaching students introductory data analysis and web-scraping tools in Python. These tools and strategies include:

  • "Wrangling" data in pandas and applying features engineering to a data set.
  • Visualzing data in matplotlib and seaborn to inform optimal feature selection.
  • Training 3 types of classification models (Linear Regression, Ridge Regression, Lasso Regression) on the data set and using them to make predictions.
    • In the preceding lectures, the students will get a more in-depth, theoretical understanding of how regularization works, why it is used, and how it affects the resulting model's coefficients.
  • Using requests in Python to learn how to extract your own data from the internet; in this case, a relatively simple API that outputs clean data in JSON format and does not require any authentication.

TO-DO:

A more rigorous analysis of the financial time series data can be explored with the statsmodels library in Python. Models to be added in a future notebook:

  • Exponential Smoothing
  • Autoregressive-moving-average (ARMA).

bitcoin-prediction's People

Contributors

pawlodkowski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.