前端开发

performance-attribution

joellewis/finance_skills

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.

  • 678 次安装
  • 218 星标
  • 收录于

安装命令

npx skills add https://github.com/joellewis/finance_skills --skill performance-attribution

SKILL.md

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.