Skip to content

Commit

Permalink
added annualNetExpenseRatio to ticker.info
Browse files Browse the repository at this point in the history
updated base.py ticker to accommodate mutual funds and ETFs to show annualNetExpenseRatio in ticker.info
  • Loading branch information
ChNgineer committed Dec 9, 2023
1 parent c60e590 commit 2fd1349
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions yfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1751,6 +1751,12 @@ def get_mutualfund_holders(self, proxy=None, as_dict=False):
def get_info(self, proxy=None) -> dict:
self._quote.proxy = proxy or self.proxy
data = self._quote.info
try:
holders = self.get_institutional_holders()
expenseRatio = holders[holders[0] == 'Expense Ratio (net)'][1].values[0]
data['annualNetExpenseRatio'] = expenseRatio
except Exception:
pass
return data

def get_fast_info(self, proxy=None):
Expand Down

0 comments on commit 2fd1349

Please sign in to comment.