Bob The SMA Bot

SHARE BOB  :          
Bob is the first Crypto trading bot that I have designed and developed. Just like his very rudimentary picture, I went with simplicity in terms of a trading strategy so that I could put my focus on getting the architecture right. Bob is reasonably dynamic and I intend creating forks of him for other trading strategies.

The technology stack I have gone with is Microsoft SQL Server 2017 (for housing the data), Microsoft .NET (for integration with Exchanges) and R (for applying Machine Learning to the data). Data is acquired from CryptoCompare.com (for historical data) and Luno.com (for current prices). The Exchange I use for automated transactions is Luno.com.

I will go into the trading strategy in a bit more detail further down, but essentially it uses a combination of simple moving averages (SMA) to generate buy and sell signals for long trades which it executes on automatically with the Exchange.

Bot Details

NameBob
Version1.0
DescriptionBob the simple SMA bot
Launch Date2018-02-18
Start Value (ZAR)R 1000.00
Current Value (ZAR)R 925.50
Gain \ Loss (ZAR)R -74.50
Gain \ Loss (%)-7.45 %
Days Operating37

Overall Performance

Number of Transactions (Buy and Sell)2
Number of Winning Transactions1
Number of Losing Transactions1

Transaction Breakdown

Buy DateSell DateBitcoin BoughtBitcoin ValueBuy ValueSell ValueGain / Loss
2018-03-012018-03-040.0074990000135179.00999.991019.8519.86
2018-03-042018-03-060.0071830000137047.00999.95984.41-15.54

SMA Trading Strategy

The trading strategy uses three simple moving averages. An SMA is an average of the values of n number of points before the current transaction.

The three simple moving averages are then broken down into a fast moving trend and a slow moving trend.

A buy signal will be generated when both the fast moving and slow moving trends are bullish (or above 0) and the previous fast moving trend was bearish (or below 0).

A sell signal is generated when the fast moving trend becomes bearish (or drops below 0).

The chart below shows the buy signals (marked B). Note how the buys signals started to occur with a temporary rise in the Bitcoin price.


The chart below shows the sell signals (marked S). Bitcoin has experienced a bearish market in the beginning of 2018 (reflected in the initial downward trend of the price in the price chart above). The strategy does identify much more sell signals than buy signals. The Bot ignores a sell signal when not in a trade.


Below is a chart that shows the closing price for Bitcoin on the Luno.com Exchange. I have lined the timing up with the above SMA.
The chart above shows a bearish market in the first part of 2018 with limited buy signals in the SMA graphs further up.

As more price data comes in over time, machine learning will be applied (using R) to find the best SMA combination to generate buy and sell signals.