fbuchinger / etf-classification-pp Goto Github PK
View Code? Open in Web Editor NEWautomatic classification of ETFs in Portfolio Performance using holding lists
automatic classification of ETFs in Portfolio Performance using holding lists
I am german but I´ll do my best to describe my issues. In addition to that, this is my first time trying out a script on github and even using python and gitbash.
After installing gitbash cloning the repository worked well.
The next step was to
"
2. in the install directory run pip3 -r requirements.txt
"
I struggled with the command, because the output in my terminal was:
"
C:\Users\Me\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -m pip [options]
no such option: -r
"
After some hours of search i found this page https://www.codegrepper.com/code-examples/shell/pip3+install+requirements.txt and it might have worked with the following comand and the following output:
"
pip3 install -r requirements.txt
Collecting Jinja2==2.11.2
Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
|████████████████████████████████| 125 kB 3.3 MB/s
Collecting requests==2.24.0
Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
|████████████████████████████████| 61 kB 168 kB/s
Collecting requests-cache==0.5.2
Downloading requests_cache-0.5.2-py2.py3-none-any.whl (22 kB)
Collecting MarkupSafe>=0.23
Downloading MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl (14 kB)
Collecting chardet<4,>=3.0.2
Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
|████████████████████████████████| 133 kB 6.4 MB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Downloading urllib3-1.25.11-py2.py3-none-any.whl (127 kB)
|████████████████████████████████| 127 kB ...
Collecting certifi>=2017.4.17
Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
|████████████████████████████████| 145 kB 6.4 MB/s
Collecting idna<3,>=2.5
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
|████████████████████████████████| 58 kB 4.1 MB/s
Installing collected packages: urllib3, idna, chardet, certifi, requests, MarkupSafe, requests-cache, Jinja2
WARNING: The script chardetect.exe is installed in 'C:\Users\Me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed Jinja2-2.11.2 MarkupSafe-2.0.1 certifi-2021.5.30 chardet-3.0.4 idna-2.10 requests-2.24.0 requests-cache-0.5.2 urllib3-1.25.11
"
As you can see, there was a warning but since I absolutely have no clue what kind of errors will results i ignored that warning.
In the following i was able to open the file "multifaktortest.xml" in portfolio perfomance and several ETF´s had the link of an csv from the page of ishares.com as the attribut called "Anbieter".
After running the command
"
python etf-classifier.py test/multifaktortest.xml > classified.xml
"
the file "classified" as an .xml will show up in here
"
C:\Users\Me\etf-classification-pp
"
If I open this file in PortfolioPerformane i get the issue which you can see in the linked picture of this "new issue".
To try this with my .xml copy of my own portfolio i did the following:
I created a random path and named PP.xml to
"
C:\Users\Me\Downloads\PortfolioEdit\classified.pp.xml
"
than i entered this to my terminal
"
python etf-classifier.py C:\Users\Me\Downloads\PortfolioEdit > classified.pp.xml
"
the output is
"
C:\Users\Me\etf-classification-pp>python etf-classifier.py C:\Users\Me\Downloads\PortfolioEdit > classified.pp.xml
Traceback (most recent call last):
File "C:\Users\Me\etf-classification-pp\etf-classifier.py", line 381, in
pp_file = PortfolioPerformanceFile(args.input_file)
File "C:\Users\Me\etf-classification-pp\etf-classifier.py", line 224, in init
self.pp_tree = ET.parse(filepath)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\xml\etree\ElementTree.py", line 1229, in parse
tree.parse(source, parser)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\xml\etree\ElementTree.py", line 569, in parse
source = open(source, "rb")
PermissionError: [Errno 13] Permission denied: 'C:\Users\Me\Downloads\PortfolioEdit'
"
If I open the new classified.pp.xml the following error will show up in PortfolioPerformance
In any case, I am very thankfull for your effort.
To reasure u, I bought only 3 ETF´s and they are all from Ishares like ishares-msci-world-ucits-etf-acc-fund IE00B4L5Y983
so the link i added for the attribut "Anbieter" was :
https://www.ishares.com/de/privatanleger/de/produkte/251882/ishares-msci-world-ucits-etf-acc-fund/1478358465952.ajax?fileType=csv&fileName=EUNL_holdings&dataType=fund
I did this for all three ETF´s.
Thank you for reading.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.