SimFin / simfin

Simple financial data for Python
https://simfin.com/
Other
298 stars 39 forks source link

Signals do not work with "Bank" and "Insurance" Standardisation Schema #7

Closed gardnmi closed 3 years ago

gardnmi commented 3 years ago

Description

The Signal Functions do not work with the non "General" Standardisation Schema

https://simfin.readthedocs.io/en/latest/signals.html?highlight=fin_singals

Code Example

REFRESH_DAYS = 1

income_banks_df = sf.load_income_banks(variant='ttm', market='us', refresh_days=REFRESH_DAYS)
balance_banks_df = sf.load_balance_banks(variant='ttm', market='us', refresh_days=REFRESH_DAYS)
cashflow_banks_df = sf.load_cashflow_banks(variant='ttm', market='us', refresh_days=REFRESH_DAYS)

fin_signal_bank_df = sf.fin_signals(df_income_ttm=income_banks_df,
                                df_balance_ttm=balance_banks_df,
                                df_cashflow_ttm=cashflow_banks_df,
                                **cache_args)

Result / Error

KeyError: "['Interest Expense, Net', 'Research & Development', 'Gross Profit'] not in index"

thf24 commented 3 years ago

thanks, I'll look into it this week

thf24 commented 3 years ago

should be fixed with the current release 0.8.2. To load the signals for banks use the argument banks=True in fin_signals (or insurance=True for insurances).