Code Monkey home page Code Monkey logo

simple-crypto-breakout-strategy's Introduction

Simple Cryptocurrency Breakout Strategy

Catch breakouts by opening positions based on the previous day's range. Popularized by Larry Williams.

Strategy

  1. Get previous day's high and low
  2. Set limit order based on previous day's range
  3. Close position at end of day

Backtest

The following are results from a backtest from 2020-01-01 to 2020-12-31 with the below config. A simple buy & hold strategy is used as a benchmark.

{
  "ticker": "ETH-PERP",
  "k": 0.6,
  "stoploss": 0.02,
  "leverage": 1
}
Metric
Trades 113
Max Drawdown -7.230%
Return 304.713%
Benchmark Max Drawdown -61.446%
Benchmark Return 471.245%

The model underperforms the benchmark, however, the model is very successful in reducing downside exposure. Increasing the leverage to 2x or 3x will significantly outperform the benchmark while maintaining tolerable drawdowns in portfolio value.

Docker

Make sure to set secret and key in config.json or pass as env vars.
See Makefile

> docker build breakout-trader .
> docker run -p 4000:4000 breakout-trader

Navigate to http://localhost:4000 for dashboard

Dashboard

The dashboard can be used to monitor your open orders and positions. The bot can also be disable and all positions and orders can be closed manually. Supports mobile view.

Dashhoard
alt text

V2

See the v2 branch for more configuration options like shorting and moving averages. This is the branch I am using and testing from but might not be ready for use and is subject to change. It also integrates with slack which I haven't made optional yet.

simple-crypto-breakout-strategy's People

Contributors

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