Brief Update…

Sorry for the lack of posts this week…we’ve had quite a busy schedule and, with no further trades by the bots, we’ve been focussed on our primary model work.

So, how are the bots performing? Well they may be holding tight with their positions but that doesn’t mean no PnL. The positions are moving in the correct direction despite the upheaval in the market caused by the Bitfinex price dislocation. For those not familiar with the cryptocurrency markets, Bitfinex, one of the leading exchanges has been forced to suspend withdrawals in Fiat currency (non cryptocurrencies). This has led to a significant price dislocation as customers try and move their money out using Bitcoin instead. This article provides a good background on the circumstances and impact of this suspension.

Performance of the models as of last night:

CurrencyStarting BalanceUSDCryptoRateUSD EquivTOTALGain/loss
TOTAL$23,938.00$510.00$25,495.98$26,005.988.64%
Bitcoin$16,900.00$0.0014.74927171246$18,377.59$18,377.598.74%
Etherium$4,800.00$0.00101.94894951.2$5,219.79$5,219.798.75%
Zcash$610.00$0.009.4338808772.92$687.92$687.9212.77%
Ether Classic$203.00$0.0075.471698113.4$256.60$256.6026.41%
DASH$610.00$0.008.7370004975.96$663.66$663.668.80%
Monero$305.00$0.0013.413997821.65$290.41$290.41-4.78%
Ripple$510.00$510.0000.0351$0.00$510.000.00%

Thanks for reading – I’ll try and post a longer piece will more design details over the next few days.

— Wintermute —

 

 

 

Training Approach – High Level Overview

I thought I would take the opportunity of the long weekend to put down some of the design principles we use for the development of our model. In particular I will focus on unique aspects of financial market trading that perhaps make it more challenging than many AI problems to solve.
If we consider the usual problem space that an AI is used to address, the process is generally static. By this I mean that training examples can be drawn (within reason) historically and the underlying process can be considered not to change dramatically between the training set and the live sample.

This is, I agree, not strictly true…language does evolve over time and semantic change over the course of decades but the key here is we are talking about an exceptionally slow evolution of the underlying model.
Financial markets are entirely different.

The underlying process and the factors that influence the direction of the market changes over time – sometimes over a very short period of time. Any model to be useful needs to either model the state change when input parameters switch between relevant and less relevant or (the approach adopted by this team) have a fluid model structure that uses different parameters over time and evolves based upon changing market structures.
The challenge is to provide continual evolution without over-fitting due to excessive overoptimization.

In this blog post I’ll discuss the general approach adopted and then, in subsequent posts I’ll drill down into more detail on specific aspects of the overall model.
The first thing to highlight is that we don’t use a straightforward machine learning algorithm as the whole picture. We have 3 key elements that together make up the evolving AI trading models.

Step 1 is a process where from a seed pool of selected parameters, market attributes, market relationships etc. At the outset a very large population of candidate models is created; this population will, initially use random parameters from the pre-seeded pool. There is then a mutation process applied where a small number of these attributes are modified, combined and otherwise altered.

Step 2. Each model is then trained to trade the specified markets. The parameters of these models will be randomly selected using the prior GA process. If we are training on related markets we will often focus on just once model to cover all markets (this is the approach adopted for the cryptocurrency markets). This technique is especially useful when we are dealing with markets with limited data histories.
Step 3. Finally the resulting models with their results are cross analysed and the best models are selected. The selection criteria is a combination of performance and robustness against over-fitting. The best performing models are then combined using GA techniques and a new generation created which undergoes the same process…and so on.
Over time the model finds a set of models that perform best on the market as it stands at that point in time. The best candidate models are then used for trading the relevant markets.

That’s not, however, where the story ends. As discussed earlier the process of the underlying markets alters over time … the models must do likewise. This process defined above does not end with a live candidate set of models … new candidates are created continually and matched head to head with the live models. When they exceed performance on the market as it is now they are then replaced.
As you can see this makes prior performance less reliable as an indicator of future performance but with the benefit that the models continually evolve to match the market conditions as they currently stand.
Given our belief that markets are a non-stationary process then prior performance of any model, static or otherwise, is highly suspect so we believe this is a small price to pay.
I will drill into more details of the modelling approach over coming weeks.
Have a great holiday break…

— Wintermute —

All In on Cryptocurrency

Well … today our Bot has decided that cryptocurrencies are the way to go…After buying both Etherium and DASH we are now long all of the currencies except Ripple (XRP).
ETH Buy 101.94894900 @ 47.08239 (Cost of $4800)
DASH Buy 8.73700049 @ 69.81801 (Cost of $610)

CurrencyStarting BalanceUSDCryptoRateUSD EquivTOTALGain/loss
TOTAL$23,938.00$510.00$24,414.08$24,924.084.12%
Bitcoin$16,900.00$0.0014.74927171187$17,507.39$17,507.393.59%
Etherium$4,800.00$0.00101.94894950.579$5,156.48$5,156.487.43%
Zcash$610.00$0.009.4338808765.322$616.24$616.241.02%
Ether Classic$203.00$0.0075.471698112.641$199.32$199.32-1.81%
DASH$610.00$0.008.7370004973.553$642.63$642.635.35%
Monero$305.00$0.0013.413997821.77$292.02$292.02-4.25%
Ripple$510.00$510.0000.035$0.00$510.000.00%

— Wintermute —

 

And In Again…

Well, 2 days on and the Bot as decided to re-enter both the XMR and ZEC markets at higher levels than it sold out. While not unusual to see this behaviour, the trading is showing signs of being more aggressive and active than we originally expected. This isn’t a bad thing as such but, with the wide spreads and relatively high commissions in the cryptocurrency space we expected the models to learn a more longer term style of trading.
Buy 9.43388087 ZEC @ 63.80671 ($601.94 cost)
Buy 13.4139978 XMR @ 21.08162 ($282.79 cost)

The AI Bot is showing a gain of 4.16% over the 10 trading days so far – Perhaps aggressive and active is the way to go in this market 🙂

CurrencyStarting BalanceUSDCryptoRateUSD EquivTOTALGain/loss
TOTAL$23,938.00$5,920.00$19,014.25$24,934.254.16%
Bitcoin$16,900.00$0.0014.74927171215.9$17,933.64$17,933.646.12%
Etherium$4,800.00$4,800.00044$0.00$4,800.000.00%
Zcash$610.00$0.009.4338808763.25$596.69$596.69-2.18%
Ether Classic$203.00$0.0075.471698112.67$201.51$201.51-0.73%
DASH$610.00$610.00066.252$0.00$610.000.00%
Monero$305.00$0.0013.413997821.053$282.40$282.40-7.41%
Ripple$510.00$510.0000.035$0.00$510.000.00%

— Wintermute —

Our First Liquidations!

Today the bot has closed out 2 of its positions (unfortunately at a loss). Both ZEC (ZCash) and XMR (Monero) have been closed out at a loss. While disappointing, this behaviour is showing good learned behaviour to cut losses early…The overall portfolio is actually at it’s best level to date (+3.02%) which is not bad for 1 weeks trading activity – even in volatile markets such as the cryptocurrency markets.
Sell 10.27033000 ZEC @ 51.61008 = $601.94
Sell 13.41399780 XMR @ 19.38677 = $282.79

CurrencyStarting BalanceUSDCryptoRateUSD EquivTOTALGain/loss
TOTAL$23,938.00$6,804.78$17,856.53$24,661.313.02%
Bitcoin$16,900.00$0.0014.74927171196.6$17,648.98$17,648.984.43%
Etherium$4,800.00$4,800.00042.309$0.00$4,800.000.00%
Zcash$610.00$601.99060.903$0.00$601.99-1.31%
Ether Classic$203.00$0.0075.471698112.75$207.55$207.552.24%
DASH$610.00$610.00067.311$0.00$610.000.00%
Monero$305.00$282.79019.778$0.00$282.79-7.28%
Ripple$510.00$510.0000.03721$0.00$510.000.00%

— Wintermute —

Things are Building Up

2 Days on and our bot has taken a position in two further markets, buying $610 of ZCash and $305 of Monero. The AI model is already showing signs of moving away from the original strategy seeding and learning a much more active style of trading.

Currency Starting Balance USD Crypto Rate USD Equiv TOTAL Gain/loss
Bitcoin $16,900.00 $0.00 14.7492717 1140 $16,814.17 $16,814.17 -0.51%
Etherium $4,800.00 $4,800.00 0 45.247 $0.00 $4,800.00 0.00%
Zcash $610.00 $0.00 10.27033 59.719 $613.33 $613.33 0.55%
Ether Classic $203.00 $0.00 75.47169811 2.793 $210.79 $210.79 3.84%
DASH $610.00 $610.00 0 75.405 $0.00 $610.00 0.00%
Monero $305.00 $0.00 14.58669 19.906 $290.36 $290.36 -4.80%
Ripple $510.00 $510.00 0 0.0358 $0.00 $510.00 0.00%
TOTAL $23,938.00 $5,920.00     $17,928.66 $23,848.66 -0.37%

Unfortunately we have now moved into a slightly negative position – the first since the start of the trial.

— Wintermute —

Trade # 2

Things are a bit busy so I’ve not been able to post any design details to date … I promise to get this done some time over the next month. Meanwhile our bot has executed Trade # 2, buying Bitcoin.
On 3rd April the bot purchased $16,900 worth of bitcoin, delivering 14.74927170 after commission – an effective rate of $1145.819.
Meanwhile ETC has moved against us down to 2.56117. Scores on the doors after todays trade are:

Currency Starting Balance USD Crypto Rate USD Equiv TOTAL Gain/loss
Bitcoin $16,900.00 $0.00 14.7492717 1151.21 $16,979.51 $16,979.51 0.47%
Etherium $4,800.00 $4,800.00 0 44.165 $0.00 $4,800.00 0.00%
Zcash $610.00 $610.00 0 59.8 $0.00 $610.00 0.00%
Ether Classic $203.00 $0.00 75.47169811 2.56117 $193.30 $193.30 -4.78%
DASH $610.00 $610.00 0 63 $0.00 $610.00 0.00%
Monero $305.00 $305.00 0 20.2148 $0.00 $305.00 0.00%
Ripple $510.00 $510.00 0 0.032 $0.00 $510.00 0.00%
TOTAL $23,938.00 $6,835.00     $17,172.80 $24,007.80 0.29%

Still a small net gain.

— Wintermute —

Our First Trade

Well the models have completed Stage I training and have sufficient performance to warrant live trading. We have turned them on and within 48 hours the first trade has been placed.

On 31st March 2017 the model purchased $203 worth of Etherium Classic. After commissions we received 75.47169811 ETC, an effective rate of 2.68975 (after commission).

Currency Starting Balance USD Crypto Rate USD Equiv TOTAL Gain/loss
Bitcoin $16,900.00 $16,900.00 0 1215 $0.00 $16,900.00 0.00%
Etherium $4,800.00 $4,800.00 0 49.65 $0.00 $4,800.00 0.00%
Zcash $610.00 $610.00 0 62.421 $0.00 $610.00 0.00%
Ether Classic $203.00 $0.00 75.47169811 2.82 $212.83 $212.83 4.84%
DASH $610.00 $610.00 0 72.352 $0.00 $610.00 0.00%
Monero $305.00 $305.00 0 20.232 $0.00 $305.00 0.00%
Ripple $510.00 $510.00 0 0.02128 $0.00 $510.00 0.00%
TOTAL $23,938.00 $23,735.00     $212.83 $23,947.83 0.04%

Starting Point

As mentioned previously we will setup the AI to learn and trade across seven separate cryptocurrencies. Each will trade vs USD or a USD equivalent. Tether is a coin that has been issued and is backed by an equivalent amount of USD to the value tracks the dollar 1:1 so we use this on Poloniex that doesn’t support holding fiat currencies.

The system is designed with the capability to trade automatically when a signal is given. Poloniex has an API which we can use; First Global Credit doesn’t currently have an API but we have written our own interface to auto-trade. They are apparently working on an API interface e so we will switch to that when available.

We have adjusted the amount of capital across each coin based approximately on the market capitalisation of the total coin market. While this does skew the early results to be dominated by the largest market, bitcoin, we believe this will be offset over time by the increased volatility of the smaller capitalisation coins. All else being equal these two factors will hopefully balance out.

So to summarise the amount available for the trading of each coin is:

Bitcoin: $16900
Etherium:  $4800
ZCash: $610
Ether Classic: $203
DASH: $610
Monero: $305
Ripple: $510

Total: $23,938

 

So What Are Cryptocurrencies?

As promised I thought a brief overview of what cryptocurrencies are may be a useful intro.

Some of you may be familiar with Bitcoin. Bitcoin is the leading cryptocurrency of the moment and was released into the world by it’s anonymous creator under the name Satoshi Nakamoto.

The concept of Bitcoin was first published on the internet in November 2008 under the title “bitcoin: A Peer-to-Peer Electronic Cash System” from this white paper the original bitcoin code was developed and released in January 2009 as an Open Source project and Satoshi mined the first block of bitcoins ever (the genesis block). The value of the first bitcoin transactions were negotiated by individuals on the bitcointalk forums with one notable transaction of 10,000BTC used to purchase two pizzas delivered by Papa John’s (current value of that 10,000BTC is in excess of $10m).

Cryptocurrencies are digital or virtual currencies that use cryptography for security. A defining feature of a cryptocurrency (until recently) is it is organic in nature; it is not issued by any central authority, rendering it theoretically immune to Government interference or manipulation.

This feature may be watered down by some of the private blockchain based currencies now being proposed by Central Banks to issue their own currencies. For our purposes we will differentiate between Public Cryptocurrencies (those held on a public Blockchain such as bitcoin) and Private Cryptocurrencies (those released on a private chain under the control of an issuing authority.

The other unique element of cryptocurrencies – all transactions are executed by “signing” the transaction with a private key. This private key is known only to the holder of the funds and by signing the transaction the holder of the funds issues a transaction from his own wallet address to the recipients wallet address. Without this private key the funds cannot be transferred – another benefit that prevents automatic confiscation or removal of your funds.

These transactions are all held on the Peer to Peer network and are validated by participants on this network. For bitcoin and most of the other leading public blockchains this validation uses a “Proof of Work” model. This sets the task for “miners” to solve a cryptographic puzzle that allows them to fix the next block of transactions on the blockchain. By rewarding these miners with distribution of bitcoin the network encourages the mining activity and the collective participants on the network validating the chains ensures that the blockchain is not corrupted or rewritten by a “bad actor” in the infrastructure.

It’s worth noting that there are other validation schemes being proposed, especially for private blockchains and in the public chain domain some are proposing alternative validation such as “Proof of Stake” – these are untried at this stage but overcome one of the leading concerns with Proof of Work, the unnecessary power consumption and computing power utilised for “wasted” effort.

For the purpose of our test trading we will focus entirely on Public Cryptocurrencies. Our starting markets will be:

Bitcoin – $16,900 trading Capital
Etherium – $4800 trading capital
ZCash – $610 trading capital
Etherium Classic – $203 trading capital
DASH – $610 trading capital
Monero – $305 trading capital
Ripple – $510 trading capital

We will follow a simple model if simply switching into the cryptocurrencies when the model believes the market will rise and move back into USD when the model believes the market is going to decline.

The exchanges we will use are First Global Credit for the Bitcoins (www.firstglobalcredit.com) and Poloniex for the other coins (www.poloniex.com). Poloniex does not support USD holdings so we will switch into Tether-USD, a USD proxy tradable on Poloniex.

We will publish a trading update whenever trades are executed or weekly if no trades have executed during the week.

— Wintermute —