joseballester / muFunds

µFunds lets you import your asset data from Morningstar and other sources to your Google Sheets spreadsheet by using a simple formula.
https://mufunds.com
81 stars 11 forks source link

Support for retrieval of closing price from stocks/ETFs #5

Closed ruippeixotog closed 5 years ago

ruippeixotog commented 5 years ago

I understand that this project is targeted at funds, but is there any plans to support the closing price of a stock/ETF? Google Finance does not have the same coverage as Morningstar; ETFs such as IE00B4L5Y983 don't exist in Google Finance, but they do not have a NAV either.

Would it be very difficult to support this? From what I understood this plugin is based on HTML scraping, so wouldn't it suffice to add a new function for extracting a different attribute?

joseballester commented 5 years ago

Hi @ruippeixotog! Thank you for your comments and sorry for the delay.

µFunds is compatible with any asset available in Morningstar (or other sources as we add them). Sometimes these assets may not work with the Morningstar generic mode, but another option is trying to parse a Morningstar country-specific page (more info here), such as the one you linked.

In fact, if you try to get the data for your fund from Morningstar UK, it works. It's important to note that the same ETF is listed in several markets (check it out here), so the ISIN doesn't uniquely identify the asset and market you want, and it may result in unexpected changes in the currency.

Therefore, I would suggest using the Morningstar ID (for your link, 0P0000N5XS refers to the ETF listed in the MSE) and the Morningstar UK country-specific mode, using the formula =muFunds("nav", "0P0000N5XS", "morningstar-gb"). Let me know if it works!

ruippeixotog commented 5 years ago

Thank you for the response! At the time I ended up fetching the data using the Morningstar ID as you mentioned.