SECTION 1: LEARNING OBJECTIVES

By the end of this lesson, you will be able to:

  • Understand the concept of correlation and its limitations in financial analysis.

  • Calculate and interpret Pearson correlation coefficients for financial variables.

  • Distinguish between correlation and causation – a critical skill in data analytics.

  • Build and interpret a simple linear regression model to predict a financial outcome.

  • Explain the slope and intercept in the context of financial data.

  • Assess model fit using R-squared, residual analysis, and standard error.

  • Apply regression to financial problems such as asset pricing, risk factor analysis, and forecasting.

  • Recognise the assumptions of linear regression and verify them using diagnostic plots.


SECTION 2: UNDERSTANDING CORRELATION

2.1 What is Correlation?

Correlation measures the strength and direction of a linear relationship between two numerical variables. In finance, we often ask:

  • Is there a relationship between a stock’s return and the market return?

  • Do interest rates and bond prices move inversely?

  • Does customer transaction volume correlate with account balance?

The most common measure is the Pearson correlation coefficient (r), which ranges from -1 to +1:

 
 
r value Interpretation
+1 Perfect positive linear relationship
+0.7 Strong positive relationship
+0.3 Weak positive relationship
0 No linear relationship
-0.3 Weak negative relationship
-0.7 Strong negative relationship
-1 Perfect negative linear relationship

Important: Correlation does not imply causation. Two variables may be correlated due to a third factor (confounding) or pure chance.

2.2 Financial Example: Stock Returns vs. Market Returns

Consider the Capital Asset Pricing Model (CAPM), which states that a stock’s expected return is linearly related to the market return. The correlation between the two is a measure of systematic risk (beta).

Formula for Pearson’s r:

r=∑(xi−xˉ)(yi−yˉ)∑(xi−xˉ)2∑(yi−yˉ)2

2.3 Pitfalls of Correlation in Finance
  • Non-linear relationships: Correlation only captures linear associations. A quadratic or exponential relationship may have r ≈ 0 but still be strongly related.

  • Outliers: Extreme values can distort the correlation coefficient.

  • Spurious correlation: Two variables may appear correlated purely by chance, especially with small samples.

  • Survivorship bias: Using only surviving stocks can inflate correlations.

Business Insight: Before building regression models, always visualise the relationship with scatter plots and compute correlation. But never rely on correlation alone for decision-making.


SECTION 3: SIMPLE LINEAR REGRESSION

3.1 The Regression Equation

Simple linear regression models the relationship between one independent variable (X) and one dependent variable (Y) using a straight line:

Y=β0+β1X+ε

  • β₀ = intercept (value of Y when X = 0)

  • β₁ = slope (change in Y for a 1‑unit change in X)

  • ε = error term (unexplained variation)

In finance, Y is often the asset return, and X is a risk factor (e.g., market return, interest rate change, GDP growth).

3.2 Least Squares Estimation

The regression line is fitted by minimising the sum of squared residuals (differences between actual and predicted Y). The formulas for the slope and intercept are:

β^1=∑(xi−xˉ)(yi−yˉ)∑(xi−xˉ)2=r⋅sysxβ^0=yˉ−β^1xˉ

3.3 Financial Example: Predicting Bank Profit from Customer Deposits

A regional bank wants to predict quarterly profit based on total customer deposits. Data for 20 quarters is collected. The regression output gives:

  • Intercept (β₀) = $2.5 million

  • Slope (β₁) = 0.08 (meaning for every $1 million increase in deposits, profit increases by $0.08 million = $80,000)

If deposits are $500 million, predicted profit = 2.5 + 0.08 × 500 = $42.5 million.

Interpretation: The slope is the marginal effect – a key metric for business planning and resource allocation.


SECTION 4: MODEL EVALUATION METRICS

4.1 R‑squared (Coefficient of Determination)

R² measures the proportion of variance in Y explained by X. It ranges from 0 to 1.

  • R² = 0.75 means 75% of the variation in profit is explained by deposits.

  • In finance, R² can be low (e.g., 0.20 for individual stock returns) because many factors affect returns.

Caution: R² alone does not indicate model quality – it increases with more predictors (even useless ones), and a high R² does not guarantee causality.

4.2 Standard Error of the Estimate (SEE)

SEE measures the average distance that the observed values fall from the regression line. It is in the same units as Y. A smaller SEE indicates better predictive accuracy.

4.3 Residual Analysis

Residuals (ei=Yi−Y^i) should be:

  • Randomly scattered around zero (no pattern)

  • Normally distributed (for inference)

  • Homoscedastic (constant variance across X)

Why it matters: If residuals show a pattern (e.g., increasing variance with X), the model may be misspecified or heteroscedastic – common in financial data. This can be addressed with transformations or robust standard errors.


SECTION 5: ASSUMPTIONS OF LINEAR REGRESSION

  1. Linearity – the relationship between X and Y is linear.

  2. Independence – observations are independent (no autocorrelation – critical for time series).

  3. Homoscedasticity – constant variance of residuals.

  4. Normality – residuals are normally distributed (mainly for confidence intervals and tests).

In finance, these assumptions are often violated (e.g., volatility clustering, autocorrelation). Therefore, we must:

  • Use diagnostic plots (residuals vs fitted, Q‑Q plot).

  • Consider robust standard errors (e.g., White’s heteroscedasticity‑consistent estimator).

  • Transform variables (log, square‑root) to improve linearity and stabilise variance.


SECTION 6: BUSINESS APPLICATIONS IN BANKING

 
 
Use Case Independent Variable (X) Dependent Variable (Y) Purpose
Credit Scoring Income, credit history Default probability Predict loan default
Customer Lifetime Value Age, transaction history Profitability Segment customers
Branch Performance Footfall, location Revenue Optimise branch network
Market Risk Market return (CAPM) Stock return Estimate beta
Interest Rate Risk Change in rates Bond price change Hedge portfolios

Example – Credit Risk: A bank uses simple regression to predict loan default rates based on debt-to-income ratio. The slope informs how much default increases with each percentage point of DTI – directly guiding underwriting policies.


SECTION 7: SUMMARY FOR THE DATA PRACTITIONER

  • Correlation quantifies linear association but does not imply causation.

  • Simple linear regression models the effect of one predictor on a target.

  • Key outputs: slope (marginal effect), intercept (explanatory power), and SEE (prediction error).

  • Always check residuals for patterns and violations of assumptions.

  • In finance, regression is used for pricing, risk management, customer analytics, and forecasting.

  • Reporting regression results should include coefficients, p‑values, and a discussion of practical significance.


[END OF LESSON 4]