Author

Topic: Crypto-HFT (Read 120 times)

newbie
Activity: 3
Merit: 0
February 06, 2020, 06:37:50 AM
#1
28.11.2018
It has been 9 months since high-frequency strategies have taken the test of practice - as high-frequency as current cryptocurrency exchange can handle, that is. Nine months are a good period in many circumstances for some conclusions to mature. For this analysis we took our data from about twenty accounts, nearly all unrelated and managed by traders and funds with widely diverse trading approaches. The one thing almost all have in common is that they are arbitrage-based (1- and 2-legged, basket, calendar and every other kind). But in the group there are people inclined to take risks and averse to risks, those who flood exchanges with orders and those who limit them, makers and takers etc. This kind of motley composition makes it possible to offset particular traders' quirks and produce an objective, roundtrip-calculated estimate of the environment on different exchanges.
Here we cover 5 exchanges (in the parentheses is the number of transactions over these 9 months):

Bitmex (FUTURES) (54.8 mln)
Bitfinex (SPOT) (6.8 mln)
Cryptofacilities (FUTURES) (1.1 mln)
Deribit (FUTURES) (3.9 mln)
Hitbtc (SPOT) (21.7 mln)

A couple of words first about why these exchanges and not others. At the moment these are the only exchanges freely available to traders from our country, with regard to adequate commissions, sufficient margins of profit and order-book liquidity and, most important, a reasonable API that lets a person trade without worrying about connection loss, order disappearance and other beauties of algorythm trading.  Trading has gone on on a number of other exchanges, but mostly with few trades vs. the amount of deficiencies of the above list.

Below is a graph of our orders in microseconds
https://drive.google.com/file/d/1hmmlveDprkA1yfXjGKppz7fatAIkVoKH/view?usp=sharing

(the caption for hitbtc has vanished for some reason - the blue line is hitbtc)
.
What stands out is that bitmex is the worst exchange in the selection. And that is borne out by facts by and large, but with some qualifications. While charting I filtered out price extremes, and the order base of bitmex needed the least moderating, while such places as deribit had them a-plenty (deribit throughout the period has had them in the hundreds, other exchanges not quite so many) with a very good roundtrip avg. 31 mlsec. Extremes appeared when we placed orders and the exchange did not respond or responded very late or responded with two contradictory answers ("order cancelled" and the next second "order placed" and such). Now, bitmex had only a few instances like this; on this exchange, if the order gets into the core, it will most likely be put up and be normally processed by algorithms. But bitmex is well-known for a different problem: a whole lot of people crashing into the narrow gateway of their core, all trying to get in and often getting their orders refused, which is just what the exchange ends up replying to your bot.
Considering together the least problematic to-core delivery speed and normal algorithmic transaction problems, I would award the prize to Cryptofacilities (avg. 14 mlsec). Over the whole period their bot made very few errors putting up orders and processing them.

Average order placement speed:
Bitmex — 898 mlsec.
Bitfinex — 138 mlsec.
Cryptofacilities — 14 mlsec.
Deribit — 31 mlsec.
Hitbtc - 168 mlsec.

A couple of words separately about deribit and bitmex
Bitmex spoils its statistics with rare sporadic long - more than 2 sec - placement delays (2-5% of all attempted orders). If those are take out of the equation, average speed becomes around 400-500 mlsec, which is comparable with the others.
Deribit looks much better than others speed-wise, but, as I said, order processing is very unstable ( >3% of orders get lost in the mists). With that kind of "stability" deribit is difficult to recommend to those who intend to place their bets and go to sleep - some orders may vanish and we will never know; this exchange is best-suited for people always in front of the monitor.
Distribution is more scattered on the other exchanges.
The following graph excludes Bitmex to make the other exchanges more visible.

https://drive.google.com/file/d/1I4tOZxI_EsRhfkmmC2oXReffk1OGmJBC/view?usp=sharing

They are clearly each in their average value corridor.

We thought it kind of strange that deleting an order takes longer than putting it up.

https://drive.google.com/file/d/1y1hXOsD-zb_g_WaUJLheBZJbmcbUWES4/view?usp=sharing

Bitmex — 1441 mlsec.
Bitfinex — 188 mlsec.
Cryptofacilities — 87 mlsec.
Deribit — 59 mlsec.
Hitbtc - 184 mlsec.

Bitmex has the same problems here as with adds, that is, lots of impossibly slow, seconds-long, take-downs. However, confirmation did eventually arrive every time.
We get a notably different profile from Cryptofacilities. The average is much worse, and there is a lot of spread paint.
Bad dell values say something about exchanges' suitability. If you can't pull out quickly, you stand in greater danger of getting a bad price.
Our analysis here only assessed their fitness for algorithm-based trading, where some automation is possible. A lot of powers HFT traders on traditional exchanges are used to are beyond our reach here, of course (e.g. the Moscow Stock Exchange roundtip times are hundreds of times shorter, and if we tried to trade there at the speeds of, say, hitbtc, we would get suckered 184 times while trying to delete an order). This puts limitations on many strategies on crypto exchanges, we have to consider the chance of exchange failures (no reply to an order, a rejected order etc.) On the whole, though, if you trade on a more-or-less suitable exchange (these five are) and try to remember and take into account that you may be unhedged on some positions or that some may fall through, try to calculate the fallout for your strategy, it is quite possible to trade here, make money and go to bed without fearing unpleasant surprises on the account in the morning. Smiley
And that's the best that can be hoped for.
Jump to: