Final Results

We’ve just moved everything back into the Bitstamp and converted everything into USD.

On 28th March, at the start of the real-time experiment,  we had $23938.96 in the Bitstamp account. After 15 weeks of trading this has grown to $54045.70 after all costs and fees, including transferring back and forth to Poloniex to trade the alt coins.

This equates to a return of +125.76%

Over the same period Bitcoin has grown from 1044 to 2010 (at time of writing on Bitstamp) for a return of +92.5% so the AI models have shown an impressive return overall and also outperformed the benchmark Bitcoin growth.

The other real stand-out is the lower volatility. While all the coins have shown huge swings during this period the AI bots have successfully navigated this and kept volatility and drawdowns lower than the coins themselves.

These results show the huge potential that AI has for extracting profits from the cryptocurrency space and bodes well for the success of our ICO, AICoin.

— Wintermute —

And We exit Bitcoin…

The bots have closed out their partial bitcoin position overnight at a rate of $2320.01 (incl fees).

We have now been pretty flat throughout this period of consolidation (for bitcoin) and outright decline (for many of the altcoins). This is overall encouraging given that the bots, at this stage, can’t go short. The Bots achieved an excellent return of >100% during the rapid bull run in April and May then over June and July pulled back and retained the large part of that profit. The ending profit is a little over 120%, and drawdowns have been extremely limited.

We are now intending to suspend the real-time experiment to allow the funds to be moved across into the AICoin ICO (http://www.aicoin.ico) but we will keep publishing here for more technical aspects of the bots performance once they start trading on behalf of the AICoin collective.

We also intend to publish further research results that we undertake and answer any technical questions on the models or architecture.

To tie up this experiment I am now pulling together the statements from the two brokers used (Bitstamp and Poloniex) and publish the statements as proof of the results achieved. Before doing this I will move the funds from Poloniex into Bitstamp so we are comparing like with like (the funds were originally deposited into Bitstamp).

Thank you all for following our experiment and hopefully there will be many more exciting and interesting things to discuss in the future.

— Wintermute —


…and finally another bitcoin trade.

Sorry but this is going to be very brief as there are so many things to keep on top of with our pending ICO but I wanted to blast a few lines down as the bots has entered a long position into BTC basis Bitstamp. For the first time it has gone long a partial position … something we discussed introducing to the model population here.

I’m quite honestly surprised that the change took hold so quickly but there it is and the model has gone long 3.95 bitcoin for a cost of $10085.77 from a total available of $30280.12 so pretty much a 1/3 positon at approximately 2547.

No positions yet in any of the other coins so we’ll see if the model is predicting a general resumption of the rally or if this is bitcoin specific.

— Wintermute —

And Sleep …..

Well, we have just passed through the longest period of inactivity from the models since the start of our real-time experiment. And I have to say, that’s not a bad call considering the markets have drifted lower in a relatively quiet market for that period.

We have implemented our partial position model adaptation into the model population … as detailed here this doesn’t mean the live model will incorporate that trading style into it’s training, it simply means that enough candidate models have that “gene” in their DNA to make it a possibility that the live model will adopt that characteristic.

As requested by a number of people we are now following the same approach to bring short selling into the mix for the models.

I’m currently in the process of performing a full trade by trade breakdown and performance comparison. I hope to publish that this week (time perimitting)…and hopefully we’ll actually get some more trades to execute 🙂

Total performance to date:  +129.02%

— Wintermute —

And Flat Again…

The AI Models have flattened all long positions again over the last few days:
Sold ETC @ 19.13776, a small gain of 4.6%
Sold XMR @ 49.38421, a gain of 2.8%
Sold ETH @ 338.4915, a gain of 59.4%
Sold DASH @ 156.5249, a gain of 17.9%
Sold ZEC @ 379.43, a gain of 48.2%
Sold XRP @ 0.238092, a loss of 22.8%

We are now sitting with no cryptocurrency assets and our gain to date is +130.46%

The last couple of weeks have seen the models slowly making positive returns while side-stepping some of the more volatile swings (both up and down) so our drawdowns have been relatively light compared to the overall markets being traded. The encouraging aspect is the way there is a tendency for the models to jump in when there are perceived opportunities then exit quite quickly once those opportunities have either unfolded or disappeared.

— Wintermute —

The Power Of Genetic Algorithms

Much has rightly been made about the power of deep learning models to sift through large amounts of data to find nuggets of value … but what defines value? … and how is that value defined?

This is a problem we are constantly up against when developing an AI model for trading markets. How do you define the fitness function? What criteria are used in the trading decision making and how is that to be represented?

A simple change we wanted to make illustrates this problem clearly and also shows why our architecture helps feed in these changes in a controlled manner.

When we first trained the model they were bootstrapped from trading decisions made by conventional (static) trading models. Instead of learning to trade from first principles they were given the task of learning to improve upon what was already working – a much simpler learning task. This gave us a good starting point in the model evolution but, given the training requirements, also created a limitation. Instead of giving the models the full range of decision making capability (to take partial positions) it was always either fully in or fully out of a particular market – unlikely to be an optimum trading style.

So now we have working models that have identified some key trading characteristics and are working well, how do we change this without breaking what we already have – how do we implement a modified behaviour function; in this case how do we include the capability to scale in and out of positions over time?

With our architecture we can implement this change in a simple manner and let the overall model take the strain.

Earlier I posted a high level overview of the structure in our trading models – key to this is a genetic algorithm front end which is continually shifting the pieces about and trying to improve upon the characteristics of the deep learning models. It has the flexibility to change network structures, input parameters and also…key to this discussion … output expectations.

To add the capability of partial positions we simply needed to add this as a possible behaviour in the pool of attributes open to the GA selection. We can bias the mutation to select this attribute for a seeding period to force the attribute into the population then we step back and let the natural selection take it’s course. If this capability can a) be learned by the deep learning element of the architecture and b) adds true value to the function then, over time, this attribute will start to successfully gain a foothold in the model population and, eventually, candidate models will be presented to trade against the current lead models for dominance.

We have been seeding this capability for a few weeks now, it will be interesting to see if the model takes on a more staged approach for position taking or if it sticks with its binary position taking.

It has also been suggested we allow the models to sell short as well as take long or flat positions…while our initial bias was to exclude short positions because of the disproportionate risk/reward profile this is certainly something we could add into the mix in the future and let the models decide.


— Wintermute —



Ether Classic Purchase…

Yesterday we went long Ether Classic (ETC) at 18.29. This moves us back into a long position across all cryptocurrencies except bitcoin.

ETC is our second best performing trading market for the bot since starting the live trade diary, showing a gain of +472.4%. Today I also thought it would be worth looking at the impact our trading methodology has on relative % holdings in the trade pool.

When we started the real-time experiment we decided to pro-rate the trading capital across all coins based roughly on their coin market capitalisation. The purpose of this was to reflect how we would approach trading a larger fund – while our small test account would have zero impact on some of the smaller coins, a larger fund would be harder to trade if they were equally split.

The decision was also taken not to rebalance this split once trading had commenced. Coins that were more profitable to trade for the AI Bot would, over time, have larger trade sizes associated with them – this was to reward the better performing model behaviours.

In the 10 weeks since the start of our experiment this has already started to see a significant change in the % applied to each coin as can be seen below:

CoinStarting %Current %
Ether Classic0.85%2.07%

bitcoin has shown a decline in relative holdings at the expense of some of the rapidly rising coins such as ETC and XRP. ETH has also made inroads into the dominance of bitcoin within the portfolio. I’m not sure we have enough information to draw anything from this trend at this stage but I think it may be interesting to monitor over time.

Total performance now sits at +135.01% since the start of the experiment and the models appear to have sidestepped some of the extreme volatility seen in some coins during this time.

We have also made a change to the learning capabilities of the models – I will detail these changes in a separate post.

— Wintermute —

AI Model Architecture

I’ve been promising since I started this blog to present some of the key design decisions and architectural choices we have made. Time constraints have limited that but this weekend I have finally put together an overview of what we’re doing and how we approach the problem.

Just for clarity, this architecture is the full solution when we go into production. The infrastructure we are using for our live trading diary is identical except it doesn’t link through to the hedging engine. With the relatively small amount of capital we are trading with this level of integration wasn’t required – but it will be essential as we move onto a full production footing. As always, comments and questions gratefully received as often the best ideas come from an open discussion about the pro’s and cons of a solution.


When designing an AI solution to trade cryptocurrency markets we imposed some key design requirements which we believe are critical to utilising AI to trade these markets:

  1. Any solution must evolve over time. Financial markets are not stationary processes. The factors that impact performance change over time and the mathematical characteristics of a market will change over time – sometimes rapidly. Any solution developed must be capable of adapting, and sometimes radically changing the model to track changes in the market as they are happening.
  2. Any model developed must be robust and not over-optimised to a market or specific market condition. This creates some interesting conflicts between requirement 1 and requirement 2. Any solution must be designed in such a way that the fitness function considers not just performance but consistency. Any indication of over-fitting or over-optimisation needs to be identified and rectified.
  3. Ability to bootstrap with limited trade history. By working with an exchange, we have had access to a significant amount of anonymized trade data but this alone is insufficient to give the history required to analyse trade opportunities and identify the best opportunities. To overcome this limitation, we created significant trade history using “naïve” standard trading models and indicators. In the first instance the AI model was set the task of beating the static indicators. Instead of trying to learn from first principles the models were targeted with improving upon an existing trade set. By starting with a simpler problem to solve the model learning could be kicked off successfully. We then extended this approach to improve upon some of the learned models building layer upon layer of expertise.


The central engine of the AI model is the deep learning algorithm that learns the key characteristics to profitably trade the cryptocurrency markets; but this is only one part of the whole.  The AI trading model, in its entirety consists of four parts:

  • Pre-processing to generate model ideas and structure
  • Deep Learning training module
  • Live Candidate Evaluation
  • Trade Execution

These four elements work together to make the entire solution effective and scalable as the funds traded by the model increases.






Step 1. Pre-processing.

The pre-processing stage is driven by genetic algorithm based models. We start with a large population that sets the “DNA” for the models that are then trained. This DNA controls the structure of the deep learning network, the learning parameters, the iteration count / early stopping criteria and the inputs to the model (what price series to include, which static models to use etc).

There are some unique twists we have added to this technology to make it more suitable for our purposes; gender and mutation.

The entire population is split 50:50 “male”and “female”. The elements of the DNA for both genders are identical but there is a difference in the Fitness Function for male and female models when we rank the models for fitness to produce offspring.

This difference in fitness function prevents the models from a tendency to cluster around a single “strongest” candidate. This is critical for our domain space as the population must maintain diversity to support Key Requirement 1 – the ability to adapt as market conditions change.

Mutation is used, again, to prevent a stale population with all parameters in a similar range but we have extended this to the model inputs. The model can combine models as part of its DNA structure. Over time this will lead to entirely new static models being evaluated by the model and included in the population if found to be successful.

Step 2. Deep Learning Algorithm.

Rather than re-invent the wheel we have utilised TensorFlow, a set of deep learning libraries developed by Googles Machine Intelligence research organization. The libraries are optimised to run on NVIDIA GPU’s allowing incredibly efficient learning runs to be executed on large amounts of data and complex models.

By parallelizing the control software to run multiple instances in parallel we can run multiple models in parallel against a bank of NVIDIA cards to power through the entire population rapidly and generate new candidate models.

The models learn using the criteria controlled by the GA element of the model and evolve their own unique set of characteristics that make them unique amongst the trained models.

Step 3. Live Candidate Evaluation.

With any deep learning implementation one of the key control points is preventing “over-fitting” to the presented example cases. The models, if care isn’t taken, can go beyond learning the characteristics of a market and instead “memorize” the market behaviour and recall perfectly what has happened in the past but have no valid model to project forward and trade markets profitably.

There are two approaches one can take to overcome this problem. One approach is to analyse the degrees of freedom in the model structure and try and limit the model to a complexity that is appropriate to the data available for learning. The alternative approach, and the one that we use, is to let the GA models present a very large number of candidate models. These models are then weeded out over time using live trading data to see if the results stack up over time. Unless a model has similar return characteristics on live trading as in the learnt data it is discarded. We believe the power of the Genetic Algorithms to evolve to the correct learning characteristics far outweighs the ability for any group of people to analyse the structure manually and determine the best network structure.

Step 4. Market Execution.

The result of Step 3 will be a set of live models that are the best candidates at any point in time. These candidates evaluate live market data 24×7 and execute orders automatically to take advantage of opportunities it identifies in the marketplace. To enable automatic execution to be safely implemented and also to allow the model to trade in relatively large size in markets that are relatively illiquid we have integrated the model with an automated hedging engine.

This engine has access to multiple exchanges with trading capability on all of them. Rather than hitting a single exchange at a single point in time the model will gradually feed orders into the market across multiple exchanges. It will start with the optimum exchanges (if selling then those exchanges that have the highest prices) and start selling on these exchanges. As the price starts to fall below other exchanges then the model will switch to the new “best” exchanges. By continually switching and selling relatively small parcels the hedging engine will both achieve the optimum execution price and ensure that the action of the bot doesn’t have a detrimental impact on the market as a whole.


By combining proprietary software with the power of Googles Tensorflow we believe we have produced an architecture that is innovative but robust. Our unique combination of Genetic Algorithms for structure and control with Deep Learning technology for specific learning and model development has created a solution that meets the key design requirements stated at the outset.

By delivering on these design requirements we have a solution that is not only effective now but has the capability to remain profitable in the future, adapting as conditions in the market change and learning to take advantage of new opportunities as they present themselves.

Finally, by making the trading entirely automated, integrating with a hedging solution that controls the execution and risk we can operate in a truly 24×7 manner, taking advantage of opportunities whenever they present themselves.

— Wintermute —

Late Posts

First an apology, I’ve been a bit lax posting up[dates over the past week. Workload has picked up as we approach the official launch of the models and I’ve not had time to post the updates so tonight I’ll give a rapid fire of what’s been happening then drill down into particular aspects in following posts.

So recently the model has bought back into Etherium (ETC) at a rate of 212.326, DASH at 132.701, and Ripple (XRP) at .3085. These are the only purchases as the models still seem to be treating this latest rally with caution.

Performance now stands at +112.07% after costs. More updates in coming days.

CurrencyStarting BalanceUSDCryptoRateUSD EquivTOTALGain/loss
Ether Classic$203.00$1,012.29017.007$0.00$1,012.29398.67%
Hold BTC$23,938.00$0.0022.907177032491$57,061.78$57,061.78138.37%

— Wintermute —