Build 13-F Hedge Fund Inflow Analyzer
Resolved 💬 2 comments Opened Dec 24, 2025 by tictcotq Closed Dec 24, 2025
Goal
Build an application to analyze SEC 13-F filings from hedge funds to identify stocks with higher-than-average inflows in a given quarter.
Research Summary
Data Source
- SEC Form 13F Data Sets (official bulk downloads)
- URL: https://www.sec.gov/data-research/sec-markets-data/form-13f-data-sets
- Pre-flattened TSV files (no XML parsing needed)
- ~70-85 MB per quarter (compressed), ~5000 filers included
Storage Estimates
| Period | Compressed | Uncompressed |
|--------|------------|--------------|
| 1 quarter | ~80 MB | ~400 MB |
| 8 quarters | ~640 MB | ~3 GB |
| Full history (2013+) | ~4 GB | ~20 GB |
Data Format (inside ZIP)
SUBMISSION.tsv- filing metadataINFOTABLE.tsv- holdings dataCOVERPAGE.tsv- manager info
Proposed Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ 1. DOWNLOADER │ --> │ 2. LOADER │ --> │ 3. ANALYZER │
│ (fetch ZIPs) │ │ (TSV → SQLite) │ │ (run queries) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │
v v
data/zips/ SQLite DB
Stage 1: Downloader
- Fetch quarterly ZIP files from SEC
- Store in
data/zips/ - Track download state in manifest
Stage 2: Loader
- Extract TSV files from ZIPs
- Load into SQLite database
- Compute quarter-over-quarter changes
Stage 3: Analyzer
- Query DB for aggregated inflows per stock
- Compute historical averages and z-scores
- Output ranked list of anomalous inflows
Analysis Logic
"Higher-than-average inflows" defined as:
- Per stock per quarter: Sum all position increases across tracked funds
- Historical baseline: Same stock's average quarterly inflow over past 8 quarters
- Anomaly detection: Flag stocks where
currentInflow > mean + 1.5 * stddev
Tech Stack
- TypeScript (fits existing monorepo)
- SQLite (local analysis, no server needed)
- Commander.js (CLI)
Open Questions
- [ ] Integrate into investing-toolkit monorepo or standalone?
- [ ] Which funds to track? (Top N by AUM, all filers, custom list?)
- [ ] Output format preferences (CSV, JSON, web UI?)
Tasks
- [ ] Set up project structure
- [ ] Implement downloader (Stage 1)
- [ ] Implement loader (Stage 2)
- [ ] Implement analyzer (Stage 3)
- [ ] Add CLI commands
- [ ] Add tests
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗