Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FundsRadar

Exploring institutional portfolio behavior: a full-stack web application that lets anyone slice and dice what U.S. mutual funds actually hold, across ~7 years of SEC filings and 100+ million holdings records.

Demo

▶ Watch the ~3-minute walkthrough: a tour of all four analysis lenses over real N-PORT data.

Overview landing page

Why

Registered investment companies must disclose their complete portfolio holdings to the SEC quarterly (Form N-PORT), but that transparency is practically inaccessible: the SEC publishes it as raw, unindexed TSV files (30+ GB across 26 quarters) with inconsistent terminology for identical asset classes. Retail investors have no easy way to see what institutional money managers are doing. FundsRadar closes that gap by streaming the raw filings through a memory-safe ETL pipeline into a normalized PostgreSQL database, then serving interactive analysis through a web UI.

What it does

Analysis at four levels of granularity:

  • Time series: how the whole industry's asset allocation and fund flows (sales vs. redemptions) shift quarter over quarter, overlaid with macroeconomic indicators (interest rates, CPI, GDP) from the FRED API.
  • Fund category: compare portfolio composition across fund types and subtypes (e.g. high-yield bond vs. TIPS vs. broad equity index).
  • Individual fund: fuzzy-search thousands of funds by name, then drill into one fund's top positions and its allocation drift across every quarter it reported.
  • Security: pick a stock or bond (by CUSIP) and see which funds hold it, how concentrated ownership is, and the security's actual market performance from daily price history.

Data

Source Contents Scale
SEC EDGAR Form N-PORT Quarterly fund filings: fund financials, flows, and line-item holdings 26 quarters (2019 Q4 – 2026 Q1), 100.6M+ holdings rows, 30+ GB raw
Yahoo Finance (via yfinance) Daily closing prices for S&P 500 tickers 811K rows, 503 tickers, 2020–2026
FRED API Live macroeconomic series (CPI, GDP, unemployment, Treasury yields) fetched on demand, cached server-side

The two static datasets overlap on securities/issuers, joined via string-similarity entity resolution (SEC free-text issuer names → standardized S&P 500 tickers, Sørensen–Dice coefficient).

Tech stack

Layer Technologies Highlights
Database PostgreSQL on AWS RDS Schema normalized to BCNF (8 tables); B-tree indexes plus a pg_trgm GIN index for fuzzy name search; 3 materialized views precomputing the heaviest industry-wide aggregations, cutting those full-scan queries from ~8–10 minutes (cold, unindexed) to under half a second (a single-fund lookup drops from ~7 minutes to 0.16s on indexes alone)
ETL / data pipeline Python (pandas, psycopg2) Streams the 30 GB of TSVs in memory-safe chunks; normalizes inconsistent SEC codes via regex/keyword classification; bulk-loads via COPY with one atomic transaction per quarter (crash-safe, resumable)
Backend API Node.js, Express, pg Parameterized SQL through a connection pool; caching proxy for the FRED API
Frontend Vanilla JavaScript (ES6+), Chart.js, Lucide icons Single-page app; native CSS Grid/Flexbox, no UI framework

Repository structure

Directory Contents
data_pipeline/ Python ETL: schema DDL (schema.py), chunked N-PORT loader (load_nport.py), fund/issuer classification heuristics (classify.py), stock-price loader, and optimizations.sql (indexes + materialized views)
backend/ Express API server: all core routes built and live-verified against the database, with tests.http documenting each route's request/response
frontend/ Single-page app: index.html, app.js, style.css

Running locally

# copy .env.example to .env in the repo root and fill in:
#   RDS_HOST / RDS_PORT / RDS_USER / RDS_PASSWORD / RDS_DB   (backend DB connection)
#   DATABASE_URL                                              (used by data_pipeline)
#   FRED_API_KEY=<free key from fred.stlouisfed.org>          # for the macro dashboard

cd backend
npm install
npm start          # serves the API and frontend on http://localhost:5005

The database itself is populated by the pipeline: python data_pipeline/load_nport.py (expects the quarterly N-PORT folders under data/), then data_pipeline/optimizations.sql for indexes and materialized views. Both the backend and the pipeline read the same repo-root .env.

Screenshots

Overview: the four lenses, live dataset figures, and last quarter's biggest fund flows. Overview landing page

Equity Flows: quarterly capital flows and portfolio composition, by strategy category. Equity Flows dashboard

Fixed Income: the same two views for bond funds, across rate and inflation cycles. Fixed Income dashboard

Fund Explorer: search any fund, then inspect its allocation drift and largest holdings. Fund Explorer

Security Ownership: rank securities by how much the industry holds; expand a row for the funds behind it. Security Ownership ranking

Macro Context: inflation, output, and labor data from FRED as the backdrop for fund behavior. Macro Context dashboard

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages