Skip to content

Performance Attribution Analysis

Explains why a portfolio beat or lagged its benchmark using Brinson and factor attribution.

Stars
37,433
Licence
MIT
Files
1 file

What it does

When installed, the agent can break down a portfolio's excess return into sources such as sector allocation, stock selection, interaction, and factor exposures like market beta, size, value, and momentum. It is guided to use the project's tested Python functions for these calculations rather than writing formulas from scratch, and to explain how multi-period results are linked and how any gap between calculated and reported returns should be reported.

Great for

  • Portfolio analysts who want to explain why a strategy made or lost money versus a benchmark
  • Quant developers building performance reports on top of the Vibe-Trading attribution library
  • Students learning Brinson and factor attribution methods

Skip it if

  • Investment advice or live trading decisions, since it only analyses inputs it is given and the outputs depend entirely on data quality
  • Users without portfolio weight and return data, because the methods cannot run without it

Try asking

  • “Decompose my portfolio's 6% return against the benchmark into allocation, selection and interaction effects by sector”
  • “Link my three monthly attribution results into one compounded report using Carino linking”
  • “Run an alpha-beta regression of my fund's daily returns against the CSI 300 and explain the beta”
Step-by-step guide: how to use Performance Attribution AnalysisInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    performance-attribution.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip performance-attribution.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip performance-attribution.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Provide sector weights and returns for both portfolio and benchmark that sum to the same total weight, or the calculation will raise an error.
  • For multi-period analysis, use Carino linking rather than summing monthly effects, which gives a materially wrong compounded result.
  • Ask the agent to quantify any residual between the attribution and the reported fund return and state its source.

What's inside

  • SKILL.md

Redistributed unmodified from HKUDS/Vibe-Trading under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.