yfinance icon indicating copy to clipboard operation
yfinance copied to clipboard

For ETFs & Mutual Funds, add fundProfile & fundPerformance details

Open thirumalairajr opened this issue 2 years ago • 11 comments

Hi,

This change will add support for showing fundProfile & fundPerformance of ETFs and Mutual Funds.

fundProfile will add support for useful fields like

  • family
  • categoryName
  • brokerages
  • managementInfo
  • feesExpensesInvestment
  • feesExpensesInvestmentCat

fundPerfomance will add support for useful fields like

  • trailingReturns
  • trailingReturnsCat
  • trailingReturnsNav
  • performanceOverview
  • performanceOverviewCat
  • riskOverviewStatistics
  • riskOverviewStatisticsCat
  • rankInCategory
  • loadAdjustedReturns
  • pastQuarterlyReturns
  • annualTotalReturns
  • returnsCat

thirumalairajr avatar Nov 10 '22 13:11 thirumalairajr

This is fine, but we have temporarily frozen dev branch for new features while @fredrik-corneliusson refactors base.py (work in progress). We expect to unfreeze with a week.

ValueRaider avatar Nov 10 '22 20:11 ValueRaider

Sure that works !!

thirumalairajr avatar Nov 11 '22 11:11 thirumalairajr

dev is open now, so when you handle the conflict I can merge. Conflict caused by recent major refactor so be careful.

ValueRaider avatar Nov 17 '22 14:11 ValueRaider

@thirumalairajr The changes should now go into this file: https://github.com/ranaroussi/yfinance/blob/dev/yfinance/scrapers/quote.py#L99

fredrik-corneliusson avatar Nov 17 '22 15:11 fredrik-corneliusson

@fredrik-corneliusson Sure I will make the changes

thirumalairajr avatar Nov 21 '22 11:11 thirumalairajr

@ValueRaider I have resolved the merge conflicts.

thirumalairajr avatar Nov 21 '22 11:11 thirumalairajr

Code is fine. I've examined info[] for first time and see some new entries are time-series data - trailingReturns, annualTotalReturns, pastQuarterlyReturns. These should go in a Pandas table, can you implement that?

An alternative is blacklist those keys with a comment and someone else implement in future. And maybe just add most recent value of each.

ValueRaider avatar Nov 21 '22 14:11 ValueRaider

@ValueRaider I can implement the pandas way as I see value in that approach. Adding only the recent value of each might not be useful as this data is consumed with history.

But I don't think trailingReturns is a time-series data , the access pattern for this would be mostly key-based lookup for getting 10 year , 5 year returns etc.,

I can create annual_total_returns, past_quarterly_returns functions to return annualTotalReturns & pastQuarterlyReturns data as dataframe. Shall I start working on it?

thirumalairajr avatar Nov 22 '22 13:11 thirumalairajr

Ah you're right on trailingReturns, I must have got mixed up.

Go ahead with Pandas.

ValueRaider avatar Nov 22 '22 15:11 ValueRaider

Abandoned. Anyone want to take over and finish?

ValueRaider avatar Mar 12 '24 22:03 ValueRaider