News for hackers. Stuff that matters.
Re:Ask HN: What programming skills are required by HFT or Tr... by brianolson on Friday May 15, 2020 @10:38AM (#23192675)
Moral flexibility and subjugation. The boss says to build a thing, you build the thing. If rewriting an infiniband driver and pinning it to a core on the server and processing requests in kernel space in exquisitely crafted C is what cuts reation time by 0.0000005 sec and makes the firm a few extra bucks, that's what you do.

I interviewed at a Manhattan HFT firm (~2015) and that's what they do. The boss noted that "Congress could make a law invalidating our business model" and I realized that would be a good idea. They're not making the world a better place; they're not providing a valuable service; they're just exploiting and extracting and skimming some dollars out of the market. They have money and they're in the right place so their money can grab more money.

Re:Ask HN: What programming skills are required by HFT or Tr... by SkyMarshal on Friday May 15, 2020 @10:55AM (#23192888)
Which would you say is more morally problematic, HFT or figuring out ways of making people click ads?
Re:Ask HN: What programming skills are required by HFT or Tr... by sdwedq on Friday May 15, 2020 @02:58PM (#23195962)
In another life, I worked for small webdev/marketing consultancy. Their clients were multilayer marketing firms, subscription services startup and other startups.

The company was run by car salesperson types.

And their clients were even more sleazy. One of the popular joke they repeated with clients was that everyone is unhappy, and if they are not, then they haven't seen the right ad.

It was pretty amazing to see "startup" founders come in and say they want to make the world a better place. Then say they need to target stupid people because they spend the most money. Or only an idiot would buy their crap but there are a lot of idiots.

A lot of subscription services are started by rich stay at home spouses. Many of them didn't even really care about about making money but just wanted it as a status symbol and a way to get their pictures appear in their friend's feed. It was funny how wanted to make sure their friends saw their ad, even though they knew their friends will never buy whatever.

After working there for a year, I decided I will never deal with anything remotely related to adtech. Professionally, I am not yet fully removed from adtech. Stuff I work on now is indirectly used by adtech companies.

But I used to spend a lot of time making websites monetized with AdWords. Now I do algotrading as a hobby and feel a lot better about it. There are no false pretenses. It is just about making money. Honest, pure, simple. And it is challenging.

So I would say ads are definitely a lot worse.

Re:Ask HN: What programming skills are required by HFT or Tr... by zarkov99 on Friday May 15, 2020 @11:53AM (#23193623)
For sure the Ad economy is worse. HFT has a small impact on the economy and 0 on culture while the ad model destroyed respectable media and is well on its way to destroying the web, not to mention doing immeasurable harm to social cohesion. But hey, better to rag against the greedy bankers than the people signing your paycheck. Don't Be Evil!
Re:Ask HN: What programming skills are required by HFT or Tr... by ScottFree on Friday May 15, 2020 @11:07AM (#23193017)
The entire financial sector. It captures 30% of all corporate profits in the world economy. Ads are bad, but not "take 1/3 of what other people make" bad.
Re:Ask HN: What programming skills are required by HFT or Tr... by ploika on Friday May 15, 2020 @11:28AM (#23193289)
You're under absolutely no obligation to like it, but banks do provide essential services for a fee.

They're also (belatedly and sometimes decreasingly) heavily regulated in most of the world. What they do isn't always rent-seeking.

Re:Ask HN: What programming skills are required by HFT or Tr... by ScottFree on Friday May 15, 2020 @12:06PM (#23193768)
> banks do provide essential services for a fee. ... What they do isn't always rent-seeking.

Mob bosses own legitimate businesses. They're still crooks.

edit: Just FYI: I am not anti-bank. I am anti "capture 1/3 of all economic profits". No economy can survive that sort of parasitic activity in the long term, regardless of the intention behind it.

Re:Ask HN: What programming skills are required by HFT or Tr... by anthony_doan on Friday May 15, 2020 @11:46AM (#23193537)
> but banks do provide essential services for a fee.

They charge you for not having enough money in your checking account, while using your money to give out loans and make money off of that. Basically charging you for being poor while making money off of your by fee and loaning your money to other people.

I'm old enough to remember they never charge a fee for not having enough money in the bank account. I left my bank for a credit union.

Also Well Fargo was caught recently in a dubious sketchy scheme.

Re:Ask HN: What programming skills are required by HFT or Tr... by ipnon on Friday May 15, 2020 @11:51AM (#23193600)
Please note these activities are unrelated to high frequency trading.
Re:Ask HN: What programming skills are required by HFT or Tr... by anthony_doan on Friday May 15, 2020 @05:57PM (#23197979)
HFT isn't essential services.
Re:Ask HN: What programming skills are required by HFT or Tr... by thedufer on Saturday May 16, 2020 @08:48AM (#23202957)
NYC seems to disagree (at least some market makers are currently considered essential businesses).
Re:Ask HN: What programming skills are required by HFT or Tr... by derision on Friday May 15, 2020 @11:59AM (#23193699)
Not all banks do that
Re:Ask HN: What programming skills are required by HFT or Tr... by nnoitra on Friday May 15, 2020 @01:40PM (#23194952)
Most do. Interest rates are how those that have take from those that don't legally. Banks are just the executors of the idea.

It's a very complex systematic problem. I'm not saying burn all banks let's move to the jungle and eat coconuts.

Re:Ask HN: What programming skills are required by HFT or Tr... by derision on Friday May 15, 2020 @07:02PM (#23198519)
I mean not all banks have minimum balances or any fees at all on checking accounts. Not sure what you mean by interest rates. If I have a savings account I'm getting paid interest. If I take a loan I'm paying interest in exchange for access to the capital. What exactly is the issue here?
Re:Ask HN: What programming skills are required by HFT or Tr... by 3fe9a03ccd14ca5 on Friday May 15, 2020 @11:18AM (#23193147)
You’d figure bank stocks would be performing better, considering they’re capturing so much purported profits.
Re:Ask HN: What programming skills are required by HFT or Tr... by logfromblammo on Friday May 15, 2020 @11:45AM (#23193513)
Capturing other companies' profits is just step 1 in the plan to put as much of that money in your own pockets as possible.

If you're willing to "steal" from other companies, why wouldn't you also "steal" from the owners of your own company? Why pay a dividend when you can pay bonuses?

Re:Ask HN: What programming skills are required by HFT or Tr... by parenthesis on Friday May 15, 2020 @11:47AM (#23193545)
In many listed financial companies it is certain employees and management who do well financially, rather than the shareholders.
Re:Ask HN: What programming skills are required by HFT or Tr... by sweeneyrod on Friday May 15, 2020 @12:54PM (#23194375)
As Matt Levine puts it, investment banks are kind of like socialist collectives run for the benefits of their workers.
Re:Ask HN: What programming skills are required by HFT or Tr... by ScottFree on Friday May 15, 2020 @11:26AM (#23193251)
fair enough. Updated to specify the entire financial sector, not just banks.
Re:Ask HN: What programming skills are required by HFT or Tr... by gowld on Friday May 15, 2020 @03:26PM (#23196316)
App store takes 30% of revenue before you even start advertising..
Re:Ask HN: What programming skills are required by HFT or Tr... by ScottFree on Friday May 15, 2020 @06:32PM (#23198295)
The App store's main source of revenue isn't advertising, it's acting as a marketplace for apps. It also doesn't capture 30% of the entire economy that it operates in.
Re:Ask HN: What programming skills are required by HFT or Tr... by fnord123 on Friday May 15, 2020 @11:27AM (#23193273)
The surveillance economy is far worse than finance.
Re:Ask HN: What programming skills are required by HFT or Tr... by pouta on Friday May 15, 2020 @11:02AM (#23192965)
Ads, 110%
Re:Ask HN: What programming skills are required by HFT or Tr... by mariodiana on Friday May 15, 2020 @12:53PM (#23194368)
If I may proffer an opinion, HFT is more morally problematic. It's basically eavesdropping or civilian wiretapping, only done at scale and with the leverage of millions of dollars.

How could "making people click ads" be worse?

Re:Ask HN: What programming skills are required by HFT or Tr... by pgwhalen on Friday May 15, 2020 @12:58PM (#23194424)
>It's basically eavesdropping or civilian wiretapping, only done at scale and with the leverage of millions of dollars

I don't think anyone on hacker news would bat an eye if your comment said "Ads are problematic" before this sentence.

It's also unclear to how HFTs are eavesdropping on anyone, they use publicly available (for a price) data.

Re:Ask HN: What programming skills are required by HFT or Tr... by mariodiana on Sunday May 17, 2020 @12:46PM (#23213199)
HFT capitalizes on a kind of time arbitrage. They take the data from one market, and then transport that data using specialized, custom built networks that move the data from one place to another a tiny fraction of a second quicker than other networks. They then capitalize on having that data earlier to eek out small profits at scale.

Imagine two investors sitting at a restaurant table discussing trades they are about to make. The trades they are making will be significant, in the sense that their trades will then impact the value of the stocks they're trading. Meanwhile, a waiter at the restaurant makes a habit of eavesdropping on the conversations of these investors. When he gets the information, he runs to the phone and effects his own, smaller trade.

It's not that the waiter happened to overhear something. The waiter makes it his business to "overhear." The waiter adds no real value. He's a parasite on the people who do add value. The HFT traders are likewise.

What they do is documented in Michael Lewis's Flashboys.

https://www.amazon.com/Flash-Boys-Wall-Street-Revolt/dp/0393...

Re:Ask HN: What programming skills are required by HFT or Tr... by pgwhalen on Sunday May 17, 2020 @01:10PM (#23213373)
I work in the industry, have read Flash Boys, and am aware of how misleading and occasionally false the book is. It's always disheartening to see someone be so sure of themselves while also being incorrect.

Your metaphor is inaccurate. Your metaphor describes actual front running, which is indeed illegal. It does not describe the sort of latency arbitrage that HFTs do, which Michael Lewis has unfortunately also dubbed "front running" (and succeeded at changing the lay population's definition of the term).

I would try to adjust your metaphor to be correct but it isn't really possible. There is no eavesdropping. HFTs do not know anything about trades before they happen. If they see a large trade, they adjust their prices after the trade happens (possibly on another exchange). This isn't eavesdropping, they are operating on public information, just very quickly. It's the foundation of all market making: adjusting prices according to order flow.

Re:Ask HN: What programming skills are required by HFT or Tr... by mariodiana on Sunday May 17, 2020 @01:27PM (#23213520)
I'm going by memory of what I read in the book and would be happy to have any misunderstanding on my part clarified. Put simply, I think the book described things this way. (I'll use all convenient numbers and fanciful descriptions.)

A buy is tendered from Timbuktu. The offer will need to travel from Timbuktu to the NYSE. The Flash Boys find out about this buy offer before the sellers using the NYSE system do, so they insert themselves.

The buyer in Timbuktu sees a price of 100 dollars. As are all prices, this 100 dollar quote is "historical." The price will be what it is when the trade is actually effected. The buyer offers 101 dollars. The Flash Boys get ahead of the game, buy the stock at 100.50 and resell it for 101.

That's boiling it down to the essentials. I could be wrong about what the book says. The book could be wrong in its characterization of what goes on. Please, you tell me.

Re:Ask HN: What programming skills are required by HFT or Tr... by pgwhalen on Sunday May 17, 2020 @03:18PM (#23214521)
I haven't read Flash Boys since it came out, but I'm pretty sure it doesn't actually inaccurately describe how latency arbitrage works the way you just did, it just blurs together similar concepts enough to create confusion about the details, which results in outrage.

The key part that you're missing is that latency arbitrage works only when there are multiple exchanges, and there is only one exchange in your example. Your example suggests that HFTs somehow see the buy order before it reaches the NYSE, but that is not possible. In reality it would be something like this:

- Buyer wants to buy 100,000 shares at $100, but no single stock exchange (there are 13 in the US I believe, soon to be 14) has that many shares available at that price. - But there are 50,000 shares each available at NYSE and NASDAQ each, so they send orders to each. - Their NYSE order arrives first, and the trade happens at $100 for all 50,000 shares - The HFT notices, and seeing that demand is high for the stock, increases their price on NASDAQ to $100.01 for those remaining 50,000 shares. - The buyer's order on NASDAQ does not trade, because the $100 is no longer available

The "information leakage" is from public information only - that a trade happened on another exchange.

Note also that no part of this example discusses the HFT buying a certain price, then selling back immediately at a higher price.

Re:Ask HN: What programming skills are required by HFT or Tr... by pgwhalen on Sunday May 17, 2020 @10:02PM (#23217428)
Sorry I can't edit, I reformatted the bullets below:

- Buyer wants to buy 100,000 shares at $100, but no single stock exchange (there are 13 in the US I believe, soon to be 14) has that many shares available at that price.

- But there are 50,000 shares each available at NYSE and NASDAQ each, so they send orders to each.

- Their NYSE order arrives first, and the trade happens at $100 for all 50,000 shares

- The HFT notices, and seeing that demand is high for the stock, increases their price on NASDAQ to $100.01 for those remaining 50,000 shares.

- The buyer's order on NASDAQ does not trade, because the $100 is no longer available

Re:Ask HN: What programming skills are required by HFT or Tr... by ping_pong on Friday May 15, 2020 @11:08AM (#23193023)
"Making the world a better place" is one of the original jokes in the Silicon Valley tv show because it's such an absurd goal. If they are doing something illegal they should go to jail, but as long as they aren't actively hurting others, being a middleman in a transaction is something that many, many people do to make money.
Re:Ask HN: What programming skills are required by HFT or Tr... by puranjay on Friday May 15, 2020 @11:31AM (#23193329)
When the dust is settled, I think HFT firms will emerge as a very minor evil compared to social media firms.
Re:Ask HN: What programming skills are required by HFT or Tr... by justusw on Friday May 15, 2020 @11:36AM (#23193395)
Are there any HFT firms that engage in shady data deals or startup acquisitions, or outright lie to the government about what they are doing?
Re:Ask HN: What programming skills are required by HFT or Tr... by justusw on Friday May 15, 2020 @11:34AM (#23193377)
Also, from the same show, Gavin Belson:

> I don’t want to live in a world where someone else makes the world a better place better than we do

Re:Ask HN: What programming skills are required by HFT or Tr... by ma2rten on Friday May 15, 2020 @11:15AM (#23193103)
I think you are thinking about "changing the world".

"Making the world a better place" to me has the connotation of providing a small positive contribution for others around you.

Re:Ask HN: What programming skills are required by HFT or Tr... by ping_pong on Friday May 15, 2020 @12:28PM (#23194039)
Re:Ask HN: What programming skills are required by HFT or Tr... by ensignavenger on Friday May 15, 2020 @10:41AM (#23192703)
What about re-writing and infiniband driver requires moral flexibility?
Re:Ask HN: What programming skills are required by HFT or Tr... by znpy on Friday May 15, 2020 @10:51AM (#23192845)
the goal behind the rewrite
Re:Ask HN: What programming skills are required by HFT or Tr... by jolmg on Friday May 15, 2020 @11:26AM (#23193267)
Cutting reaction time to make a few extra bucks? How does that require moral flexibility?

Is the immoral part that they can use their money to make more money? If by earning more money, one can afford to buy more food in bulk and save money on that and gas, or buy a washing machine and save money on going to the laundromat, is that immoral of one to do?

Re:Ask HN: What programming skills are required by HFT or Tr... by logfromblammo on Friday May 15, 2020 @11:57AM (#23193675)
I think the sticking point is that this method of acquiring money is only available to those who are already have more money than any one person could ever spend, and the money that is acquired often comes from those who do not have enough money to retire yet, via institutional investors that manage insurance, pensions, and retirement accounts.

That is, people who could retire now and live without worry for the next thousand years or more are taking more money from people who are toiling away to try to retire by age 70, and making it more difficult to accomplish that goal.

Re:Ask HN: What programming skills are required by HFT or Tr... by jolmg on Friday May 15, 2020 @02:04PM (#23195285)
Then what's being argued is that what's immoral is to have too much money.

An issue with it is that there's no objective, definite point at which we can say that a person has made too much money. I think anyone could consider that those that are making more than themselves are making too much. How much more they're making compared to us determines the certainty with which we can say they're making too much.

Re:Ask HN: What programming skills are required by HFT or Tr... by logfromblammo on Tuesday May 19, 2020 @03:00PM (#23238725)
I would absolutely argue that it's immoral to have more money than 500 times the median individual income. That means anyone with individual wealth (after liquidating everything to cash) of more than about $33M is a selfish, exploitative asshole. That's not illegal, of course, but I can still think ill of their avarice.

500 times median individual income allows you to pay your fiduciary manager 2.5x median while you earn 12.5x median for doing nothing at all, forever. That is without a doubt a permanent luxury lifestyle, firmly wedged in the upper class, with a dependent business that is infinitely sustainable with a single client. But it isn't so much that one couldn't spend it all on luxury consumer goods, with a bit of effort. It's enough for up to ten full-time personal servants, while eating filet and lobster every night. Six security guards, at two per 8-hr shift, one personal chef, one executive assistant, one driver, and one house-cleaner. Seems like plenty to me, but as a filthy prole, what do I know?

Spending the money back into the economy is the saving grace of the wealthy. Letting the money go, so that it can be someone else's to spend for a little while, is why it is okay for the rich to have lots of money (but not "too much"). They keep the yacht builders and golf course architects in business.

When someone has "too much" money, they can't spend it fast enough to avoid creating a wealth singularity. They mostly invest it and lend it, weakly throwing it out in a long elliptical orbit, but that money accumulates more money on its journey through apolucre and then collides back at perilucre. Only spending it can send it out beyond the event horizon, and permanently lessen the mass of the hoard, and possibly keep someone else's star from evaporating too small to sustain its energy reactions.

A billionaire can pay their fiduciary management company $5M per year, taking $25M per year in investment income (adjusted for inflation, forever). They can fund a personal servant army/entourage of 350 people, with an average annual salary of $70k, still leaving $500k to spend on their own. The Queen of all the Commonwealth nations has about 1000 servants in the UK, distributed over several palace properties. You literally have to be a national institution to have that many employees.

Re:Ask HN: What programming skills are required by HFT or Tr... by PascLeRasc on Friday May 15, 2020 @11:50AM (#23193595)
Is that what hedge fund people do with their money, buy their first washing machine? Or are they buying apartments and leaving them empty to store their money?
Re:Ask HN: What programming skills are required by HFT or Tr... by jolmg on Friday May 15, 2020 @01:56PM (#23195174)
> Is that what hedge fund people do with their money, buy their first washing machine?

I'm obviously not saying that. It's an example of how average people make/save more money from having more money. IOW, it's how average people use essentially the same tactic.

Re:Ask HN: What programming skills are required by HFT or Tr... by ma2rten on Friday May 15, 2020 @11:11AM (#23193058)
Could you explain this more? I don't know much about this world. I understand they are not making the world a better place, but are they making it worse?

Something that I have heard is that they are providing a service by providing liquidity to the market.

Re:Ask HN: What programming skills are required by HFT or Tr... by quickthrowman on Friday May 15, 2020 @11:21AM (#23193185)
You are correct, HFT firms provide a valuable thing: liquidity in financial markets which leads to smaller bid/ask spreads.

They aren’t making things worse, lower transaction costs are good for everyone that participates in markets, which includes the OP.

Re:Ask HN: What programming skills are required by HFT or Tr... by ric2b on Friday May 15, 2020 @01:55PM (#23195164)
Does it really matter if you save 1 or 2 cents when buying a bunch of stocks?
Re:Ask HN: What programming skills are required by HFT or Tr... by badfrog on Friday May 15, 2020 @06:42PM (#23198369)
If your 401k has ETFs or mutual funds in it, the fund managers are rebalancing every month or every quarter. Saving small amounts of money on these transactions really adds up when you think about compounding over decades.
Re:Ask HN: What programming skills are required by HFT or Tr... by jliptzin on Friday May 15, 2020 @11:54AM (#23193646)
In theory yea but during a crisis or other high volatility situation where the market needs liquidity the most they’re the first ones to pull their bids/asks.
Re:Ask HN: What programming skills are required by HFT or Tr... by traK6Dcm on Friday May 15, 2020 @12:28PM (#23194036)
Even if that was true (it's difficult to prove either way since there is little data on black swan events), the fact that they provide liquidity during stable times can make up for not providing liquidity during black swans. The impact could still be net-positive.

Also, it's unclear what the alternative is. While HFT may not be needed, markets run by human traders were significantly more unfair than anything we have now. It's just that fewer people complained about it because nothing was transparent. Or do you believe human traders don't pull quotes?

Re:Ask HN: What programming skills are required by HFT or Tr... by jliptzin on Friday May 15, 2020 @12:37PM (#23194145)
I don't really have an opinion on how to make the market fair one way or another, I just advocate for retail investors to completely dispense with the idea that the market will be fair to them. I see a lot of people getting into day trading not realizing that the whole thing is completely rigged, from front-runners, insider traders, hedge fund managers with huge pockets spreading fake news (watch Jim Cramer brag about all his different market manipulation tactics: https://www.youtube.com/watch?v=gMShFx5rThI), etc. Unless you are prepared to engage in that kind of behavior as well (and have the resources to do it), expect to lose your money. Your only option is to buy and hold for the very long term.
Re:Ask HN: What programming skills are required by HFT or Tr... by paulgb on Friday May 15, 2020 @11:38AM (#23193415)
I am a believer in markets and generally buy the idea that HFT produces value by providing liquidity, but I interviewed at an HFT firm where we spent most of the time talking about microwave networks that cut down transmission times by nanoseconds. I have a hard time telling myself the story that an arms race over milliseconds is creating as much value as it captures. E.g. from WSJ:

> [Jim Barksdale] spent an estimated $300 million or more to bury a fiber-optic cable that shaved three-thousandths of a second off communications between New York and Chicago

Re:Ask HN: What programming skills are required by HFT or Tr... by AllanHoustonSt on Friday May 15, 2020 @12:58PM (#23194434)
The industry as a whole provides net value to the market by via higher liquidity and tighter spreads.

The arms race is a necessity due to rising competition. HFTs cannibalize each other every year. People on the outside seem to think being in HFT inherently means you’re printing money but they don’t acknowledge how tough the business actually is. Many firms have either collapsed or have been bought out over the past decade.

Market makers specifically (who inherently have to operate in HFT time horizons) don't even compete with low-mid frequency hedge funds and props. They don't compete with retail investors. They strictly compete against other MMs to capture the spread.

Re:Ask HN: What programming skills are required by HFT or Tr... by gas9S9zw3P9c on Friday May 15, 2020 @01:12PM (#23194618)
Out of curiosity, why do MMs have to operate on HFT time horizons? Couldn't they operate on a somewhat lower frequencies by quoting wider? Sure, they won't see the same profits, but why is it impossible?
Re:Ask HN: What programming skills are required by HFT or Tr... by pgwhalen on Friday May 15, 2020 @01:53PM (#23195130)
It's interesting the way you connect quoting with wider with lower profits. In a vacuum, clearly the opposite is true. But you're leaving out the part that you only stand a chance to trade and therefore profit if you have the very best price, so you can't quote wider otherwise your competitors will get the trade. If your quote is a million dollars wide, you won't make a million dollars less frequently - you'll never make anything at all.

That's all true for the very strictest definition of a market maker, which is pretty much necessarily HFT (in list US equities). But there are other types of traders that are successful of course, because their edge comes from thinking about the market in a different way. In situations where finely-tuned, data-informed, low-latency algorithms do not have the confidence to give good prices (e.g. illiquid securities or during times of volatility), these traders might be more successful.

Re:Ask HN: What programming skills are required by HFT or Tr... by gas9S9zw3P9c on Friday May 15, 2020 @01:59PM (#23195225)
Oh yeah, when I said "lower profits" I didn't mean per roundtrip, but overall lower profits over a longer period of time due to fewer trades happening at wider quotes. HFT almost always quotes minimum spreads, so my question was why you couldn't be successful quoting larger spreads (not $1M, but let's say 2-10x the normal spread) while trying to be "smarter" as opposed to faster, since with wider spreads you'd already be in front of the order queue when the price moves, in front of the HFT trader who has to react to the movement to quote his tiny spread.

I'm trying to understand where the market maker = necessarily HFT comes from. After all, we had markets makers well before HFT too. I understand that MM can be particularly profitable when doing HFT, but why is HFT a necessity?

Re:Ask HN: What programming skills are required by HFT or Tr... by pgwhalen on Friday May 15, 2020 @05:17PM (#23197533)
Your intuition is good, I think it's the terminology/semantics that are causing you confusion. What you're describing is a valid way to make money as a trader, but most people don't call it market making. The wider you quote relative to other market participants, the more risk you take on - because your volume is lower, you have to hold on to your positions longer, exposing you to greater fluctuations in price. Market making is very much about not exposing yourself to this kind of risk.

In real terms, if you quote a penny wide market, there's a much greater change that you can both buy and sell in a short period of time to capture that penny. However, if you quote a 10c wide market (when everyone else is quoting a penny), you might buy shares at $10, but it might be a much longer time before anyone wants to buy them back from you at $10.10 - in fact it might be never, they could go straight to 0!

Again, quoting that 10c spread is perfectly valid, it just means that your edge begins to be less about capturing "flow" as much as it is about predicting the direction of the stock over a longer time horizon.

Re:Ask HN: What programming skills are required by HFT or Tr... by gas9S9zw3P9c on Saturday May 16, 2020 @03:27AM (#23201203)
That's a good point and it makes sense, but couldn't you hedge the inventory risk?
Re:Ask HN: What programming skills are required by HFT or Tr... by pgwhalen on Sunday May 17, 2020 @02:54PM (#23214306)
I'm not totally sure what you mean by "hedge the inventory risk." How would you accomplish that? You can reduce your position size but that's not hedging, it's just reducing your exposure in the first place. You could use options, but that 1) exposes you to other risks and 2) is prohibitively expensive given the cost to transact in that market is much higher.

The best way to keep risk low as a market maker is to keep inventory low, which means you need to get out of positions quickly, which means you need to have competitive prices to increase your chance of interacting with order flow.

Re:Ask HN: What programming skills are required by HFT or Tr... by AllanHoustonSt on Friday May 15, 2020 @01:30PM (#23194828)
Traders (be it hedge funds, props, retail, anyone) will only "take your action" if you price competitively. You'll never get your orders filled. The open bid and ask as per whatever the exchange quotes are really the only prices that matter when it comes to what actually gets executed.

Also even if you do quote wider, to effectively capture the spread, your buy on one side and your sell on the other side still have to basically occur simultaneously which is where the demand for latency comes in so you really can't escape it.

That said there are ways to still be profitable even if you know you're not the fastest gun in the west across the most exchanges. Without going into too many details you'd have to selectively choose where/what you trade. Which is not trivial at all of course.

Re:Ask HN: What programming skills are required by HFT or Tr... by gas9S9zw3P9c on Friday May 15, 2020 @01:50PM (#23195089)
Hm, maybe I'm fundamentally misunderstanding something. Let's just say the price is a random walk. It's not directly relevant to the argument, but for simplicity. An HFT MM will make money by continuously quoting ask/bid at the best price, i.e. a lot of trades, capturing a very small spread each time. Given that it's a random walk, buy and sell don't always occur simultaneously either, e.g. in a trending regime where the HFT MM may start pulling quotes due to risk checks and/or inventory/hedging concerns.

So if I am an MM that quotes a wider but gets fewer executions at larger time intervals, shouldn't I be able to also make profit? After all, my queue position is in front of the HFT MM because I put in orders earlier (since I am quoting wider), latency here is irrelevant.

Can you explain where my logic is faulty?

Re:Ask HN: What programming skills are required by HFT or Tr... by AllanHoustonSt on Friday May 15, 2020 @02:19PM (#23195492)
I guess I would say, it depends?

Existing profitable MMs aren't all equally fast. So the slower ones that trade on the same exchanges or even the same indices have to be profitably trading at a wider spread.

HFT isn't a concrete term so I guess technically there's no hard line to draw for how fast your roundtrip times have to be to be profitable. But if you are trading wide enough where you think latency isn't a factor, aren't you really just predicting where you think the book will go "far" ahead in the future? MM is inherently a reactionary business (with some effort put into anticipating the price moving against you in the very very short term).

Re:Ask HN: What programming skills are required by HFT or Tr... by gas9S9zw3P9c on Friday May 15, 2020 @02:25PM (#23195558)
> But if you are trading wide enough where you think latency isn't a factor, aren't you really just predicting where you think the book will go "far" ahead in the future

Yep, or rather, predicting where the market will not go to avoid the price moving against my quote. My impression was that HFT is all about being fast, as opposed to smart, since you can't make complex predictions on nanosecond scales. Complex models don't fit on an FPGA. So couldn't you get an edge by being just a little bit smarter with predictions but slower and quoting wider spreads? And just to be clear, I'm not talking about minutes here, but maybe milliseconds to seconds, which I think wouldn't be considered HFT today?

Re:Ask HN: What programming skills are required by HFT or Tr... by AllanHoustonSt on Friday May 15, 2020 @03:22PM (#23196279)
There is trading activity in the milliseconds-seconds horizon as well. I'm sure all the big HFT players participate plenty. These just wouldn't be considered MM strategies.

Your original question was why MMs have to operate at HFT horizons. MMs by definition are liquidity providers (which means high availability and high volume at competitive prices). In some cases (DMMs) they're legally obligated to do so at some well defined baseline. And in that specific context HFT speeds are required.

Re:Ask HN: What programming skills are required by HFT or Tr... by gas9S9zw3P9c on Friday May 15, 2020 @04:13PM (#23196853)
To me, MM is the activity of providing liquidity with passive buy and sell orders - profiting from the spread while taking on inventory risk. That's also how exchanges define it, paying (or giving discounts to) traders whose orders are filled passively - the whole maker/taker incentive that was invented to attract customers a few decades ago. And we had human market makers well before electronic markets, and we still have them for illiquid markets today. They are (still now) called Market Makers even though they trade on minute scales!

So why is it not considered Market Making if I make decisions on millisecond or second scales? I don't understand how that is related to time horizon. So that's what I meant with original question, why can't I be a profitable market maker without HFT speeds? I still don't see the reason... Or are we just arguing about definitions here? Maybe when you say MM, what you really mean is HFT, but in my head the taxonomy looks completely different.

DMMs are a different story since that's basically just an SLA you have to adhere to, but not talking about DMMs in this case.

Re:Ask HN: What programming skills are required by HFT or Tr... by 1e-9 on Saturday May 16, 2020 @03:02AM (#23201099)
Slow market making is still market making, although rarely a good idea in my view. There are instruments with market makers operating at millisecond time scales. Not nearly as many as a few years ago, but they do still exist.
Re:Ask HN: What programming skills are required by HFT or Tr... by JoshuaDavid on Friday May 15, 2020 @08:02PM (#23198990)
> Let's just say the price is a random walk

This is where your logic is faulty. On the time scale of for example days, the price is definitely not a random walk. If stock XYZ has a price of $100 at 9:00 am, and you put in a buy order at $99.50 and a sell order at $100.50, there are a number of ways for it to go:

1. The price drops to $99, your buy at $99.50 triggers and you now are long (expect the price to rise), the price rises to $101, your sell at $100.50 triggers, you make $1.00 and are back to your original position.

2. The price rises to $101, your sell order at $100.50 triggers and you are now short, the price drops to $99.00, your buy order at $99.50 triggers, you make $1.00 and are back to your original position

3. The price drops to $99, your buy at $99.50 triggers and you now are long (expect the price to rise), the price continues to drop to $95, you now have a share of XYZ worth $95.00 which you are offering to sell at $100.50. Either you exit your position (and lose $4.50) or stay in the position (in which case you have $99.50 less available to invest than before. Whether or not the position makes sense to keep, you are now a long-term investor, not a market maker.)

4. Same as number 3 except that the price rises to $100.50, your sell goes and you are now short XYZ, the price continues to rise to $105.00 and again you either exit the position and lose money or don't exit and are long-term short XYZ (and never make the money back if the price never drops back down).

In order to make a profit, 1 and 2 have to happen 10x as often as 3 and 4 for the particular values mentioned above.

If you widen your spread, you will make more money each time the random walk of the market goes from one side of your spread to the other, but that will happen less often (whereas large one-way market moves that more-or-less permanently move the price to a level where it no longer crosses your spread stay roughly as probable as before).

If you narrow your spread, you will make money more often, but less each time. HFT firms are an extreme example of this - they have very (very!) narrow spreads that they trade on millions of times per second, pocketing a fraction of a penny each time (unless the market moves, in which case they lose money just like any other market maker, but events that happen every minute are "rare" when you are working on the timescale of microseconds).

There is a phrase, "picking up pennies in front of a steamroller", used in finance. The basic idea is that there are pennies (spreads) lying on the ground for you to pick up, but the steamroller (an actual movement of the market) could come along at any time and crush your profits.

Re:Ask HN: What programming skills are required by HFT or Tr... by quickthrowman on Sunday May 17, 2020 @08:31AM (#23211504)
In short, someone else will quote a tighter spread and capture it.
Re:Ask HN: What programming skills are required by HFT or Tr... by traK6Dcm on Friday May 15, 2020 @12:45PM (#23194245)
> I understand they are not making the world a better place, but are they making it worse?

Most people would argue that they are not directly making the world a worse place, but rather that they are sucking in talent that could have used their skills in other places to make the world a better place. For example, many talented Physicists ended up in trading companies a few decades ago. Today, you can make a similar argument for companies such as Google or FB who probably have tons of extremely intelligent scientists working on ads.

> Something that I have heard is that they are providing a service by providing liquidity to the market.

It's unquestionable that they provide liquidity, at least most of the time. That's good. What's questionable is whether they are doing it in an efficient way. Their primary goal is not to provide liquidity - it's to make money. Liquidity is just kind of a side effect of their activities, which is an elaborate race to "beat" other firms through speed and algorithms. Most of the resources go towards that, but don't result in additional liquidity, most of which is probably not even needed. It's like saying "FB provides an important service by allowing you to message your friends" - sure, that's not wrong, but that's not their primary goal. And you don't need a trillion dollar to make a messaging app. The difference is that FB also does lots of other things, so it's unclear how much of their resources are actually wasted vs. potentially used for "making the world a better place" - it's not quite as obvious that they are wasting a lot of talent and capital.

The other question is what the alternative would be. Markets run by human traders were significantly more unfair than anything we have now, but HFT was never meant to happen, it was just result of markets becoming electronic and transparent, and people trying to extract more money.

Re:Ask HN: What programming skills are required by HFT or Tr... by 1e-9 on Friday May 15, 2020 @02:23PM (#23195536)
> The boss says to build a thing, you build the thing.

Sounds like a typical entry-level job to me.

> They're not making the world a better place; they're not providing a valuable service; they're just exploiting and extracting and skimming some dollars out of the market.

Firms providing useful services through their trading allow our economies to prioritize resources more efficiently. Better resource prioritization increases prosperity, which makes the world a better place in a multitude of ways. The useful services provided (for example, increased market stability) go beyond the seemingly-simple benefits of "increased liquidity" and "tighter bid/ask spreads" that are often mentioned. This becomes easier to appreciate once you delve into the enormous number and diversity of traded instruments and their interrelationships. It's far more than just cash equities.

Firms pursing parasitic trading are harmful to markets. Their behavior tends to backfire in the long run due to a combination of regulatory action and natural market dynamics.

Characterizing all (or even most) HFT firms as harmful is inaccurate in my experience.

Re:Ask HN: What programming skills are required by HFT or Tr... by ackbar03 on Friday May 15, 2020 @11:22AM (#23193207)
Wouldn't this kind of stuff make the server hugely vulnerable though? Like wouldn't one malformed input completely screw the whole thing up, or God forbid a carefully crafted malicious one? High speed complex systems running on tailor made c code doesn't seem particularly safe
Re:Ask HN: What programming skills are required by HFT or Tr... by lucozade on Friday May 15, 2020 @11:49AM (#23193585)
Bugs have been known to cause some fairly major blow outs [0].

It's pretty/very rare for malicious code/data to get involved because this sort of thing is almost always co-hosted with the exchange. There's nowhere really to inject yourself. I'm sure it happens in other parts of the process, just not much in the very low latency parts.

[0] https://en.wikipedia.org/wiki/Knight_Capital_Group#2012_stoc...

Re:Ask HN: What programming skills are required by HFT or Tr... by nnoitra on Friday May 15, 2020 @02:03PM (#23195280)
Right. Does it take 15 minutes to "rewrite an Infiniband driver and pin it to a core"?

I ask because a friend was contacted by HFT firm but is concerned about work hours and cowboy coding.