Profitable Crypto trading strategies part 9: Predic 1.0

CryptoPredicted
Coinmonks
Published in
6 min readJun 2, 2018

--

Until now we have only analyzed simple yet powerful trading strategies. Most of these used mathematical formulas and followed predefined heuristics. Eventually we optimized the hyper-parameters to improve their ROIs. In this post we are introducing a totally new strategy developed using machine learning and A.I. neural networks.

Many months ago we started applying machine learning and artificial intelligence to generate price predictions. Ever since we were primarily looking for ways to improve these short-term predictions. But in the back of our mind we were also thinking of ways to trade based on these predictions.

A few weeks ago we came up with a simple yet powerful algorithm that uses these predictions. And we successfully back tested the algorithm on historical data, quickly and efficiently. In the next section I’ll first explain what these predictions are, and then we’ll analyze our algorithm.

Also Read: Best Crypto Trading Bots

Artificial Intelligence

Several months ago we began using machine learning tools (Tensorflow and Keras) to create artificially intelligent systems. The systems are called “neural networks”, which try to emulate the way a human brain works.

Neural network example (source)

These neural networks are nothing more than mathematical concepts implemented in software. Usually they are very low-weight (small in size) and can compute outputs really fast. But they are extremely slow during the “training” or “learning” process. During training we feed raw data into the network, making it “learn” the output from the given input. This way we can teach it to approximate complex environments. Neural networks are powerful but only in narrow tasks; these systems only do what we train them to do. They are used for self-driving cars, pattern recognition, object detection, language translation and a lot more.

Neural networks are wonderful tools for helping us solve complex problems. That’s why we are using them to help us make better trade decisions. Stock markets, especially the cryptocurrency industry is highly complex, so we need these systems to help us out.

Predictions

Below you’ll find three screenshots of our predictions. These predictions show a 12-hour forecast for a specified market (on the Binance exchange).

For quite a while our predictions weren’t useful in a direct sense, other than giving a probabilistic prognosis. At some point we measured their accuracy, using its absolute values and comparing it against reality. The accuracy from these tests was over 99.9% — simply because of the absolute value problem.

On the other hand, measuring the accuracy is a complex problem because of the nature of the predictions. We’ve learned that the predictions indicate what “might” happen in the near future. It cannot exactly predict when “something” will happen. So in a nutshell, if it indicates the price to go up (or down), it is likely to happen, but this might only happen several minutes or hours down the line.

Predic 1.0

Right now the predictions are generated and updated every two minutes. There are two different type of predictions: 10-minute and 60-minute interval ones. Both make 12-step predictions, thus 120min and 12 hours respectively.

The Predic algorithm makes a buy, sell or hold decision at every interval (every hour). In the algorithm we compare the first prediction value with another. The first question is: which value should we compare against? In our first attempt we compared the first prediction against the last one (as indicated on the screenshot below).

Comparing first against last predicted value.

The above proved to be a bad decision. Actually, our results proved that the further down we went in the predictions the worse our ROI became. The most optimal variant was to compare the first prediction against the second one. This makes a lot of sense actually, this system is much better at making predictions of one hour into the future than longer ones.

The second question is what should the buy/sell criteria be? This is can be solved by checking whether the second value exceeds a certain threshold. For instance, if the second prediction is 0.2% larger than the first prediction then we can tell it to “buy”. For the “sell” part we instead opt for ROI margins: if we can make a 1% profit we “sell”, otherwise we hold unless our ROI drops below 98% or so.

Now is the time for back testing and simulating this strategy. Let us compute a 60-day ROI (3 April to 2 June, 2018) for our three distinct cryptocurrencies:

BTC-USDT

ROI: 15.19% (±6.75)

ETH-USDT

ROI: 36.36% (±15.45)

LTC-USDT

ROI: 10.27% (±12.24)

Discussion

I was quite amazed that such a simple heuristic would yield reasonable returns. But it could do so much better. By looking at the buy/sell signals on the charts, we see that some are sub-optimal. During uptrend regions it executes too many conservative trades (play it safe), because of the “sell” heuristic. While during downtrend periods it’s trading too much, resulting in many losing trades. The latter could be solved by our bearish detection code (a topic for another time).

Another phenomenon which is sub-optimal can be seen on the chart with BTC-USDT trades. Because of the algorithm the sell-buy signals follow each other closely. This means it buys immediately after selling. This can be prevented by not selling if a buy criteria is met. But it also induces risk into the strategy, because we are making it more “greedy”.

Conclusion

The Predic 1.0 algorithm definitely deserves to be on our signals list, and in the weeks to come we’ll integrate it. There’s still a ton we can improve and tweak to make this algorithm yield higher returns, it’s just a matter of time and resources.

Thank you for reading, if you enjoy our posts make sure to subscribe. And stay tuned for the next part!
- Ilya Nevolin

Also, Read

Get Best Software Deals Directly In Your Inbox

--

--

CryptoPredicted
Coinmonks

Cryptocurrency price predictions using machine learning, development and analysis of algorithmic trading strategies and more. App: https://cryptopredicted.com/