CAPM and Security Market Line Visualizer
The Capital Asset Pricing Model (CAPM), developed by Sharpe (1964) and Lintner (1965), is the workhorse model linking a security's expected return to its systematic risk. The central insight is that only risk that cannot be diversified away — systematic risk, measured by beta (\(\beta\)) — is compensated by the market. Idiosyncratic (firm-specific) risk earns no extra return because it can be eliminated by holding a broad portfolio.
The CAPM expected return formula is
$$E[R_i] = R_f + \beta_i \bigl(E[R_m] - R_f\bigr)$$where \(R_f\) is the risk-free rate, \(E[R_m]\) is the expected return on the market portfolio, and \(E[R_m] - R_f\) is the market risk premium. The Security Market Line (SML) plots this required return against beta: every asset sitting above the SML offers more than CAPM requires and appears underpriced; every asset below appears overpriced. The vertical gap between an asset's actual expected return and the SML is its alpha (\(\alpha\)).
The visualization
Drag the sliders to change the risk-free rate, expected market return, asset beta, and the asset's own expected return. The SML and all derived quantities update instantly.
Results
Market risk premium = E[Rm] − Rf (the slope of the SML)
Alpha = actual E[Ri] − CAPM required return (distance above/below SML)
Key takeaways
- Beta, not total volatility, is the relevant risk measure. Idiosyncratic risk earns no reward in equilibrium because it can be diversified away.
- The SML is an asset-pricing benchmark. In equilibrium every asset lies on the SML. A positive alpha means the asset is underpriced; a negative alpha means it is overpriced.
- Raising the risk-free rate shifts the SML upward in parallel. All required returns rise by the same amount; the slope (market risk premium) is unchanged.
- Raising the market risk premium steepens the SML. The penalty for bearing systematic risk is larger, so high-beta assets require a much higher return while low-beta assets are affected less.
- Beta = 1 is the market. Beta > 1 amplifies market moves (aggressive stocks); beta < 1 dampens them (defensive stocks); beta = 0 earns only the risk-free rate.