What the skill tells Claude
This is the skill's instruction file, SKILL.md, as Claude reads it.
Purpose
Decompose a total fund's active return versus its Strategic Asset Allocation (SAA) policy benchmark into three additive effects per asset class/manager sleeve:
| Effect | Formula | What it measures |
|---|---|---|
| TAA (Allocation) | (w_act − w_pol) × (r_bench − R_pol_total) |
Impact of over/underweighting an asset class |
| Selection | w_pol × (r_mgr − r_bench) |
Impact of manager out/underperformance |
| Interaction | (w_act − w_pol) × (r_mgr − r_bench) |
Combined weight + return divergence |
Invocation
/multi-asset-attribution-macro <user request>
Examples:
- /multi-asset-attribution-macro Here is my fund's macro input xlsx
- /multi-asset-attribution-macro Run macro attribution on the uploaded file
Input Schema
The skill accepts input in two forms:
Form 1 — Spec-compliant xlsx (preferred)
An Excel file containing a sheet named Macro_Input with the following columns:
- period_id (e.g., "2026-Q1")
- asset_class (e.g., "US Equity")
- manager_name (e.g., "Alpha Partners")
- policy_weight (Decimal, sums to 1.0)
- actual_weight (Decimal, sums to 1.0)
- manager_return (Decimal)
- benchmark_return (Decimal)
Form 2 — Natural language + prompted collection
If no file is provided, the skill prompts for the required data.
Step-by-Step Workflow
The skill MUST execute these steps in order:
Step 1 — Detect input form
- Check whether the user uploaded an xlsx file.
- Otherwise, enter prompted collection mode.
Step 2 — Validate inputs (scripts/validate_inputs.py)
Run the validator against the detected input. The validator checks:
- policy_weight sums to 1.0 ± 1e-4
- actual_weight sums to 1.0 ± 1e-4
- Required columns exist in the Macro_Input sheet.
If validation passes → proceed to Step 3. If validation fails → display a clear error table and prompt the user to fix it.
Step 3 — Run attribution (scripts/run_attribution.py)
- Instantiate
MultiAssetMacroAttributionfromMultiAssetMacroAttribution.py - Call
calculate_effects() - Generate
macro_attribution_report.xlsx
Step 4 — Deliver results
Present a structured summary of the Total Fund Effects and attach macro_attribution_report.xlsx.
Prompt Rules (Prompted Collection Mode)
When inputs are missing or incomplete, prompt for them:
"I need the fund data to run the Macro Attribution. Please provide an Excel file with a sheet named Macro_Input containing the following columns:
period_id,asset_class,manager_name,policy_weight,actual_weight,manager_return, andbenchmark_return. Note: Both policy weights and actual weights must sum to 100% (1.0)."
Files in This Skill Package
multi-asset-attribution-macro/
├── SKILL.md ← This file
├── assets/
│ └── icon.png ← Skill icon
└── scripts/
├── validate_inputs.py ← Input validator
├── run_attribution.py ← Attribution runner
└── MultiAssetMacroAttribution.py ← Core engine
Shared as is, with no warranty. Not investment, legal or tax advice. See Disclosures.