portfolio-analysis

portfolio-analysis is a skill for Claude Code, Codex from cxcscmu/SkillLearnBench. It costs 18 tokens per session (2,371 once invoked), scanned A, original, MIT.

A method for examining hedge-fund portfolios from SEC Form 13-F filings, quarterly reports of certain institutional investments.

In plain words
What is it for?
It is for extracting fund assets, counting holdings, comparing portfolios over time, and summarizing investment positions.
Why use it?
It provides a repeatable way to find assets under management, holding counts, and portfolio composition from filing data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for extracting fund assets, counting holdings, comparing portfolios over time, and summarizing investment positions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cxcscmu/skilllearnbench/portfolio-analysis
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 cxcscmu/SkillLearnBench --skill portfolio-analysis
Clone the repo
git clone --depth 1 https://github.com/cxcscmu/SkillLearnBench

Made for: Claude Code, Codex.

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 portfolio-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/portfolio-analysis/github.svg)](https://agentmods.dev/skills/cxcscmu/skilllearnbench/portfolio-analysis)
Your own site
<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/portfolio-analysis"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/portfolio-analysis/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 portfolio-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/portfolio-analysis"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/portfolio-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,371 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
  • NVIDIA SkillSpector pass 7 Sept 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.00018 $0.02371
Opus 5.5 $0.00007 $0.00948
Sonnet 5.5 $0.00004 $0.00474
Haiku 4.5 $0.00002 $0.00237

Measured 1mo ago against content hash 4a3afa6c06ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

portfolio-analysis 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 1mo ago.

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.

skills/b1-one-shot-claude-haiku-4-5/financial-analysis/portfolio-analysis/SKILL.md · 282 lines

How it starts

The opening of the file, as written. The whole thing — 282 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Portfolio Analysis for Hedge Funds

Overview

Portfolio analysis involves extracting fund-level information (AUM, total holdings, composition) from 13-F filings and comparing across time periods.

Key Metrics

1. Assets Under Management (AUM)

Location: SUMMARYPAGE.tsv

import pandas as pd

def get_fund_aum(accession_number, summarypage_df):
    """
    Extract AUM for a specific fund
    """
    fund_summary = summarypage_df[
        summarypage_df['ACCESSION_NUMBER'] == accession_number
    ]

    # Look for AUM-related fields in the data
    # Common field names: AUM, ASSETS_UNDER_MANAGEMENT, TOTALASSETS, etc.
    # Check available columns first
    available_cols = fund_summary.columns.tolist()
    print(f"Available columns: {available_cols}")

    # If found, extract and convert to numeric
    for col in available_cols:
        if 'AUM' in col.upper() or 'ASSET' in col.upper() or 'TOTAL' in col.upper():
            try:
                aum_value = pd.to_numeric(
                    fund_summary[col].iloc[0],
                    errors='coerce'
                )
                return aum_value
            except:
                continue

    return None

# Usage
q3_summary = pd.read_csv('/root/2025-q3/SUMMARYPAGE.tsv', sep='\t')
aum = get_fund_aum('specific_accession_number', q3_summary)

2. Portfolio Holdings Count

def get_holdings_count(accession_number, infotable_df):
    """
    Count the number of stocks held by a fund
    """
    fund_holdings = infotable_df[
        infotable_df['ACCESSION_NUMBER'] == accession_number
    ]
    return len(fund_holdings)

# Usage
q3_infotable = pd.read_csv('/root/2025-q3/INFOTABLE.tsv', sep='\t')
holdings_count = get_holdings_count('specific_accession_number', q3_infotable)
print(f"Renaissance Technologies holds {holdings_count} stocks")

3. Portfolio Composition

def analyze_portfolio_composition(accession_number, infotable_df):
    """
    Analyze fund's portfolio composition
    """
    fund_holdings = infotable_df[
        infotable_df['ACCESSION_NUMBER'] == accession_number
    ].copy()

    # Ensure VALUE is numeric (in thousands)
    fund_holdings['VALUE'] = pd.to_numeric(fund_holdings['VALUE'], errors='coerce')

    # Calculate statistics
    total_portfolio_value = fund_holdings['VALUE'].sum() * 1000  # Convert to dollars
    num_holdings = len(fund_holdings)
    avg_position = total_portfolio_value / num_holdings if num_holdings > 0 else 0

    # Get top positions
    top_10 = fund_holdings.nlargest(10, 'VALUE')[
        ['NAMEOFISSUER', 'CUSIP', 'VALUE', 'SSHPRNAMT']
    ]
    top_10['VALUE_MILLIONS'] = top_10['VALUE'].astype(float) / 1000

    return {
        'total_value_dollars': total_portfolio_value,
        'num_holdings': num_holdings,
        'avg_position_dollars': avg_position,
        'top_10_positions': top_10,
        'concentration': (top_10['VALUE'].sum() / fund_holdings['VALUE'].sum() * 100)
    }

# Usage
composition = analyze_portfolio_composition('accession_number', q3_infotable)
print(f"Total Portfolio Value: ${composition['total_value_dollars']:,.0f}")
print(f"Number of Holdings: {composition['num_holdings']}")
print(f"Top 10 Positions Concentration: {composition['concentration']:.2f}%")
print("\nTop 10 Positions:")
print(composition['top_10_positions'])

Read the full file on GitHub · 282 lines

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. 1mo ago First seen · 282 lines · 18 tokens per session scan A 4a3afa6c06ba

Subscribe to this mod's changes

portfolio-analysis is a skill published in the GitHub repository cxcscmu/SkillLearnBench (91 stars, last pushed 22d ago), licensed MIT. It adds 18 tokens to every session and 2,371 once invoked, about $0.0001 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-08-30.

Related

Other skills, from other repositories

paired-reversal-cancellation

Reference for paired-reversal handling on GL batch tapes: an RV row whose ref-trace points at an earlier row cancels BOTH legs (the RV and the row it references) — but ONLY when the two value-dates fall within the shop's reversal settlement window; an RV that references a too-old posting is NOT a cancellation and…

benchflow-ai/skillsbench · 112 tokens

triangulated-fx-rates

Reference for multi-hop / triangulated currency conversion on batch rate tapes. When a rate row carries an explicit "via" currency, the row's rate is only one leg of the conversion, and the via currency may ITSELF be quoted through another via — so the effective rate is the product of every leg, resolved by walking…

benchflow-ai/skillsbench · 113 tokens

timeseries-detrending

Tools and techniques for detrending time series data in macroeconomic analysis. Use when working with economic time series that need to be decomposed into trend and cyclical components. Covers HP filter, log transformations for growth series, and correlation analysis of business cycles.

benchflow-ai/skillsbench · 57 tokens

fuzzy-name-search

This skill includes search capability in 13F, such as fuzzy search a fund information using possibly inaccurate name, or fuzzy search a stock cusip info using its name.

benchflow-ai/skillsbench · 39 tokens

13f-analyzer

Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.

benchflow-ai/skillsbench · 38 tokens

gl-posting-codes

Background on general-ledger batch posting codes (HD/DR/CR/RV plus signed "other" rows). Reference only -- follow the task instruction for the exact rules, which may differ per account type.

benchflow-ai/skillsbench · 48 tokens