performance-attribution

performance-attribution is a skill for Claude Code from JoelLewis/finance_skills. It costs 99 tokens per session (2,680 once invoked), scanned A, original, MIT.

A guide to explaining why a portfolio did better or worse than a benchmark, which is a reference index used for comparison. It separates the effect of choosing sectors or assets from the effect of choosing individual investments.

In plain words
What is it for?
Use it to analyse allocation, security selection, factor, bond, and currency effects in portfolio returns across one or more periods.
Why use it?
A single return number does not show what caused the result. Attribution identifies where decisions added or lost value and helps distinguish skill from market exposure.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the wealth-management plugin — 38 skills shipped together

Good fit Use it to analyse allocation, security selection, factor, bond, and currency effects in portfolio returns across one or more periods.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joellewis/finance_skills/performance-attribution
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JoelLewis/finance_skills --skill performance-attribution
Clone the repo
git clone --depth 1 https://github.com/JoelLewis/finance_skills

Made for: Claude Code.

Or install wealth-management, the plugin that ships this one along with the rest of its 38 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for performance-attribution

README.md
[![agentmods](https://agentmods.dev/badge/skills/joellewis/finance_skills/performance-attribution/github.svg)](https://agentmods.dev/skills/joellewis/finance_skills/performance-attribution)
Your own site
<a href="https://agentmods.dev/skills/joellewis/finance_skills/performance-attribution"><img src="https://agentmods.dev/badge/skills/joellewis/finance_skills/performance-attribution/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for performance-attribution

Your own site · 80×15
<a href="https://agentmods.dev/skills/joellewis/finance_skills/performance-attribution"><img src="https://agentmods.dev/badge/skills/joellewis/finance_skills/performance-attribution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,680 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 27 Nov 2026
  • Snyk pass 27 Nov 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.02680
Opus 5.5 $0.00040 $0.01072
Sonnet 5.5 $0.00020 $0.00536
Haiku 4.5 $0.00010 $0.00268

Measured 3d ago against content hash da1d2814b51f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

performance-attribution scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/performance_attribution.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/wealth-management/skills/performance-attribution/SKILL.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on 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

Read the full file on GitHub · 132 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 132 lines · 99 tokens per session scan A da1d2814b51f

Subscribe to this mod's changes

performance-attribution is a skill published in the GitHub repository JoelLewis/finance_skills (272 stars, last pushed 3d ago), licensed MIT. It adds 99 tokens to every session and 2,680 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-27.

Related

performance-attribution compared with skills from other repositories

performance-attribution next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
performance-attributionJoelLewis/finance_skillsSkill2723d agoMITA99Claude Code
Freelance EmpireLeoYeAI/openclaw-master-skillsSkill2.2k8d agoMITA71Claude Code, Codex
agent-otc-tradeLeoYeAI/openclaw-master-skillsSkill2.2k8d agoMITA80Claude Code
agentic-streetLeoYeAI/openclaw-master-skillsSkill2.2k8d agoMITA91Claude Code, Codex
alpha-vantageforyourhealth111-pixel/Vibe-SkillsSkill3.9k21d agoApache-2.0A126Claude Code, Codex
prompt-proximity-architectureelvisun/newsjackSkill1.7k4d agoMITA67Claude Code
syndicromainsimon/paperasseSkill2.6k18d agoMITA204Claude Code