Data platform · 2026
Market Analyser
An ETF correlation dashboard and portfolio simulator, fed by a self-maintained market-data pipeline that scrapes six fund providers.
The problem
ETF fact sheets tell you what a fund holds, not how those holdings behave together. I wanted to see which constituents actually move as a block, how much of a fund’s risk a single holding drives, and what a basket of funds would have done over time.
What it does
- Correlation matrix with clusters. Pairwise Pearson correlation of daily returns for a fund’s top holdings over the past year, with the holdings that moved together grouped into clusters.
- Holding vs. fund analysis. Beyond ρ: how much of the fund’s own risk a holding drives, and whether the relationship holds on the days that matter.
- Portfolio simulator. A basket of tickers, weights and a window of history. It supports recurring contributions or withdrawals, dividends, and scoring against a tracked risk-free rate. Portfolios live in the browser. There’s no account, and they can be shared by link or exported as a backup.
- Price charts with candles, and a freshness indicator showing when the data was last refreshed.
How it is built
- Scrapers. One fetcher per provider (VanEck, SPDR, ARK, iShares, Vanguard, Invesco), all running through a shared Playwright-backed browser session. A real page load is the only thing that gets past Invesco’s bot protection.
- Data pipeline. Scripts validate new tickers, backfill full price history and upsert holdings with weights into Supabase. Stocks under 1% weight in every fund are skipped or pruned. A GitHub Actions cron refreshes prices, metadata, holdings and the risk-free rate every day, and records each run.
- Storage that scales with age. Prices are always split- and dividend-adjusted. History is tiered: daily under a year old, weekly buckets up to five years, monthly beyond. The simulator scales each return by the trading time a row actually covers.
- API and app. FastAPI backend with rate limiting for anonymous clients, and a React 19 + Vite frontend. Deployed on Render from a Blueprint.
- Engineering hygiene. pytest and Vitest suites run in Docker, and design decisions are recorded as ADRs.
What I learned
Most of the hard problems were about what a number means: an unadjusted 10:1 split reads as a one-day crash and corrupts every correlation it touches, and a weekly bucket’s date is not a trading day. Writing those conventions down (in the README and ADRs) mattered as much as the code.