Join GitHub today
µFunds is a Google Sheets add-on introducing all type of data for your assets (mainly mutual funds and pension plans) into your spreadsheet: last NAV and its date, currency or expenses ratio, as well as fund category, investment style and other attributes from Morningstar. By the use of a simple spreadsheet formula, the desired data can be introduced into your document for many purposes, e.g. portfolio supervision and management or investment strategies.
µFunds aims to provide relevant information for most of the assets tracked by Morningstar, especially mutual funds and pension plans, from all continents. Furthermore, sometimes it can accidentally be compatible with ETFs or stocks, but in this case we recommend using the Google Finance function over µFunds. For more information, check our Compatibility page.
How to install
Install as a Google Sheets addon (first use)
Visit the µFunds page in the Google Sheets add-on store and press the Add (+ Free) button.
A new spreadsheet will open. Give µFunds permissions to work in the spreadsheets where µFunds is called.
That's it! You can now try and use µFunds in this spreadsheet and new ones if you activate the add-on.
Activate in a spreadsheet (following uses)
In a new or existing spreadsheet, where you aim to use µFunds, navigate through the menu bar and choose Add-ons > Manage addons.
A new window will open. For µFunds, click on Manage and press Use in this document. Now you can use µFunds!
How to use
µFunds makes you able to use the
muFunds function in any cell within your spreadsheet. This function takes three arguments, so you can call it as
=muFunds(option, id [, country]) with:
option: Asset attribute that you want to import in that cell. Possible options are:
nav: Net Asset Value (NAV) or price.
change: Last NAV/price change.
currency: Asset currency, in 3-letter code.
date: Last NAV/price date.
expenses: Total Expenses Ratio (TER).
category: Fund category according to Morningstar.
id: Asset identifier. Please refer to the Compatibility page for a complete list of identifiers for each asset and country.
country(optional): compatible 2-letter code of a country in which the asset is available for sale. This forces µFunds to load a snapshot page for the defined country. In general, this argument is not needed but in certain cases it can lead to more accurate or reliable data. For more information, refer to the Detailed behavior page.
Remember to format returned values properly, especially representing percentages when using
change (last NAV/price change) or
expenses (Total Expenses Ratio) options.
How it works
Starting from the
muFunds() function call, µFunds will fetch a Morningstar quote or snapshot page and load the asked attribute of the asset from it, thanks to a rudimentary but effective tool called HTML parsing. Google Apps Script's cache may be used as an intermediate step to avoid fetching several times the same page within a small period of time.
For detailed information about how µFunds works, including all the use cases, please check the Detailed behavior page.
For µFunds developers, privacy is an important matter to care about. Fortunately, µFunds is a really simple Google Sheets addon that performs a single, well-defined task, making it really easy to explain how your privacy is respected.