performance-attribution
БесплатноЗапускает вложенные скриптыНе проверенDecompose portfolio returns into explainable components to identify where value was added or lost. Use when the user asks about Brinson attribution…
от JoelLewis★ 273 звезды на GitHubОб этом скилле
Performance Attribution
Core Concepts
Brinson-Fachler Attribution (Single Period)
The classic equity attribution model decomposes active return (portfolio return minus benchmark return) into three effects:
- Allocation effect: Value added by over/underweighting sectors relative to the benchmark
- A_i = (w_p,i - w_b,i) × (R_b,i - R_b)
- Rewards overweighting sectors that outperform the total benchmark
- Selection effect: Value added by picking better securities within each sector
- S_i = w_b,i × (R_p,i - R_b,i)
- Rewards outperforming the sector benchmark regardless of weight
- Interaction effect: Combined effect of both overweighting and outperforming (or vice versa)
- I_i = (w_p,i - w_b,i) × (R_p,i - R_b,i)
- Captures the joint benefit of overweighting a sector AND selecting better securities in it
- Total active return: R_p - R_b = Σ A_i + Σ S_i + Σ I_i
Where: w_p,i = portfolio weight in sector i, w_b,i = benchmark weight in sector i, R_p,i = portfolio return in sector i, R_b,i = benchmark return in sector i, R_b = total benchmark return.
Multi-Period Attribution
Single-period attribution does not compound across periods. Geometric linking methods are required:
- Carino method: Scales each period's arithmetic effects by c_t = k_t / K, where k = [ln(1 + R_p) - ln(1 + R_b)] / (R_p - R_b) is computed per period (k_t) and for the cumulative returns (K). The scaled effects sum exactly to the full-period active return R_p,cum - R_b,cum
- Menchero method: Uses a logarithmic approach for smoother decomposition
- GRAP (Groupe de Recherche en Attribution de Performance): Multiplies each period's effects by the cumulative portfolio return before it and the cumulative benchmark return after it
- Key principle: the linked effects must sum to the full-period active return with no residual. Carino, Menchero and GRAP target the cumulative difference R_p,cum - R_b,cum; geometric attribution methods target the geometric active return (1 + R_p,cum) / (1 + R_b,cum) - 1. State which one a report uses
Factor-Based Attribution
Decomposes returns into exposures to systematic risk factors:
- Model: R_p = Σ β_k × F_k + α
- β_k = portfolio's exposure (loading) to factor k
- F_k = return of factor k during the period
- α = residual return unexplained by factors (true alpha)
- Common factors: Market (MKT), Size (SMB), Value (HML), Momentum (UMD), Quality (QMJ), Low Volatility (BAB)
- Factor contribution: β_k × F_k for each factor
- Active factor contribution: (β_p,k - β_b,k) × F_k
- The model chosen (Fama-French 3, Carhart 4, Fama-French 5, Barra, Axioma) affects results
Fixed-Income Attribution
Decomposes bond portfolio returns into component sources:
- Yield return (income): Coupon income accrued during the period (yield × time)
- Roll return: Price appreciation as bonds "roll down" the yield curve toward maturity
- Curve change return: Impact of parallel and non-parallel yield curve shifts
- Duration effect: -D × Δy (parallel shift)
- Curve reshaping: key rate duration contributions
- Spread change return: Impact of credit spread changes: -spread_duration × Δspread
- Credit/default return: Losses from defaults or credit events
- Residual: Unexplained return (convexity effects, model error)
Currency Attribution
For international portfolios, returns decompose into:
- Local return: Return of the asset in its local currency
- Currency return: Gain/loss from exchange rate movements
- Cross-product: Interaction between local return and currency return
- Total return (base currency): R_base ≈ R_local + R_currency + R_local × R_currency
- Hedged return: Local return + hedge cost (forward premium/discount)
- Attribution of active currency decisions: actual currency exposure vs benchmark currency exposure
Holdings-Based vs Returns-Based Attribution
- Holdings-based: Uses actual portfolio positions; more accurate but requires detailed holdings data at each evaluation point
- Returns-based (style analysis): Regresses portfolio returns against a set of style indices (e.g., Sharpe style analysis); less precise but requires only return series
- Transaction-based: Most accurate; accounts for intra-period trading by using actual transaction records
Key Formulas
| Formula | Expression | Use Case |
|---|---|---|
| Allocation effect (sector i) | A_i = (w_p,i - w_b,i) × (R_b,i - R_b) | Sector weighting decisions |
| Selection effect (sector i) | S_i = w_b,i × (R_p,i - R_b,i) | Security selection within sector |
| Interaction effect (sector i) | I_i = (w_p,i - w_b,i) × (R_p,i - R_b,i) | Joint allocation-selection effect |
| Total active return | R_p - R_b = Σ(A_i + S_i + I_i) | Sum of all effects equals active return |
| Factor return contribution | C_k = β_k × F_k | Return from factor k exposure |
| Duration effect | ΔP/P ≈ -D × Δy | Bond price change from yield sh |
Установить performance-attribution в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл performance-attribution?
Decompose portfolio returns into explainable components to identify where value was added or lost. Use when the user asks about Brinson attribution, allocation vs selection effects, factor-based attribution, fixed-income attribution, or currency attribution. Also trigger when users mention 'what drove my returns', 'was it stock picking or sector bets', 'alpha decomposition', 'multi-period linking', 'interaction effect', 'active return breakdown', or ask why their portfolio outperformed or underperformed the benchmark.
Как установить скилл performance-attribution?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл performance-attribution запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic