Quantitative finance, part two, in ten ideas

On this page
  1. 1. Time series: returns are the data, prices are not
  2. 2. Indicators: a price pattern turned into a number
  3. 3. Alphas: a formula, a universe and a test of whether it worked
  4. 4. The fundamental law: skill times the root of independent bets
  5. 5. Portfolio construction: the frontier meets the real constraints
  6. 6. Evaluating a strategy: where the return came from
  7. 7. Frictions and capacity: a strategy that works small can fail big
  8. 8. Execution: how an order becomes a fill, and what it costs on the way
  9. 9. Options: a payoff is a bent line
  10. 10. AI in the investment process: a tool inside a process, not the process
  11. References

The first series built the vocabulary: returns compound, risk is measured by how much returns swing, correlationCovariance rescaled into a measure that always lies between minus one and one. decides what cancels, a trade has a cost, and data lies in known ways. This second series follows one trading idea along the whole chain, from the raw price history to a portfolio a fund could actually run, and asks at each step what can go wrong. The order matters: each idea needs the one before it. Read this page for the shape, then go to the post for the idea you need. The examples again use daily prices from 2020 to 2025 for five tickers (trading symbols): SPY, a fund that tracks the US stock market, three stocks (NVDA, GS, XOM), and GLD, a fund that tracks gold.

Two habits do most of the work this time:

A forecast is not a return, and a backtestTesting a trading strategy by simulating how it would have traded over some past period. is not a track record. Between a signal that predicts and money in the account sit sizing, costs, capacityHow much money a strategy can absorb before its returns start to suffer. and execution, and each one can take the whole edge away.

The ten ideas at a glance, grouped by the job each one does (the grouping is mine; the numbers are the sections below):

QF 2

Find a signal

Build the portfolio

Test and trade it

Other tools

1 Returns, not prices

2 Indicators

3 Alphas

4 The fundamental law

5 Portfolio construction

6 Evaluating a strategy

7 Frictions and capacity

8 Execution

9 Options

10 AI in the investment process

1. Time series: returns are the data, prices are not

A price history is ordered in time, and the order is information. Two things follow. First, work with returns, not prices: a price level says where a stock is, a return says what happened, and returns from different stocks can be compared where prices cannot. Second, every statistic you compute, an average, a volatilityHow much an asset's price spikes and dips; most often measured as the standard deviation of its per-period returns., a correlation, must use only the data that was available on that day, which is what a trailing window (the last n days, ending today) does and a centred window does not. Returns have known habits: they barely predict their own next value, but calm and stormy days cluster together, and a relationship measured in one calm year can be absent in the next crash. Full post: Time series: returns are the data, prices are not.

2. Indicators: a price pattern turned into a number

A technical indicatorA calculation on a security's prices or volume whose result is used to anticipate future price changes. is a summary of recent prices: a moving averageAn average of recent prices that follows the trend; it smooths out price moves but runs behind them in time. smooths them, momentumPrices that are trending are said to have momentum, and a trading strategy built on that trend is a momentum strategy. measures how far they moved over a window, Bollinger bandsBands above and below a moving average, set by the standard deviation, that widen when volatility rises and narrow when it falls. say how far today’s price sits from its recent average in units of its recent volatility. Each one has a lookbackThe number of past periods an indicator uses, such as 14 for RSI; shorter makes it more sensitive, longer less. (how many days it uses), and the lookback is a dial between two faults: a short one reacts fast but flips on noise, a long one is steady but late. Three indicators built from the same prices can all point the same way while carrying one piece of information. An indicator is not yet a trading rule, a rule is not yet a position, and a position is not yet a profit; each step needs its own justification. Full post: Indicators: a price pattern turned into a number.

3. Alphas: a formula, a universe and a test of whether it worked

In trading slang an alphaThe part of a stock's return over and above the market's, left after the market's share is taken out; the intercept of the regression line. is any formula that turns today’s data into a forecast of future return. A published collection of 101 real ones shows what they look like: short expressions over price and volume, held for between about half a day and six days on average, and only weakly related to one another, with an average pairwise correlation of about 16 percent. A forecast can say “this stock will go up” or “this stock will do better than those”, and the two need different tests. Raw forecasts are ranked or rescaled before they can be combined, and every one of them fades: the holding period must match how fast the forecast decays, and a signal that everyone trades stops paying. Full post: Alphas: a formula, a universe and a test of whether it worked.

4. The fundamental law: skill times the root of independent bets

How much is a forecast worth? Grinold’s fundamental law of active portfolio managementGrinold's rule that a manager's performance equals skill times the square root of breadth, the number of investment decisions made each year. says the information ratioLike the Sharpe ratio: the average excess return per period divided by the standard deviation of that excess return. (return above the benchmarkThe yardstick a strategy's returns are compared against, usually the market index that the traded securities belong to. per unit of the risk taken to earn it) equals the information coefficientThe correlation between a manager's price predictions and the actual future prices: 1 is a perfect predictor, minus 1 perfectly wrong. (the correlation between your forecasts and what happened, a measure of skill) times the square root of breadthThe number of trading opportunities a portfolio or strategy is presented with over time. (the number of independent bets per year): IR=IC×BR\mathrm{IR} = \mathrm{IC} \times \sqrt{\mathrm{BR}}. The square root is the lesson. Doubling your skill doubles the result; doubling the number of bets improves it by only about 41 percent, and to double the result through breadth alone you need four times as many bets. A coin that lands heads 51 percent of the time earns the same two cents per dollar whether you bet one thousand dollars once or one dollar a thousand times, but the thousand small bets carry a fraction of the risk. The catch is the word independent: a hundred positions that all ride the same sector are one bet, not a hundred. Full post: The fundamental law: skill times the root of independent bets.

5. Portfolio construction: the frontier meets the real constraints

A forecast says which way; construction says how much. The first series showed the efficient frontier, the set of mixes with the least risk for each level of return, and warned that an optimiser takes its inputs literally. Construction is what happens next: forecasts become positions through a sizing rule, risk is measured against a benchmark as tracking errorHow much a portfolio's return strays from its benchmark's, measured as the standard deviation of the gap between the two. (how far the portfolio’s returns stray from the benchmark’s), and limits on leverageUsing other people's money, such as a loan, to buy an asset, so you feel the full gain or loss of its price moves., short sellingBorrowing an asset and selling it, expecting its price to drop so you can buy it back cheaper and return it to the lender., position size, liquidityLiquid markets have large trading volumes, many market makers and the smallest spreads; widening spreads are an early sign liquidity is freezing up. and turnoverHow much of a portfolio is bought or sold over a period, as a share of its value; more turnover means more trading cost. cut the ideal portfolio down to one that can be held. The same correlation that makes diversificationNot putting all your eggs in one basket: holding several asset classes and several securities within each class. work also means ten sensible positions can add up to one concentrated risk. A good construction step treats every forecast as a noisy estimate and refuses to let a small estimation error become an extreme position. Full post: Portfolio construction: the frontier meets the real constraints.

6. Evaluating a strategy: where the return came from

A cumulative returnThe total return an asset piles up over a whole period, such as money doubling over five years being a 100 percent return. is not evidence. Evaluation starts by choosing the right benchmark, then tests on data the strategy never saw, because a result tuned on the test period confirms only itself. It reports return, volatility, drawdownHow far a portfolio's current value sits below the highest value it has reached so far. (how far the money fell from its peak) and turnover together, since a high Sharpe ratioReturn above the risk-free rate divided by the standard deviation of the portfolio's return: reward per unit of risk. (return per unit of risk) can hide a short sample or one lucky exposure. Attribution then splits the return into the part that was simply the market, the part from known factors or sectors, and the residualThe gap between an observed value and the value the model predicted for it. that might be skill. Three traps recur: peeking into the future when designing the rule, mining the data until something fits, and a market that has since changed. Testing on more than one period and more than one set of stocks is the standard defence. Full post: Evaluating a strategy: where the return came from.

7. Frictions and capacity: a strategy that works small can fail big

The gap between a backtest and live results is frictions: the spread between buying and selling prices, slippageThe gap between the price that triggers an order and the price it actually fills at; on average a cost. (the difference between the price you saw and the price you got), the market impact of your own order pushing the price, the fee to borrow shares for a short sale, and the cost drag that frequent trading multiplies. Capacity is the amount of money a strategy can run before those frictions eat the edge. A rule that earns a small edge per trade on a thinly traded stock may be real at one million dollars and impossible at one hundred million, because the orders needed would move the price against themselves. CrowdingMany investors holding the same positions, so when they all try to sell at once they push prices against each other. adds the last risk: when many funds hold the same positions, they all leave through the same narrow door. Full post: Frictions and capacity: a strategy that works small can fail big.

8. Execution: how an order becomes a fill, and what it costs on the way

Deciding to buy and buying are different events, and the price moves between them. Execution is judged against a benchmark such as the price when the order arrived, or the volume-weighted average price over the day, and the shortfall against that benchmark is the cost. An aggressive order crosses the spread and fills now, paying for certainty; a passive limit orderAn order that sets a price condition before it can be executed, such as buy only at 200 dollars a share or less. waits in the queue of the order bookThe exchange's list of orders, grouped into buys and sells, showing how many shares are offered and requested at each price. for a better price and may never fill, or fill only when the price is about to move against it. Trading faster lowers the risk of the price running away and raises the impact; trading slower does the reverse. Execution algorithms spread an order over time to balance the two, and none is best for every order. Full post: Execution: how an order becomes a fill, and what it costs on the way.

9. Options: a payoff is a bent line

A share’s payoff is a straight line: gain a dollar for each dollar the price rises, lose one for each it falls. An optionA contract giving the right, not the duty, to buy or sell an asset at a fixed price until a set date. bends that line. A call is the right, not the obligation, to buy at a fixed strike priceThe fixed price at which an option lets its holder buy or sell. before a date; a put is the right to sell. At expiryThe date after which an option no longer exists. a call with a strike of 100 pays 12 if the stock is at 112 and nothing if it is at 90, so the holder’s loss is capped at the premiumThe price paid for an option, made of its intrinsic value and its time value. paid and the writer’s is not. Payoff and profit differ by that premium: a positive payoff can still be a loss. An option out of the moneyA call whose strike is above the asset's price, or a put whose strike is below it: it would pay nothing now. today (one that would pay nothing if it expired now) can still be worth something, because time and volatility leave room for the price to move. Hedges are built from these bent lines: a protective put floors a loss for a fee, a covered callOwning an asset and selling a call on it: income now in exchange for a ceiling on the gain. sells the upside for income. Full post: Options: a payoff is a bent line.

10. AI in the investment process: a tool inside a process, not the process

Machine learning now touches every stage of this chain: research, forecasting, construction, execution, monitoring and reporting. Each stage is a different job with different consequences, so each needs its own test and its own leash. A model that summarises a filing needs less authority than one that changes portfolio weights, and far less than one that sends orders. The working rule is to match autonomy to how costly and how reversible a mistake is, keep a person deciding the objective and the boundaries, and build explainability, monitoring and escalation into the system rather than bolting them on after. Models also fail together: when many funds use similar data and similar models, their errors arrive at the same time. Full post: AI in the investment process: a tool inside a process, not the process.

References

  • Romero and Balch, What Hedge Funds Really Do. Chapter 9 for the fundamental law, the coin example and the 41 percent figure; Chapter 10 for the efficient frontierThe curve of lowest-risk portfolios, one for each target return, found by optimising the portfolio weights for every target. and the parts of an optimisation problem; Chapter 12 for adjusted pricesA historical price rewritten to fold in stock splits and dividends, so it shows the true value of holding the stock.; Chapter 14 for the parts of a backtest and the three cautions (peeking, data mining, a changing market).
  • Kakushadze, 101 Formulaic Alphas (2015). The abstract gives the holding periods and the average pairwise correlation of the 101 alphas, and footnote 4 the trader’s definition of an alpha.
  • CFA Institute Research Foundation, Handbook of Artificial Intelligence and Big Data Applications in Investments. Chapter 7 for execution benchmarks and market-impact models; Chapter 8 for limit order books, order-book imbalanceShares at the best bid minus shares at the best ask, over their sum; from -1 to +1, a hint of the next price move. and passive versus aggressive orders.
Tagged finance, portfolio, risk, trading, options← Home