Notes by Sara
Lesson 17

If the market rises 1%, what does your stock do?

Example, with made-up numbers. In the last lesson, a stock and the market had a correlation of +0.87 over five months. That tells you they move together. It doesn't tell you whether the stock moves half as much as the market, the same or twice as much. For that you need the slope of a line.

The idea

Draw a straight line through the scatter plot: y = a + b × x. Each dot misses the line by some vertical gap, called a residual. Linear regression picks the one line that makes the sum of those squared gaps as small as possible. That's why it's also called least squares.

The fitted line, with each month's miss shown as a dashed gap. No other straight line has a smaller total of squared gaps.

The slope b says how much y moves, on average, for each 1-unit move in x. The intercept a is where the line sits when x is zero.

Quick check

A stock's line is stock = 0 + 0.6 × market. The market falls 10%. What's the expected move in the stock?

Worked example: the stock's beta

Example, with made-up numbers. Same five months as the correlation lesson. Market: 2, −1, 3, 0, 1. Stock: 3, −2, 4, 1, −1. Both average 1%.

Slope b = sum of (x gap × y gap) ÷ sum of x gaps²  ·  Intercept a = mean y − b × mean x
1. Sum of (x gap × y gap), from the last lesson14
2. Sum of market gaps²10
3. Slope14 ÷ 10 = 1.4
4. Intercept1 − 1.4 × 1 = −0.4
5. If the market rises 2%−0.4 + 1.4 × 2 = 2.4%
Fitted linestock = −0.4 + 1.4 × market

The slope of a stock against the market is its beta: here 1.4, so the stock tends to move 1.4 times as much as the market, both up and down. In Excel: =SLOPE(stock range, market range) and =INTERCEPT(stock range, market range). Five months is far too few for a reliable beta. Analysts usually use 3 to 5 years of monthly returns.

There's a neat link to correlation: slope = correlation × (standard deviation of y ÷ standard deviation of x). Here 0.87 × (2.55 ÷ 1.58) = 1.4.

Reading a beta

Beta above 1Swings more than the market, like many tech stocks
Beta of 1Moves with the market, like an index fund
Beta between 0 and 1Calmer than the market, like utilities
Beta below 0Tends to rise when the market falls

Beta is also how traders hedge. To cancel the market risk of $100,000 of a stock with beta 1.4, you'd sell about $140,000 of the market index.

Try it yourself
Paste two lists, see the fitted line, and make a prediction.
Fitted line
Slope (beta, if x is the market)
Predicted y
Common mistakes
Three slips beginners make.
  • Swapping x and y. Regressing the stock on the market gives beta. Regressing the market on the stock gives a different line and a different slope.
  • Predicting far outside the data. A line fitted on months between −3% and +3% says little about a −30% crash month.
  • Treating beta as fixed. It's an estimate from past data. It changes over time and with the period you choose.

Remember

  • Regression fits the line y = a + b × x that makes the squared gaps smallest.
  • Slope = sum of (x gap × y gap) ÷ sum of x gaps². In Excel, =SLOPE and =INTERCEPT.
  • A stock's slope against the market is its beta: how much it moves per 1% market move.

Check yourself

Three questions. Try them without scrolling up.

1. A fitted line is stock = 0.2 + 1.5 × market, in %. The market rises 4%. What's the predicted stock return?

2. A stock has a beta of 0.5. What does that mean?

3. A stock's correlation with the market is 0.6. Its standard deviation is 30%, the market's is 15%. What's its beta?

Score: 0 of 3