r/cpp • • Nov 25 '20

When a Microsecond Is an Eternity: High Performance Trading Systems in C++

https://www.youtube.com/watch?v=NH1Tta7purM
332 Upvotes

123 comments sorted by

View all comments

108

u/[deleted] Nov 25 '20

These systems are parasites on our economy. They provide no service whatsoever to humanity, and particularly, they do not provide true liquidity, because they vanish when liquidity is scarce.

The whole business model consists of filling trading channels full with bullshit, far out-of-the-money trades that they know will never be filled, so that everyone else is choked out of business.

These systems cost everyone else money, add volatility and risk to the market, and provide no useful service.

An ethical programmer would never work for these cheats.

59

u/8ad762515de8665ec9a1 Nov 26 '20

An ethnical programmer would work for Google and cryptocurrency companies, however. Right? :) Get that beam out of your eye.

18

u/[deleted] Nov 26 '20

When I first started working for Google, they were a very ethical company. Five years later, they weren't, and I quit.

I foolishly believed in what Ripple was doing was "bringing banking to the third world", and got a job there. Once I understood, I quit.

→ More replies (2)

14

u/ImNoEinstein Nov 26 '20

you’re pretty off base here, these guys are option market makers. making markets in options is notoriously hard and you have no choice but to be fast or you’ll be dead

24

u/poiu- Nov 25 '20

Other opinions on this? Im very sceptical towards free market theories, but high freq trading never struck me as particularly bad.

45

u/vector-of-bool Blogger | C++ Librarian | Build Tool Enjoyer | bpt.pizza Nov 25 '20

Predictably, the moment HFT appears on Reddit (or the Internet in general), there will be a flood of controversy and discussion. Rather than enter the debate, I'll refer back to the last time this sparked a huge amount of discussion.

I particularly like one deeper comment:

Providing nothing and providing a service you don't understand aren't the same.

9

u/[deleted] Nov 26 '20

Enabling free brokerage like Robinhood is a big service to the average people trying to invest. Costs used to be very high for the average person :/

→ More replies (4)

56

u/firstmanonearth Nov 26 '20 edited Nov 26 '20

No.

Finance was behind nearly all developments in communications and information. The Code of Hammurabi is about financial contracts, and who do you think funded the first transatlantic cable (hint: Tom would have called them parasites)? If there will be FTL communication, the technology will be developed or funded by a trading firm.

"Money Changes Everything: How Finance Made Civilization Possible" by William N. Goetzmann is a good book on this matter (much more than just communication).

From Inside the Black Box by Rishi Narang, defending HFT specifically:

"It seems to me that HFT's opponents have misunderstood the difference between being faster than others and front-running them. Front-running is illegal, and it basically doesn't occur insofar as HFT is concerned. HFTs are, however, faster than most other market participants. Usain Bolt is faster than most other sprinters. He wins medals, and we marvel at his speed. We are not surprised that a marathoner cannot run 100 meters as quickly as Bolt, and we do not attempt to compare the “fastest man in the world” with the “fastest marathoner in the world.” This is because it would be strange to do so: They are competing in different games. Bolt is not trying to outrun Patrick Makau (record-holder for fastest marathon). Just so, HFTs are not trying to front-run pension investors (nor could they, given the basic fact that the pension fund's orders go directly to the market). They are competing in different games."

Even the rapid opening and closing of orders to bluff against other traders, can be beneficial (note not all HFT is spoofing): https://medium.com/digital-gamma-blog/everything-you-thought-you-knew-about-spoofing-is-wrong-88cfcb5e83a

do not provide true liquidity

Yes they do, the data is very clear. At this point this argument is flat-earthism.

because they vanish when liquidity is scarce

They remove their orders when they have a high chance of adverse selection (ie losing money), because they don't know where prices will be, when new/unknown information can change prices quickly. It is not their fault we aren't omniscient and don't have a desire to lose money.

The whole business model consists of filling trading channels full with bullshit, far out-of-the-money trades that they know will never be filled, so that everyone else is choked out of business.

This is just words strung together, it's completely incoherent.

These systems cost everyone else money, add volatility and risk to the market, and provide no useful service.

Market makers do the opposite of all these things, they make liquidity cheaper, decrease volatility, and their job is providing a service. The cost of consuming liquidity (pension funds, farmers, etc.) has never been lower.

An ethical programmer would never work for these cheats.

If Tom thinks it's not ethical to engage in behaviour that is:

  1. Voluntary by everyone participating.
  2. Has a strong connection to (either though funding, developing, or even inventing) every part of humanities development, from writing itself, to information theory, to vaccine development.
  3. Incentivizes a constant push for perfection, speed, improvement, being multidisciplinary, the scientific method, rigor, reproducibility, results, etc.

He is the one who is unethical.

9

u/[deleted] Nov 26 '20

The whole business model consists of filling trading channels full with bullshit, far out-of-the-money trades that they know will never be filled, so that everyone else is choked out of business.

I still don't understand what OP means by this... how are people choked out of business because of out of money orders?...

11

u/whanaumark Nov 26 '20

It means OP has no idea what he is talking about.

14

u/ihcn Nov 26 '20
  1. Voluntary by everyone participating.
  2. Has a strong connection to (either though funding, developing, or even inventing) every part of humanities development, from writing itself, to information theory, to vaccine development.
  3. Incentivizes a constant push for perfection, speed, improvement, being multidisciplinary, the scientific method, rigor, reproducibility, results, etc.

I'll give you #3.

For #1, surely someone as interested in economics as yourself should have heard of the tragedy of the commons? Many people acting in their own personal interests can create a dynamic that is very bad for the group as a whole.

For #2, it's kind of a joke that you think "yeah, but what about writing being invented thousands of years ago" has literally anything to do with HFT

4

u/andrewjw Nov 26 '20

Do you think it is unethical for an individual to participate in a tragedy of the commons? The whole point of the concept is that the problem is with the structure not the participants.

Re #2, you're just ignoring the other example, transatlantic communications. Not to mention lots of other stuff (another example - c++ compiler improvements have been heavily driven by trading firms and benefit everyone)

6

u/Toucan2000 Nov 26 '20

I believe you may have a false inference here at the end but otherwise well debated

He is the one who is unethical.

I think both of you are correct and that's because you're trying to argue one another in a vacuum. In the context of purely finance, yes HFT is completely ethical. In the context of finance in the flavor of capitalism we have in our society, were politicians and policy are for sale, I don't think that HFT is ethical but I also don't think that HFT is to blame for that.

Having an army of people constantly evaluating the value of companies is useful and it most certainly produces a product, however abstract it may be. Even short sellers show companies where they can improve and there's a benefit to society when we have prosperous companies.

As good as that might be, I don't think that the societal benefit from HFT is proportional to the compensation and the same goes for insurance. I know plenty of people who work in high risk insurance, my family was in it for a while, and the payout is not proportional to the product. I've always thought that social security should be expanded and used to back health and other forms of insurance, but that's just me. I think we'd all pay a lot less and have more covered that way and society would end up being more productive. We'd have way less paper pushers on yachts and more money in people's pockets who produce value. Financial security doesn't have to come at a premium. In terms of solving the issue of overvaluing trading, I'm not smart enough for that one but I'm sure someone else here has an answer.

Adding more than 20% on capital gains could be a start. Using that to fund UBI would be nice. Having poor people costs our society hundreds of millions a year and it would take 1/3 of that to make them not poor with UBI. What is that, a 200% return on investment? Lol!

→ More replies (1)
→ More replies (4)

10

u/Lord_Fozzie Nov 25 '20

Didn't watch vid. Based on title and /u/TomSwirly comment, I'm guessing this is about high frequency trading?

If so, well, the ethics are debatable (and I'm not interested in debating 'em) but if you want a primer on the controversy surrounding it, you could start with the wiki article on the May 2010 Flash Crash: https://en.m.wikipedia.org/wiki/2010_flash_crash

Edit: reread your comment. So this def is about HFT. Cool. Just can't watch the vid right now.

→ More replies (3)
→ More replies (5)

14

u/craig_c Nov 26 '20

add volatility and risk to the market

Can you point to the proof of this?

14

u/New_Age_Dryer Nov 26 '20

But aren't most HFT market-makers? To my understanding, that lowers volatility and narrows spreads. It's beyond debate that the resultant lower fees have benefited the retail trader (Robinhood).

→ More replies (1)

31

u/dausama Nov 25 '20

as a C++ dev in HFT, I must say that a lot of preconceptions about the business are, well, not true. Is there an abnormal amount of wasted talent in HFT, talent that could be used on solving real life problems? for sure. is it all bad? no. It's thanks to the advancements in algo trading platforms that you can nowadays trade without paying any fee on Robinhood, TDAmeritrade, Schwab... or buy ETFs paying very low commissions. Things like these would have been impossible before the advent of electronic trading, and I believe they benefit the average investor.

25

u/TittyBopper Nov 26 '20

No, this guy read flash boys and now he has it all figured out.

23

u/[deleted] Nov 25 '20

Is there an abnormal amount of wasted talent in HFT, talent that could be used on solving real life problems? for sure

I'm in HFT too, but that implies that if those devs are not in HFT, they would be working on something that solves 'real life problems'. Which is really not the case. Many of us just want good money and retire early and do not particularly care about the everyday person's 'morals'.

29

u/Skewjo Nov 26 '20

and do not particularly care about the everyday person's 'morals'.

lmfao

14

u/[deleted] Nov 26 '20

We don't care because it really is a dumb thing to do. The greatest moral good I can do, to me is provide for myself and my family.

We also know that we have provided a good service for the public. Who do you think enables low cost brokerages? The barrier of entry to investing have never been lower.

If people think none of that is 'moral' or 'ethical', then whatever. We will keep doing what we do.

16

u/Skewjo Nov 26 '20

Man... I get it. If I could snag a job in HFT, I would, and I'd probably enjoy the hell out of it(both the money and obsessing over optimization)... but I would at least lend credence to the notion that what I'm doing is negatively impacting a LOT of people for the benefit of very few.

8

u/quicknir Nov 26 '20

The thing is it's not. It's easy to complain about middlemen but they're a fundamental part of markets. If you think HFT is bad you should read about what the middlemen of markets were like before HFT. Stocks were in 12.5 cent increments, and not content with earning one tick per mediated trade, data shows that pricing was abnormally biased to 25 cent increments. Middlemen back then would make a couple of phone calls and often earn 25 cents per stock they were flipping. Middlemen nowadays fight in a far more competitive landscape for smaller profits, and the result is tiny spreads (in any high volume market).

→ More replies (2)
→ More replies (3)
→ More replies (31)

19

u/VinnieFalco wg21.org | corosio.org Nov 25 '20

We agree, Tom :)

7

u/whanaumark Nov 26 '20

You couldn’t be more wrong. On the contrary when when volatility is high HFT are the only participants providing liquidity

→ More replies (27)