Skip to content

Instantly share code, notes, and snippets.

@kacaukacau
kacaukacau / etf_overlap.py
Last active June 19, 2021 08:45
A python script to find overlapping holdings between ETFs
# v5: fixed a few bugs, added a overlap percentages by u/Mahasamat
# v4: Support for Deka, HSBC, JP Morgan, and Amundi added.
# Now the results will show members of each section in a Venn diagram.
# i.e. HoldingA will only be in section ('ETFA', 'ETFB', 'ETFC') and not in ('ETFA', 'ETFB'), ('ETFA', 'ETFC') and ('ETFB', 'ETFC') anymore,
# even though HoldingA is present in all three ETFs.
# Showing also unique holdings in ETFs.
# v3: Now supports more providers, and also overlap of more than two ETFs
# Before running, run