ranaroussi / yfinance

Download market data from Yahoo! Finance's API
https://aroussi.com/post/python-yahoo-finance
Apache License 2.0
14.9k stars 2.44k forks source link

"Loss Adjustment Expense" not pulled as part of Income Statement #1961

Closed rhwvu closed 5 months ago

rhwvu commented 5 months ago

With some insurance companies, their biggest expenses are listed as "Loss Adjustment Expense" which is not pulled at all by income_stmt. Using ELV as an example, you can see above that it's not pulled at all, and neither is "Net Policyholder Benefits And Claims" which is a subexpense of it on Yahoo Finance and would work the same.

I'm trying to pull the expenses from Yahoo Finance, but pulling the Total Expenses is not helpful for me because ELV includes Depreciation & Amortization under that and I specifically don't want that included.

Here's a link to the Yahoo Finance page: https://finance.yahoo.com/quote/ELV/financials/


ticker_object = yf.Ticker('ELV')
inc = ticker_object.income_stmt
print(bal)
input("...")
ValueRaider commented 5 months ago

Is the data you want anywhere on website? yfinance can only fetch what's there.

rhwvu commented 5 months ago

Yes. At the link I put in the first post, under "Total Expenses", here's the exact thing I'd want to pull: image

ValueRaider commented 5 months ago

Solution will involve https://github.com/ranaroussi/yfinance/blob/main/yfinance/const.py

rhwvu commented 5 months ago

The merged issue fixes this. I manually edited my pip package to add this fix since it's not in the release yet. Thanks.