Quantitative finance in ten ideas
On this page
- 1. Hedge funds and the fee that shapes them
- 2. Returns compound
- 3. Risk, and three ratios that divide by it
- 4. Diversification: correlation decides what cancels
- 5. Portfolio optimisation takes its inputs literally
- 6. Execution: a trade pays the spread, the book and the impact
- 7. Valuation: price is observed, value is estimated
- 8. Beta is a slope, alpha is what is left
- 9. Prices are hard to beat
- 10. Data lies in known ways
- 11. A strategy is a chain, judged net at the end
- The formula sheet
- The arithmetic to be fluent in
This is the map of the series. Each idea gets one paragraph, its key number from the blog’s five tickers (SPY, AAPL, JPM, XOM, GLD, daily adjusted closes 2019 to 2023), and a link to the post that works it through with formulas, worked numbers and code. The ideas are in the order each one needs the one before it. At the end is the formula sheet for the whole series.
Two habits do most of the work:
Multiply, never add, returns. Scale volatility and Sharpe by the square root of time, never by time. And for every number in a backtest, ask when it was known.
1. Hedge funds and the fee that shapes them
A hedge fund is a lightly regulated pool paid mostly on performance, “2 and 20”: 2% of assets every year, then 20% of the return, both on absolute return, not on return above a benchmark. On a 10% year the manager takes 3.6 points, over a third of the return; in a losing year the 2% is still charged. The investor is buying lower volatility, not higher return. Full post: What is quantitative finance?.
2. Returns compound
Returns multiply. Chain periods by multiplying growth factors, because each period starts from the last one’s end: +10% then −10% leaves 0.99, a loss. A −50% drawdown needs +100% to recover. Annualise a return with a power, volatility and Sharpe with the square root of time (√252 ≈ 15.87 for daily, √12 ≈ 3.46 for monthly). Full post: Returns compound: multiply, never add.
3. Risk, and three ratios that divide by it
Return without risk is half a number. Sharpe divides excess return by total volatility, Sortino by downside volatility only, the information ratio by tracking error against a benchmark. Each answers a different question, and all three scale with √time. Drawdown is the risk the ratios miss: how far from the peak, and for how long. Full post: Sharpe, Sortino and information ratio.
4. Diversification: correlation decides what cancels
Portfolio risk depends on how holdings move together, not how many you hold. Correlation changes the risk and never the expected return, which stays the weighted average. With correlation ρ between every pair, adding assets drives risk down to a floor of ρσ², never to zero; in the 2020 crash the five tickers’ correlations jumped, and the floor rose exactly when it mattered. Full post: Covariance and correlation.
5. Portfolio optimisation takes its inputs literally
Mean-variance optimisation picks weights from estimated returns and covariances. The maths is exact, the inputs are noisy, so the optimiser piles into whatever looked best in the window it saw. Over five rolling windows the optimised portfolio beat equal weights in some and lost in others; constraints (long only, weight caps) are what make the answer holdable. Full post: Portfolio optimisation.
6. Execution: a trade pays the spread, the book and the impact
An idea becomes profit only after paying the bid-ask spread, walking the order book, moving the price, and, for shorts, borrowing. A market order guarantees execution and risks the price; a limit order guarantees the price and risks never filling. A buyer trades at the ask. At 0.5% per trade a rule that trades almost daily turned +14.5% gross into −95%. Full post: What a trade really costs.
7. Valuation: price is observed, value is estimated
A dollar later is worth less than a dollar now, because a dollar now can earn . Present value divides by ; the Gordon model prices a growing dividend stream as and blows up as approaches . Small changes in or move the value a lot, which is why value is an estimate and the margin of safety exists. Full post: Value is an estimate.
8. Beta is a slope, alpha is what is left
Plot a stock’s daily return against the market’s and fit a line. Beta is the slope, how much of the market’s move you carry (AAPL: 1.24 against SPY); alpha is the intercept, what is left after paying for that exposure. CAPM turns beta into a required return, and a hedge sized in beta-dollars removes the market from a position. Full post: Beta and alpha.
9. Prices are hard to beat
Efficiency is about what information prices already contain: weak form (past prices), semi-strong (public news), strong (even insiders). SPY’s day-to-day autocorrelation is −0.17, enough to make a “buy after a down day” rule look great before costs and lose nearly everything after them. A roulette doubling rule shows the same shape: most runs win small, the rare run loses everything, and the expected value is still negative. Full post: Why prices are hard to beat.
10. Data lies in known ways
Most “alpha” in a backtest is a data bug: survivorship (the losers were deleted), look-ahead (a number used before it was known), multiple testing (1,000 coin-flip signals produce about 50 “significant” ones), unadjusted prices (a split looks like a crash). Know each bug and its fix. Full post: Data that lies.
11. A strategy is a chain, judged net at the end
Hypothesis, data, signal, sizing, execution, costs, evaluation. Every link can silently break the chain, so judge the net result at the end against a benchmark, not the signal at the start. Full post: Backtesting in Python.
The formula sheet
| Topic | Formula | Remember |
|---|---|---|
| Cumulative return | multiply | |
| CAGR | root, not divide | |
| Annualise return | = 12 or 252 | |
| Annualise σ, Sharpe | √252 ≈ 15.87, √12 ≈ 3.46 | |
| Recovery | −50% needs +100% | |
| Sharpe | total risk | |
| Sortino | bad risk only | |
| Information ratio | against a benchmark | |
| Covariance | carries units | |
| Two-asset variance | ρ only in the cross term | |
| Perfect hedge | inverse to volatility | |
| Turnover | half | |
| Beta | a slope | |
| CAPM | required return | |
| Alpha | actual − CAPM | skill, if real |
| Hedge size | dollars × β_asset / β_hedge | beta-dollars |
| Present value | divide | |
| Gordon | needs | |
| Margin of safety | divide by value | |
| Spread, mid | ask − bid; (ask + bid)/2 | buyer pays the ask |
| Impact cost | price × (1 ± impact) | plus commission per order |
| False positives | tests × α | 1,000 × 5% = 50 |
| Total return | include the dividend | |
| Gross leverage | (long + short)/equity | net 0 is not safe |
| 2 and 20 | 2% + 20% × (return − 2%) | absolute return |
| Roulette doubling rule | bust after losses in a row, | the median wins, the mean loses |
The arithmetic to be fluent in
- Multiply growth factors; CAGR with a root; geometric mean.
- Daily to annual: σ × 15.87, Sharpe × 15.87; monthly × 3.46.
- Recovery gain after a loss; drawdown from the peak.
- Two-asset variance with the cross term, then the square root.
- Beta, CAPM, alpha, hedge size, beta-neutral weights.
- Present value, Gordon, margin of safety.
- Walk the book, slippage, short profit net of dividend and fee, impact plus commission.
- The roulette expected value: , and a run of losses as .