13f-analyzer
Perform analysis on SEC 13F filings to get per-fund AUM/holding counts, and quarter-over-quarter “Top Buys/Sells” changes.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- 13f-analyzer
- description
- Perform analysis on SEC 13F filings to get per-fund AUM/holding counts, and quarter-over-quarter “Top Buys/Sells” changes.
02 资源文件 2
- 脚本scripts/holding_analysis.py1.4 KB
- 脚本scripts/one_fund_analysis.py4.2 KB
03 SKILL.md 正文
Steps
-
Use the helper scripts from their absolute path under
/skills/13f-analyzer/scripts(the task data is under/root/<quarter>, so/root/scripts/...is not the same location). If a helper “is missing”, check/skills/13f-analyzer/scriptsbefore building a replacement pipeline. -
After you have a fund’s
ACCESSION_NUMBERfor a given quarter, get one-quarter summary stats (AUM, holding counts):python3 /skills/13f-analyzer/scripts/one_fund_analysis.py \ --accession_number <ACCESSION_NUMBER> \ --quarter 2025-q3 -
Interpret the printed fields precisely:
Total AUM= sum ofVALUEacross all reported rows for that accession filing.Number of stock holdings= number of rows remaining after the script’sTITLEOFCLASSstock filter; when asked “how many stocks”, use this field (notTotal number of holdings,TABLEENTRYTOTAL, or a unique-CUSIP count).
-
For cross-quarter change / “Top Buys” (e.g., Q2 → Q3 for the same manager, using quarter-specific accession numbers), run:
python3 /skills/13f-analyzer/scripts/one_fund_analysis.py \ --quarter 2025-q3 \ --accession_number <Q3_ACCESSION_NUMBER> \ --baseline_quarter 2025-q2 \ --baseline_accession_number <Q2_ACCESSION_NUMBER>Use the
Top 10 Buyssection to answer “increased investment” questions:- It is ranked by
ABS_CHANGE = VALUE(Q3) - VALUE(Q2)(dollar-value increase). - It includes both new positions and increases to existing positions.
- Take the top 5 positive
ABS_CHANGErows when asked for “top 5 increases”.
- It is ranked by
-
To find the top holders of a stock CUSIP in a specific quarter (and get manager names, not just accession numbers), aggregate that quarter’s
/root/<quarter>/INFOTABLE.tsvbyACCESSION_NUMBERand join to/root/<quarter>/COVERPAGE.tsv:python3 - <<'PY' import pandas as pd quarter = "2025-q3" cusip = "69608A108" topk = 10 inf = pd.read_csv(f"/root/{quarter}/INFOTABLE.tsv", sep="\t", dtype=str) inf["CUSIP"] = inf["CUSIP"].str.upper() inf["VALUE"] = inf["VALUE"].astype(float) if "PUTCALL" in inf.columns: inf = inf[inf["PUTCALL"].isna() | (inf["PUTCALL"] == "")] g = (inf[inf["CUSIP"] == cusip] .groupby("ACCESSION_NUMBER", as_index=False)["VALUE"].sum() .sort_values("VALUE", ascending=False) .head(topk)) cover = pd.read_csv(f"/root/{quarter}/COVERPAGE.tsv", sep="\t", dtype=str)[ ["ACCESSION_NUMBER", "FILINGMANAGER_NAME"] ].drop_duplicates() out = g.merge(cover, on="ACCESSION_NUMBER", how="left") print(out[["ACCESSION_NUMBER", "FILINGMANAGER_NAME", "VALUE"]].to_string(index=False)) PY
Expected Result
- You can extract a fund’s quarter AUM and “number of stock holdings” from a single 13F filing.
- You can compute and read quarter-over-quarter “Top Buys” ranked by dollar-value increase (
ABS_CHANGE), and select the top N CUSIPs. - You can rank top holders of a given CUSIP in a quarter by total
VALUE, and resolve accession numbers to filing manager names viaCOVERPAGE.tsv.
04 同仓库更多 Skills
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms