Closed LucaColombi closed 6 months ago
Hi! Thank you for reporting this.
Unfortunately it is quite complicated to track the individual currency changes of a company given that data sources tend to auto adjust for past prices based on the current currency.
For example ASML has been listed since 1995 and is reported in Euro even though the Euro itself came into existence in 1999. This means that if you would use a financial statement of 1995 denominated in Dutch's Gulden it wouldn't match up with the historical data and you couldn't convert it to Euro given there is no historical data available.
For the time being it would work to split up the collection of data before 2000 and after 2000 so that a subset has its currency converted and the other subset has not and pay extra attention to data before 2000. This will also remain a tricky area even in the financial industry itself.
hello,
that workaround work just for EU financial statements, but for SONY or PBR or other doesnt work at all
the system break requesting older data with auto currency translation enabled
an important deatil I omitted, this happens requesting data from FMP
but, this also give a solution because FMP gives explicit data about currency of each single statement:
https://site.financialmodelingprep.com/developer/docs#balance-sheet-statements-financial-statements
[
{
"date": "2022-09-24",
"symbol": "AAPL",
"reportedCurrency": "USD",
"cik": "0000320193",
could you just copy that column reportedCurrency in the dataframe as is? I can retrieve currency data apart and do all the other workaround
Users in my situation can disable the auto conversion and handle it manually with just this column added, also could be useful for users to know the original financial statement currency
hello,
that workaround work just for EU financial statements, but for SONY or PBR or other doesnt work at all
the system break requesting older data with auto currency translation enabled
an important deatil I omitted, this happens requesting data from FMP
but, this also give a solution because FMP gives explicit data about currency of each single statement:
https://site.financialmodelingprep.com/developer/docs#balance-sheet-statements-financial-statements
[ { "date": "2022-09-24", "symbol": "AAPL", "reportedCurrency": "USD", "cik": "0000320193",
could you just copy that column reportedCurrency in the dataframe as is? I can retrieve currency data apart and do all the other workaround
Users in my situation can disable the auto conversion and handle it manually with just this column added, also could be useful for users to know the original financial statement currency
Hi @LucaColombi,
I actually collect this information automatically through get_statistics_statement
. You could have a look if this works for you. See: https://www.jeroenbouma.com/projects/financetoolkit/docs#get_statistics_statement
I'll most likely build in a warning when currency transformation fails given that it should work fine for most companies after 2000.
Please let me know if this helps and what you come up with.
Hi @LucaColombi,
I wasn't able to grab my laptop for a while but I was looking into this and everything seems to work fine from my side. Are you on the latest release (v1.8.5) and are you on a Premium FMP plan?
For example this is SONY with convert_currency=True
:
When I look at ASML, this also works just fine:
And the Statistics Statement for both:
Unless you experience different results, this issue seems to be resolved.
hello,
upgraded from 1.8.4 to 1.8.5
seems to work, by curiosity what changed from .4 to .5? I installed it just one month ago and it downloaded the .4 automatically
also, could I ask for 1 detail? in FMP the statement currency is declared statement by statement, so when the library converts currency, do it uses the single statement currency, or always the same last anagraphical currency for the stock? because non US stock could have changed the currency in the time and using the last one could false older report, just want to be sure
I keep track of my releases in the "Releases" section, see: https://github.com/JerBouma/FinanceToolkit/releases/tag/v1.8.5
Regarding your comment. It matches the currency per year that is in the Statistics Statement. However, this tends to be the same currency most of the time and in some cases, the financial statements are already translated to USD (or EUR in the case of ASML).
What's the feature that should be improved? When I donwload data from an old ticker (for instance PBR or SONY) from a very old time (for instance, 1970-01-01) it gives error if I left the convert_currency to True.
My hipotesys, is that there are not currency data older enough to cover such old report data, and this case is unhandled from the system.
This case is quite frequent, for instance all EU stock before 2000 would fall in it.
Moreover, is not a bug but an appreciable feature, I'd like to know which currency is the data in the dataframe, that actually is hidden and could change in the years so cannot be simply deducted from the ticker current data
Describe how you would like the feature improved A simpler but effective solution for both the problems would be add a column in the dataframe indicating the values currency, such that:
Possibly describe the ideal way to improve this A more sophisticated approach could be give the user some option about what to do when some data row currency cannot be converted, for instance a parameter currency_convertion_strategy with options:
Additional information Here the error stack for SONY from 1970-01-01 with convert_currency=True