News for hackers. Stuff that matters.
Re:The Accidental HFT Firm by SkipperCat on Saturday June 10, 2023 @08:43AM (#36269991)
One thing I love about the HFT world is the race to be fast. You cant get better by scaling out, you have to make your trading server as fast as possible. This leads to some whacky but clever hacks. I've always felt like I was working on a F1 race team when working in HFT.

I never came across isolating CPUs, TCP offload, FPGAs, layer 1 switching until I joined a HFT shop. Its like a whole different way of looking at computing system architecture.

Re:The Accidental HFT Firm by jacquesm on Saturday June 10, 2023 @09:15AM (#36270191)
Optimization for latency is a completely different game than optimization for throughput. The flip side has similar but opposite hacks and you can get a lot of hints on what to do by looking at that polar opposite as things to avoid.
Re:The Accidental HFT Firm by roflyear on Saturday June 10, 2023 @08:46AM (#36270006)
Necessity is an amazing thing: at a company I worked for, the dev team (which I was a part of) "couldn't make things cheaper" than $14k/m for a small app.

We spun them into their own org, and now its "their money" they are spending. Their bill is $2k/m! Amazing!

Re:The Accidental HFT Firm by thr_low_latency on Saturday June 10, 2023 @08:55AM (#36270062)
It's easy to make things cheap by making them wrong.

Making things fast though is a whole other world.

Re:The Accidental HFT Firm by roflyear on Saturday June 10, 2023 @09:16AM (#36270200)
"You can't get better by scaling out" disagrees with you. That's my point - if you scale out, it's more expensive.
Re:The Accidental HFT Firm by thr_low_latency on Saturday June 10, 2023 @09:31AM (#36270314)
The first step of getting decent latency out of modern computers is to build a pile of cash that's taller than you then set it on fire.

They are optimized for throughput, not latency. If you want to do things in microseconds instead of anything from milliseconds to seconds you look at all the lovely code everyone has written in the last 40 years then throw it on top of the burning pile of cash.

I work in an area where microseconds matter and have to write everything from scratch in kernel mode C because nothing else cuts it.

Re:The Accidental HFT Firm by winstonprivacy on Saturday June 10, 2023 @09:38AM (#36270365)
Exactly my experience as well.
Re:The Accidental HFT Firm by boppo1 on Saturday June 10, 2023 @10:00AM (#36270518)
> write everything from scratch in kernel mode C because nothing else cuts it.

Neat. Is that all for custom processors too?

Re:The Accidental HFT Firm by SkipperCat on Saturday June 10, 2023 @10:02AM (#36270531)
The cost of writing software isn't as horrible as the cost of colocating in the various financial exchanges. The market data feed costs are massive and you really need to make a significant amount of money trading just to cover the infrastructure costs.
Re:The Accidental HFT Firm by thr_low_latency on Saturday June 10, 2023 @12:11PM (#36271754)
The salaries of the people doing this sort of thing start at mid six figures out of university and go up substantially from there.
Re:The Accidental HFT Firm by smabie on Saturday June 10, 2023 @12:47PM (#36272154)
Compensation for employees in HFT tend to be extremely high. Employee comp number one cost for any trading firm.
Re:The Accidental HFT Firm by SkipperCat on Saturday June 10, 2023 @05:24PM (#36275269)
Yes, the cost is very high. But the cost of an good software engineer at Google, Facebook or another top tier firm is also very high.

However, when Google buys a WAN link from NYC to CHI, they pay $XX dollars because they don't care about the latency too much. When a HFT buys that same link, they'll spend three times that much just to get a link that is a few milliseconds faster.

Also, the colocation costs at the major exchanges (NASDAQ, NYSE, CBOE) are insane. A cabinet in one of those data centers can be 3x as much as a cabinet somewhere else.

I guess what I'm saying is there are a lot things in the HFT world where you have to spend a lot more money than you would if you were doing similar amounts of work at any other tech firm.

Re:The Accidental HFT Firm by smabie on Saturday June 10, 2023 @05:39PM (#36275428)
Yep totally agree: HFT pays out the ass for any tech due to their very particular requirements.
Re:The Accidental HFT Firm by smabie on Saturday June 10, 2023 @12:49PM (#36272176)
This is my experience as well: almost no existing software is written with ultra low latency in mind (it's optimized for throughput instead).

Getting latency in the micros with low jitter is extremely difficult and requires a bunch of custom software. And getting into the nanos requires a bunch of custom hardware.

Re:The Accidental HFT Firm by andrepd on Saturday June 10, 2023 @09:52AM (#36270470)
It's definitely a very interesting field in software engineering terms. Pity it's for such an unproductive use) end x)
Re:The Accidental HFT Firm by amelius on Saturday June 10, 2023 @09:57AM (#36270499)
It fits in the "our smartest people are making people click ads" category.
Re:The Accidental HFT Firm by hef19898 on Saturday June 10, 2023 @11:04AM (#36271134)
I'd say it beats big ad tech by miles. First, in the current financial system, HFT serves a tengible purpose, an easily quantifiable one. Well, easier than selling ads so. Also, HFT is not spying on it users to turn a buck. And if HFTs screw up, they loose their own money. If ad tech screws up, they risk screwing up democracy (Cambridge Analytica was a thing, least we forget).

For me, HFT is the more honest, and less evil, way of making a buck.

Re:The Accidental HFT Firm by delecti on Saturday June 10, 2023 @11:41AM (#36271482)
Isn't HFT just being a middle man lots of times? If that understanding is correct, then I disagree that it serves any purpose. At least ads help enable new economic activity, being a middle-man just skims off the top of things that are already happening. Also, HFT has contributed to a flash crash before, so it's not free of externalities either.
Re:The Accidental HFT Firm by lordnacho on Saturday June 10, 2023 @11:51AM (#36271572)
What's wrong with middle men? People would just cut them out if all they did was skim a bit from everyone.
Re:The Accidental HFT Firm by amelius on Saturday June 10, 2023 @12:13PM (#36271779)
Eh, perhaps they set themselves up so that it becomes impossible to cut them out.

If you don't know how that works, just look e.g. at TicketMaster:

https://en.wikipedia.org/wiki/Ticketmaster#Criticism_and_con...

Re:The Accidental HFT Firm by lordnacho on Saturday June 10, 2023 @03:19PM (#36274034)
But that's not an argument against all middlemen. Do you think your fishmonger has any value?
Re:The Accidental HFT Firm by amelius on Saturday June 10, 2023 @06:16PM (#36275746)
Not against all middlemen. But it's a response to your argument:

> People would just cut them out if all they did was skim a bit from everyone.

The point is that "just cut them out" is not so simple in many cases. See TicketMaster and the fact that even artists hate them but have to deal with them.

Re:The Accidental HFT Firm by growse on Saturday June 10, 2023 @12:29PM (#36271925)
> ...being a middle-man just skims off the top of things that are already happening.

Presumably you buy all your goods directly from growers / manufacturers, rather than using retailers who are simply there to skim off the top?

> Also, HFT has contributed to a flash crash before, so it's not free of externalities either.

You're confusing the effects of the industry with the effects of incompetent actors within that industry. Besides, the negative externalities are trivial. Institutional holders barely notice or care about flash crashes.

Re:The Accidental HFT Firm by delecti on Saturday June 10, 2023 @12:38PM (#36272038)
The point of the stock market is to be a market. And when possible I do like to buy from companies that sell their product directly.

> You're confusing the effects of the industry with the effects of incompetent actors within that industry

Doesn't that same point apply to Cambridge Analytica, the singular example of a negative externality from ads in the comment I replied to?

Whether HFTs and/or the broader concept of middle-men are better or worse than ads, they're at least still in the same ballpark. I definitely agree with the GP comment's sentiment:

> It fits in the "our smartest people are making people click ads" category.

Re:The Accidental HFT Firm by growse on Saturday June 10, 2023 @01:10PM (#36272394)
> The point of the stock market is to be a market. And when possible I do like to buy from companies that sell their product directly.

What if you're in the northern hemisphere and want to buy strawberries in December? Or you want a pint of milk, but your local dairy only sells it by the tanker?

The point is effective middlemen help markets function even better than if it were just people with things to sell and people who wanted to buy them. They provide a valuable service, which the market also coenienhly ascribes a value to.

> > You're confusing the effects of the industry with the effects of incompetent actors within that industry

> Doesn't that same point apply to Cambridge Analytica, the singular example of a negative externality from ads in the comment I replied to?

I think there's a difference between incompetence and malice. But broadly, yes. I don't think you can write off the ad / data broker industry because of a few bad actors.

> Whether HFTs and/or the broader concept of middle-men are better or worse than ads, they're at least still in the same ballpark. I definitely agree with the GP comment's sentiment:

> > It fits in the "our smartest people are making people click ads" category.

The difference I see is that it's possible to externally measure and quantify the benefits / externalities of HFTs to the market participants. It's much less clear cut in ads, which is why some people feel ickier about that particular industry.

But I don't buy the whole "smartest people doing useless things" argument. You can't make people work on "useful" things, and you can't discount everything that a smart person does in the ad industry as useless to humanity. It's much more complicated than that.

Re:The Accidental HFT Firm by polygamous_bat on Saturday June 10, 2023 @01:36PM (#36272680)
> What if you're in the northern hemisphere and want to buy strawberries in December? Or you want a pint of milk, but your local dairy only sells it by the tanker?

You do understand how that's different from HFT, right? That's more of a market making job. HFT is like hiring The Flash to be your grocery store clerk, who notices you reaching for the milk, and runs in to empty out the shelf and raise the price by 0.003 cents by the time your hand gets there.

Re:The Accidental HFT Firm by growse on Saturday June 10, 2023 @01:48PM (#36272821)
> You do understand how that's different from HFT, right?

HFTs provide liquidity, which by definition is providing what people want to buy/sell, when they want to trade it and it the desired quantity.

> HFT is like hiring The Flash to be your grocery store clerk, who notices you reaching for the milk, and runs in to empty out the shelf and raise the price by 0.003 cents by the time your hand gets there.

This is not what HFTs do. They can't see your "hand reaching", they see your quote hit the book at the same time as everyone else. It's not magic.

They're literally the market makers. Your complaint appears to be that they're good at reacting to new information, i.e. being good market makers.

Re:The Accidental HFT Firm by HDThoreaun on Saturday June 10, 2023 @02:08PM (#36273098)
> they see your quote hit the book at the same time as everyone else. It's not magic.

Every exchange gives "good standing market participants" aka HFT market makers first dibs on orders. If a gallon of milk goes on sale and I'm waiting in line with a market maker I will never make the sale, it'll go the the HFT firm every time.

Re:The Accidental HFT Firm by growse on Sunday June 11, 2023 @02:41AM (#36278814)
Care to link to a major equity exchange's product page and/or sec declaration that details exactly how this works (ie, criteria for getting "first dibs", what that actually means etc)?

Or are you talking about exchange hosting, where you get lower latency if you pay more to colocate?

Re:The Accidental HFT Firm by dahfizz on Saturday June 10, 2023 @05:15PM (#36275179)
That's not how it works. They can't "see you reaching for the milk".
Re:The Accidental HFT Firm by knodi123 on Saturday June 10, 2023 @01:48PM (#36272827)
> Presumably you buy all your goods directly from growers / manufacturers, rather than using retailers who are simply there to skim off the top?

Grocery stores to the things that are difficult for me to do, like sourcing and sorting a wide variety of produce and products. Also, they use economies of scale to make it cheaper than if I were to do the same thing myself without an intermediary.

HFT firms neither enable customers to do things they can't accomplish on their own, nor do they save customers money by exploiting economies of scale.

Re:The Accidental HFT Firm by growse on Saturday June 10, 2023 @01:53PM (#36272882)
> HFT firms neither enable customers to do things they can't accomplish on their own, nor do they save customers money by exploiting economies of scale.

Study after study has shown this empirically the be false. It's uncontroversial and established that spreads have significantly tightened (that means it's cheaper for market participants to trade) because of the rise of HFT market makers.

Re:The Accidental HFT Firm by andrepd on Saturday June 10, 2023 @02:42PM (#36273543)
> It's uncontroversial and established that spreads have significantly tightened (that means it's cheaper for market participants to trade) because of the rise of HFT market makers.

In more concrete terms, what does it achieve? Genuinely curious. It seems to me that "enabling capital to get better returns" is not a noble goal in itself (especially considering the gilded age levels of inequality we experience in the developed world today).

Re:The Accidental HFT Firm by dahfizz on Saturday June 10, 2023 @05:08PM (#36275122)
Have you noticed that anyone can get an online brokerage account and have direct market access for zero fees?

The liquidity from market makers and HFT firms have ushered in this age of free trading for the lay man. This was not possible even 10 years ago.

> It seems to me that "enabling capital to get better returns" is not a noble goal in itself

The majority of Americans own stock. Sabotaging the middle class's retirement to give a middle finger to some billionaires does not seem noble to me.

Re:The Accidental HFT Firm by knodi123 on Monday June 12, 2023 @01:10AM (#36288689)
> that means it's cheaper for market participants to trade because of the rise of HFT market makers.

Okay, so it makes it easier for some people to become market traders.... but is that beneficial? The money that HFT firms are making has to come from somewhere. The only way an average person can be a market participant and come out ahead, is if they have some inside information that the HFT firms do not. Risky stuff. And the ability for people to make trades that turn out to be winners, is reduced by the massive and aggressive trading done by HFT firms.

The massive profits from HFT come from somewhere. Someone is making less because the HFT guys made more.

HFT firms do not benefit the average person- unless you define "benefit" as allowing them to have an easier time gambling at a game that has become harder to win.

Re:The Accidental HFT Firm by growse on Monday June 12, 2023 @06:16AM (#36291108)
Firstly, HFTs do not generate "massive profits". Not sure where that myth comes from. It's extraordinarily difficult to make profit as a market maker, let alone a "massive" one.

Secondly, their income comes from the spread, same as any other market maker. They're able to operate at much lower profit margins exactly because they're HFTs. Making a cent a trade makes no sense if you're doing 3 trades a day. However, it'll quickly become an attractive business if you're doing millions of trades per day. Because spread is what they compete on (and competition is pretty healthy), this drives trading costs down for everyone else.

Re:The Accidental HFT Firm by knodi123 on Monday June 12, 2023 @04:48PM (#36300859)
> Firstly, HFTs do not generate "massive profits". Not sure where that myth comes from

From places like the Tabb Group? "According to research conducted by the Tabb Group, the top 5 High Frequency Trading (HFT) firms make an average of $2 billion a year in profits."

> However, it'll quickly become an attractive business if you're doing millions of trades per day

Attractive as in profitable? Honestly I don't know what you're trying to get at here. Yeah, their margin is small, and they make massive profits by replacing that with volume. Why is that a controversial claim?

> this drives trading costs down for everyone else

It really feels like you didn't even read my last comment. Okay, let's grant that they lower trading costs, while extracting many, many billions of dollars from the market.

I have a great idea for a business. I'll lower the door charge at vegas casinos, in exchange for bumping the house edge up by a fraction of a percent. There you go, I have made it a lot cheaper for everyone to get in and participate in the craps market. I have offered a valuable service and am in no way a parasite.

What's the difference between my business plan, and what you're describing?

Re:The Accidental HFT Firm by smabie on Saturday June 10, 2023 @12:35PM (#36271987)
Middle men provide real value, that's why you buy almost all of your stuff thru them.
Re:The Accidental HFT Firm by HDThoreaun on Saturday June 10, 2023 @01:46PM (#36272802)
Not when the market is already liquid enough for my liking without them.
Re:The Accidental HFT Firm by smabie on Saturday June 10, 2023 @04:03PM (#36274493)
What market are you referring to? Certainly not financial markets where market makers make up majority of volume?
Re:The Accidental HFT Firm by amelius on Saturday June 10, 2023 @02:22PM (#36273328)
Re:The Accidental HFT Firm by amelius on Saturday June 10, 2023 @06:18PM (#36275770)
If HFT was so great then why didn't any HFT firm produce any layman-understandable evidence of it?
Re:The Accidental HFT Firm by fisf on Saturday June 10, 2023 @08:30PM (#36276798)
Because not everything that's useful is layman-understandable.
Re:The Accidental HFT Firm by kajaktum on Saturday June 10, 2023 @10:46AM (#36270940)
HFT provides liquidity and depth to the market tho. It does serve a purpose. How much? Not sure. Does it need to be super duper fast? Not sure. But that is natural in industries like this, because if you don't do it then someone else will.
Re:The Accidental HFT Firm by skippyboxedhero on Saturday June 10, 2023 @11:05AM (#36271137)
It provides unbelievable amounts of value. Most people who complain about HFT, even those who work in the industry, say this from a position of total ignorance about what things were like before.

Even ten years ago, commissions were sky-high in comparison. Twenty years ago, it wasn't possible for most investors to access markets directly at all. You had to go through several layers of intermediaries just to get market exposure (it isn't just execution costs, HFT is an enabler for other innovation like ETFs)...you paid your wealth manager, the fund manager, who paid the broker, etc. Your returns were getting cut by a significant amount.

This trend is still working it's way through the industry but even versus ten years ago, you have seen massive improvements for consumers.

Re:The Accidental HFT Firm by amelius on Saturday June 10, 2023 @03:34PM (#36274198)
It just raises an enormous barrier of entry to access the market.
Re:The Accidental HFT Firm by nradov on Saturday June 10, 2023 @11:22AM (#36271306)
In theory, HFT firms boost growth for the entire economy by reducing the liquidity premium portion of the cost of capital. But in practice it's hard to determine whether that social benefit actually outweighs the value they extract. This would be an interesting area for further economics research.

For retail investors like me, HFT firms allow me to get better trade execution.

Re:The Accidental HFT Firm by latency-guy2 on Saturday June 10, 2023 @01:26PM (#36272573)
It's not unproductive at all - you just don't like what it's being used for, and you should explicitly say that rather than proclaiming an industry to be unproductive.

Avoid the tendency to exaggerate your feelings.

Re:The Accidental HFT Firm by falcor84 on Saturday June 10, 2023 @10:12AM (#36270622)
Everything in computer science can be solved by adding another layer of indirection, other than latency.
Re:The Accidental HFT Firm by Twixes on Saturday June 10, 2023 @10:12AM (#36270628)
I'm always impressed how direct the relationship between profit and mathematics/physics/electronics is in HFT. It feels like a marker of civilizational advancement – it's not enough abstraction to just have fungible means of payment and slices of enterprises, not enough to have instruments derived from these, not even enough to have the ability to trade from afar using electricity. At this point there's value even in making the trades as close to instant as possible. Is it _good_? That's what I don't know – in some way it seems more divorced from reality than the engineering of F1, in another it seems more grounded
Re:The Accidental HFT Firm by mgaunard on Saturday June 10, 2023 @11:51AM (#36271577)
It depends on the market. Most trading venues don't really require a latency much below 100us. The only ones that do are the ones that are fully deterministic. If fastest guy wins, the all you have to do is throw a good tech team at the problem and then money comes in.

Targeting a non-deterministic venue comes with its own set of challenges which are not purely technical. You don't know how long it will take for your order to reach the matching engine nor the likelihood of things changing before it gets there. Simulation is also more difficult. So you have to rely on alpha instead, which is a different game.

Re:The Accidental HFT Firm by parrot987 on Saturday June 10, 2023 @12:02PM (#36271677)
I'm not too familiar with the space, but what kind of market is fully deterministic?
Re:The Accidental HFT Firm by HolyLampshade on Saturday June 10, 2023 @12:15PM (#36271794)
Fully is a hard threshold to meet, but most of the US Equity markets have determinism windows in the ballpark of 1-3us. Some Futures markets have got under the 1us window, though I don’t recall exactly what the threshold minimum is there.
Re:The Accidental HFT Firm by mgaunard on Saturday June 10, 2023 @12:46PM (#36272135)
The most deterministic market is Eurex, which is mostly for trading the eurostoxx and the bund.

The CME is also quite deterministic (largest derivative exchange in the world, big names there are the S&P, treasury notes, eurodollar, wti..)

Off-the-shelf best-in-class solutions run at 30ns (see STAC T0). The fastest people are faster than this.

Re:The Accidental HFT Firm by SkipperCat on Saturday June 10, 2023 @05:19PM (#36275224)
No market is fully deterministic, however there are a lot of correlations in all markets. Take options. The option is a derivative and therefore its price is defined by the underlying stock. This was mathematically proven by Black & Scholes (and they got a Nobel prize for it).

So, when the underlying moves (the stock) the option should move according to the model. But there are time inefficiencies in the market so a HFT can trade against the misplaced option and lock in a bit of profit. Do that a million times a day any you may make a few bucks.

Re:The Accidental HFT Firm by mgaunard on Sunday June 11, 2023 @05:37AM (#36279707)
The parent post is talking about the determinism of the order gateway/matching engine/market data publisher, not the price.

Determinism is achieved there by ensuring there is only one path to the order gateway with everyone having cables of equal length, and that the order in which network packets hit the gateway is guaranteed to be the order the matching engine processes the packets in. Likewise you need to ensure everyone sees the market data at the same time (equal length cables, multicast). Most exchanges fail hard at guaranteeing this.

For your option example, I think you paint a somewhat misleading picture of options trading. You can't trivially arbitrage the spot and the option. There are several unknown factors between the two. An options market-maker works by taking on risk, decomposing it based on the sensitivities of the price to the various inputs, spreading it across the option universe and biasing its prices so that trades statistically take them back to zero. It's closer to a dispersion strategy. For some markets, delta (sensitivity to the underlying) risk is bad to take on so you try to hedge out of it fast, or you avoid trading options with too much delta in them. Trading high-delta requires being fast to react on underlying moves. But that's just an extra requirement when operating this kind of strategy and isn't how you make profit. Even taking out mispriced options after a move is usually mostly done as a way to get out of risk for cheap, and what you'd care about most there is modelling the spot-volatility dynamics.

Re:The Accidental HFT Firm by dahfizz on Saturday June 10, 2023 @12:34PM (#36271975)
I love it. It feels like a rare opportunity to do "real" software engineering for a job.
Re:The Accidental HFT Firm by maest on Saturday June 10, 2023 @02:11PM (#36273147)
It's kind of funny because, on the one hand, yes, you need to be fast and have clever hacks.

On the other hand, your edge can be explained in very simple terms: in the article, their edge comes from the fact that they had a closer colo than other market participants. ITG made money by front running customers[0], cheaper financing means you can arb an ETF more aggressively than the other guy etc.

Like, there are straightforward mechanical reasons why you're making money. No amount of clever hacks can help you if you're at a structural speed, informational or cost disadvantage.

[0]: https://www.reuters.com/article/us-securities-regulation-itg...

Re:The Accidental HFT Firm by SkipperCat on Saturday June 10, 2023 @05:15PM (#36275187)
I've found that most of the HFT strategies are pretty simple. Its exercising a proven mathematical stat/arb condition in the market. The tricky part is finding it first and getting to execute on it first.

However, there are plenty of firms that operate in the low frequency space. Long/short shops are typical for this type of trading. They don't care about order speed. They spend all their time trying to find inefficiencies or hidden correlations between financial instruments and profit from them.

Low frequency tends to be highly research compute focused, while HFT is highly trade compute focused.

Re:The Accidental HFT Firm by aldanor on Sunday June 11, 2023 @06:35AM (#36280030)
Here comes the tricky part: "finding it first" may imply you're have more and more false positives as you speed things up beyond crazy. And so, even if you have a "deterministic" model (and no, it's neither "pretty simple" nor "proven mathematical" most of time), it will get fuzzier and fuzzier. Also, HFT is execution-centric, indeed, but it doesn't mean you can't use complicated math models and all that, it's just much harder to do and is more of a computational challenge (which is part of what makes it fun).

Source: hft quant

Re:The Accidental HFT Firm by intelVISA on Saturday June 10, 2023 @04:48PM (#36274952)
It's like wearing glasses and seeing things As They Should Be whilst everybody else is telling you to just accept and deal with their blurry abstractions.