作者:Eduardo Pena Vina
今天为大家分享一篇比特币高频交易的文章,以项目形展示,附有代码,大家可以从文末进行下载。
在这篇文章中,分析了比特币交易所中高频交易一些问题。 由于迄今为止这个市场极不受管制,因此这种行为几乎没有任何限制。 文章展示了超过99%的订单是如何填补的,而不是扭曲市场的看法。 此外,文章还尝试发现常见的HFT策略,例如 Quote Spoofing, Layering 和 Momentum ignition。 鉴于这些交换的匿名性质,最后的这些结果在某种程度上都是主观的。
This analysis has been carried out with order data from the Websocket stream from GDAX, a US based digital asset exchange owned by Coinbase. It is one of the largest markets (over 42 MM USD/day) and it exposes a high performance socket where all orders are broadcasted. In addition, it offers some interesting features for data analysis:
1、Orders are timestamped (as opposed to Bitfinex, for example)
2、It has millisecond granularity (again, as opposed to Bitfinex)
3、It says whether an order has been matched or canceled -one could argue that disappearing orders far from the bid/ask spread must have been canceled (and it's true), but for orders inside the spread, this information is necessary.
While data has been captured for several days (at the time of this post I'm still capturing data), for the following analysis only data from July 21, 2017has been taken. Mind you, there are still over 2 Million datapoints.
Since the GDAX feed does not explicitly keep information of the current best bid/ask, a little preprocessing is needed. The best bid is the highestprice for currently open BUY orders, while the best ask is the lowest price for open SELL orders. Although this calculation is not complicated nor particularly slow, it's better to append the current best bid/ask as additional columns. No further preprocessing has been carried out.
代码实现部分
[1]https://en.wikipedia.org/wiki/Bitfinex
[2]https://www.gdax.com/
[3] Source:https://coinmarketcap.com
[4]http://parasec.net/blog/order-book-visualisation/
[5]http://www.bsic.it/marketmanipulation/
[6]https://www.theatlantic.com/technology/archive/2010/08/explaining-bizarre-robot-stock-trader-behavior/61028/
[7]https://docs.gdax.com/
来源:https://nbviewer.jupyter.org/github/ghgr/HFT_Bitcoin/blob/master/hftbitcoin.ipynb
知识在于分享
在量化投资的道路上
你不是一个人在战斗
领取专属 10元无门槛券
私享最新 技术干货