So the only major issue I see seems to be the “Holding” taxonomy, which (in my US-portfolio) misses almost everything. Other taxonomies are much better. Even very large & popular ETFs are almost entirely unclassified, i.e.
VTI (59% unclassified)
VT (82% unclassified)
VXUS (67% unclassified)
etc.
I am a happy user of portfolio-classifier.py. For my personal use, I have rewritten part of the code so that it now updates existing xml entries rather than creating new ones. This is very convenient as it keeps colors and balancing weights etc. I also added a few nice other features like skipping entries with zero weight, rounding to 100% when the sums are slightly above, etc. It also doesn’t delete entries like holdings when no information can be fetched from MS.
I wonder what would be a good way to share this with others (though I don’t plan to maintain this). Should I just dump it on github? Shoud I give it a new name (like portfolio-classifier-v2)? Should I send the code to the original authors so that they integrate whatever they like? Are there any legal constraints or potential traps?
Personally, I would get in touch with the original author and try to work something out with him. Maybe you two will find a good way on how to go forward from here.
Indeed @fizban was the one making use of morningstar data. Maybe it makes sense to talk to him… But let me stress this one more time, this is just my view on things… genuinely you can place it on github and that’s it.
That’s great! A lot of people are waiting for this “data-update” feature. I also tried to extend the existing script. Getting data was not the problems, but I did not understand how to change the xml data to save it.
Would be great when you release it on github. I guess correct would be as fork. I think to release it as public fork you don’t have to ask the creator, right? As I know, all previous creator/coder on the scripts are (unfortunately) not active anymore. They (in my opinion and unfortunately) also do not write in this thread anymore. But I could be wrong and some of them will answer.
If not, do it as fork … or, if you changed most code or all of the code, then as new project.
Would be also great, if you can put a lot of comments inside the code. This would make it easier for people like me who can code but are not professionals, to quickly dive into it and may help. Especially on the topics how data are saved and why things are solved like this.
Thanks @Manni79. I think you are right, sharing it via a public fork is Github is probably the right way to go. I think this is the idea of Github on how to contribute to such a project and people can then pick whatever they need from my code modifications.
(And: Yes, I have a few comments in the code and the script is also quite talkative towards the user. The code is not as elegant as the original, but I tried my best not to make it too clumsy).
If you run it for the first time with existing xml from a previous version, please note the compatibility issue for the corrected name of the geographic region “Europe Emerging”. I recommend to adapt manually before you run the script.
I struggle to understand why the MorningStar data in portfolio-classifier.py does not contain countries like Saudi Arabia, Qatar, Kuwait, UAE and Egypt. Is there is a mistake in how portfolio-classifier.py fetches data from MorningStar or is the data provider just not providing data on these countries? Please let me know, if you have some facts on this topic.
I don’t find any page which tells for which countries they are providing data. I am not interested in a specific ETF or fond. But you are right, I could check for a specific Middle East ETF what kind of country information they provide for that.
@Rafa: Yes, and on the snapshot page, it provides even country information, but only for 51 countries all with 0% and Saudi Arabia not being one of them. So indeed, it seems that Morningstar does not map ETFs and fonds to those countries.
@ProgFriese : Thanks. Yes, I also see e.g. on Instant X-Ray that also MorningStar provides mapping of individual holdings to such countries. But unfortunately not for ETFs and fonds.
To sum this up: It seems that MorningStar provides mapping of ETFs and fonds to a list of 51 countries (several Middle East countries not being on that list). I see all those 51 countries in my data from portfolio-classifier.py. So in that sense, it is complete.
(In theory, it could also be iShares and other asset managers who do not provide the data, as in the example from Rafa. But as the MorningStar snapshot webpage shows a list of 51 countries all with 0% for the iShares MSCI Saudia Arabia ETF, it seems plausible that this is the complete list of MorningStar.)