ranaroussi / yfinance

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

Expense ratio for ETFs .info returns None #244

Closed aditya08 closed 1 month ago

aditya08 commented 4 years ago

'annualReportExpenseRatio' is working fine for mutual funds but not for ETFs.

Python 3.7.3 [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import yfinance as yf
>>> vti = yf.Ticker('VTI')
>>> vti.info['annualReportExpenseRatio']
>>> print(vti.info['annualReportExpenseRatio']) 
None
>>> vtsax = yf.Ticker('VTSAX')
>>> vtsax.info['annualReportExpenseRatio']
0.0004
ycc1107 commented 4 years ago

The issue code did not go to the fundProfile to find annualReportExpenseRatio.