Free Fama-French Five-Factor API

Get academic-grade factor exposure for any US stock. Our API runs the full Fama-French five-factor regression and returns loadings, alpha, and R² — the same model used by institutional quant funds.

Endpoint

GET https://securitiesdb.com/api/v1/stocks/{ticker}/fama-french

What Is the Fama-French Five-Factor Model?

The Fama-French Five-Factor Model (Fama & French, 2015) explains stock returns through five systematic risk factors:

MKT (β): Market risk premium — exposure to broad market returns
SMB: Small Minus Big — size factor (small-cap vs large-cap)
HML: High Minus Low — value factor (high vs low book-to-market)
RMW: Robust Minus Weak — profitability factor
CMA: Conservative Minus Aggressive — investment factor
α (Alpha): Excess return not explained by the five factors

Reference: Fama, E. F., & French, K. R. (2015). "A five-factor asset pricing model." Journal of Financial Economics, 116(1), 1-22.

Response Fields

FieldDescription
factors.market_betaMarket beta (systematic risk)
factors.size_smbSize factor loading (+ = small-cap tilt)
factors.value_hmlValue factor loading (+ = value tilt)
factors.profitability_rmwProfitability factor loading
factors.investment_cmaInvestment factor loading
alpha_annualizedJensen's alpha (annualized excess return)
r_squaredR² — how well the model fits the stock's returns

Python Example — Factor Exposure Heatmap

import requests

tickers = ["AAPL", "TSLA", "BRK-B", "JPM", "NVDA"]

print(f"{'Ticker':>6} {'Beta':>6} {'SMB':>6} {'HML':>6} {'RMW':>6} {'CMA':>6} {'Alpha':>7} {'R²':>5}")
print("-" * 55)

for ticker in tickers:
    r = requests.get(f"https://securitiesdb.com/api/v1/stocks/{ticker}/fama-french")
    if r.status_code != 200:
        continue
    d = r.json()["data"]
    f = d["factors"]
    print(f"{ticker:>6} {f['market_beta']:>6.2f} {f['size_smb']:>6.2f} "
          f"{f['value_hml']:>6.2f} {f['profitability_rmw']:>6.2f} "
          f"{f['investment_cma']:>6.2f} {d['alpha_annualized']:>6.1%} "
          f"{d['r_squared']:>5.2f}")

Use Cases

  • Portfolio risk attribution: Decompose returns into factor exposures to understand what's really driving performance
  • Factor-neutral hedging: Identify and hedge unwanted factor tilts
  • Smart beta ETF analysis: Verify if a "value ETF" actually loads on HML
  • Alpha generation: Find stocks with persistent positive alpha after controlling for all five factors