This project applies the Fama-French five-factor model augmented with the Momentum factor to analyse the drivers of ETF returns. Both static and rolling regressions are performed to estimate factor exposures, evaluate alpha generation, and examine how tisk characteristics evolve over time.
Understanding the sources of portfolio returns is a fundamental task in asset management.
Rather than evaluating performance only through total returns, factor models allow investors to identify whether returns are driven by systematic risk exposures or by manager skill (alpha).
This project implements a six-factor regression framework to decompose ETF returns into their underlying risk factors.
- Downloads monthly ETF returns via
yfinance - Fetches Fama-French 5-factor data and Momentum factor via
getFamaFrenchFactors - Runs a static OLS regression for each ETF, outputting factor loadings and annualized alpha
- Runs a rolling OLS regression (default 36-month window) and plots time-varying factor exposures
| Ticker | Description |
|---|---|
| VTI | Vanguard Total Stock Market ETF |
| VLUE | iShares MSCI USA Value Factor ETF |
| AVUV | Avantis U.S. Small Cap Value ETF |
The selected ETFs provide exposure to the broad US equity market, value investing and small-cap value strategies.
| Factor | Description |
|---|---|
| Mkt-RF | Market excess return |
| SMB | Small Minus Big (size) |
| HML | High Minus Low (value) |
| RMW | Robust Minus Weak (profitability) |
| CMA | Conservative Minus Aggressive (investment) |
| Mom | Momentum |
- Market risk (Mkt-RF) explains the largest share of returns across all three ETFs, with estimated market betas close to one.
- The factor model successfully distinguishes the investment styles of the selected ETFs through their factor exposures.
- AVUV exhibits strong positive exposure to the Size (SMB), Value (HML) and Profitability (RMW) factors, consistent with its small-cap value investment strategy.
- VLUE shows a pronounced Value (HML) exposure together with limited Size exposure, reflecting its focus on large-cap value stocks.
- VTI displays negligible exposure to style factors beyond the market, confirming its role as a broad market index ETF.
- Rolling regressions illustrate that factor sensitivities are not constant over time, highlighting the dynamic nature of portfolio risk exposures.
The estimated factor loadings provide insight into the systematic sources of ETF returns.
Rather than evaluating performance solely through historical returns, the model identifies the underlying risk premia each portfolio is exposed to. This framework is commonly used in portfolio construction, performance attribution and risk management within quantitative asset management.
Static regression estimates for the selected ETFs. The estimates factor loadings are consistent with the investment styles of the underlying portfolios, while the rolling regressions illustrate how these exposures evolve over time.
| Factor | AVUV | VLUE | VTI |
|---|---|---|---|
| Mkt-RF | 1.06 | 1.04 | 0.99 |
| SMB | 0.90 | -0.05 | -0.01 |
| HML | 0.53 | 0.47 | 0.03 |
| RMW | 0.27 | -0.36 | 0.02 |
| CMA | -0.05 | 0.13 | -0.01 |
| MOM | -0.02 | -0.06 | 0.00 |
| Alpha | 0.07% | 0.06% | -0.03% |
| Annualized Alpha | 0.84% | 0.77% | -0.39% |
pip install yfinance statsmodels getFamaFrenchFactors lxml pandas numpyRun the script directly:
python factor_regression.pyThe script prints the static factor loadings table and displays rolling regression plots for each ETF.
Static regression returns a table with factor loadings, monthly alpha, and annualized alpha for each ETF. Rolling regression plots show how each factor exposure evolves over time using a 36-month sliding window.


