Add Annual Net Expense Ratio to Ticker Info #1769
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checks for existence of 'Expense Ratio (net)' of mutual funds and ETF tickers and adds metric retroactively to
Ticker.info
attribute throughTickerBase.get_info()
method as'annualNetExpenseRatio'
as requested and resolves #801.Change uses
TickerBase.get_institutional_holders()
which returns a dictionary with row info['Net Assets', 'NAV', 'PE Ratio (TTM)', 'Yield', 'YTD Daily Total Return', 'Beta (5Y Monthly)', 'Expense Ratio (net)', 'Inception Date']
for mutual funds and ETF tickers.This may be a bug, as these dictionary contents have nothing to do with institutional holders of mutual funds and ETFs as they do not have any listed under Holdings. These stats are located on the summary page of mutual funds and ETFs on finance.yahoo.com see Vanguard 500 Index Fund (VOO) as example, Holdings tab of mutual funds and ETFs show Overall Portfolio Composition (%), Sector Weightings (%), Equity Holdings, Bond Ratings, and Top 9 Holdings.
From testing it shows that
TickerBase
class methodsget_major_holders()
returns information from the first column of the summary page andget_institutional_holders()
returns information from the second column of the summary page for mutual funds and ETFs.This is a temporary fix, but further action will likely require a code refactor of considerable scale.