factor-models

Run a complete analysis of the three factors (market, size, and value) with a single command.

Updated Jun 20, 2025
One-click install
npx skills add https://github.com/kerryback/mgmt638 --skill factor-models
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: factor-models
Source: https://github.com/kerryback/mgmt638/tree/main/.claude/skills/factor-models
Command: npx skills add https://github.com/kerryback/mgmt638 --skill factor-models

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, statsmodels.

What problem does it solve?

Understanding and implementing complex factor models (like Fama-French) for investment analysis can be challenging, requiring deep statistical knowledge and careful data handling. This skill simplifies the construction, analysis, and application of factor models, enabling robust quantitative finance strategies without extensive manual coding.

Core Features & Use Cases

  • Automated Factor Construction: Build common factors like Size (SMB), Value (HML), Quality (QMJ), and Profitability (RMW) from raw financial data with pre-built logic.
  • Factor Regression Analysis: Run CAPM, Fama-French 3-factor, and 5-factor regressions to determine factor loadings and alpha, providing clear statistical insights.
  • Multi-Factor Strategy Development: Construct and backtest multi-factor portfolios for systematic equity strategies, streamlining your investment research.
  • Use Case: Analyze a stock's exposure to market, size, and value factors using the Fama-French 3-factor model, and attribute its returns to these factors, gaining a deeper understanding of its risk and return drivers.

Quick Start

Using the provided stock and factor data, run a Fama-French 3-factor regression for Apple (AAPL) and output the alpha and factor betas.