Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

factor-investing

БесплатноЗапускает вложенные скриптыНе проверен

Apply factor models to portfolio construction and fund evaluation, from CAPM through the Fama-French 3- and 5-factor models plus momentum. Use when the user…

JoelLewisот JoelLewis★ 273 звезды на GitHub

Об этом скилле

Factor Investing

Core Concepts

From CAPM to Multifactor Models

CAPM prices a single source of risk: E(R_i) - R_f = beta * (E(R_m) - R_f). Persistent anomalies — small caps, cheap (high book-to-market) stocks, and recent winners earning more than beta predicts — motivated adding factors. Fama-French (1993) added size and value to the market factor (3-factor model); Carhart (1997) added momentum; Fama-French (2015) added profitability and investment (5-factor model):

R_i - R_f = alpha + b_MKT*MKT + b_SMB*SMB + b_HML*HML [+ b_RMW*RMW + b_CMA*CMA] [+ b_UMD*UMD] + epsilon

The key reinterpretation: a manager's CAPM alpha may be nothing more than static factor exposure. Alpha only means skill after controlling for the factors an investor could buy cheaply. Single-factor OLS mechanics, t-statistics, and the CAPM regression itself live in the statistics-fundamentals skill; this skill generalizes to K regressors and interprets the output.

The Canonical Factors

Factor Construction (long-short) Rationale: risk-based Rationale: behavioral Approx. premium*
MKT Market minus risk-free Non-diversifiable macro risk — 6-7%/yr
SMB (size) Small caps minus big caps Illiquidity, distress sensitivity Neglect of small firms 1.5-2%/yr
HML (value) High book/market minus low Distress risk, cyclical cash flows Overextrapolation of growth 2.5-3%/yr
RMW (profitability) Robust minus weak operating profitability Compensation for cash-flow risk Underreaction to quality ~3%/yr
CMA (investment) Conservative minus aggressive asset growth Q-theory: high investment implies low expected return Empire-building overinvestment ~3%/yr
UMD (momentum, Carhart) Past 12-1 month winners minus losers Crash risk (violent reversals) Underreaction, herding 6-7%/yr

*Approximate annualized US long-short premia over the 1963-2024 sample, Ken French data library, as of 2026. Long-run averages, not forecasts; realized decade-long stretches deviate wildly (see cyclicality below).

The rationale matters for durability: risk-based premia should persist (someone must bear the risk); behavioral premia survive only while limits to arbitrage prevent them from being competed away — and are more vulnerable to crowding.

Reading a Factor Regression

Run OLS of fund excess returns on the factor return series. Interpret:

  • Loadings (b_k): exposure per unit of factor. b_HML = 0.45 means the fund behaves like it holds a 0.45-weight position in the value long-short portfolio. Judge each by its t-stat (|t| above roughly 2 for 5% significance).
  • Alpha: average return unexplained by the factors — the only defensible claim to skill. A positive alpha with |t| < 2 is not evidence of skill (see statistics-fundamentals on t-statistics); most funds' alpha turns insignificant once value or momentum loadings are added.
  • R-squared: fraction of return variance the factors explain. Diversified equity funds typically show R-squared of 0.90-0.99 against 3-4 factors. Use adjusted R-squared when comparing models with different factor counts — R-squared mechanically rises with every added regressor.
  • Stability: run rolling windows; loadings that drift signal style drift or factor timing rather than a stable tilt.

Alpha Decomposition and Closet-Index Detection

Two complementary uses of the same regression:

  1. Expected-return decomposition: E(R) = R_f + sum(b_k * lambda_k), where lambda_k are assumed factor premia. This tells you what the fund should earn from its exposures alone; realized excess return minus the factor-implied excess is the manager's implied alpha. If the implied alpha is near zero, the fund is a factor portfolio you could replicate with cheap factor ETFs.
  2. Closet-index screen: a fund charging active fees while hugging its benchmark. Returns-based red flags: benchmark regression R-squared >= 0.98 and annualized tracking error <= 2%. The holdings-based analog is active share below ~60% (Cremers and Petajisto 2009). Then compute the breakeven Information Ratio: IR_breakeven = (fund fee - index fee) / tracking error. A closet indexer needs an implausibly high IR on a tiny active-risk budget just to earn back its fee gap (Information Ratio itself is covered in performance-metrics).

Smart-Beta Product Evaluation

Treat every smart-beta product as a factor portfolio (the equities skill's rule) and evaluate the implementation, not the marketing name:

  • Factor purity: regress the product on the academic factors. A "value" ETF with b_HML = 0.15 and b_MKT = 1.0 is expensive beta; look for the target loading to be significant and dominant, and for unintended loadings (e.g., a value fund's negative momentum exposure) to be modest.
  • Turnover: momentum needs high turnover to exist (~100%+/yr); value needs little (~1
Полный SKILL.md на GitHub

Установить factor-investing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

scripts/factor_investing.py

FAQ

Что делает скилл factor-investing?

Apply factor models to portfolio construction and fund evaluation, from CAPM through the Fama-French 3- and 5-factor models plus momentum. Use when the user asks about 'Fama-French', 'value factor', 'smart beta', 'factor tilt', 'momentum exposure', or the 'factor zoo', wants to run or interpret a factor regression (loadings, alpha after controlling for factors, R-squared, t-stats), decompose a manager's returns into factor exposures versus skill, or asks 'is my fund closet indexing'. Also trigger on SMB, HML, RMW, CMA, UMD, size/value/quality/profitability/low-vol premia, factor ETF or smart-beta product evaluation (factor purity, turnover, capacity, fees), factor cyclicality and the danger of factor timing, factor crowding, long-short academic factors versus long-only implementable tilts, and post-publication factor decay.

Как установить скилл factor-investing?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл factor-investing запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить factor-investing с