How to chart a rolling beta against the market
Quick answer
To chart a rolling beta, compute beta = cov(asset, market) / var(market) over a moving window of returns - 60 to 252 daily observations - and plot one point per window as a line, with a beta = 1 reference line drawn. It shows how an asset's market sensitivity drifts over time, which a single full-sample beta averages away: a name can look defensive on average yet turn high-beta in a sell-off. Use returns not prices, align both series to the same dates, and name the benchmark.
Beta measures how much an asset moves when the market moves. A single beta computed over a long history hides the fact that this sensitivity drifts - a stock that looks defensive on average can turn into a high-beta name in a sell-off. A rolling beta recomputes cov(asset, market) / var(market) over a moving window and draws it as a line, so you can watch market sensitivity rise and fall through time instead of trusting one blended figure.
The formula, one window at a time
Beta is the covariance of the asset's returns with the market's, divided by the variance of the market's returns: beta = cov(asset, market) / var(market). It is the slope of a regression of the asset on the market. The rolling version computes that same slope over each trailing window - a 60- or 120-day span of daily returns - and plots one point per day. Two things must be true before the number means anything: both series are returns, not price levels, and they are aligned to exactly the same dates. Compute beta on prices and you get a spurious number driven by trend rather than co-movement.
Excess returns, or not
The strict CAPM definition uses excess returns - asset and market returns each minus the risk-free rate - before taking the covariance. Over daily windows the risk-free rate is tiny, and most practitioners compute beta on raw returns and move on. Either is defensible; the rule is to document which you did, because a reader comparing your beta to a data vendor's needs to know. Over a short horizon, raw returns are the common choice.
Choose the window
Rolling beta is unstable over short windows, because a quiet market shrinks the var(market) term in the denominator and the ratio jumps around. Sixty observations is a sensible floor; a 120-day or 252-day window gives a smoother, more trustworthy line at the cost of lagging genuine regime shifts. As with any rolling statistic, label the window on the chart - a rolling beta line without a stated window cannot be read.
Draw the reference line
The one line that makes a beta chart legible is a beta of 1, the market's own beta. Above it the asset amplifies the market; below it the asset dampens it; below zero it moves the other way. Draw that horizontal reference and the chart reads at a glance. You can see the exact windows where a defensive name quietly became a high-beta one, which is usually the moment a portfolio's risk crept up without anyone rebalancing.
A worked example
Take a large-cap technology stock against a broad equity index on daily returns with a 120-day window. Through a calm, trending market its rolling beta might sit somewhere above 1 - the stock amplifies the index. Into a risk-off stretch, when correlations across equities rise toward one and the stock sells off harder than the index, the same line climbs higher still. A full-sample beta would report one blended figure and tell you none of that timing. The magnitudes here describe the usual pattern; compute the exact values on your own return series and benchmark, and name the benchmark on the chart - beta to the S&P 500 is a different number from beta to a sector ETF.
[QUADESTO-EMBED: 120-day rolling beta of a large-cap equity against a broad index on daily returns, beta = 1 reference line drawn, benchmark named]
Where it sits in a performance pack
Rolling beta is the third of the rolling-window views that describe how a strategy behaves through time, alongside rolling correlation and the rolling Sharpe ratio, and it pairs naturally with an underwater drawdown panel when you want exposure and damage in the same view. Feed Quadesto a return series and a benchmark and it plots the rolling beta with the window shown, the beta = 1 line drawn, and the benchmark named in the caption. The free tier embeds it live with a Made with Quadesto credit; Pro (149 pounds a month) removes the attribution and adds branded themes.