Coder Social home page Coder Social logo

webclinic017 / moneybot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jakehartnell/moneybot

0.0 0.0 0.0 2.28 MB

backtest (and deploy) trading strategies

License: BSD 3-Clause "New" or "Revised" License

Python 96.42% Makefile 0.60% Shell 2.98%

moneybot's Introduction

MoneyBot

Build Status

MoneyBot allows you to backtest trading strategies, and deploy these strategies to live-trade, without changing code.

For now, MoneyBot only supports Poloniex. However, a generic MarketAdapter pattern could allow trading over many exchanges. PRs welcome!

install

First, install Python dependencies.

python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt

Next, set up the Postgres database and restore the historical data. We provide scripts to automate this process with Docker (note, however, that you'll need to install postgres on your system for the restore, brew install postgresql with homebrew):

cd local-services/postgres
make image
make server
./restore.sh

(By default, the database password is secretpass - you can change that in local-services/postgres/Makefile.)

use

First, make sure Postgres is running (cd local-services/postgres; make server).

There are a few Strategy implementations in moneybot.examples.strategies.

The strategies included herein are viable for live-trading use, but crypto trading is serious business. It's entirely possible to lose a lot of money, very quickly. The authors of this library provide these for the sake of illustration and assume no responsibility for their performance if deployed.

backtesting

python3 examples/backtest.py -c config.yml -s buffed-coin

live trading

NOTE: See disclaimer!

To live-trade, you will need Poloniex API keys. You can generate those via the Poloniex web interface. You'll only need to allow "trading" permissions on the keys. See the config-example.yaml file, add your Poloniex credentials and save it as config.yml.

python3 examples/live_trading.py -c config.yml -s buffed-coin

disclaimer

Use MoneyBot AT YOUR OWN RISK. Specifically,

  • Backtests are no guarantee of future/live performance.
  • MoneyBot relies on 3rd-party APIs, like Poloniex, which may fail at anytime.
  • MoneyBot is experimental software, and also may fail at any time.
  • Running a bot, and trading in general, requires careful study of the risks, and parameters. Wrong settings can cause a major loss.
  • Never leave MoneyBot un-monitored for long periods of time. Be prepared to stop it if too much loss occurs.

You alone are responsible for anything that happens when you're live-trading!

license

BSD

moneybot's People

Contributors

elsehow avatar adamrothman avatar jakehartnell avatar csmpls avatar harperj 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.