BBGO
Published in

BBGO

Discovering BBGO

(This article was written by Arthur Wolf and has been authorized by the author)

I discovered crypto a while ago, I was one of the users who lost Bitcoins in the 2013 hack of the MtGox exchange, and only a year after that I spent 300 BTC to buy a second-hand hard-drive.

Imagining where I would be if I had just hodl those coins in a cold wallet really stings.

Recently, looking back at those two bad decisions recently got me itching to get back into it, and around the beginning of the Corona Virus crisis, I started investing a bit of money into crypto again.

I also love programming, so I started looking into crypto bots.

At first, I used Kucoin’s Spot Grid trading bot.

It works pretty well, and doing everything inside a web interface is nice, but it didn’t allow for much customization, and there were some features I wanted, and I had no way to add them.

So, I started to look into Zenbot. It’s JavaScript (which I like), but it didn’t have Grid trading (the strategy I like most).

So I spent two months implementing grid trading into it. As I went, the quality of the code was so bad, and the performance so slow, that I spent much more time fixing/improving things than actually doing anything helpful.

I was about to give up, when just to make sure I didn’t miss anything, I searched once more for trading bot projects on GitHub, and found this new project named BBGO.

It was perfect. It natively did Grid trading (no need to add it myself), and it was BLAZZING fast (and the code was the cleanest of any such project I had seen).

The reason it’s important that the project be fast, in my use case, is that I use genetic (and other) optimization algorithms to find the best strategies (using back testing) to trade hundreds of coins at once. This results in running thousands of bots in parallel on a server. When I switched to BBGO, simulations that took weeks before with Zenbot, now took only hours with BBGO.

Using BBGO

Getting started with BBGO is pretty straightforward.

You can follow the instructions yourself, but here’s what I do:

1, I run the automated setup script:

Running it will give an output like this:

This one is for the Binance exchange, and the grid strategy (this matters only in that it gives you “default” config files that reflect this).

What’s most important though, is that it gives you the bbgo binary also (the bbgo file), and a bbgo.yaml config file.

By default, the bbgo.yaml file looks like this:

This configures the strategy (here we're using Grid to trade BTC versus USDT).

Another important file is the ENV file (it's hidden, it's named .env.local ), it looks like this by default:

(Of course, here you input your Binance API keys, instead of test).

Now that all of this is setup properly, you are ready to run BBGO yourself, simply do:

And your adventure begins!

In other articles, we'll cover back testing, the database, optimizations, but for now this should do as an introduction.

If you need any help with BBGO, you can create an issue in the GitHub project, or email me at wolf.arthur@gmail.com

This article was written as part of our “ArticleForNewFeature” initiative, Arthur is the first participant. If you like BBGO and want to share your knowledge about it, you can write an article on any BBGO-related topic, and in exchange I will implement a new feature of your choice, and of a size matching your article.

DM me if you’re interested in.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store