Regression Lines Are Not Magic. They Are Just the Best Straight Line Through Your Data.
Linear regression is one of those things that sounds intimidating until you realize what it actually is; the best-fit line through a scatter plot. That is it. You have a bunch of data points, you want to find the line that comes closest to all of them simultaneously, and regression finds it. Everything else is just interpretation.
In finance, regression shows up constantly. Beta versus a benchmark, which measures how much a stock moves relative to the market, is just the slope of a regression line. Trend lines on charts are regression lines. Pairs trading strategies are built on regression relationships. Factor models that explain stock returns as combinations of market exposure, size exposure, and value exposure are regression models. The tool is everywhere once you know what to look for.
The FatNarwhal Linear Regression tool takes any stock (or pair of stocks) and runs a regression of its returns against a benchmark or another variable, giving you the slope, the intercept, the R-squared, and a visual of the fit.
How to Use It
Go to fatnarwhal.com/regression and set up your analysis.
The most common use case is regressing a stock's returns against the market. Enter the stock ticker in the Y variable field and SPY (or another benchmark) in the X variable field. Pick a time window, say two years of daily returns, and run it.
The output gives you the regression line overlaid on the scatter plot of weekly or daily returns, the slope (beta), the intercept (alpha, if any), and the R-squared. In this context beta tells you that for every 1% the market moves, your stock tends to move beta percent in the same direction. A beta of 1.3 means the stock amplifies market moves by 30%; a beta of 0.6 means it only captures 60% of market moves.
Alpha is the intercept of the regression, which in theory measures how much return the stock generates that is not explained by market exposure. In practice alpha estimates from short windows are noisy and should not be over-interpreted.
R-squared tells you how much of the stock's return variation is explained by the market. An R-squared of 0.80 means 80% of this stock's moves are explained by what the market does; only 20% is idiosyncratic to the company itself.
The Math Behind It
Ordinary least squares regression finds the slope and intercept that minimize the sum of squared vertical distances from each data point to the line:
The solution is:
Where β is the slope and α is the intercept. In the market beta context, X is the market return and Y is the stock return, so β is the familiar CAPM beta.
R-squared is the square of the correlation coefficient between X and Y, measuring what fraction of Y's variance is explained by X. An R-squared of 1 means X perfectly explains Y; an R-squared of 0 means X tells you nothing about Y.
When to Use It and When Not To
Use it when you want to understand a stock's relationship to a benchmark or to another asset. Use it to estimate beta for portfolio risk calculations. Use it to find potential pairs trading candidates by looking for two assets with a stable, high-R-squared regression relationship.
The main limitations are all the standard caveats of linear regression. It assumes the relationship between X and Y is linear, which is not always true. It assumes the relationship is stable over time, which it often is not; beta estimated over 2019-2021 may look very different from beta estimated over 2022-2024. And it is sensitive to outliers; a few extreme return days can meaningfully shift the slope.
The regression is most reliable as a rough characterization of a relationship over the historical window you measured, not as a precise prediction of future behavior.
Try It
Head to fatnarwhal.com/regression and run a market regression on any stock you own. Look at the beta and the R-squared together. A high-beta, high-R-squared stock is essentially a leveraged bet on the market; a low-beta, low-R-squared stock is genuinely idiosyncratic. Knowing which one you are holding changes how you think about your overall portfolio risk.
The line is the simplest model you can fit to the data. Sometimes the simplest model is the most useful.