-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Try to convert Currency when eod and statement are same currency #150
Comments
Any ideas on how to facilitate the caching? I'll fix this somewhere in the upcoming weeks. |
Issue has been resolved! It will now only collect data on currency tickers that hold actual exchange rate data (and is not simply 1). |
I have a bad feeling you have unintentionally broke the data download. I cannot download almost any data now, which I could few hours back and this error apears. Or the change is so recent, that the data are not yet available for the exchange rate conversion. But all the downloads show critical error on exchange data download, which I think was not present previously and I expect it to be added as new related to this issue. Or there is somewhere new input variable for the exchange rate setting I am missing. Obtaining cashflow data: 100%|██████████| 1/1 [00:00<00:00, 9.62it/s]
|
Oops, I'll have a look today. Can you share your code? |
Hi @adahan, this issue should now be resolved. The issue was that in the case that no ticker was a different currency (e.g. TSLA, AAPL and AMZN) it would try to collect data with an empty ticker list. This has now been resolved to automatically fill an empty object which is not used further on. Let me know if you still run into issues. See 280f773 |
Hi Jeroen, Jakub here again. I see you changed the code. But new error arises. The code I am trying is this, but it is essentially same for all downloads.
The results is this
I was able to bypass it by commenting the section where the return historical_data.xs(self._currencies[0], level=1, axis="columns") is because I do not need it. I did not have time to examine closer but I expect that when you have only 1 exhange rate, the dataframe is not Multiindex and thus raising the error. My guess is the condition should be > 1 but I am not sure to be honest. |
Seems to break because of |
Works perfectly, thank you very much for fix and thanks for your work and the whole package, it's tremendous piece of work. Have a good day. |
What's the feature that should be improved?
Downloading a statement will try to convert the statements to market data currency. But when those currency are equal this is not needed resulting in additional waste of call to try to download fx
Describe how you would like the feature improved
Toolkit should check if those currency are equal and try to convert only if needed. Idealy fx should be cached so its not redownloaded everytime
Possibly describe the ideal way to improve this
Check if currency are different before converting
Additional information
Check could be done line 113 in helper.py on determine currencies function
The text was updated successfully, but these errors were encountered: