Hello portfolio-b2,
3/ this feature is now implemented in pp-portfolio-classifier@0.0.22 thanks to Benjamin’s contribution. Use the maxItems config option as described in the readme file.
Regards
Hello portfolio-b2,
3/ this feature is now implemented in pp-portfolio-classifier@0.0.22 thanks to Benjamin’s contribution. Use the maxItems config option as described in the readme file.
Regards
Hello Thomas,
it should be fixed in 0.0.21
let me know if you still have a problem.
Regards
Thank you @LuAp for taking the time to investigate and share your findings!
These are indeed very interesting observations that I had not identified:
The fixTotal parameter - You’re right, this parameter is currently unused in the code. I will remove it from the config files.
The separate bond/equity country exposures - This is a great catch! I was not aware that the API returned these separately. Being able to extract them individually would indeed provide more accurate classifications.
The NotClassified field in Breakdowns - This is a smart approach to correctly weight the exposures. I’ll analyze your suggestion and see if I can implement it in a configurable way.
Thank you also for providing the sample API response - this will help me better understand the data structure and test any potential changes.
I’ll analyze all these elements and see how I can incorporate them into the classifier. Your feedback is highly appreciated!
just tried it wit version 0.0.23 → works perfect! Thanks.
Hello LuAp,
I implemented the third point as you suggested by multiplying each of the Breakdown values with (1-NotClassified/100). The feature is available in release 0.0.25 but it’s not active in the default configuration. You have to enable it in your config/local.json file with:
"country": {
...
"notClassifiedField": "NotClassified",
"multigroup": true,
...
}
You can look at the example in the README file.
I think it’s an interesting feature that provides more accurate data. The point that surprises me is that when I look at the Morningstar website for LU2872292243, the country breakdown shows for example Japan at 6.38%, which is the value returned by the classifier before the implementation (releases before 0.0.25). With the new implementation, the result is different and does not reflect what is displayed on the Morningstar website. For this reason, I did not activate it in the default configuration.
I am interested in your feedback, as well as feedback from other users and the opinion of the community, to know if it should be the new default configuration.
Regards,
rylorin
@rylorin Thanks for your response. Contrary to my expectation I was able to fork your code and implement a new flag inclNotClassified that allows the user to configure the calculation to include the NotClassified bit of the API response. Check it out here:
https://github.com/LuAp-maker/pp-portfolio-classifier.
If you’re interested, I can create a pull request to merge into your code (Edit: Since I don’t know how to publish the compiled version as you did, merging into your code would be probably be most useful to other users). So far, I’ve only been using it for myself. I also added some classification mappings, but didn’t change any existing ones, so that users of those mappings shouldn’t be affected.
Hi @rylorin,
I’ve updated the script, and the local.json as in the README.md
“holding” : {
“active”: true,
“maxItems”: 100,
“name”: “Actions > Avoirs”
}
But… Everything in the config.json is consumed, except this parameter : all the holdings are back in my taxonomy and no “Console log” of Truncating to 100 items. What I’ve missed ?
Hello LuAp,
Yes please, could you submit a PR and we will see how we can manage the merge, as it won’t merge automatically.
Thanks
Hello portfolio-b2,
I’m afraid that you didn’t miss anything and my last change broke the maxItems limit.
I will have a look on how to fix this.
Stay tuned!
Regards
Hello portfolio-b2,
fixed in v0.1.0 and NotClassified feature temporarily disabled. Will reintroduce it when LuAp submit his PR.
holding enabled and limited to 100 items in default config.
Regards
Looks like web application firewall is blocking script access.
Depending on your script (haven‘t checked it) two possible ways forward come to my mind.
Maybe this could a solution:
https://thetechlogger.medium.com/how-to-solve-aws-waf-captcha-using-python-6267d9b25500
Thanks for the hints. Let me summarise the situation, because I think that it is slightly more complex:
The error message refer a “temporary” failure therefore we may expect it to work again in a few days unless this was done on purpose.
In the meanwhile I’ve implemented authentification with credentials in v0.1.2 as it seems quite easy, but I don’t have an active subscription for testing.
@LuAp I just noticed your PR, I will work on it in the next few days.
Hmm. Unfortunately, it is not as simple. I retrieved a proper token using my free Morningstar account but when I tried to use it in the script, the server replied that authorisation failed. (I read this that I am authenticated but not authorised).
Let’s hope for the best ![]()
Also “https:// global.morningstar. com/api/v1/de/search/securities” seems to be gone. The script uses it to get the mapping from isin to secid. Does anybody know an alternative?
In the long run, we might need to switch to pages like “https:// global.morningstar. com/en-eu/investments/etfs/0P0000XRVP/portfolio”, but also for those the secid (0P0000XRVP in this case for ISIN JP5841350001) would be useful.
UPDATE:
As the service is not back and as even a normal Morningstar subscription does not work with the Morningstar API, I have to assume that Morningstar does not want to offer this servcie to ordinary internet users anymore (but only to certain corporate customers). So the script doesn’t work anymore and I have added the following to the README:
pp-portfolio-classifier
DOES NOT WORK ANYMORE. MORNINGSTAR HAS DISCONTINUED THE PUBLIC SERVICES AND/OR MOVED THEM BEHIND CORPORATE SUBSCRIPTION WALLS.
Is yfinance useful (see code and output examples in following messages) ?
Thanks for the hint.
I have been looking at yfinance and yahooquery.
As far as I can see, they can provide asset allocation, sector weightings and top 10 holdings, but neither of them reliably provides ETF country and region allocations as far as I understand. Also stock style information seems to be very limited.
Therefore, I am still looking for alternatives.