jerbouma / thepassiveinvestor Goto Github PK
View Code? Open in Web Editor NEWPassive Investing for the Average Joe
Home Page: https://www.jeroenbouma.com/
License: MIT License
Passive Investing for the Average Joe
Home Page: https://www.jeroenbouma.com/
License: MIT License
Running just your demo flows...
import thepassiveinvestor as pi
etf_list = ['BOTZ', 'ROBO', 'IRBO', 'ROBT']
pi.create_ETF_report(etf_list, 'MFReport.xlsx')
--- Result --
(sf) pages % python funds.py
Not able to collect data for BOTZ
Not able to collect data for ROBO
Not able to collect data for IRBO
Not able to collect data for ROBT
Traceback (most recent call last):
File "/myproject/pages/funds.py", line 11, in
msft.info
File "/sf/lib/python3.11/site-packages/yfinance/ticker.py", line 138, in info
return self.get_info()
^^^^^^^^^^^^^^^
File "/sf/lib/python3.11/site-packages/yfinance/base.py", line 1475, in get_info
data = self._quote.info
^^^^^^^^^^^^^^^^
File "/sf/lib/python3.11/site-packages/yfinance/scrapers/quote.py", line 95, in info
self._scrape(self.proxy)
File "/sf/lib/python3.11/site-packages/yfinance/scrapers/quote.py", line 124, in _scrape
json_data = self._data.get_json_data_stores(proxy=proxy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sf/lib/python3.11/site-packages/yfinance/data.py", line 41, in wrapped
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/sf/lib/python3.11/site-packages/yfinance/data.py", line 311, in get_json_data_stores
stores = decrypt_cryptojs_aes_stores(data, keys)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sf/lib/python3.11/site-packages/yfinance/data.py", line 162, in decrypt_cryptojs_aes_stores
raise Exception("yfinance failed to decrypt Yahoo data response")
Exception: yfinance failed to decrypt Yahoo data response
Hi!
While running the code, with the required libraries, send me this error:
"Not able to collect data for V00"
The code is just the one in the description:
import thepassiveinvestor as pi
vanguard_sp500 = pi.collect_data('V00')
Much thanks in advance
Describe the error
After I entered the URL 'https://finance.yahoo.com/lookup/etf?s=developed%20markets' and click button "Create Report", I got error as follow:
The program has crashed with the following error:
[Errno 22] Invalid argument: 'Example: C:\Documents\Investing\Output\S&P500_Output.xlsx'
If the problem persists, please create an Issue with the error message on the project's GitHub page:https://github.com/JerBouma/ThePassiveInvestor/issues.
To Reproduce
Include the input (filepath and ticker url/file)
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Hi Jeroen,
There seems to be a problem with yahooquery/fc.yahoo.com that causes various applications, including your package thepassiveinvestor, to be unable to retrieve information for any ticker.
More details here: YahooQueryIssue
I personally kept getting the following error in the beginning:
ConnectionError: HTTPSConnectionPool(host= fc.yahoo.com , port=443): Max retries exceeded with url: / (Caused by ReadTimeoutError( HTTPSConnectionPool(host= fc.yahoo.com , port=443): Read timed out. (read timeout=5) ))
And then I tried to follow some of the suggested solutions (I am based in Europe/Germany) but none worked for me.
I also tried with different versions of yahooquery (the one I got when installing your package was 2.3.3, but what the posts recommended were more recent ones - 2.3.5 or 2.3.7 - but also none of those worked).
Now I am getting from thepassiveinvestor package this error: see the attached pic.
I was wondering if you have an idea how this can be fixed.
Thanks in advance.
Kind regards,
Niko
pi.create_ETF_report(['VOO'], 'Popular ETFs.xlsx')
D:\code\pycash\venv\Lib\site-packages\yahooquery\utils_init_.py:1470: FutureWarning: 'S' is deprecated and will be removed in a future version. Please use 's' instead of 'S'.
has_live_indice = index_utc[-1] >= last_trade - pd.Timedelta(2, "S")
D:\code\pycash\venv\Lib\site-packages\yahooquery\ticker.py:1333: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
df["dividends"].fillna(0, inplace=True)
Traceback (most recent call last):
File "C:\Users\cohend\AppData\Local\JetBrains\PyCharm Community Edition 2023.1.1\plugins\python-ce\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
^^^^^^
File "", line 1, in
File "D:\code\pycash\venv\Lib\site-packages\thepassiveinvestor\create_report.py", line 49, in create_ETF_report
stock_data.index = pd.to_datetime(stock_data.index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\code\pycash\venv\Lib\site-packages\pandas\core\tools\datetimes.py", line 1076, in to_datetime
result = convert_listlike(arg, format, name=arg.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\code\pycash\venv\Lib\site-packages\pandas\core\tools\datetimes.py", line 435, in _convert_listlike_datetimes
result, tz_parsed = objects_to_datetime64(
^^^^^^^^^^^^^^^^^^^^^^
File "D:\code\pycash\venv\Lib\site-packages\pandas\core\arrays\datetimes.py", line 2398, in objects_to_datetime64
result, tz_parsed = tslib.array_to_datetime(
^^^^^^^^^^^^^^^^^^^^^^^^
File "tslib.pyx", line 414, in pandas._libs.tslib.array_to_datetime
File "tslib.pyx", line 630, in pandas._libs.tslib.array_to_datetime
ValueError: Cannot mix tz-aware with tz-naive values
The program has crashed with the following error:
Excel does not support timezones in datetimes. The tzinfo in the datetime/time object must be set to None.
If the problem persists, please create an Issue with the error message on the project's GitHub page:https://github.com/JerBouma/ThePassiveInvestor/issues.
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.