Giter VIP home page Giter VIP logo

_cytrade's Introduction

CyTrade

CyTrade Algorithmic Trading

CyTrade is a repo with some examples for stream-learning-based Machine Learning strategies for trading cryptocurrency. These examples are built with Cytrader (a cythonized fork of Backtrader), Ct-CCXT-Store (a fork of Backtrader-CCXT-Store) and River.

This repository is accessible at: CyTrade

To install from git:

pip install git+https://github.com/Saran33/_CyTrade.git

  • To build from cython files:
cd cytrade
python setup.py build_ext --inplace

USAGE:

Cytrade is set up to use environment variables for API keys, as well as to indicate whether you are live trading or usng a demo account, and to indicate whether you are trading spot or futures. Set a .env file in the cytrade directory, or alternatively set environemnt varibales with your cloud provider. e.g.:

LIVE=False
FUTS=False

BINANCE_KEY=YOUR_LIVE_KEY
BINANCE_SECRET=YOUR_LIVE_SECRET

BINANCE_TEST_KEY=YOUR_TEST_KEY
BINANCE_TEST_SECRET=YOUR_TEST_SECRET

BINANCE_FUTS_TEST_KEY=YOUR_FUTURES_DEMO_KEY
BINANCE_FUTS_TEST_SECRET=YOUR_FUTURES_DEMO_SECRET

Stream Learning strategy

  • The backtests/btRiver.ipynb notebook file contains an example logistic regression strategy, integrating River with Backtrader.
  • It is using the Kelly Critereon to size positions (solving for the maximum growth rate is done in cython, which is 200 times faster than if done in scipy and numpy cytrade/cyutils/cyzers.pyx).
  • In the example, the Kelly allocation fraction is scaled by the model's probability estimate.

_cytrade's People

Contributors

saran33 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.