2026-11-01

What is Simple Linear Regression?

Simple linear regression models the relationship between two quantitative variables.

  • Response variable: the variable we want to explain or predict
  • Explanatory variable: the variable used to explain changes in the response
  • A straight line is fitted to describe the relationship between the two variables
  • In finance, regression can be used to study how a stock’s returns relate to market returns

The Regression Model

The simple linear regression model is:

\[ R_i = \alpha + \beta R_m + \epsilon \]

where:

  • \(R_i\) = return of the individual stock
  • \(R_m\) = return of the overall market
  • \(\alpha\) = intercept
  • \(\beta\) = sensitivity of the stock’s return to the market return
  • \(\epsilon\) = random error term

Example: Stock Returns and the Market

We will use simulated daily return data to demonstrate simple linear regression.

  • Market Return: daily percentage return of the overall market
  • Stock Return: daily percentage return of an individual stock
  • We will examine whether changes in market returns help explain changes in stock returns
  • A positive relationship would indicate that the stock tends to move in the same direction as the market

Visualizing Stock and Market Returns

Fitting the Regression Line

## `geom_smooth()` using formula = 'y ~ x'

Interpreting the Regression Line

The fitted regression equation can be written as:

\[ \hat{R}_i = \hat{\alpha} + \hat{\beta}R_m \]

  • \(\hat{R}_i\) is the predicted stock return
  • \(\hat{\alpha}\) is the estimated intercept
  • \(\hat{\beta}\) is the estimated slope
  • A positive \(\hat{\beta}\) indicates that stock and market returns tend to move in the same direction
  • The distance between an observed return and its predicted return is called a residual

Interactive Regression Plot

R Code for the Regression Plot

The following R code creates the fitted regression plot:

ggplot(returns, aes(x=Market_Return, y=Stock_Return)) +
  geom_point() +
  geom_smooth(method="lm", se=FALSE) +
  xlab("Market Return (%)") +
  ylab("Stock Return (%)") +
  theme_bw()

Conclusion

  • Simple linear regression measures the relationship between two quantitative variables
  • In our example, stock returns have a positive relationship with market returns
  • The slope measures how strongly the stock responds to changes in the market
  • Regression plots help visualize both the observed data and the fitted relationship
  • Interactive Plotly graphs provide another way to explore the relationship