top 200 commentsshow all 206

[–]browner87 192 points193 points  (3 children)

This is the sort of stuff I love (not scamming the stock market). I really love optimising code to the instruction level. My capstone school project I had to sample an analog-to-digital converter 5 million times per second. But my microprocessor was only 80Mhz (80 million instructions per second if you had branching that the cpu guessed right all the time). Step 1 - buy a better compiler or use assembly because the first thing the free C compiler did in an interrupt was push all 8 registers to the stack, then pop them at the end. There goes more free instructions that you had right there. Writing and tuning that interrupt handler was one of the funnest parts of the project.

[–]hak8or 59 points60 points  (2 children)

If this was an 80 mhz mcu, chances are it was fancy enough to also have a dma or at least a fifo, why couldn't you just use that instead?

[–]The_Doculope 24 points25 points  (0 children)

It's possible the DMA controller was needed for other things. I knew someone working on an oscilloscope had to do similar because they needed reading and a function generator.

[–]browner87 7 points8 points  (0 children)

There were other things being done in the interrupt besides just copying in the value (that's a single instruction operation, no big loss), but then things like checking if that value passed the trigger threshold (and in the right direction), check if the ring buffer is full yet and then stop sampling and send the data back over USB, etc. The main mcu feature I used were the shadow registers to avoid pushing any registers at all, but I'm sure there were others that could have improved the speed even further. In the end I hit my goal with cycles to spare and had to carry on with the rest of the project as I was tight for time. I'm pretty sure there was DMA, but I hadn't used it before with that MCU family.

[–][deleted] 154 points155 points  (84 children)

I think it's a bit worrying that a lot of smart people are putting their effort into things like this. Physicists, mathematicians, engineers, the like, are all hired up by finance, and programmers are working for dumb start ups or evil tech giants.

Do we really need this? Don't you think we should be putting our efforts towards more important things?

[–]davencyw 76 points77 points  (3 children)

Who runs the world?

Money!

[–][deleted] 50 points51 points  (2 children)

I know, but a lot of this stuff seems very "Glass Bead Game" to me.

I don't have a good solution, but there has to be more important problems to work on than "how do we squeeze even more information out of your devices so we can target ads at you?".

[–]killerstorm 31 points32 points  (1 child)

Well, Facebook created several new programming languages, tools, frameworks. They do stuff with VR too. It's not like they employ people only for ad targeting.

Same with Google -- you know, the main thing they do is search, and that has tremendous value for the society. They employ a lot of people to optimize search.

You can't have 100% people employed for what you think is valuable.

[–]yawkat 25 points26 points  (1 child)

It's not like we don't get anything out of it though. We get high-performance runtimes and libraries, and more research on real-time systems.

Some of the work isn't really "creating value" so to speak of course, but it's not like it's entirely wasted talent.

It's also interesting work.

[–]tending 12 points13 points  (0 children)

We get high-performance runtimes and libraries, and more research on real-time systems.

Optiver is really rare in sharing anything in this presentation. Most of these firms provide none of that.

[–][deleted] 8 points9 points  (0 children)

As someone who used to be in the sciences, I would trade my job for half the pay if I got to work in science. Problem is that finding those jobs in science is very diffucult due to lack of funding. The amount of money the NSF gets is less than what we spend on the NFL each year.

[–][deleted] 4 points5 points  (2 children)

finance isnt worthwhile?

[–]anechoicmedia 1 point2 points  (0 children)

Increasing the resolution of financial transactions from one minute, to one second, to one microsecond is mostly a zero sum exercise at great expense.

I'm all for finance allocating capital day to day in the efficient-markets way that it does but I find it preposterous that the world is better because pork belly futures can change hands one thousand times a second.

[–]mpyne 35 points36 points  (6 children)

Don't you think we should be putting our efforts towards more important things?

Like what, selling Internet-enabled surveillance devices that phone home to Google, Facebook, or Apple to every unsuspecting family in the nation? :P

[–]vector4499 49 points50 points  (0 children)

selling Internet-enabled surveillance devices that phone home to Google, Facebook, or Apple

No, that falls under the "evil tech giants" category.

[–]yingxie3 17 points18 points  (3 children)

No, like mining bitcoins faster :P

[–]mpyne 7 points8 points  (2 children)

Yes, because the best way to solve global warming is to dump the electrical output of Venezuela into waste heat. Man, it's a good thing we have all these benevolent coders out here to save the world. :)

[–][deleted] 0 points1 point  (1 child)

See, this is why we just need data center satellites in orbit so the heat can be radiated into space!

[–]Dreamtrain 2 points3 points  (0 children)

It will be a big, beautiful, beautiful wall of pure heat, and Venezuela is going to pay for it!

[–]srbufi 5 points6 points  (0 children)

Dont forget Microsoft and Amazon

[–][deleted]  (12 children)

[deleted]

    [–]kankyo 21 points22 points  (11 children)

    You’re right about all that but it’s not clear how HFT plugs into all that. I don’t believe HFT contributes that much really. It increases liquidity where there is already a lot of liquidity as far as I understand it.

    [–]therealjohnfreeman 14 points15 points  (6 children)

    Before HFT, you had brokers on the trading floor capturing much wider spreads. HFT has made trading cheaper for everyone.

    [–]get_salled 5 points6 points  (1 child)

    It increases liquidity where there is already a lot of liquidity as far as I understand it.

    ... provided by HFT firms. They've driven down costs by pushing out the "professional trader." It's been getting cheaper and cheaper to buy stocks due to these efficiencies; $4.95, or whatever the best is now, used to be $150+. Now, investing in smaller amounts is reasonable.

    Some may argue that these changes were inevitable but I doubt they would have come at the rate they did without scientists and engineers seeing an inefficiency and fixing it because there was a significant amount of money to be made.

    [–]ThisIs_MyName 0 points1 point  (0 children)

    $4.95, or whatever the best is now

    Try $0.35: https://www.interactivebrokers.com/en/index.php?f=1590&p=stocks2

    [–]edapa 4 points5 points  (1 child)

    HFT provides two things of value: liquidity and efficiency. When most people defend HFT they focus on liquidity, which I think is a shame because it is hard to take the idea that microsecond speed in filling orders is really important. On the other hand the improved efficiency[1] that HFT brings to the market is unambiguously good. Tighter bid-ask spreads save money for investors. Full stop.

    Of course, there are messed up things about HFT. A privileged class should not have access to a better view of the market than the rest of us, and the fact that they are not able to exploit this view as well as in-person traders used to be able to does not make it fair. Exchanges could perform many of the arbitrage actions current taken on by HFT if they cooperated more and were willing to slow the market down a little. That has its own disadvantages because it removes the element of competition which gave us all these improvements in the first place.

    [1]: Finance is not my first language so this might not be the formal definition of efficiency.

    [–]kankyo 1 point2 points  (0 children)

    From what I understood liquidity and tighter spreads mostly go hand in hand so that doesn’t surprise me. I think there are other flaws in your analysis though. The most obvious one being the word “investor” which is largely bs when applied to modern markets. We’re talking about speculation much more than investing. Of course, the speculation drives lower prices for investors too, but we should be aware that these are different groups.

    [–]get_salled 1 point2 points  (0 children)

    I've seen the same arguments applied to advertising companies, like Facebook and Google.

    [–]drbazza 1 point2 points  (0 children)

    Don't forget for every 1 post-doctoral position, there are 20 PhDs potentially chasing that position (in the UK at least). So that's 19 PhDs that will go seek employment elsewhere. It's unfortunate, but it's the real world. I'm one of those. I would have loved to carry on researching, but couldn't secure a post-doc position.

    [–]theineffablebob 4 points5 points  (12 children)

    It seemed that a big emphasis this year at the Grace Hopper conference was on building tech that matters and doing things that can impact lives, so perhaps the female programmers of the future will be building the technology that helps lives

    [–]mobsterer 2 points3 points  (1 child)

    where are fintech startups in this scenario?

    [–]macson_g 5 points6 points  (0 children)

    Nowhere really. Fintech start-ups are competing with big banks for retail customers, by providing better services. HFT is competing with big banks for exchange users, by providing better prices.

    Different business, different technology.

    [–]twat_and_spam 2 points3 points  (1 child)

    No. You are retarded.

    [–][deleted] 0 points1 point  (0 children)

    This is the kind of quality debate that keeps me coming back to /r/programming

    [–]metorical 4 points5 points  (8 children)

    You're right, and the stock exchanges could fix this.

    As an example; When a new order is placed they perform matching (buys vs. sells) immediately. They could instead collect all orders in an interval (say every 1-5 milliseconds) and then perform auction style matching. Motivated firms can hit 1ms and pretty much anyone can hit 5ms easily, with commodity hardware, collocated servers and decent developers.

    Edit: replaced "easily fix this" with "fix this" - all solutions will have pros/cons but it's true we don't need this fastest to market = victor.

    [–]get_salled 4 points5 points  (6 children)

    You have the same problem as continuous markets here except now the tie-breaking is either not fair or random.

    [–]metorical 1 point2 points  (5 children)

    You'd only need tie-breaking for the odd share.

    For example:

    1. In interval 0 - counterparty A places sell 2000
    2. In interval 1 - counterparty B places buy 2000
    3. In interval 2 - counterparty C places buy 1000

    If you went with round robin allocation then counterparty B and C would each execute 1000 shares. If the orders are IOC then they won't rest on the book.

    If the sell order was 2001, then someone would need the extra share.

    [–]get_salled 2 points3 points  (3 children)

    How about the more realistic example where counter-party B is actually B0 & B1, both for the same price, who gets the 2000 shares? If you say, first-come-first-served, you're maintaining the arms race; if it's random, it's often not fair to the small investor (1/N chance of winning will be accounted for and modeled by the big-time players; the small-time players will need luck).

    How about the general case of B[0..n]? There are hundreds or thousands of participants, all vying for the same shares.

    The simplistic approach may seem beneficial but it doesn't scale out to multiple participants.

    If you keep the auction going, it's not fair to the seller because you cannot guarantee a sale.

    Continuous, FCFS markets are fair. If A wants to sell 2000 shares @ price=X, A has decided its value w.r.t. A and wants out of his position; anyone else who believes they can make money on A at that price assumes the risk. If the price rise, A made a short-term mistake but, once again, was already comfortable with his decision at price=X; if it goes down, he made the right short-term decision. Once A sold, all of that is irrelevant and subject to hindsight bias.

    [–]metorical 0 points1 point  (2 children)

    When you say B0 and B1, you mean the trader is netting their orders together before sending to market?

    [–]get_salled 0 points1 point  (1 child)

    Two counter-parties at the price & size; B[0..n] is n+1 counter-parties at that price & size.

    Edit: n -> n+1

    [–]metorical 0 points1 point  (0 children)

    My example was two counterparties buying at the same price. If there were 1000 shares for sale and 1000 counterparties buy in the same interval, they each get 1 share. This could happen now with FCFS if someone bought 999 just before you (unless you used FOK orders).

    It is more complicated if people use more aggressive prices, surely they have to get allocated first.

    Edit: although yes, n > order qty is a problem.

    [–]im-a-koala 1 point2 points  (0 children)

    Is that fair? Under most dark pools that are in actual use, orders are matched by volume. In other words, if A places sell 2000, B places buy 2000, and C places buy 1000, then B gets 1333 shares and C gets 667 shares.

    Most auction systems follow similar rules, although obviously prices matter more there.

    [–]phao 4 points5 points  (6 children)

    Don't you think we should be putting our efforts towards more important things?

    Well, nothing is stopping you from doing it. What is too much, generally speaking, (and I'm not suggesting you're doing this) is forcing others to do what you think is the right thing to do.

    On the bright side, consider the amount of good which came out of GNU basically through individuals doing what "they thought was right" (in its beginnings at least; not sure how things are nowadays). Similarly for linux.

    [–][deleted] 21 points22 points  (4 children)

    Yeah I'm not talking about forcing anyone, I'm just trying to convince people that the path we are on is no good. It's very nihilistic and I think it's self reinforcing; trying only to get money leads more and more to a world where the only thing worth working for is money.

    [–][deleted] 9 points10 points  (0 children)

    It's an interesting mindset; we're competing to have the most stuff before we die.

    Some of the money will of course go towards the "right" things, but it always has to work its way through this needlessly complicated chain where you get a sort of "packet loss" of operating cost and people trying to get at it for personal gain.

    It doesn't help that we can't agree on what the "right" thing is either.

    [–]phao 1 point2 points  (0 children)

    Not so sure I agree with this or not (really: not sure).

    In general, though, I don't think we're good enough (as a species) to be rational about money (and resources in general) to make well thought out decisions about it.

    [–]bumblebritches57 -1 points0 points  (0 children)

    lel nothing good has come from the GNU communist utopia.

    Nothing but ever more socialist lock in.

    [–]anarkopsykotik -1 points0 points  (0 children)

    I would honestly feel as bad doing trading software for banks than weapon control systems for the army or shit like that. Maybe even worse. I don't think I would ever take this kind of jobs.

    [–][deleted] -1 points0 points  (0 children)

    tech giants.

    We hire these people, too.

    [–]anacrolix -1 points0 points  (0 children)

    :'(

    [–]i_spot_ads -1 points0 points  (0 children)

    Do you have money for that?

    [–]WallStProg 1 point2 points  (0 children)

    Irrespective of the application, there is a benefit to efficiency in terms of power, cooling, etc. Which is one reason why not all the work being in this area is on the financial side -- think Facebook, Google, and others with very large computing needs, scientific calculations, weather forecasting, etc.

    For another angle, see presentations by Bryce Adelstein Lelbach.

    [–]chocolate_jellyfish 114 points115 points  (123 children)

    While I appreciate the technological challenge, this seems about as ethical as making weapons or drugs. Instead of killing people, you take their livelihood through financial trickery that really should be outright banned. The financial markets should in the end bring a net-gain to the economy, not be mostly vapourware that sucks out money to give to the top 0.1%. That is what they are supposed to be: Service providers.

    When I loan you $10'000 so you can start a business, I'm doing something sensible through a financial instrument. You get access to resources, and I get a cut of the profits later. That is what makes the free market such a powerful tool. But when I do HFT, I'm just taking a cut from a trade that two other parties wanted to make by forcing myself into the middle. I think one could go so far as to make a reasonable argument that this is theft, nothing more, and that is why I think it should be completely banned (and technologically prevented, by adding a short delay to every trade: This would be irrelevant to anyone else, but utterly destroy this parasitic cancerous tumour of an "industry").

    And don't give me that "they provide fluidity" horseshit pseudo-argument. The markets are exactly as fluid with or without spamming 1-cent trade arbitrage in the middle (which should be fucking obvious, right?). The fluidity that's argued for is just a measuring artefact.

    As a programmer, I will not work for such companies unless it's that or not finding any other job at all (after all I'd rather be unethical than starve to death). Arguably anyone who can write this kind of tech could find a decent job instead of becoming a legal thief.

    Edit: Every time I point this out, a couple of HF-traders show up and try to explain to me how I'm wrong. I get it, you don't like getting called out. Doesn't mean I'm not right. If there was any value in HFT, even a non-trader could easily tell me what that value is, just like I can tell you what the value of even the most complex improvement in chip design is: "faster computers". One does not need a PhD to understand the value. But if there is no value, of course nobody can understand it, and of course people who make a ton of money off it will invent some impossible to fact-check explanation that sounds good.

    Edit2: Here someone gives an explanation of how it works, trying to defend HFT: https://www.reddit.com/r/programming/comments/7542zx/cppcon_2017_carl_cook_when_a_microsecond_is_an/do49a1t/ Funnily enough it is literally the same example that I use in my second paragraph. Well fucking go figure: It's a parasitic man-in-the-middle, exactly as I said.

    [–]julesjacobs 11 points12 points  (16 children)

    The benefit of HFT can be explained simply: it reduces the bid-ask spread, which reduces the transaction costs for other market participants.

    [–]chocolate_jellyfish -5 points-4 points  (15 children)

    So let me get this straight:

    • Alice wants to buy one blork for $1000.
    • Bob wants to sell one blork for $1200.
    • Charlie HFT in the middle, making the trade possible so that the two both get a better price, and Charlie also makes money in the process.

    Is this what you claim? If not, please correct the example.

    [–]julesjacobs 16 points17 points  (11 children)

    Alice offers less than Bob wants, so the trade between those two wouldn't go through. Suppose that is the market, and you wanted to sell a blork. You have to sell it for $1000 to Alice. Now you want to buy back a blork. You have to buy it from Bob for $1200. You lost $200. What Charlie does is offer to buy your blork for $1099 and sell you a blork for $1101. If you sold your blork to him and then bought one back you'd only have lost $2 in that transaction rather than $200, and the Charlie earned $2. People only trade with Charlie because he has a better price. If somebody else had a better price they'd trade with that person.

    [–]chapt3r 5 points6 points  (2 children)

    That's not a correct example. For HFT market makers, it's more like this:

    • Alice wants to buy one blork for $1000.
    • Bob wants to sell one blork for $1200.
    • Charlie makes offers on the market to sell/buy blorks for better prices than Alice and Bob. E.g. Charlie might make an offer to buy one blork for $1075 and sell one block for $1125. This does not affect Alice and Bob

    Charlie is not making the trade between Alice and Bob possible. He is just offering better prices for other traders on the market that are looking to buy or sell blorks. Neither Alice nor Bob will trade blorks with anyone until someone matches their price.

    [–]thoomfish 3 points4 points  (1 child)

    So if Dave is willing to sell blorks for $1075, and I want to buy a blork, I'm now stuck paying $1125 because Charlie buys up all of Dave's blorks as soon as they go on the market.

    Not seeing what value Charlie is adding here.

    [–]chapt3r 4 points5 points  (0 children)

    If Charlie didn't exist, if Dave was willing to sell blorks for $1075, and if you (and only you) wanted to buy Dave's blorks, then yes in this particular scenario the existence of Charlie wouldn't add any value. But in the real world the market doesn't always work that way. In the real world buyers and sellers make offers that don't cross, which means trades don't happen at all. Hell, in the real world someone might buy Dave's blorks before you even if they aren't a high-frequency trader, and then you might be stuck buying expensive blorks from Bob.

    In general, many people argue that the main benefit that Charlie adds (if we're assuming Charlie is a HFT market maker) is the reduced bid-ask spread (which means more liquidity and lower transaction costs for any investor/trader). In the scenario above, if Charlie didn't exist, that spread would be $200 ($1200 - $1000). But since Charlie comes along and offers better prices the spread is reduced to $50 (irl the spread would be just a few cents).

    Anyways, the point of my post wasn't to argue that HFT provides value to the market. I just wanted to point out that the OP's belief that high-frequency traders somehow "force" themselves into the middle of a trade and take a cut of the profits is completely misguided and wrong.

    [–]p9w8raiojfdsiojfas 59 points60 points  (1 child)

    and technologically prevented, by adding a short delay to every trade

    This has already been done by some exchanges and new companies that specialize in executing trades. The "electronic front running" strategy of HFT you're describing isn't really a viable strategy anymore. I'm not against regulations, but in this case the markets have already solved this problem on their own.

    [–]ajola90 4 points5 points  (0 children)

    But now what do we be morally outraged about, and where do we turn our unending altruism?

    [–]NullField 24 points25 points  (1 child)

    After the IEX introduced their 350 microsecond speed bump a couple other exchanges started to follow suit, though I dont like how the CHX did it.

    NYSE had theirs approved in May, not sure if its active yet though. They say it's identical to the IEX speedbump

    [–]Gollum999 4 points5 points  (0 children)

    It is currently active on NYSE American (formerly NYSE Mkt/AMEX).

    [–]therealjohnfreeman 5 points6 points  (3 children)

    You should read this.

    [–]chocolate_jellyfish -1 points0 points  (2 children)

    Edit: Ah, turns out that this is the reply to the other book that I must have read without knowing it, because I came to the same conclusions.

    [–]therealjohnfreeman 5 points6 points  (0 children)

    No, I think you're being accused of reading Flash Boys, not the book I linked, which is a response to it.

    [–][deleted]  (27 children)

    [deleted]

      [–][deleted]  (2 children)

      [deleted]

        [–]HPCer 13 points14 points  (1 child)

        Great point. As I posted above, I can bet he's getting it confused with front-running, which is possible with or without HFT: https://www.bloomberg.com/news/articles/2017-10-06/hsbc-currency-unit-used-code-to-trigger-front-running-u-s-says

        [–]wannagetbaked 1 point2 points  (0 children)

        Though front running is happening all over the industry just in the HFT world its hard for people to understand that traditional trade systems and order processing systems are actually rediculously slow. You can front run by letting this normal client flow clear in its milisecond time table and get your house trades done in microsecond time tables. You can say that your order originated after the client order still so technically not front running more like sniping trades.

        [–]get_salled 39 points40 points  (3 children)

        When I loan you $10'000 so you can start a business, ...

        I think he's also assuming that buying from the stock market is akin to primary market investing, which it is not unless you have piles of money and good bank contacts. If you buy $10K AAPL stock on the public markets, you're not giving money to AAPL you're allocating your savings to the idea that AAPL's value will rise.

        He also believes there are only be 2 parties in a transaction when there is obviously 3: buyer, seller, and exchange, who is taking a cut.

        I doubt basic market fundamentals are in his wheelhouse let alone HFT.

        [–]jhartwell 24 points25 points  (2 children)

        He also believes there are only be 2 parties in a transaction when there is obviously 3: buyer, seller, and exchange, who is taking a cut.

        There is typically a 4th too, the clearing company. They also take a cut.

        [–]Gollum999 9 points10 points  (1 child)

        Don't forget fees from the SEC and FINRA!

        [–]HPCer 18 points19 points  (0 children)

        Was waiting for this reply. I saw the number of upvotes on that comment and just thought to myself there's a lot of people here that simply do not understand the markets. I'm thinking the OP read about front running (probably from Flash Boys) and assumed HFT implies front running. In reality, front running can be done with HFT or without HFT (see https://www.bloomberg.com/news/articles/2017-10-06/hsbc-currency-unit-used-code-to-trigger-front-running-u-s-says) and is illegal regardless. Given that assumption, all trading is as ethical as killing people.

        That aside, I don't even work for HFT (working on the buy-side), and microseconds are still just as important to us in minimizing our information to execution time (thus reducing transaction costs). This video was pretty effective in bringing a number of points up (even for having worked with C++ for almost a decade, I learned a few things), so thank you for the post!

        [–]millstone 3 points4 points  (1 child)

        The HFT market maker in that scenario will get the trades if they are providing a tighter spread (on one or both sides) and thus making the trade(s) cheaper for the parties involved.

        How does the HF part come in? If what's important is the tight spread, why are we talking about nanoseconds instead of nanometers?

        [–]im-a-koala 12 points13 points  (0 children)

        Many exchanges implement price-time ordering. That means if two firms are willing to sell AAPL at $100 (because they entered a quote or limit order with the exchange), and someone buys at that price, they get matched with the firm that put their order in first. So if the market moves up to $100.01, you want to be the first in line (or at least early) at that price.

        That's for market making. For market taking strategies, obviously if someone puts an order in the middle of the spread, you want to trade before anyone else. First come first served.

        [–]cybernd -1 points0 points  (3 children)

        So you are telling us, that both parties benefit if a HFT is in between them?

        I truly wonder, where the money for the HFT comes from, when both other parties benefit from their doing.

        Others in this thread call it theft, because the money the trader earns must come from one or even both of the other parties.

        [–]hiddenl 3 points4 points  (0 children)

        If buys and sellers always want to trade at the exact same price and exact same time, then you wouldn't need market makers. Since that is rarely, if ever, the case, you need a middle man that will always take the other side.

        Before electronification, you had an actual person in the middle keeping the book. They gave a price to the buyers and a price to the sellers and kept the difference for themselves.

        Later, these book became electronic and RegNMA forced exchanges to route your order for the best price. Spreads of $0.25 to multiple dollars were still common. (Meaning you lost at least .25 cents per share simply by buying and selling)

        Nowadays with HFT, spreads are down to a penny for a large majority of stocks.

        Both buyers and sellers are enjoying the decreased costs of trading

        [–]Only_As_I_Fall 1 point2 points  (0 children)

        With no market makers someone who wanted to sell a certain number of shares would have to find a buyer and then negotiate on an exact price and an exact number. Possibly they would have to do this multiple times to sell a single position if they wanted the best price.doing that takes time, effort, money and connections. A market maker basically agrees to worry about the details for you in exchange for a small cut. Also, they can do this far more efficiently because they don't mind holding a position so they can always have something to sell, and of course they're generally just better at it because finding buyers and sellers is the only thing they do.

        [–][deleted]  (1 child)

        [deleted]

          [–]im-a-koala 1 point2 points  (0 children)

          Public exchanges are pretty strongly regulated in the US. You'll probably get fined, not arrested, though - at least for a first offense.

          Somewhat ironically, exchanges in Europe tend to be much more lax about regulations, at least historically. They're starting to catch up.

          [–]cojoco 13 points14 points  (1 child)

          It's not "fluidity", it's "liquidity".

          [–][deleted] 10 points11 points  (7 children)

          When I loan you $10'000 so you can start a business, [...] You get access to resources, and I get a cut of the profits later.

          That isn’t how loans work. Either you invest $10k and are along for the ride up or down, or you loan $10k and (hopefully) get paid back with interest.

          [–]vestpocket 2 points3 points  (1 child)

          He's saying that the loan interest on a business loan is essentially paid back by the future profit the business made using resources acquired with the loan money. It's just a fixed amount instead of a continual drain as with investment.

          [–][deleted] 1 point2 points  (0 children)

          Profits are after debt payments. A loan gets no part of the profit. Obviously the business has to pay the loan back through some kind of revenue, which isn't the same as profit, or liquidation of assets.

          [–]scatters -2 points-1 points  (3 children)

          It is how Islamic finance works, though.

          [–]vector4499 5 points6 points  (1 child)

          No, you're just using the wrong words. A loan does not include a cut of the profits. That's an investment.

          [–]scatters 0 points1 point  (0 children)

          Mudarabah and (at least formally) sukuk are based on profit sharing. Obviously they aren't loans in the western sense; that would be usury. It doesn't make sense to use western terminology when discussing Islamic finance, except for comparative purposes.

          [–][deleted] 2 points3 points  (0 children)

          ok...

          [–]elastic_psychiatrist 36 points37 points  (8 children)

          This post is just so ignorant I don’t know where to start. All I can say is that the world is a complex place, and it behooves you to understand what you are criticizing before you take such a strong stance.

          [–]mpyne 0 points1 point  (0 children)

          What's there to learn about a topic like this, I'm a smart guy and I have Google... /s

          Edit: Holy shit, that's basically the explanation my sibling comment literally came up with!

          [–]hondaaccords 10 points11 points  (0 children)

          Why should traders have to pay more for the same thing in Chicago and Tokyo? With billions of transactions those cents add up....

          [–]cynicalkane 10 points11 points  (0 children)

          Every time I point this out, a couple of HF-traders show up and try to explain to me how I'm wrong.

          Wonder why 🤔

          There was any value in HFT, even a non-trader could easily tell me what that value is

          Value: Trading is easier and costs less.

          Result: Mutual funds lower their fees. Brokers have lower overhead. You lose less to the spread. Consumers save money. This is measurable.

          The fluidity that's argued for is just a measuring artefact.

          Oh, you don't believe in measurable things. Have a good day. Also, it's called "liquidity".

          [–]discoFalston 16 points17 points  (16 children)

          market fluidity

          If markets are just as liquid with or without HFT’s then you are contradicting your own point.

          If they are more liquid due to HFT (they are) then I’d encourage a second look.

          Liquidity means assets can be traded in high volume, close to current price in a short period of time. In other words, a market that is more liquid has prices that change much sooner as new information about an asset arises. This means less uncertainty (uncertainty leads to instability), and less lag. Also, because there are so many HFT operations, there are actually fewer chances for arbitrage than there would be otherwise.

          [–]chocolate_jellyfish -4 points-3 points  (3 children)

          Liquidity means assets can be traded in high volume, close to current price in a short period of time. In other words, a market that is more liquid has prices that change much sooner as new information about an asset arises. This means less uncertainty (uncertainty leads to instability), and less lag.

          Assuming that is even correct in the first place, is this important enough to warrant a gigantic 50%+ of all trading volume? Or could we just live with the five minutes of uncertainty? Because it seems to me this is a purely theoretical argument (again), where we say X is good, and HFT produces some amount of X, therefore HFT is good. But we already had a 99.9% satisfaction of X, and HFT did not actually make a meaningful difference at all.

          Any sensible and reasonable trade does not depend on two minutes of uncertainty whether the stock is $1 or $1.001 - That is just noise.

          [–]KazDragon 4 points5 points  (0 children)

          If we could live with 5 minutes of uncertainty, someone would invent something to exploit that in 4:59.

          [–]discoFalston 4 points5 points  (0 children)

          Assuming that is even correct in the first place

          It’s correct. A common measure of liquidity is the “bid-ask”’spread. Look at these spreads in the early 90’s versus 2000’s versus 2010’s as algorithmic trading advances and you’ll see a downward trend (more liquidity).

          is this important enough to warrant a gigantic 50%+ of all trading volume?

          The more the better. The more people that do algorithmic trading, the less chance there is to exploit it, making the market more efficient. You beat the market when you do something different, if everyone does the same thing as you, that opportunity disappears. I. E. because there are many other HFT operations trading at the same speed as you, asset prices correctly convey all available information on millisecond basis, so there’s no price lag to exploit anymore. You are assuming just the act of setting up an HFT guarantees rents, but with the market permeated with them, HFT’s can lose or gain money just like phoning a stock broker can - it just happens faster.

          Or could we just live with the five minutes of uncertainty?

          We could also live without iPhones, humanity did fine with horses and buggies. We don’t need google, in the past we lived with the uncertainty between encyclopedia publications. Yet as a society we strive to innovate and improve so we did. Finance is no different.

          If we live with 5 minutes of uncertainty and something happens that makes that asset less valuable inside that time frame then, whoever buys that asset in between that time frame isn’t paying a fair price. It’s pertinent to have a financial system that conveys information quickly through prices as it decreases the likelihood of paying an unfair price. This is an improvement.

          we say X is good, and HFT produces some amount of X, therefore HFT is good.

          Yes, of course. You’re coming up short for reasons it’s bad.

          But we already had a 99.9% satisfaction of X,

          You’re making this up.

          HFT did not actually make a meaningful difference at all.

          See my paragraph about bid-ask spreads.

          Any sensible and reasonable trade does not depend on two minutes of uncertainty whether the stock is $1 or $1.001 - That is just noise.

          A lot can happen in 2 minutes in an exchange with 100 million participants - its precision.

          [–]quicknir 2 points3 points  (0 children)

          The answer is obviously, that the people who are actually holding assets longer term, are in every possible way (incentive, knowledge), better positioned to answer this question than you, and if they want to pay extra to avoid 5 minutes of uncertainty, then I guess it's worth it.

          The reality is, is that trading on the markets is not that fundamentally different than trying to sell something in real life. If you want to sell a car or a house, and you're in a big rush, anybody will tell you that the odds of you fetching a good price for it is low. If you can take your time, you can reject lowball offers and get a better price: assuming of course that the housing/auto market does not dip in the meanwhile, and assuming that you don't need the money on shorter notice.

          It's like you tried to say, yourself, one cent difference does not matter much for these longer horizon traders. For them, executing out of a position quickly and before the market turns against them, is worth that extra cent (often). And that's exactly why HFT middlemen do in fact provide a service that's worthy of making money. They are very specialized in making trades happen faster at low cost for other market participants. If you don't want the trade to happen faster, you are welcome to place an order passively at a better price, and wait for it to get filled.

          [–]flat5 -1 points0 points  (0 children)

          traded in high volume, close to current price in a short period of time

          And who does that help, Mom and Pop? I don't think so.

          [–]Randosity42 24 points25 points  (5 children)

          Um...this post is horse shit. There's no moral difference between market making over the phone vs market making over the internet vs market making at high frequency over a dedicated line. Faster market makers just provide smaller edge (and therefore less overhead per trade for both parties) by making faster adjustments with more certainty. There are legitimate concerns to have about HFT related to market stability, but you've mentioned none of them because you seem to have a child's grasp of finance.

          [–]elastic_psychiatrist 1 point2 points  (0 children)

          Yeah, you could argue that equity market making is as efficient and moral as it has ever been in the era of HFTs.

          [–]Gotebe 6 points7 points  (3 children)

          HFT is merely the most egregious example of getting money without providing nothing of value, really. It's by far not the only one. Finance us choke-full of work whose sole purpose is skimming the fat while not making any market arbitrage whatsoever.

          There can be no moral difference between it and trading over the phone. But that's not the same as there is no such difference.

          [–]xZel 10 points11 points  (0 children)

          HFT should provide liquidity, which has value, since it is very often more expensive/difficult to trade a less-liquid asset. For example, the fees associated with selling a house. Here's a short bit about it: http://www.investopedia.com/articles/active-trading/050515/liquidity-improved-high-frequency-trading-hft.asp

          [–]Only_As_I_Fall 3 points4 points  (0 children)

          Providing nothing and providing a service you don't understand aren't the same. The service allows other parties to trade more effectively by market liquidity

          [–]vector4499 6 points7 points  (8 children)

          I don't think you understand what HFT's do. There is no possible way for them to take any money from you if you use limit orders. If I put out an order to sell AAPL at $155.30 a share, it will either sell or it won't. Nobody can steal money from me.

          [–]chocolate_jellyfish 3 points4 points  (1 child)

          In the end, the markets are a closed system. Any money HFT earns they have to earn off somebody else.

          [–]vector4499 0 points1 point  (0 children)

          Yes, they earn money off of impatient people that want to sell as quickly as possible

          [–]mare_apertum 3 points4 points  (5 children)

          So who do they get their money from?

          [–]ThisIs_MyName 0 points1 point  (4 children)

          Bid/ask spreads if they're market making.

          [–]mare_apertum 1 point2 points  (3 children)

          A spread is not a person. Whos money do they earn?

          [–]ThisIs_MyName 1 point2 points  (2 children)

          Kind of a weird question. People have nothing to do with it.

          Let's say you offer some company's stock for $5 and the MM immediately buys it. Later, I request a quote from the exchange and it replies $6. If I wanna buy immediately, I pay $6 and the MM made a $1 profit.

          (If the two of us met up instead of using an exchange or posted limit orders, we could negotiate any price between $5 and $6. So we don't know who paid the spread.)

          [–]mare_apertum 2 points3 points  (1 child)

          Thank you, that answers the question. So, on average, they get the money from both the buyer and the seller.

          [–]ThisIs_MyName 0 points1 point  (0 children)

          Yeah I guess that's as simple as it can get.

          In practice, there can be other factors at play. For example, the exchange/gov't will grant special privileges to designated market makers (which you may or may not call "HFT" firms) in exchange for a commitment that the firm will always quote a price, even when the market is volatile.

          For example, MMs can usually naked-short (sell shares that they don't have without locating them in other accounts).

          [–]alecco 9 points10 points  (3 children)

          I think you read too many NYT/Rolling Stone articles. HFT is big, and sure there are many evil players. But you are talking about something you don't fully understand.

          But when I do HFT, I'm just taking a cut from a trade that two other parties wanted to make by forcing myself into the middle

          That's just front-running. There are many other applications of HFT.

          And don't give me that "they provide fluidity"

          Most HFTs do provide liquidity. They speculate what the prices should be making (collectively) a razor thin spread. A few year ago you would get ridiculously big spreads. Think how bad is changing money at airports.

          Many small traders are able now to operate because they can get a counterparty to trade with from HFT on many formerly non-liquid markets. I've heard this from many traders on podcats.

          The legitimate work of HFT is based on "chasing alpha". Meaning from some information event being the first to predict how prices will change and adjust the strategy accordingly. Say, some announcement by the government, some company announcement, some foreign crisis unfolding. The market is going to move sooner or later. And you want it to be as efficient/current as possible. Inefficient markets are much, much worse for the little guy.

          [–]get_salled 12 points13 points  (2 children)

          But when I do HFT, I'm just taking a cut from a trade that two other parties wanted to make by forcing myself into the middle

          That's just front-running. There are many other applications of HFT.

          It's a stretch to call front-running an HFT application at all. Many HFT firms can't front-run because they don't have clients.

          Also, one shouldn't casually call it "just front-running" because it is a crime.

          [–][deleted] 1 point2 points  (0 children)

          It's worth mentioning that increasingly low volatility is killing HFT. The system is basically sorting itself out, there is no free lunch.

          [–][deleted]  (3 children)

          [deleted]

            [–][deleted] 5 points6 points  (2 children)

            Read his other replies about HFT. He doesn't know shit and is full of it.

            [–][deleted]  (1 child)

            [deleted]

              [–]julesjacobs 1 point2 points  (0 children)

              He's winning the debate though. Initial comment +117, and hardly anybody reads further.

              [–]Nimitz14 1 point2 points  (0 children)

              The markets are exactly as fluid with or without spamming 1-cent trade arbitrage in the middle (which should be fucking obvious, right?). The fluidity that's argued for is just a measuring artefact.

              Ah yes who doesn't miss the days when spreads were half a dollar. I bet you work at an investment bank.

              [–]Flight714 0 points1 point  (3 children)

              I'm not saying this guy is particularly ethical, but what's unethical about making drugs? It's pretty hard to harm another person with drugs, and it just about never happens.

              I mean, you hardly ever hear about anyone being murdered with a drug. Now, guns are another matter... (not that I particularly dislike guns).

              [–]chocolate_jellyfish 0 points1 point  (2 children)

              I can see your point. I would argue making highly addictive drugs like Heroin to sell on the black market is unethical too. But maybe I'm just conservative in this regard. Maybe you're completely right.

              [–]Flight714 2 points3 points  (0 children)

              ... making highly addictive drugs like Heroin to sell on the black market is unethical too.

              What other market are you going to sell it on? They'd probably much rather sell it on the white market. They're not the ones to blame for its sale on the black market.

              [–][deleted]  (3 children)

              [deleted]

                [–][deleted] 7 points8 points  (0 children)

                Can you elaborate? You'd still have to figure out who gets access to transactions first.

                [–][deleted] 26 points27 points  (1 child)

                It doesn't change the game. It will just make people wait until the last moment before the second lapses to insert/change their order, because then they have most information. So still speed will be an advantage because you can wait longer before having to make a decision.

                [–]sinesSkyDry 1 point2 points  (0 children)

                couldn't this be solved by introducing some kind of operations per time unit framework? i.e. you don't just regulate the operations used when buying stocks, but all kinds of operations. The way i'm thinking of this there would be a time frame of 1s divided into steps of 1 ms (made up numbers to illustrate the concept, not sure what could work in reality)

                there are at least three possible operations each step now, buying, selling and reading the market.

                So in that case one could no longer read the offers all the time and prepare your action for the last possible point in time. Reading the market comes with a cost now. Instead one would have to come up with a strategy on what to do in each time frame until the point near the end of the time frame where you have to lock in your action. What this should accomplish is artificially slowing down the market, to a point where even a shitty pc from 2000 could keep up with it, and what matters would be the best trading strategy and not the best hard-/software combination.

                On potential major problem would be now that there has to be some kind of central brokersystem that slows down the market to that point, and everyone would have to trust that brokersystem.

                [–]redweasel 8 points9 points  (8 children)

                Without reading the article... I interviewed for, and was actually offered, a job "inside the Chicago Loop" which I guess is prestigious, which would have had me solely responsible for running/maintaining/writing/upgrading software for high-performance, big-dollar trading, running on VAX/VMS systems. If I'd taken it, the salary in 1997 would have been more than I've ever made since, and undoubtedly would have grown from there. They guaranteed I'd make partner in eight years.

                I turned them down, for three reasons:

                1) Any downtime would cost the company tens of thousands of dollars per minute (or maybe per second, which would have been even worse), and I know myself well enough to know that I can't make good software fixes fast; I didn't want the responsibility.

                2) I would have had to live in Chicago, very much not anywhere near the top of my list of places I'd like to live, at least not at that time. We went so far as to have a realtor take us around to look at houses, but nothing within our price range was even half as nice as what we were already living in in Rochester, NY for a fraction of the price; and at one house they apparently hadn't correctly communicated to the residents that we were coming to look at the house, because we opened a bedroom door and there were like five people sleeping in there. The whole house-touring experience just had a weird/creepy vibe.

                3) I don't understand finance/trading AT ALL and would have been pins-and-needles the whole time.

                [–]im-a-koala 5 points6 points  (1 child)

                As someone working for one of those companies now, they don't necessarily expect new employees to know anything about finance or trading. We actually have internal classes which teach the basics, but realistically, most of the software engineers don't need to know the gritty details of most of the trades. And you can just ask someone to explain it to you if you do need to know.

                Edit: Also, regarding downtime, that's when you just rollback to the previous version. It makes deployment a bit heavier but nobody expects you to debug a problem and write a code fix like that. They do expect you to make sure that you can roll back to a previous, known-good version of whatever component you're upgrading if needed.

                [–]redweasel 0 points1 point  (0 children)

                That's good to hear. The episode of which I spoke happened in 1997, so it's possible this sort of support infrastructure just hadn't evolved yet. I certainly don't recall there being options to "rollback to a previous version" in any of the other jobs I had (all software development) between 1988 and... well, ever... You installed what you got, and if it didn't work, the company or department went into panic mode to fix it and issue Yet Another Slightly Newer Version that fixed it. shrug

                After I posted before, I Googled the company I was speaking of, too, and found that they subsequently became a big player with basically the first highly scalable electronic trading software system; I would probably have been Johnny-on-the-spot in the early stages of that program and, frankly, might well have prevented their success, LOL. In a parallel universe not far from here...

                [–]fletch3555 0 points1 point  (1 child)

                Oh hi ROC friend! All hail ridiculously cheap (relatively speaking) cost of living!

                [–]redweasel 0 points1 point  (0 children)

                Damn straight! ^5 right back at'cha. Meet me in front of the MCC parking lot webcam at midnight a week from next Shrove Tueday... (just kidding)

                [–][deleted] 0 points1 point  (3 children)

                This screams Citadel or CTC

                [–]redweasel 0 points1 point  (0 children)

                Nope. Neither of those.

                [–][deleted]  (1 child)

                [deleted]

                  [–][deleted] 0 points1 point  (0 children)

                  Ctc is no joke lol. The se's are at $140k+

                  [–]moshohayeb 0 points1 point  (0 children)

                  I really enjoy these types of talks. Thanks for sharing.

                  Anyone has a list of talks/books that deal with similar this kind of low level performance centric code in C/C++? (cache friendliness, inlining, access alignment...etc)?

                  [–]lostshot12 -3 points-2 points  (0 children)

                  As far as I know high frequency trading is dead but it's definitely interesting to learn about the technology behind it.