Hi, this is by far one of the best threads here on BHW, so thank you for all your work.
I'm just curious in regards to how accurate the predictions have been, has there been any back testing on historical data or something of the like? I understand you've tried trading with the predictions and have gotten a mixture of profit/losses.
Hey

Thank you for the kind words.
I have definitely been doing a lot of backtesting and the like.
If you skim over all my posts you'll find a ton of these results -- or even better, as I've just finished writing my latest report (below).
Cheers!
====================
=== March 4th, 2018 ===
Today was a day of reading and learning about AI.
But I've also spent an hour or two on cleaning up code, optimizing scripts and running some backtests.
In this post I would like to discuss and illustrate what we have accomplished thus far, and what we can do with what we have.
If you've been following our progress since the beginning, you just can skip to part 2 of the article.
Part 1 -- an overview
Gathering Data and manual analysis
So until now we have been gathering data related to cryptocurrencies.
The data we gather is primarily an aggregation of the price, trading volume, social mentions (e.g. tweets, mentions and posts) and news articles (from major news channels).
On our "general chart" (and the 3D charts), you are able to look at this data for almost 20 different crypto coins.
In the first several weeks since I started this project, we exclusively used the charts to make conclusions and answer questions like why the price of Bitcoin went up or down during a certain period in time. The idea is to find trends in these charts that could indicate why such an event occurred. By doing so, we can to a large extend, make predictions of what will happen in the near-future (e.g. in the next 1 hour) by looking at the current state of news articles and social mentions.
Since most of us (including me) try to have a social life, we shouldn't do this manually by hand, but instead utilize systems and algorithms to do the analysis and trend detection part. This is what "big data" and "machine learning" are all about.
From Data to Machine Learning
For those who've closely been following my progress -- at some point I started building Neural Network models. Neural Networks are like artificially created brains that can learn stuff. The things they learn is what we feed into them -- so if we feed them data and teach them that Y=4 for x=2 , and Y=6 for x=3 and that Y=16 for x=8, ... doing this a few hundred/thousand times, then the system will be able to reproduce the function as in our example is: Y(x) = 2*x . This means that given some input number "x", it will be able to predict/compute the output "Y" -- which in our case is just the multiplication of "x" and 2. Neural Networks are nothing new, they've been around for half a century -- but their usage only became very popular in recent years due to more cheaper memory and more cheaper processing power.
As in our case, we used special types of neural networks to be trained using our data. And we train it to predict the price of a crypto coin (e.g. Bitcoin -- BTC).
I've spent quite a lot of time (and still am), figuring out which combinations of data yield the best results. And another challenge is tweaking the parameters of a neural network and it's learning components. However, I am truly fascinated by the world of AI, as many people are, because these systems are "trained" -- they are not programmed like a regular piece of software with code. They are like artificial brains that can take input and yield a meaningful output -- but we don't always fully understand what's going on inside that black box. However, they are also very limited and narrow, meaning they are only trained to do a specific type of job (e.g. making a prediction within a very narrow space ; or playing chess or playing Go). Although this isn't part of my research/project, what researchers are doing right now is teaching such a system how to drive a car, just like an ordinary human would do -- so it easily becomes a very complex task but worthwhile pursuing.
Back to our project -- it has been more than a month since I first started making price predictions using Neural Networks. And the results are really good, but not great. I have posted a lot about this including the results, so if you want to learn more (after reading this post), skim through my previous posts.
Detecting Anomalies
As I've been trading on my favorite exchange -- I noticed that it would be super useful if I had a system that could notify me when the price was increasing (or decreasing) rapidly in a very short amount of time. Because most day traders like to enter and exit trades within a few minutes (or a few hours) depending on the currencies they are trading. But we don't want to sit in front of our exchange window all day long waiting for that golden opportunity.
In doing so traders make anywhere between 0.5% and 3% ROI on a single (or multiple) trade, doing that several times a day (if the market allows us), we can make a nice amount of cash. So long story short, it took me just several hours to build, test and release an Anomaly Detection (AD) system. And in one of my latest posts I've released some ROI results that were really great. But knowing that what I have is still a very basic system, makes me even more happy because by tweaking & improving it it'll only become better.
The mobile App
A few weeks after having started my journey, I've released a beta version of our website. The website was primarily designed for notebooks/desktops, not for mobile devices (such as tablets and smartphones). But I realized it would be even better if I had an App where I could consult my data and look at the predictions -- so after a couple of days I got it done. Right now it supports +70% of all Android devices and you can find by searching for "CryptoPredicted" on the Google Play Store if you'd like to play with it.
Backtesting
Backtesting, in our context, comes from the world of trading. It's a system/method where we use historical data to run trading simulations.
These simulations allow us to evaluate trading decisions made by some indicators, such as Simple Moving Average (SMA) and many other.
In our scenario, we have been making simulations using our prediction results, and since recently also using the Anomaly Detection (AD) system.
So feel free to re-visit some of my older posts if you want to read about the backtesting results.
Part 2 -- A.D. versus A.I.
Back to backtesting -- as I mentioned in the intro I've spent some time today doing more simulations. And if you recall, in the past I've mentioned that backtesting results are highly dependent on the state of the market. So if the market is crashing the results would most likely be break-even or negative. While in a growing market it's hard not to make a profit.
If you've read my previous backtesting experiments, using solely A.D. then you've seen that we had some great returns from it (such as 17% over 7 days). While in the case of our A.I. generated predictions, the results were highly dependent on the state of the market. So I was wondering, how would A.D.'s system work in a declining market?
So in this example we shall be simulation trades, solely based on one of our indicators. First off, let's start with a situation where the market started to crash/decline at some point. Let us look at February 25 (2018) on the chart below; where at 6:30am (UTC) the price of BTC dropped from $10.4k to just above $9.4k at 22:00 (10pm):
Let us backtest/simulate trading during this day (full 24 hour range) and see how much ROI we would make/lose.
A.I. generated predictions
I have used two trading strategies "FirstPredic" and "MinMax":
- FirstPredic: The first one only uses the first prediction for the next interval (10 minutes in our case) and compares that against the current/actual price. If the prediction of the price (10 minutes into the future) is lower than the actual price we let it generate a "sell signal", and in the other case, if the price is about to go up then we should generate a "buy signal". By doing so we would always buy low and sell high, thus making a profit. Whether we'll make a profit or not depends on the quality of the predictions.
- MinMax: The second strategy uses all the predictions -- our system actually generates 8 price predictions into the future (thus 8x10 = 80 minutes ahead). And we then use these to find the lowest (min) prediction and the highest (max) prediction within this 80 minute interval (that's why I called it MinMax). We then generate a "buy signal" for the lowest point and a "sell" for the highest point. Once again, this will make a profit it the actual price follows the predicted values.
Here are the trading (ROI %) results for
MinMax:
Overall the results are negative, and the system makes a loss on average (of between -0.5% and 8%).
Notice that there are multiple lines, each line represents one type of prediction -- this is because we have multiple different Neural Networks that generate a different output. This allows us to evaluate and score which one is better than the other.
And here is the one for
FirstPredic:
Once again, most values are negative thus the system makes a loss on average (of between -0.5% and -4%).
A.D. generated signals
In one of my previous posts I discussed how to use A.D. as trading signals, so make sure to check that out because I'm not going to discuss it in a lot of detail here.
But the basic concept is to wait for the AD system to generate a notification that the price is going "up", and then wait until the price stabilizes (when the market reaches a plateau). Once it reaches that point we then generate a "sell" signal, because that's a point where the price has reached a new local maximum. And the reverse is also true, when there is a notification that the price is rapidly declining, we wait until it has reached some new stable position where the price is pretty low -- at that point we generate a "buy" signal.
The end result is that it would be buying low and selling high. The results also speak for themselves. As shown below, this system has made 5.36% ROI (that's pure profit) in a declining market. And so A.D. appears to have easily beaten our A.I. system.
Now let us look at a period when the market started to grow. I have chosen February 26th (the whole 24 hour range as shown below) -- it's an interesting range because nothing extraordinary happens during the first 14 hours, but then at about 2pm the price shoots up rapidly and reaches a new plateau.
Let us look at what the A.I. predictions give us.
The
MinMax strategy yields us these ROIs:
Overall they are quite positive, on average between 1% and 6% -- so not bad at all.
Finally comes the
FirstPredic strategy:
Once again, quite similar results with ROIs between 1% and 6%.
It shouldn't surprise us by now that A.D. system beats the A.I. system once again, with an 8% return:
Discussing our findings
Does this mean that A.I. is irrelevant because it yields worse results than A.D. ? Not at all.
In my opinion what we have achieved from the A.I. is already remarkable, and if we keep investing in it and learning how to optimize it, it might break-even with the A.D. system.
Hypothetically the AI could perform even better than AD if it could be trained to detect and predict peaks/valleys pretty accurately.
I also think that our two current backtesting strategies are not optimal (MinMax and FirstPredic). It could be that the AI generated predictions are trying to tell us something meaningful in some way, but that I have the wrong system in place for interpreting its outputs.
I have many ideas for the AI system and how to improve it, one that I'm very excited about and willing to share in public is a system that learns to trade and make the pseudo-best possible decisions. This would be a much better system than one that merely makes price predictions.
But in the short-term, it's way more realistic to shift our focus to A.D. systems -- because the crypto market is highly volatile and anything can happen in matter of seconds. We can never predict if/when some whale will use a large amount of coins to push the market in some direction. So it is actually these scenarios we need to anticipate using A.D., because they are un-predictable.
I hope you've enjoyed and have a great day!

- Ilya