Beta, Alpha & the CAPM

This page runs one real CAPM estimate from start to finish. First we download prices and build returns. Then we fit a line to get β and α and ask what they mean. At the end we use β to get the return investors should require. Everything uses real data from Yahoo Finance and FRED.

Stock or fund, grouped by its β (5 years of monthly returns against SPY)

How far back
How often
Market index

Use your own data

Load a price file for any stock: a CSV downloaded from Yahoo Finance, or the Historical Data table selected and copied from the Yahoo page. You can also replace the market index or the risk-free rate with your own file, for example a FRED CSV. Files stay in your browser and are not uploaded anywhere.

This data is

Stocks and the market need a date column and a price column (Adj Close is used when present). Daily, weekly or monthly prices all work. The risk-free rate needs a date and an annual rate in percent, as in FRED's TB3MS or DTB3.


Part I · Get the data

1

Download the prices

Where (stock): Yahoo Finance → → Historical Data.

Settings: Time period = the last years, Frequency = . Download the file, or select the table and copy it into Excel.

Keep: the date and the Adj Close column.

Yahoo shows two price columns. Close is the price as it was quoted that day. Adj Close is rewritten after the fact to account for stock splits and dividends. Here are both for :

Close, as quoted that dayAdj Close

See the downloaded table

2

Turn prices into returns

The CAPM is about returns, not prices. Each period's return is the percent change in Adj Close:

rt = Pt / Pt−1 − 1

In Excel, with Adj Close in column B starting in row 2, type =B3/B2−1 in C3 and fill down. The most recent :


3

Subtract the risk-free rate

The CAPM compares excess returns: what the stock and the market earned beyond a riskless Treasury bill.

Where: FRED, the St. Louis Fed's free data site. For monthly returns use TB3MS (3-month T-bill, monthly). For weekly returns use DTB3 (the same bill, daily). Click Download → CSV.

Careful: FRED quotes an annual percent, like 4.25. Divide by 100, then by , to get a rate: .


Part II · Estimate β and α

4

Fit the line

Each dot is one . Left to right is the market's excess return that ; bottom to top is 's. Try to draw the line that best follows the cloud. Dashed segments are your line's misses.

Excel's =SLOPE(stock excess, market excess) and =INTERCEPT(…) pick the one line with the smallest total squared miss. That is all a regression is.

Rstock = α + β × Rmarket + ε

Where β and α come from

The best-fitting line has an exact formula, so nobody really has to search for it. Write Ri for the stock's excess return and Rm for the market's, in each of the n s, and put a bar on top for an average. Then:

β=Cov(Ri,Rm)Var(Rm)=∑t=1n(Rm,t−R‾m)(Ri,t−R‾i)∑t=1n(Rm,t−R‾m)2

β is the covariance of the stock with the market, divided by the variance of the market. In words: in the s when the market was above its average, how far above its own average was the stock, relative to how far the market moved? Once β is known, the line must pass through the point of averages, which gives α:

α=R‾i−β×R‾m

And R², the share of the stock's variance explained by the market:

R2=β2×Var(Rm)Var(Ri)

With the data above:

β, the slope, says how much the stock moves with the market. α, the intercept, is where the line crosses the vertical axis: the stock's average excess return in a when the market did exactly zero. ε, the miss, is each dot's distance from the line: the firm-specific part of that , such as earnings surprises, product news, or lawsuits.

How sure are we about β? A different stretch of history would give a somewhat different line. The reasonable range above is wide for volatile stocks and short windows.


5

Take one apart

Pick any , or click a dot above. Using Excel's best line, the stock's return splits into three pieces. It starts on the with the biggest firm-specific surprise.


6

Two kinds of risk

What we are doing: using the line from Step 4 to split the stock's risk into two pieces. Risk here means variance, the average squared distance of returns from their mean. Because every return is market part + α + miss, and the misses are unrelated to the market, the variances add up:

Var(Ri)total risk=β2×Var(Rm)market risk+Var(ε)firm-specific risk

Step by step, for (all numbers per ):

    Now diversify. Suppose you split your money equally across N stocks like this one: same β, but each with its own unrelated firm news. Every stock feels the same market, so the market part stays. The firm-specific parts partly cancel: good news at one firm offsets bad news at another, and their variance shrinks by a factor of N:

    Var(Rp)=β2×Var(Rm)+Var(ε)N

    Why this matters for the CAPM. Firm-specific risk is easy to get rid of, so investors are not paid for bearing it. Market risk cannot be diversified away, so that is the risk that has to earn a reward. β measures how much market risk a stock adds, which is why β is the only input in the CAPM.


    7

    Is α skill or luck?

    The computer invents a fake stock with the same β and the same amount of firm-specific noise, but a true α of exactly zero. It lives through the same market history, and we run the same regression. Any α it shows is pure luck. Repeat many times.

    Reading it. A stock with a lot of firm-specific noise can show a large α over a few years by luck alone. And with thousands of stocks out there, some will land far out in the tail by chance. Looking back and picking the winner is easy. Knowing in advance which stock will have a positive α is not. That is why the CAPM treats the expected α as zero.


    8

    Check how much your choices matter

    There is no single "correct" β. Analysts choose how far back to look and how often to measure returns. Each choice changes every step above.

    How far back
    How often

    Compare with the β that Yahoo publishes

    Yahoo Finance reports a β for every stock and fund, labeled Beta (5Y Monthly): 5 years of monthly returns against the S&P 500, the same recipe as the ◂ cell when you choose 5 years, monthly and SPY. Open the links and compare. Small differences are normal, because each data provider makes slightly different choices: the exact months, the index with or without dividends, and whether to subtract the risk-free rate.

    Adjusted β. Very high and very low βs tend to drift back toward 1 over time. So data providers such as Bloomberg report an adjusted β = ⅔ × raw β + ⅓ × 1.


    Part III · From β to the CAPM

    9

    From portfolio theory to the CAPM

    What we are doing: connecting everything so far to the Portfolio Optimizer from class, where each investor finds the portfolio with the highest Sharpe ratio. The CAPM is what you get when everyone uses the Optimizer with the same inputs. Four steps:

    1. Everyone holds the tangency portfolio. In the Optimizer, each investor picks the portfolio with the highest Sharpe ratio, the tangency portfolio, and then mixes it with T-bills according to their risk aversion. If everyone agrees on expected returns, volatilities and correlations, everyone picks the same tangency portfolio.
    2. The tangency portfolio is the market. Every share must be held by someone, so the portfolio everyone holds has to be the whole market, M. That is why this page measures β against SPY or the Fama–French market. The capital allocation line through M is called the capital market line (CML):E[rp]=rf+E[rM]−rfσM×σp
    3. The risk that matters is covariance with the market. An investor who holds the market does not care about a stock's own σ. What matters is how much the stock adds to the risk of the portfolio they already hold, which is its covariance with the market. In units of the market's variance, that is β, exactly the slope from Step 4:βi=Cov(ri,rM)Var(rM)
    4. Every asset pays the same reward per unit of that risk. Inside the tangency portfolio, each asset must earn the same extra return per unit of covariance with the market. If one paid more, tilting toward it would raise the Sharpe ratio, so the Optimizer would not have been at its maximum. The same condition for every asset gives the security market line (SML), which is the CAPM:E[ri]−rfCov(ri,rM)=E[rM]−rfVar(rM)⇒E[ri]=rf+βi×(E[rM]−rf)

    So the Optimizer and the CAPM are the same idea at two levels: one investor choosing a portfolio, and the whole market in equilibrium. It also explains α from Step 7: a positive α is a reason to tilt away from the market, because adding that asset would raise your Sharpe ratio.

    Total risk or market risk? The same assets, two ways

    Each dot is one asset from the top of the page, placed at the return the CAPM requires for it. The risk-free rate and premium come from Step 11 (defaults: T-bill and 6%), and σ and β from the window you selected. Switch the horizontal axis and watch the dots.

    Horizontal axis


    10

    Many stocks, one line

    One stock only gives us a β. The CAPM makes a claim about all stocks together: average returns should rise in a straight line with β. The line starts at zero for β = 0 (T-bills) and passes through the market at β = 1. This is the security market line.

    E[Ri] = βi × E[Rmarket] and αi = 0 for every stock

    To test it, researchers sort all U.S. stocks every year by β into ten groups. Each dot is one group, measured from July 1963 to August 2026.

    See the numbers

    What the picture says. Higher β does come with somewhat higher average returns, which is the core CAPM idea. But the real line is flatter than the CAPM line: low-β stocks did better than predicted, and high-β stocks did worse. It is one of the best-known findings in finance, and part of why later models add factors like SMB and HML.


    11

    Gather the three CAPM inputs

    What we are doing: getting ready to compute the return investors should require from , per year, going forward. The CAPM formula needs three inputs:

    E[ri]=rftoday+βifrom the past×(E[rm]−rf)market risk premium

    β comes from the past because we cannot observe the future co-movement, so we use history as our best guess. It has no units, so a β estimated from ly data can be used directly with annual rates. The other two inputs describe today, because we want the return investors require from now on.

    Input 1: the risk-free rate today

    Take the current yield on a U.S. Treasury, as an annual rate. Nothing to convert: FRED already quotes it per year, and the answer we want is per year.

    Risk-free rate

    Input 2: the market risk premium

    This is how much more than the risk-free rate investors expect to earn from the whole stock market in a typical year: E[rm] − rf. It cannot be looked up; it has to be estimated. Three common ways:

      Step 12 plugs your three inputs into the formula.


      12

      The required return

      E[r] = rf + β × (market risk premium)

      All assets under the same choices, from lowest to highest required return:

      Look at the ranking. Low-β assets such as Coca-Cola, utilities and gold move little with the market, so investors ask for little more than the risk-free rate. High-β assets such as Nvidia and the leveraged funds amplify market swings, so they need a much higher expected return to be worth holding. Negative-β assets, such as the short S&P 500 fund and the volatility fund, need less than the risk-free rate. They pay off when everything else falls, so they work like insurance, and investors accept a low or even negative expected return for that protection. How risky an asset is on its own plays no role. Only β does.


      The recipe on one card

      1. Download month-end Adj Close for the stock and SPY from Yahoo Finance, last 5 years.
      2. Returns: =B3/B2−1, filled down.
      3. Risk-free: FRED TB3MS ÷ 100 ÷ 12. Subtract it from both returns.
      4. β: =SLOPE(stock excess, market excess). Check its range and try other windows.
      5. Pick today's rf and a market risk premium (often 4–6%).
      6. Required return = rf + β × premium.

      What to remember

      1. β is a slope. It measures how strongly a stock moves with the market, and it is the only risk the CAPM rewards.
      2. α is what is left over. The CAPM says it should be zero on average. Past α, even a big one, is noisy and says little about the future.
      3. Firm-specific risk washes out in a diversified portfolio. Market risk does not.
      4. The CAPM is a statement about all stocks at once: average returns should line up with β. In the data they do, but along a flatter line than the theory predicts.

      With 5 years of monthly data, NVDA's β is against SPY (with FRED's TB3MS as the risk-free rate) and against the Fama–French market (with French's RF). Excel Exercise 2 follows this page's default (SPY and TB3MS), so its β of 2.21 matches the first number; its last question asks for the Fama–French version too. Same idea, slightly different ingredients. Data: Yahoo Finance adjusted closes; FRED series TB3MS, DTB3 and DGS10; the Fama–French market factor and risk-free rate (monthly and weekly), ten beta-sorted portfolios and the historical premium from Kenneth French's Data Library. Step 7 simulates normally distributed firm-specific shocks.