Live data from Hacker News

Thoughts on low latency trading if exchanges went full cloud

blog.abctaylor.com

91–100 of 184 posts

Re: Thoughts on low latency trading if exchanges went full cloud

#91
post #10

Nice article. Wondering though why trading is not done in discrete batches, e.g. 5 second intervals? Trades in the same interval get filled equally or stochastically? Info about trades with that same 5 second batch delay? Is there some (theoretical) market efficiency thing at play? All this HFT feels wasteful and bad for 'regular' human investors.

Those batched trades are called “auctions” and they are a part of many exchanges.

I think it’s pretty uncommon to do them every N seconds.

A common pattern is to collect quotes before the market open, do an “opening auction” to set the opening price, and then switch to continuous trading for the rest of the day. If trading in a stock ever pauses (which can happen for a variety of reasons) then another auction occurs when trading is restarted.

Re: Thoughts on low latency trading if exchanges went full cloud

#92
post #82

Earlier quoted context omitted.

The same way you would without a clock I guess? You could match what you can distributed equally and leave the rest unsettled. You could let people decide whether to roll-over the partial bid into a new bid on the next clock or to cancel unsettled. You could clock to something both very fast on a human scale (50ms), quick enough it'd still feel instant but slow enough that it could reduce HFT silliness and need for e…

> You could match what you can distributed equally and leave the rest unsettled. Equally per market participant? Do large participant like banks trade same amount as retail investor one trade at a time? Per quantity? HFT will time the end of the interval and decide to place a large order or not.

It would be weighted by bid size. If there's $10m of bids one side and $5m of offers on the other, you match up the $5m on that side and every bid gets 50% settled.

I'm not sure I understand the problem with "waiting" for the end of the clock. The pool wouldn't be public so you couldn't get knowledge inspecting the pool. All bids and offers would be published on the clock and settled by weighing all the bids and offers against each other and matching by volume.

The trickier issue is what happens in this scenario (assuming limit orders):

Person A bids for 500 units @62

Person B offers 100 units @61 Person C offers 400 units @60

Clearly there needs to be full settlement, we have a bidder who wants to buy 500 units at a price which sellers are happy to sell at.

Correct me if I'm wrong, but in a traditional market it would depend on the order they came in.

Here we would need a formula to work out the correct settlement price. Intuitively this ought to be somewhere just above 61. ( If it were just two people, a bid at 62 and an offer at 60, you could intuit a fair settlement would be 61. )

I'm sure fair formulae can be derived however.

Re: Thoughts on low latency trading if exchanges went full cloud

#94
post #52

Fun thought exercise, thanks! My question is, what advantage would a large exchange find in moving to cloud? They’ve already got the personnel capable of managing their environment. They’re not a rapidly-growing startup in need of flexibility. They’re large enough to get at least decent deals purchasing gear. “The cloud” will naturally expect to make a profit on the deal, which likely eats up (and then some) any savi…

Without reductions in personnel, then none.

That's essentially what you're buying from a cloud provider. Most of the time its not so much renting the hardware as renting their labor in maintenance.

That is assuming your hardware needs don't have a wide enough variance from time to time (scale up/scale down)

Re: Thoughts on low latency trading if exchanges went full cloud

#95

Earlier quoted context omitted.

>Quite the opposite, thanks to the tough competition the market makers are setting the bid/asks spreads as minimal as possible. Which leads to less costs for human investors, pension funds, insurance companies etc. It's not automatically the case that the disappeared margins & thinning of bid/asks have been shared equitably between the trading firms and customers. Take two exaggerated markets for example: 1) No HFTs:…

In the United States at least both scenarios you mentioned are illegal. Market makers are not just sitting in the middle of orders. They buy without a seller lined up and then fill orders from their own inventory (or route orders to an exchange in the case where they can't fill a buy order from their own inventory). In cases where they route to an exchange they are required by law to fill the order at the lowest pric…

Latency Arbitrage still exists in a world with NBBO regulations. Research consistently finds that not only does the strategy work in theory, but that it is consistently put into practice by HFT firms to the detriment of other market participants. If a firm can calculate the NBBO ahead of other market participants and the market regulator, it can still legally front-run the market, and risklessly extract rents from end-customers. The NBBO formula is not computationally expensive, and its underlying data is necessarily publicly available to all trading firms. This occurs in the real world, in the order of $billions annually.

The UK's Financial Conduct Authority:

>We use stock exchange message data to quantify the negative aspect of high-frequency trading, known as “latency arbitrage.” The key difference between message data and widely-familiar limit order book data is that message data contain attempts to trade or cancel that fail. This allows the researcher to observe both winners and losers in a race, whereas in limit order book data you cannot see the losers, so you cannot directly see the races. We find that latency-arbitrage races are very frequent (one per minute for FTSE 100 stocks), extremely fast (the modal race lasts 5-10 millionths of a second), and account for a large portion of overall trading volume (about 20%). Race participation is concentrated, with the top-3 firms accounting for over half of all race wins and losses. Our main estimates suggest that eliminating latency arbitrage would reduce the cost of trading by 17% and that the total sums at stake are on the order of $5 billion annually in global equity markets

https://www.fca.org.uk/publication/occasional-papers/occasio...

The University of Michigan's Economics department:

>We illustrate this process and the potential for latency arbitrage in Figure 1. Given order information from exchanges, the SIP takes some finite time, say δ milliseconds, to compute and disseminate the NBBO. A computationally advantaged trader who can process the order stream in less than δ milliseconds can simply out-compute the SIP to derive NBBO,a projection of the future NBBO that will be seen by the public. By anticipating future NBBO, an HFT algorithm can capitalize on cross-market disparities before they are reflected in the public price quote, in effect jumping ahead of incoming orders to pocket a small but sure profit. Naturally this precipitates an arms race, as an even faster trader can calculate an NBBO* to see the future of NBBO, and so on.

http://strategicreasoning.org/wp-content/uploads/2013/02/ec3...

The Bank for International Settlements:

>Conservative estimates suggest that at least 4% of dark trading occurs at stale reference prices. High-frequency trading firms (HFTs) almost always benefit from such stale prices, being on the profitable side of the trades between 96 and 99% of the time. Furthermore, stale trading does not happen at random but is driven by the behaviour of HFTs. HFTs as a group almost never provide marketable liquidity in the dark and rather behave strategically to exploit their speed advantage by submitting marketable orders to execute against stale quotes.

https://www.bis.org/publ/work1115.htm

Re: Thoughts on low latency trading if exchanges went full cloud

#96
post #86

Earlier quoted context omitted.

Pub/sub systems in unicast-only environments are very complex distributed systems to handle the load involved in fan-out routing while maintaining a global order. I had an interviewer once get annoyed with me for suggesting using multicast to solve the fan-out part of a pub/sub system, which made the global ordering part small and simple. We lost a lot by thinking of HTTP as the one true level of network abstraction.

A reliable multicast network that preserves global order even during maintenance and doesn’t drop packets is not something you will find off the shelf. A reliable multi-tenant multicast network also appears to be a rare beast. I’ve only heard of it in finance, and that’s only because it’s private and expensive and all the participants need to be generally nice to each other because it’s a repeated game and the operat…

Do you regularly allow untrusted machines onto your private pub/sub instances? I'm not sure the "operator pulling the plug" part is unique to the finance industry.

Also, yeah, you have to do some engineering around your multicast distribution to make a pub/sub system, but multicast pretty much solves the data rate scaling problem - you are now basically O(1) in the number of connected subscribers.

Re: Thoughts on low latency trading if exchanges went full cloud

#97

IEX Exchange is building a cloud-first stock exchange that uses the concept of "slowed trading" to eliminate some of the worst practices of HFT. They even use a 38 mile loop of fiber to slow down connections that are "too close". https://en.m.wikipedia.org/wiki/IEX

I'm not sure IEX is cloud-first, that would be a recent development. Their 38 mile fiber gimmick is also kind of silly because they have to provide data to a consolidated feed with no delay.

Re: Thoughts on low latency trading if exchanges went full cloud

#98
post #27

> The NYSE runs out of a public data centre (called NY4) which is run by Equinix. No. NY4 is in Secaucus. NYSE operates out of an ICE (NYSE parent co) owned facility in Mahwah about 25 miles north of there. They managed to pick out the one big US equities exchange operator _not_ running in an equinix facility. Sorry but this whole post sounds like someone who is sort of HFT adjacent but doesn't really know what they…

> Sending orders at "09:29:59.9999971 at the hope your order arrives at 100ns past 9.30am." What?

This literally does happen, though. One of the things the hyperscalers have convinced the world is that precise time is hard. Precise time is easy if you are willing to pay extra for your hardware. Sub-10-ns precision is unremarkable when you use PTP.

Re: Thoughts on low latency trading if exchanges went full cloud

#99
post #27

> The NYSE runs out of a public data centre (called NY4) which is run by Equinix. No. NY4 is in Secaucus. NYSE operates out of an ICE (NYSE parent co) owned facility in Mahwah about 25 miles north of there. They managed to pick out the one big US equities exchange operator _not_ running in an equinix facility. Sorry but this whole post sounds like someone who is sort of HFT adjacent but doesn't really know what they…

> Sending orders at "09:29:59.9999971 at the hope your order arrives at 100ns past 9.30am." What? This literally does happen, though. One of the things the hyperscalers have convinced the world is that precise time is hard. Precise time is easy if you are willing to pay extra for your hardware. Sub-10-ns precision is unremarkable when you use PTP.

It doesn't happen. All the exchanges have a "Day" order type that you can send before 9:30 that will be live on the book when it opens at 9:30 (or transitions to the "core" session at 9:30, most US exchanges have a premarket session prior to that). The idea of having some sophisticated strategy that sends 100ns before 9:30 is nonsense.

Re: Thoughts on low latency trading if exchanges went full cloud

#100
post #22

This is an interesting read but I think it leaves outside what kind of trading is the one that would benefit from ULL. ULL and currently HFT seems to be very useful for market making (buying the ask and selling the bid and profiting from the bid-ask spread making parts of a cent per transaction, done a few million times a day), but there are other uses for HFT. One of them would be to execute very big orders over tim…

Your description of market making is backwards. If you're buying the ask and selling the bid, you're paying the spread not collecting it.
Post reply on HN