Trying to understand how the internals of the stock market work

37 points by catasaurus ↗ HN
There is a lot of information online about the stock market, but I am at a loss for something about how it actually works. From how online brokers actually execute a trade with the NYSE or NASDAQ, to basically anything else on how this system actually works. Sorry if there is an easy source for this information, I just haven't been able to find one.

21 comments

[ 3.2 ms ] story [ 62.2 ms ] thread
Find a day trading firm that gives you a bit of $$$ to trade, a professional trading workstation and you will understand the basics rather quickly. They usually don't give you salary but give you payout once you win some $$. TBH I'm not sure whether these firms still exist but back in 201X I did a few months of day trading (mostly scalping CIM).
lol I have never understood day trading. Everyone says day traders lose money yet somehow people make money doing it enough that they can get jobs at hedge funds and the like.
Most people lost $$ eventually and those who win consistently don't necessarily care about a hedge fund job.

From what I remember they basically told us not to be afraid of losing $$ because our capital allowance for each stock is small. My best stock was CIM and the allowance was merely 10 hands which is 10k shares. I'm not sure if it leads to a job in hedge funds but I think hedge funds are very picky about schools and such.

I don't have any specific resources to suggest but if you are interested in learning about the financial "infrastructure" that allows stocks to be traded, you should read up on the securities clearing systems - primarily DTCC in the US and Euroclear/Clearstream in Europe.
Look up the concept of a "Central Limit Order Book" (CLOB) -- this is the fundamental data structure that allows the matching and of buy- and sell-orders on a typical exchange "matching engine". It matches these orders in "price-time" priority.

Once you understand this, everything else, at least at a technical level, more or less falls into place, but you will need to learn a bit about the various order types (market, limit, etc), and the concept of "liquidity provision"

On top of that you can look at concepts like "Exchange Connectivity", "Market Data" Feeds, "Clearing" and "Central Counterparties", and, of course "FIX".

It will take time, but it'll all fit together in the end and you'll end up with a reference architecture for a prototypical exchange business reasonably easily after that.

Source: I worked in wholesale finance IT for over 2 decades, a good chunk of those in exchange / exchange-like businesses.

if this all interests him he should in addition read up on SOR.
Yeah. DMA, Sponsored Access, SOR, (both sellside and buyside),dark pools, etc.

And this is just equities and listed derivatives (and the odd bond).

When you get on to FX and Fixed Income proper it all changes quite a bit as these tend to use a bifurcated market structure with CLOBs on the D2D side and quote-based markets on the D2C side. In all, a whole lot more complicated than a cash equities structure.

Thank you so much! I will definitely look into all of this. So surprised that I got so many answers! Hacker news > reddit
Larry Harris, Trading & Exchanges: Market Microstructure for Practitioners, Oxford 2003

David M Weiss, After the Trade is Made: Processing Securities Transactions, Penguin 2006

This is the kind of thing ChatGPT is excellent at, just saying.
Lol. I know I'm a new user but I'm not ChatGPT :)
Oh, reading this again. Do you mean something ChatGPT is excellent at answering? The only problem with that is that ChatGPT is really just an excellent bullshit machine, as in it is really good at making stuff up. So I would probably get some questionable information when it comes to smaller details.
Yeah, I guess I haven't run into that enough to know when it's a danger. I wonder what conditions cause it to bullshit.
The study of Complex Adaptive Systems can provide a lot of insight.