I wrote a small python script that automatically classifies ETFs managed in Portfolio Performance files by the currencies, countries and industry sectors they are invested in. Furthermore it determines the Top 10 holdings across all PDFs. The classifier uses the list of etf assets as provided by the ETF issuer (iShares etc) as a data source for classification.
- Only works with iShares ETFs at the moment
- Experimental software - use with caution!
requires Python 3, git and Portfolio Performance. Steps:
git clone
this repository- in the install directory run
pip3 -r requirements.txt
- test the script by running
python etf-classifier.py test/multifaktortest.xml > classified.xml
to test the script. Then openclassified.xml
in Portfolio Performance.
Important: Never try this script on your original Portfolio Performance files -> risk of data loss. Always make a copy first that is safe to play around with or create a dummy portfolio like in test folder.
- In Portfolio Performance, save a copy of your portfolio file as unencrypted xml. The script won't work with any other format.
- Then open the saved copy in PP. Edit each iShares ETF security (Ctrl + E) and add a "Provider" (Anbieter) attribute on the attributes tab. The value of the attribute is the URL of the holdings list that can be obtained from the iShares website, e.g. https://www.ishares.com/de/privatanleger/de/produkte/270051/ishares-msci-world-momentum-factor-ucits-etf -> Link to "Fondspositionen und Kennzahlen")
- Run the script
python etf-classifier.py <path to pp.xml> > classified.pp.xml
- open classified.pp.xml in Portfolio Performance and check out the additional classifications.
- add support for other ETF issuers (xtrackers, ...)
- write tests
- nudge people to make this a PP core feature one day