performance-attribution

Decompose portfolio excess returns into allocation, selection, and factor contributions.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ebrahim-sani/trading-automation --skill performance-attribution-ebrahim-sani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-attribution
Source: https://github.com/ebrahim-sani/trading-automation/tree/main/vibe-trading/agent/src/skills/performance-attribution
Command: npx skills add https://github.com/ebrahim-sani/trading-automation --skill performance-attribution-ebrahim-sani

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Decompose a portfolio's excess returns into explainable sources so analysts can understand why performance occurred rather than only how much was earned. The Skill clarifies contributions from sector allocation, stock selection, interaction effects, factor exposures, and market-timing decisions to support more transparent performance review and decision-making.

Core Features & Use Cases

  • Brinson Attribution: Single-period decomposition into allocation, selection, and interaction effects and guidance for linked multi-period attribution to reduce residuals.
  • Factor Decomposition & Alpha/Beta: OLS regression templates for single- and multi-factor models (market, SMB, HML, MOM) to quantify alpha, betas, and factor contributions.
  • Timing Evaluation & Rolling Analysis: Implements Treynor-Mazuy and Henriksson-Merton timing tests, bull/bear capture metrics, and rolling-window Sharpe, beta, and information ratio for style drift detection.
  • Use Case: Turn a backtest or live trade journal plus a chosen benchmark into an attribution report that highlights whether excess returns came from sector bets, stock-picking, factor tilts, or timing skill.

Quick Start

Run a Brinson sector attribution and multi-factor regression on your portfolio returns against a chosen benchmark to produce an attribution report.

Frequently Asked Questions about performance-attribution

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decompose portfolio excess returns into allocation and selection effects?

Multi-period attribution uses linked Brinson attribution to reduce residuals across monthly periods. It ensures that single-period allocation and selection effects compound accurately over time without leaving unexplained return gaps.

Can I run multi-factor regression to quantify alpha and factor exposures?

Timing evaluation uses Treynor-Mazuy and Henriksson-Merton tests alongside bull and bear capture metrics. These models identify whether a portfolio's excess returns derive from genuine market-timing skill or factor exposures.

Does this attribution analysis work with live trade journals and backtests?

Rolling-window analysis calculates rolling Sharpe, beta, and information ratio to detect style drift in portfolios. This continuous monitoring identifies when a portfolio's factor exposures or risk profile shifts over time.

What is the best way to explain why a portfolio outperformed its benchmark?

The best way to explain outperformance is running Brinson attribution and multi-factor regression together. This combination reveals if excess returns came from sector allocation, stock selection, factor tilts, or timing decisions.