Giter VIP home page Giter VIP logo

crypto-predict's Introduction

crypto-predict

Build Status Coverage Status Docker Build Docker Build Status

This project is a easily reproducible Python/Docker project to create an API that predicts the price of BTC and ETH using OHLCV data. The API is defined using Zalando's connexion package, which leverages the Flask framework.

Current implementation smooths the raw close % change data (previous 72 hours). This data is fed into a 1D Convolutional Layer, which feeds into a dual-layer LSTM with linear activation function (network graph coming soon!).

Note: Anaconda is recommended to manage the project environment. Environment creation without Anaconda is untested

Install the Development Environment

mv .env_template .env   # Must have a .env file for some functions to find correct path
make create_environment
conda activate crypto_predict
make install_dev
make test

Get/Process Data and Train Models with crypr-* Commands

crypr-data --hours 10000
crypr-features
crypr-models --epochs 20

Run the API with Docker

make run_docker

Now find your prediction at http://localhost:5000/predict?coin=BTC

Jupyter Notebooks

The Jupyter Notebooks in this project serve as rich visual examples of how data preprocessing and model training is done for the prediction API.

Run with

make run_jupyter

Notebook server will be at http://localhost:8888

Future Directions

  • More coins!
  • More models (xgboost)
  • Visualize price predictions in a web app based on the developed prediction api
  • Use unstructured text data to calculate sentiment or other metrics to use in prediction
  • Use transfer learning from financial markets and other crypto coins to enhance the RNN model

Project Organization

├── api/                            # connexion pyfiles and config
│   ├── app.py
│   └── swagger.yaml
├── crypr/                          # Python Package
│   ├── scripts/
│   │   ├── make_dataset.py
│   │   ├── make_features.py
│   │   └── make_train_models.py
│   ├── tests/
│   │   ├── data/
│   │   ├── test_app.py
│   │   ├── test_build.py
│   │   ├── test_cryptocompare.py
│   │   ├── test_model.py
│   │   └── test_transformers.py
│   ├── build.py
│   ├── cryptocompare.py
│   ├── models.py
│   ├── transformers.py
│   ├── types.py
│   ├── util.py
│   └── zoo.py
├── data/
│   ├── external/
│   ├── interim/
│   ├── processed/                        # Data generated by crypr-features
│   └── raw/                              # Data retrieved with crypr-data
├── docker/                               # Deploy the API
│   ├── Dockerfile
│   └── wait_for_healthy.sh
├── models/                               # DL models trained with crypr-models
├── notebooks/
│   ├── cwt_rnn_model_dev.ipynb
│   ├── data_exploration.ipynb
│   ├── jupyter_notebook_config.py
│   ├── model_dev.ipynb
│   ├── preprocessing.ipynb
│   ├── rnn_model_dev.ipynb
│   ├── self-attention-model-dev.ipynb
│   ├── statistical_model_dev.ipynb
│   ├── tree_model_dev.ipynb
│   ├── wt_multiple_preprocessing.ipynb
│   ├── wt_single_preprocessing.ipynb
│   ├── wt_smooth_preprocessing.ipynb
│   └── wt_smooth_rnn_model_dev.ipynb
├── references/
│   ├── bao2017.pdf
│   └── hsieh2011.pdf
├── Dockerfile.dockerhub        # For hub.docker.com automated build hook
├── LICENSE
├── MANIFEST.in
├── Makefile
├── README.md
├── requirements.txt            # Development Python packages
├── setup.cfg
├── setup.py
├── .coveragerc
├── .coveralls.yml
├── .dockerignore
├── .env                        # Copied from .env_template
├── .env_template
├── .gitignore
└── .travis.yml

crypto-predict's People

Contributors

daniel-cortez-stevenson 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.