Quant Terminal
B2-01B2·intermediate·~19 min

Short selling, margin, and leverage

short-sellingmarginleverageshort-squeezerisk

▸ Pretest — guess, even if you don't know

You short 100 shares of a stock at $50, collecting $5,000 in sale proceeds. What is your maximum possible loss on this position?

Shorting, step by step

Selling something you don't own sounds like fraud; it's actually a regulated four-step loop:

  1. Borrow the shares. Your broker locates them — typically from another client's margin account or an institutional lender. Under Regulation SHO your broker must have reasonable grounds to believe shares can be borrowed (a "locate") before you short.
  2. Sell the borrowed shares at today's price. The cash proceeds land in your account, held as collateral — pledged assets you can't spend freely, there to guarantee you can buy the shares back.
  3. Buy back ("cover") later, at whatever the market price is then.
  4. Return the shares to the lender.

Profit = sell price − buy-back price, minus costs. In words: you keep the gap between what you sold at and what you later bought back at — if the price fell, that gap is positive. And the costs are real. You pay a borrow fee — rent on the borrowed shares, quoted as a yearly percentage rate like loan interest. It's well under 1% for easy-to-borrow large caps (the biggest, most heavily traded companies), but tens or even hundreds of percent per year for hard-to-borrow stocks, where few shares are available to lend. You also owe the lender any dividends — cash payouts to shareholders — the stock makes while you're short. So a short that's "right eventually" can still lose money to these carry costs — the running cost of just keeping the position open — while it waits.

The asymmetry, and what it did in January 2021

Compare the two payoffs. Long (you bought the stock): worst case −100% if it goes to zero, best case unbounded. Short: best case +100% (the stock goes to zero and you buy back for nothing), worst case unbounded — there's no ceiling on the buy-back price. You've swapped the good tail — the extreme end of the range of outcomes — for the bad one.

This asymmetry creates a feedback loop called a short squeeze. When a heavily shorted stock rises, every short seller sits on growing losses. Their margin requirements (defined in the next section) grow at the same time. Some are forced to buy back — and that buying pushes the price higher still, squeezing the next short. The canonical case is GameStop, January 2021. Reported short interest — the fraction of a company's tradable shares that has been sold short — exceeded 100% of the float (the shares actually available for public trading). That's possible because the same share can be borrowed, sold, and then borrowed again from its new owner. Retail buyers piled in, and the stock ran from around 19atthestartofthemonthtoanintradaypeaknear19 at the start of the month to an intraday peak near 483 on January 28. Forced covering — shorts buying back to close — fed the rally. Melvin Capital, a hedge fund heavily short GME, lost over half its value that month and shut down the following year. The lesson for a quant is not "never short." It's that short positions must be sized for the unbounded tail, and that crowded shorts — high short interest, expensive borrow — carry squeeze risk that no backtest of calm periods will show you.

Margin accounts: trading with borrowed money

A margin account lets you put up only part of a position's value in your own cash and borrow the rest from your broker. (Shorting requires one, since shorting is built on borrowing.) Two numbers govern it:

Key mechanic: the loan doesn't shrink when the stock falls. Your equity absorbs the entire move.

Worked example. Buy 100 shares at 100(100 (10,000) with 5,000cash+5,000 cash + 5,000 loan; maintenance margin 25%. Write PP (read it as just "P") for the current share price. Your equity is 100P5000100P - 5000 — the value of 100 shares minus the fixed 5,000loan.Theequitytovalueratiois5,000 loan. The equity-to-value ratio is (100P - 5000)/100P.Inwords:equitydividedbypositionvalue.Troublestartswhenthatratiofallstothe25. **In words:** equity divided by position value. Trouble starts when that ratio falls to the 25% floor. Setting it equal to 0.25 and solving gives P = 66.67$. The general formula for a long position:

Pcall=Pentry1minitial1mmaintP_{\text{call}} = P_{\text{entry}} \cdot \frac{1 - m_{\text{initial}}}{1 - m_{\text{maint}}}

In words: the margin-call price ("P sub call") equals the price you bought at ("P sub entry"), times one-minus-the-initial-margin (the fraction you borrowed), divided by one-minus-the-maintenance-margin. The letter mm just stands for each margin fraction — here minitial=0.5m_{\text{initial}} = 0.5 and mmaint=0.25m_{\text{maint}} = 0.25 — and the dot \cdot means multiply.

Check against the example: 100×0.5/0.75=66.67100 \times 0.5 / 0.75 = 66.67. So a 33% price drop puts you in a margin call — the broker's demand that you deposit more cash or have the position force-sold ("liquidated"), at whatever the price is, in whatever market conditions caused the fall. Note what happened on the way down: at 66.67yourequityis66.67 your equity is 1,667, down 67% on a 33% price move. That's leverage — controlling a bigger position than your own capital — doing exactly what it says: at 2× leverage, every move in the stock hits your equity twice as hard.

Leverage cuts both ways

Leverage multiplies your exposure — how much of the asset you effectively hold — per dollar of your own capital. 2× leverage doubles every return, including the ones you didn't want. A −50% market move on 2× leverage is −100% for you: a total wipeout, with no capital left to participate in any recovery. Losses are not symmetric with gains (A1's compounding lesson). After −100% there is no "waiting it out."

Leveraged daily-reset ETFs (2× and 3× products — funds that trade like stocks and are engineered to deliver 2× or 3× the index's return each single day) add a subtler cost: they reset their leverage every day. In a choppy market, that daily resetting compounds against you. Concrete example: the index goes +10% one day and −10% the next. The index ends at 1.1×0.9=0.991.1 \times 0.9 = 0.99, i.e. −1%. In words: multiply the two daily growth factors, 1.1 and 0.9, and you land at 0.99 times where you started. The 2× daily ETF does +20% then −20%: 1.2×0.8=0.961.2 \times 0.8 = 0.96, i.e. −4%. That's worse than the −2% a fixed 2× buy-and-hold exposure would have produced. The extra loss is volatility drag — the toll that up-and-down swinging takes on compounded returns — and it's amplified by the square of the leverage. In a smooth trend these products can beat 2× buy-and-hold; in sideways chop they bleed. Holding them long-term is a bet on low volatility (small day-to-day swings), whether you meant it or not.

How quants actually think about leverage

Not as a return amplifier — as a risk-budget dial. A quant first decides how much volatility, or drawdown (peak-to-trough loss), the portfolio is allowed to run. Then they set leverage so the strategy's risk matches that budget. A low-volatility strategy might be levered up to hit a 10% volatility target; a hot, high-volatility one gets scaled down. One thing leverage can never do is improve a strategy's Sharpe ratio — the standard score for return earned per unit of risk taken (defined properly later in the curriculum). Leverage scales the return and the risk by the same factor, so their ratio doesn't move. What leverage does is convert a good Sharpe into the return level you want. The price: fatter left tails (bigger, more frequent extreme losses), borrow costs, and margin-call risk arriving in exactly the moments when everything falls together. Sizing the dial is Track D's business; respecting it is this lesson's.

Try it

▮ EXERCISE · b2-01-ex1

Implement margin_call_price(entry_price, initial_margin, maintenance_margin) for a long stock position: the price below which equity / position value falls under the maintenance requirement. Formula: entry_price * (1 - initial_margin) / (1 - maintenance_margin).

⧉ Review card
What are the four steps of a short sale?
Borrow the shares (broker locates them), sell at market, buy back later (cover), return to the lender. You pay a borrow fee and owe any dividends paid while short.
⧉ Review card
Why is shorting riskier than buying, structurally?
Payoffs are asymmetric: max gain +100% (stock to zero), max loss unbounded (no ceiling on the buy-back price). Rising prices also raise margin requirements, which can force covering — the short-squeeze feedback loop.
⧉ Review card
At what price does a long bought at 100 with 50% initial and 25% maintenance margin get a margin call?
66.67. P_call = entry * (1 - initial) / (1 - maintenance) = 100 * 0.5 / 0.75. The loan stays fixed at 50/share, so equity hits 25% of position value after a 33% drop.
⧉ Review card
Why do 2x daily-reset ETFs lag 2x buy-and-hold in choppy markets?
They re-lever daily, so volatility drag is amplified. Index +10% then -10% ends at -1%; the 2x daily ETF does +20% then -20% and ends at -4%, vs -2% for a fixed 2x exposure.
⧉ Review card
How do quants use leverage?
As a risk-budget dial, not a return amplifier: scale a strategy's exposure so portfolio volatility hits a target. Leverage never improves Sharpe — it scales mean and vol together while fattening the left tail and adding margin-call risk.

Predict before the next lesson

◈ Calibration check

Could you explain a short squeeze and compute a margin call price without looking anything up?

1 = guessing · 5 = could teach it

⏻ End of lesson

Mark it read to book its 5 review cards into your deck.

Sources & further reading