Visualizing weighted ETF overlap with an upset plot.
upsETF takes into account the weight any holding has in a given ETF. For example, if ETF1 has a 7% allocation in META, ETF2 has a 14% allocation in META, and ETF3 has a 20% allocation in META:
- The three-way intersetion is the minimum of the three values
- The intersection between ETF1 and ETF2 only is 0% (already taken into account by the three-way intersection)
- The intersection between ETF2 and ETF3 is the minimum of the remaining weight (14% - 7% from three-way)
- The intersection of ETF3 alone has the remaining weight (20% - 7% - 7% = 6%).
Thanks to @smotes for the inspiration to make such a tool!.
Thanks to UpSetPlot of the upsetplot python package for maintaining the ability to plot an upset chart.
GUI by chatgpt to make the interface call dummy functions. ETF weight overlap written by me.
Get your AlphaVantage API key here. You are limited to 25 calls per day (each unique ETF you want to compare is one call). To help with this, upsETF caches each ETF API call.
- Install Python
- Execute
python -m venv .env
- Execute
\.env\Scripts\activate.ps1
- Execute
source venv/bin/activate
- Execute
python upsetf_app.py - (optional) Enter your AlphaVantage API key if you know you will be querying for a non-cached ETF.
- (optional) Check the "Force refresh" box to get new data even if it's cached.
- Input up to 5 ETF tickers
- Click "Fetch & Plot"
- Repeat from #3.
Test data with simple allocations are included in the data folder as if it were cached. The tickers for the fake ETFs are 123, 124, and 125. This was changed from ABX, ABY, and ABZ to make sure those tickers are not real.
{
"net_assets": "385800000000",
"net_expense_ratio": "0.002",
"portfolio_turnover": "0.08",
"dividend_yield": "0.0046",
"inception_date": "1999-03-10",
"leveraged": "NO",
"holdings": [
{
"symbol": "NVDA",
"description": "NVIDIA CORP",
"weight": "0.2"
},
{
"symbol": "BAR",
"description": "BAR",
"weight": "0.6"
},
{
"symbol": "BAZ",
"description": "BAZ",
"weight": "0.2"
}
],
"ticker": "123",
"fetched_at": "2025-11-07T19:47:19.687683"
}

