VectorFin/Glossary/Factor Model
Quant Finance

What is Factor Model?

A framework that decomposes asset returns into contributions from systematic risk factors (market, size, value, momentum, quality) plus an idiosyncratic residual.

In Plain English

Every stock's return has two parts: the part that moves with broad systematic forces (the market's mood, interest rate changes, economic cycles) and the part that's unique to that company (a product launch, an executive departure, a supply chain crisis). Factor models give you a structured vocabulary for describing the systematic part.

The original factor model was CAPM: everything is explained by market exposure (beta). Fama and French showed in 1993 that two more factors significantly improved explanatory power: small companies tend to outperform large ones (size factor, SMB), and cheap companies (high book-to-market) tend to outperform expensive ones (value factor, HML). Their 2015 five-factor model added profitability (RMW) and investment (CMA). Then Carhart added momentum (WML). Each new factor was a systematic source of return that the previous model couldn't explain.

For practical investors, factor models serve three distinct purposes. First, attribution: understand where your returns came from — market exposure, sector bets, or genuine stock selection. Second, risk management: measure your unintended factor exposures and hedge them out if needed. Third, signal construction: explicitly target factors with positive expected returns (value, momentum, quality) in a systematic portfolio.

The landscape of factors has expanded dramatically — there are now hundreds of "factors" documented in academic literature. The challenge is distinguishing true risk premia (persistent, economically motivated) from data-mined noise. The most durable factors are backed by both long return histories and clear economic rationale for why they should persist.

Technical Definition

The Fama-French 5-factor model for asset i at time t:

r_\{i,t\} − r_f = α_i + β_i^MKT × MKT_t + β_i^SMB × SMB_t + β_i^HML × HML_t + β_i^RMW × RMW_t + β_i^CMA × CMA_t + ε_\{i,t\}

Factors:

  • MKT: market excess return
  • SMB: Small Minus Big (size)
  • HML: High Minus Low (value, book-to-market)
  • RMW: Robust Minus Weak (profitability)
  • CMA: Conservative Minus Aggressive (investment)

Fama-French factor data is publicly available from Ken French's data library. AQR publishes additional factors including QMJ (Quality Minus Junk), BAB (Betting Against Beta), and time-series momentum.

Factor construction: long-short portfolios formed by sorting on the underlying characteristic, rebalanced monthly. Factor return = return of long leg minus return of short leg. Factor betas estimated by time-series regression of asset returns on factor returns.

How VectorFin Uses This

VectorFin signals map directly to specific factor exposures:

| Signal | Factor Connection | |--------|------------------| | whystock_score | Multi-factor composite (quality + value + momentum) | | sentiment_drift | Behavioral momentum factor | | signals/volatility | BAB (Betting Against Beta) / low-volatility factor input | | signals/regime | Macro/time-series momentum factor conditioning | | piotroski_f_score component | RMW (profitability) + CMA (investment) factors |

The sentiment_drift signal is particularly interesting as a behavioral factor: it captures the market's slow information processing of qualitative earnings call language, which is distinct from and partially orthogonal to the standard quantitative factors above.

GET https://api.vectorfinancials.com/v1/signals/whystock-score/{ticker}?date=2024-10-01

The Pro API includes factor decomposition of the whystock_score, showing how much of each ticker's score comes from quality, value, and momentum sub-components.

Code Example

import requests
import pandas as pd

API_BASE = "https://api.vectorfinancials.com"
API_KEY = "vf_your_api_key_here"

# Fetch factor decomposition for a portfolio
portfolio = ["AAPL", "MSFT", "JPM", "XOM", "JNJ"]

factor_exposures = []
for ticker in portfolio:
    resp = requests.get(
        f"{API_BASE}/v1/signals/whystock-score/{ticker}",
        params={"date": "2024-10-01", "decompose": True},
        headers={"X-API-Key": API_KEY},
    )
    if resp.ok:
        data = resp.json()
        factor_exposures.append({
            "ticker": ticker,
            "quality": data["components"]["quality"],
            "value": data["components"]["value"],
            "momentum": data["components"]["momentum"],
            "sentiment": data["components"]["sentiment_drift"],
            "composite": data["score"],
        })

df = pd.DataFrame(factor_exposures)
print("Portfolio factor exposures:")
print(df.to_string(index=False))
print(f"\nPortfolio avg quality: {df['quality'].mean():.2f}")
print(f"Portfolio avg momentum: {df['momentum'].mean():.2f}")

Put Factor Model to work in your pipeline

Access AI-ready financial data — embeddings, signals, Iceberg tables.