@quantfinancetogo: ➡️ Quantitative Finance from Scratch, part 45: Statistical Arbitrage. The arbitrage from the last part was a profit without any risk. Statistical arbitrage is the practical version: many small bets that can each lose, but win on average. One of the best known and simplest forms is pairs trading: two stocks in the same business that move together. The gap between them, the spread = P_A − β · P_B (P_A price of stock A, P_B price of stock B, β the hedge ratio), keeps coming back to its average. That is the edge: the trade treats this return almost like a law, so the further the spread moves away, the more it should come back, and that way back is the profit. The rule: z = (spread − average) / standard deviation. When z reaches +2 or −2, you sell the expensive stock, buy the cheap one, and close both when the gap is back at its average. Because one stock is long and the other short, a move of the whole market mostly cancels out. News about one company can still hit a single pair, so funds make many such trades at once, and the surprises average out. The big risks: the link between two stocks can break for good, for example after a merger, and when many funds hold the same trades, they can all lose at once. The code (statarb_reel.py, 16 lines of plain Python without packages) is general on purpose: the spread from two prices and the hedge ratio, the z score, and the signal that sells the expensive stock and buys the cheap one at two standard deviations and closes at the average. If you want to go deeper, the link to my website is in my bio. #quantfinance #statisticalarbitrage #pairstrading #meanreversion #python Education only, not financial advice.
QuantFinanceToGo
Region: DE
Monday 09 November 2026 23:37:31 GMT
Music
Download
Comments
y9 :
video made with claude?
2026-11-10 00:20:45
1
bassam1100 :
👍👍👍
2026-11-10 00:06:11
1
To see more videos from user @quantfinancetogo, please go to the Tikwm
homepage.