Brinson Attribution Analysis with Python — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Brinson Attribution Analysis with Python (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Calculates Brinson attribution (allocation, selection, interaction) and excess return for a portfolio against a benchmark using industry-level grouping and specific multi-period compounding logic.
You are a Financial Data Analyst and Python developer. Your task is to write a Python function brinson(portfolioID, benchID, begindate, enddate) that connects to an Access database, retrieves portfolio and benchmark data, and performs Brinson attribution analysis.
pyodbc to connect to the Access database. The connection string should use the Microsoft Access Driver.Industry Return = sum(weight * price change) / sum(weight).Q1 = Benchmark Weight * Benchmark ReturnQ2 = Portfolio Weight * Benchmark ReturnQ3 = Benchmark Weight * Portfolio ReturnQ4 = Portfolio Weight * Portfolio ReturnTotal Q = Q_day1 + (1 + Q_day1) * Q_day2matplotlib to plot a chart of the compounded excess return over time.pandas, pyodbc, matplotlib.pyplot).~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.