3. The market maker inside, and the hidden costs
Theory 2: How trading actually works
There are brokers that do not charge you a single penny to trade. They still make money out of you. The interesting question is how.
In the previous level we met market makers as the participants who constantly quote a buying price and a selling price, earning the spread in exchange for taking on risk. Now it is time to open that black box: where exactly does that risk come from, and why is the price on screen sometimes not the price you pay?
Inventory risk
A market maker makes money, in theory, from the spread. It buys at the bid and sells at the ask, pocketing the difference on each completed cycle.
But that only works if it can close both sides of the cycle before the price moves against it. Imagine it buys at $99.98 expecting to resell shortly at $100.02. In the meantime negative news sinks the price to $95, and the market maker is left holding inventory worth less than it paid.
This is called inventory risk, and it explains a behavior you can observe constantly: market makers automatically widen the spread in moments of uncertainty or high volatility. The more likely the price is to move sharply before they can close the position, the more compensation they demand for taking on that risk.
It is also the technical explanation for something you may already have noticed. Just before an earnings release or an important macro figure, spreads tend to widen noticeably in almost any asset: market makers protect themselves by reducing their exposure.
Where 'zero commission' comes from
A related phenomenon, and one that surprises many beginners, is payment for order flow.
Some brokers, especially those offering zero commission to retail clients, do not make money by charging per trade. They make it by selling their clients' order flow to high-frequency trading firms — wholesale market makers — who pay for the privilege of being the ones to execute those orders.
Those firms, in return, usually offer a slight improvement on the best public price, which is known as price improvement.
But the system as a whole creates an obvious incentive: the broker earns more the more client order flow it manages to sell, not necessarily the better it executes each individual order.
It is neither illegal nor necessarily harmful to the retail client. In fact, it usually translates into zero commission and prices slightly better than the public spread. It is worth knowing it exists for another reason: it explains why 'zero commission' does not mean 'no hidden cost in the execution'.
The costs nobody advertises
Beyond the spread and payment for order flow, there are execution costs rarely mentioned in a broker's advertising:
- The commission itself, where it exists, charged per trade or per share.
- The slippage we saw in the previous module, which in illiquid assets can far exceed any explicit commission.
- The opportunity cost of a limit order that never gets filled. You set your limit too tight, hoping to save a few cents of spread. The price runs away without reaching your level. And the 'saving' you were after can turn into missing the entire move you wanted to capture.
Laboratory versus the real market
Adding up all these costs — spread, commission, slippage, missed opportunity — is what separates two very different figures. On one side, the 'laboratory' performance of a strategy, calculated on clean closing prices. On the other, the real performance an algorithm would get running that same strategy in the actual market.
It is one of the reasons why we will insist so much on modeling these costs from the start once we reach the backtesting level. They are not a last-minute correction to be bolted on at the end of the work.
What the regulation requires
In the United States, regulation requires brokers to comply with the principle of best execution. That is: to ensure a client's order is filled at the best price available across all connected trading venues.
That reference standard is known as the NBBO (National Best Bid and Offer).
The fact that a broker sells its clients' order flow to an HFT firm does not exempt it from this obligation. The price improvement those firms offer must be at least equal to or better than the NBBO prevailing at the exact moment of execution. And brokers are required to publish periodic reports on the execution quality they achieve for their clients.
It is a regulatory mechanism designed precisely so that the payment-for-order-flow incentive does not translate, in practice, into worse prices for the end client.
It does not fully remove the tension of interests described above. Nor does it replace each investor's responsibility to understand what they are really paying to execute each order.