Coder Social home page Coder Social logo

binance-balancer's Introduction

Binance-Balancer - create your own ETF

Portfolio re-balancer for binance. Herein I provide a script to automate digital asset portfolio re-balance at user specified intervals (defaults to every hour). Note this is long only spot portfolio.

Why diversify ?

Diverse investments mitigate risk of loss and can offer significant return improvements over any single asset. The dawn of crypto enables anyone to set up their own portfolio at near zero cost. Moreover, I present tools to enable anyone to automate re-balancing at any interval, based on manually pre-defined allocations.

Why manually pre-defined ?

Informed human intuition outperforms risk models by an order of magnitude. Here is an excerpt of our performance stress test results of varying portfolio strategies from the same basket of crypto's over the last 2 years, re-balancing hourly.

Portfolio backtests

Y axis is % Return On Investment

X axis is number of hours since the start (2 years ago)

Which to choose ?

Higher market cap coins offer more safety. After that, it becomes a personal choice based on foreseen security, value, utility, fees, speed. Once you have picked your top 10, say, you can see their correlations.

Correlations

Highlighted in blue are the low correlations we are looking for. Note that in this case all correlations are positive. Since they are all in the currency class this is not unexpected but highlights the importance of investing also across asset classes.

From the above example, we can choose a simple portfolio:

Correlations

How to setup my ETF ?

Steps to get started:

  1. Download and install python framework
  2. Set up a Binance account
  3. Generate API keys
  4. Fund your Binance account
  5. Download this binance balancer script
  6. Edit API keys in binance_balancer.py
  7. Edit your configuration:
lastweights = {     "BAT":0.1,         "XLM":0.1,     "BNB":0.1,      "BTC": 0.4,       "USDT": 0.3 }

Install dependencies:

pip install python-binance

Run the script (it will automatically re-balance for you every hour):

python binance-balancer.py

Final thoughts

Hopefully, you have found my software of value. I offer my extensive testing, results and software for your benefit. That is for financial sovereignty of the populous. Please consider donating.

Karma Jar

BTC - 112eMCQJUkUz7kvxDSFCGf1nnFJZ61CE4W

LTC - LR3BfiS77dZcp3KrEkfbXJS7U2vBoMFS7A

ZEC - t1bQpcWAuSg3CkBs29kegBPXvSRSaHqhy2b

XLM - GAHK7EEG2WWHVKDNT4CEQFZGKF2LGDSW2IVM4S5DP42RBW3K6BTODB4A Memo: 1015040538

Nano - nano_1ca5fxd7uk3t61ghjnfd59icxg4ohmbusjthb7supxh3ufef1sykmq77awzh

XRP - rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh Tag: 103535357

EOS - binancecleos Memo: 103117718

Recommended links

Getting started - Coinbase

Portfolio balance - Binance

Futures trading - Deribit

Cold wallet - Atomic

binance-balancer's People

Contributors

sandybradley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

binance-balancer's Issues

script stuck

hi it looks like the script stuck .. any suggestions ?

'XRP': 2.925772364711064e-06,
'ZEC': 4.501806547066401e-06}
Canceling open orders

never mind. its working. ... every 20 minutes the script is doing the job. Why did you changed from 0,1 to 0,005 thats 0,5% instead of 10%

lastweights = {
"BAT":0.005,
"ADA":0.005,
"EOS":0.005,
"NEO":0.005,
"XLM":0.02,
"XRP":0.02,
"DASH":0.01,
"ETC":0.01,
"BNB":0.03,
"NANO":0.03,
"ZEC":0.03,
"XMR":0.04,
"LTC":0.04,
"BTC": 0.50,
"USDT": 0.25 }

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.