What this calculator shows
Paste two return series in percent, one row per period: the asset first and the benchmark second, with an optional header row of names. Both need the same periods, from 3 to 600. Add a yearly risk-free rate and pick the period length. The calculator returns beta, the correlation, R², Jensen's alpha per period and per year, the regression intercept, the tracking error and the number of periods. It has no market data: every number is one you type in.
How the numbers are worked out
- Beta = covariance(asset, benchmark) ÷ variance(benchmark), using sample statistics (divide by n − 1). The n − 1 cancels, so beta is also the slope of the best-fit line.
- R² is the correlation squared: the share of the asset's variation that lines up with the benchmark in this sample.
- The risk-free rate is divided by the periods in a year, so 3% a year is 0.25% a month. Jensen's alpha = asset mean − (rf + β × (benchmark mean − rf)). The yearly alpha multiplies the per-period figure by the periods in a year, adding them up without compounding.
- The regression intercept = asset mean − β × benchmark mean. It equals Jensen's alpha − rf × (1 − β), so the two differ unless rf is 0 or β is 1.
- Tracking error is the sample standard deviation of the differences between the two series; the yearly figure uses the √(periods a year) approximation.
Worked example (hypothetical)
The defaults are Stock S and Market M from the lesson, six made-up months. The market mean is 1% and the stock mean is 2%. The cross-products add up to 33 and the market's squared deviations to 22, so beta is 33 ÷ 22 = 1.5. The intercept is 2 − 1.5 × 1 = 0.5%. With a 0.25% monthly risk-free rate, Jensen's alpha is 2 − (0.25 + 1.5 × 0.75) = 0.625% a month, or 7.5% over 12 months added up. R² is 49.5 ÷ 55.5, about 0.8919.
Limits of this model
- Beta and alpha look backward and change with the window, data frequency and benchmark. Short samples are noisy, and a low R² means the benchmark describes little of the asset's movement.
- The full method is in beta and alpha, explained. For how series move together, see the correlation matrix; for return per unit of volatility, the Sharpe and Sortino calculator.
- This is education, not a recommendation about any security.
For educational purposes only. This material does not provide investment advice.