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)
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.
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
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 :
The CAPM is about returns, not prices. Each period's return is the percent change in Adj Close:
In Excel, with Adj Close in column B starting in row 2, type =B3/B2−1 in C3 and fill down. The most recent :
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: .
Where: the same Fama–French file. Its RF column is the return on a 1-month T-bill during that , already per .
Careful: only divide by 100: =RF/100. Do not divide by 12 again. And Mkt-RF is already the market's excess return, so for the market this step is done for you.
Part II · Estimate β and α
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.
β, 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.
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.
Some of the stock's ups and downs come from the market (the β part). The rest are firm-specific (the ε part). R² is the market's share.
Now suppose you hold many stocks like this one: same β, but each with its own unrelated firm news. Good news at one firm offsets bad news at another. The market part does not cancel, because every stock feels the same market.
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.
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.
There is no single "correct" β. Analysts choose how far back to look and how often to measure returns. Each choice changes every step above.
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
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.
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.
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.
β came from the past. The other two inputs should describe today, because we want the return investors require going forward.
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.
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 uses the Fama–French data, so its β of 2.16 matches the second number. 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.