Hacker News new | ask | show | jobs
by chollida1 4371 days ago
Wow, looking at the order book of bitstamp [1] through the eyes of someone who lives in the world of market microstructure is eye opening:)

There are huge holes everywhere in the order book and the liquidity at each offering level seems to be completely without reason.

I just spent 20 minutes applying the sort of algorithms that'd we'd normally run on each stock to make markets in it and it can't detect any real patterns or justification for the bid/ask levels.

Is this just a case of everyone in the bitcoin market being "unsophisticated" in the quantitative sense? or is there some new form of market micro structure being created here?

Thoughts??

EDIT For people asking about what you'd expect to see:

1) After the initial price level, you'd generally expect the next 10 or so price levels to be pretty tight. In the bitcoin case some of the spreads between price levels are larger than the bid/ask spread.

The price levels don't appear to have any logical basis behind why they are placed where they are.

2) volume at each price level. Similarly to above the volume at each price level doesn't appear to have any discernible pattern. Typically volumes would increase at each price level, up to a point, as more people join the market at each price level.

They don't break out a level 3 quote( order book by order, as opposed to price) so you can't really see how many orders are backing up each price level but given how small the volume of many of the price level are you can probably assume its only one person/order at most levels.

[1] https://www.bitstamp.net/market/order_book/

14 comments

I've been holding Bitcoin since it was $10. In my view, Bitcoin has always been thinly traded because most people new to Bitcoin learn that they should acquire as much of it as they can afford to, and then withdraw all of it from a centralized service. For example, they learn that decentralized, trustless money can only be decentralized and trustless when there's no middlemen involved. Storing BTC on an exchange just invites back the middleman. Which is just not part of the narrative.

Because of this, Bitcoin exchanges have always lagged the market, and BTC-denominated trading volumes will almost certainly always remain small. The real demand comes from people who want to hoard all of it that they can. It'd be a lot like Pogs if it weren't for the sorry state of government issued currencies.

Can this drive more and more people to currencies backed by nothing and governed by algorithms? Any news that affects this picture, moves the price, often times significantly, e.g. China. So in effect, the price of Bitcoin moves on whether the dream of breaking free from government issued currencies worldwide can actually happen.

In order to buy Bitcoin, you pretty much have to get over the fact that the only sustainable demand could come in the event that public trust towards mainstream institutions continues to erode to the point that people at large no longer trust the money. Or no longer trust the money for other reasons. The people who bought into BTC early on for pennies, viewed the situation like this, and many of them refuse to sell. I've seen people try to claim half of all Bitcoins have been deleted from hard drives in the early days or lost, which I find unbelievable. Then again, having been involved in the Bitcoin space for several years now, there's very little left that I find unbelievable. There's an enormous amount of disingenous players, and it's completely cut throat actually. If you're crazy enough to get on board with Bitcoin, chances are non-zero that you're also crazy enough to do and say anything to take people's BTCs. Because really, the narrative states that the price of BTC can only go up as more and more people lose faith in government backed currencies. The whole concept of a currency is based on mutually shared delusions, so it's really not without merit.

To cut it short, this results in poor liquidity. I haven't run the numbers myself, but I very much doubt the BTC trading volume, as measured in BTCs, as done anything but gone down now that the price reached $1200. That _really_ got the early adopters dreaming.

I'm honestly become extremely jaded and cynical over the last year in particular. If you think the idea of cryptocurrency can't work, there's not much you can do besides short it or ignore it. The latter is really quite hard, because anyone, even someone with less than 1 BTC to their name, inevitably finds it worth commenting on Bitcoin stories, and submitting Bitcoin related news of their own on social networking sites.

Bitcoin exchanges are moving to reduce fees to zero and add leveraged trading, because that's all you can really do to offer substantial liquidity in a market where all of the "real" participants aren't interested in trading, or spending the underlying. There's just not enough trading activity. It goes back to the narrative. The sad part is most exchanges are shoddy or even outright fraudulent, see: MtGox (Mark Karpeles in all likelihood stole 850,000 BTC, and no i don't find this surprising in the least bit).

All of you coming at this from the angle of HFT are playing with fire. That's all I can say.

I'm not saying any of this is a good thing, quite the contrary. The price of Bitcoin is effectively determined by day traders, payment processors like Coinbase and BitPay with clientele that effectively accepts BTC and then dumps it on the market, along with the odd miner or newbie looking to acquire coins en masse. Not to be mean spirited, but what the heck. Everyone else doesn't matter, because they don't have enough money to affect the market.

Truly, the Bitcoin concept itself more closely resembles MLM / network marketing than any one traditional financial instrument.

Finally, anyone who has invested or lent BTC over even a short timeframe in the past two-three years will tell you that there's no incentive to invest or lend or spend BTC. It is what it is. The only interesting game is acquiring as much BTC as you can afford and then playing with altcoins, which are mostly P&Ds.

Maybe it's a racket, maybe Bitcoin is only useful to spend on illicit items. Even so, the fact that more and more people are becoming interested in the idea of a currency governed by an algorithm just goes to show how little trust there is in mainstream institutions. This is why I'm very begrudgingly bullish. I don't think anyone who day trades Bitcoin knows what they're doing. I think it's profitable to sell at the top of pure manic phases, but it's not worth doing that when you consider taxes and reporting requirements. Buy and hold BTC in a wallet only you control. This has always been the best option, and it explains the overall shoddiness of the Bitcoin exchange scene.

> but it's not worth doing that when you consider taxes and reporting requirements

That's like saying it's not worth owning stock because of taxes and reporting requirements; you're either very young, or you're just way off base.

Sorry, but you can't compare MtGox to the NYSE. Two points:

1. Bitcoin is _very_ thinly traded. I'm speaking as someone who sold at $1100 and bought back in at $450, which at the time was very near the bottom. In a matter of seconds, the price was $500. In those precious seconds, I'd be shocked if more than 10000 BTC traded hands. That's barely enough room for a handful of traders to call the bottom. Like I said, very, very thinly traded.

2. I would never do the above, ever again. Speaking as an American citizen, there's no good domestic exchange. If you're dealing in amounts above $10,000 say hello to the FBAR. The BSA's online efiling site isn't quite as bad as healthcare.gov, but JFC. Ultimately you have to use IE on Windows, load a PDF through IE's Acrobat extension, and then fill out the form inside IE. You then have to sign the form with your given PIN, which execs some JavaScript if I remember correctly. Obviously the FBAR form isn't fun. I picked up a few more coins but at the cost of having to disclose all of my financials to the BSA, and I'm just praying that I did things correctly. On top of that, taxes. YMMV, but IMO it's not worth the hassle to sell.

> Sorry, but you can't compare MtGox to the NYSE

I didn't, in fact I never mentioned Gox at all. Gox is not Bitcoin. I commented on your mention of taxes/filing being too burdensome, nothing more. Saying trading is not worth doing because of taxes/filing being too burdensome is just silly; the requirements are the same as for any other capital asset. People don't avoid trading the stock market because the taxes/filing of capital gains is too burdensome and they shouldn't avoid trading bitcoin for that either. If you can trade profitably, then it's worth it.

Are you sure FBAR filing is required for amounts over $10,000?

http://www.bna.com/irs-no-bitcoin-n17179891056/

Edit: Actually, I guess you meant your account on Mt. Gox, so nevermind.

For more lols check out the trading API. There is no TIF for orders and there isn't any obvious way to get fills as they occur. I guess you just poll the api to check for fills but they also say they'll ban your IP if you poll too often. Nice. Also no mechanism for cancel on disconnect or whatever the HTTP equivalent of that would be.

Maybe there is some money to be made there, but it's hard to imagine trading with that kind of tech.

https://www.bitstamp.net/api/

The btc-e API is far far worse. Some of the messages are in Russian and some are in English (randomly). Even worse (and a deal breaker for me) is that the order id can change underneath you if your transaction is split to fill the order, so there is no way to tell if your order completed or not. I've talked to people on Reddit who say they've made it work, but I'd never trust a bot spending money against an API like that. It's amateur hour when it comes to these exchanges and their API designs.
That's the same (almost) issue that Mt.Gox supposedly famously had with the actual blockchain, transaction malleability. I've read that Mt.Gox actually lost tens of Bitcoins in this way and it was a red herring for the whole actual giant scam that was perpetrated, but it was still a real vulnerability that needed patching or working around.
Most of the exchange APIs are pretty dreadful to work with. Shameless plug, but I've had to a build a unified library to deal with this at Tradewave[1] and it has been challenging.

Some of the newer, more professionally managed exchanges support FIX but those are at very low volumes right now.

[1] https://tradewave.net

Cool idea!

Some questions/thoughts:

Do you provide any access to raw tick-by-tick event data or just bars?

How do you secure your users' scripts so they don't worry about you stealing their ideas or front-running them?

It might be useful to provide FX rates as a feed so users could come up with a synthetic price for non-USD pairs.

For guys who want to work passive orders, an API where they can pass a dictionary of prices/sizes they're willing to buy/sell at into a goal seeking algorithm that handles canceling/placing individual orders might be a better match and more convenient.

Thanks.

> Do you provide any access to raw tick-by-tick event data or just bars?

The minimum granularity is 1-minute candles, where the latest candle becomes available at the close of each clock minute (e.g. 02:00:01 if we're fast enough).

> How do you secure your users' scripts so they don't worry about you stealing their ideas or front-running them?

There's certainly an element of trust here. There's a clause in our license agreement stating that we'll never access user strategies unless you ask us to, or it's needed for some kind of maintenance.

We don't trade on user strategies. That's not the model here.

>It might be useful to provide FX rates as a feed so users could come up with a synthetic price for non-USD pairs.

More generally I'll be adding a way to load in arbitrary data via HTTP requests within a strategy.

> For guys who want to work passive orders, an API where they can pass a dictionary of prices/sizes they're willing to buy/sell at into a goal seeking algorithm that handles canceling/placing individual orders might be a better match and more convenient.

These kinds of features (e.g. VWAP orders) are in the pipeline. There's certainly a need for tools like that.

I think one reason is that many people in the bitcoin market are unsophisticated compared to your normal market traders.

But also, Bitcoin is an asset all by itself. You can't hedge it against other assets, like you can do with corn or tech. You can't easily short it. So, there's no "true" reasonable price range like with most assets, and no normal influences on the price. It's basically truly a bubble of hot air everybody is bidding on, except with the hope that the bubble will never burst, and be used as currency.

Look over at http://www.reddit.com/r/bitcoinmarkets. The "analysis" there will probably make you laugh and cry at the same time.
I think the primary reason you don't see large amounts of sophisticated market makers is that the Bitcoin exchanges don't provide rules that are very favorable to them. The per-trade fees are high and liquidity rebates rare.
As someone who doesn't live in the world of market microstructure, what kinds of patterns or justifications did you expect to see?
There are a lot of amateur day traders in the bitcoin community who just wing it. I'd say weird patterns you find are probably because of that.
Well, a big part of the sparsity of the order book is that the tick size is tiny for a market this immature.

Take the USD/JPY rate for example, which moves in ticks of 0.01 and is currently sitting at 101.83, so the tick size is 0.0098% of the price (or about 1 basis point). This is a mature currency market between two giant countries.

By comparison, BTC/USD also moves in increments of 0.01 but its price is 655, so the tick size is 0.0015% of the price (0.15 basis points) which is absolutely tiny for such a thinly traded market.

I'd suggest that it should be trading in ticks at least 10 times larger. A cursory glance at the order book (top of book is currently 654.03 and the tenth level is 653.00 on the bid) shows that this would result in the first ten levels being filled most of the time. If it traded in increments of $0.20 (20 times the current tick) then the first ten levels would easily be filled.

That should create opportunity for automated trading. Identify large orders and place small orders a de minimis amount ahead of them when the bid-offer spread is sufficiently large. If someone trades with your bid (offer), try to be the best offer (bid) to exit and make the spread. If the large order behind you starts trading, trade with it to lose 0.01.

I've traded these markets by hand before using relative value signals from other exchanges (e.g. buy on bitstamp if btc-e moves up and bitstamp hasn't yet). You can't really do pure arbitrages since it takes so long to move money around but if you can identify which market leads you can use that as a starting point for coming up with a fair price to trade around. I made money easily but gave up on trying to automate it since the volume is so low, bid-offer spreads are often tighter than 2*trading fees, you can't short-sell easily/cheaply, exchanges seem incompetent or downright crooked, laughably bad APIs, etc.

These markets are wildly inefficient though. For a home day-trader or hobbyist there's easy money to be made. It's absurd how slowly price discovery trickles from one market to another. Most modern markets don't even get mispriced by a penny for more than a few microseconds, but there are nickels, dimes, quarters and even dollars of mispricing to capture in BTC/USD markets clicking on the screen.

You could probably dominate with an algo, but how much can you really make in a market that trades 10s of millions in notional value a day? There are also way too many exceptional conditions to let it run even semi-unattended since the exchanges are too immature. Anyone who's capable of doing it can make more doing the same thing on a real market.

ETA: Exchanges in this space are really, really bad. Some don't even know about rounding errors when using floating point for prices. Or would you trust trading on a market that can't even match trades as an atomic event? http://www.reddit.com/r/Bitcoin/comments/1r4d6t/bitstamps_st...

Yes, the exchange fees are astronomical.

It looks like the spread if you wanted to trade 10BTC is around $2 (just looking at the last hour or so of data).

On BitStamp the exchange fee is 0.2% (at minimum - can be higher) so trading 10BTC twice (one buy, one sell) would cost you $20 in bid-offer spead, but about $26 in exchange fees - insanely high!

Usually you expect the exchange fees to be 1/10th to 1/5th of the spread. With fees this high and no rebates, I wouldn't even be sure I could make a profit as a market maker even if you could exit every position immediately.

Genuinely interested here. Would you mind explaining the terminology, or even better, expand on your thoughts in a blog post or something?

Bitcoin exchanges are generally very illiquid, in the meaning that little funds are kept on the exchanges. (Because there are no regulations and guarantees.) Would you not expect "huge holes" in such an order book? Why not?

What does "price level" mean? I read it as the distance between orders in the order book, but then your comment does not make sense. You are surprised these levels are farther apart than the bid/ask spread. Why?

What does "unsophisticated" mean? It seems to me you mean this in a specific sense rather than the dictionary meaning of the word. How is it that no discernible pattern is indicative of a less sophisticated market? In the layman definition of the word, one would expect the opposite.

I don't know if other markets behave the same but Bitcoin exchanges have large dark components to them. If the price moves dramatically, lots of coins move in/out of the exchanges. Some people believe the days-destroyed metric is indicative of these movements, but in practice things are of course not that simple.

As you might understand, I do dabble with Bitcoin trading on the side on a pure hobbyist basis and I would be very interested in your views on this. I don't know if there is a personal message function on the HN board but any answer would be appreciated. I think a lot of traders on Bitstamp and other exchanges are hobbyists too, but I have the feeling that something happened during the runup to the October rally and would not be surprised if there are quite a few pros among us now.

https://www.bitfinex.com/ allegedly (or at one point) claims to offer FIX connectivity. And they have swaps for BTC.
Why would FIX support help? FIX provides a means of expressing useful order types, but it doesn't imply that there's a backend that implements them.
The presence of FIX in their offering indicates the company was built by or is run by someone who has some (possibly dated) understanding of what is going on when it comes to implementing trading systems.
I'm not sure "decimal digits equals value then 01h" is as indicative as you imply it is. :)
Is this just a case of everyone in the bitcoin market being "unsophisticated" in the quantitative sense? or is there some new form of market micro structure being created here?

Not everyone, but a lot of people heavily involved with bitcoin and other cryptocurrencies are rather unsophisticated.

Anyone reading this comment: Has someone started doing automated round trip trading between the various cryptocurrencies and conventional currencies?

What would you recommend as introductory reading to a person interested in market microstructure and market making? (Background in finance and programming)
Rather heavy reading, but this is probably what you're looking for: http://www.amazon.com/Trading-Exchanges-Market-Microstructur...
This is a great book. I wouldn't say it's "heavy reading"; it's like the "TCP/IP Illustrated" of money.
Bitcoin trading is mostly done by bots/day traders and the orders shift around all the time a whale/bad news moves the market, so I wouldn't try to find much justification apart from people trying to make short term profit
The main driver behind Bitcoin is amateur speculation. As those guys don't stand any chance on real markets, they find opportunity in Bitcoin.
All "real markets" need suckers, just like a wholesale market needs retailers. Institutions are chasing the consumers, not the other way around.
Exactly why eventually Wall Street will get into Bitcoin - it's full of suckers with money.