Mutual funds are a popular investment vehicle and staying updated with the latest Net Asset Values (NAVs) is crucial
for investors to make informed decisions. One of the most efficient ways to track these values is by importing them
directly into Google Sheets, which allows for real-time updates and easy analysis. In this blog post, I'll guide you
through the process of importing the latest NAV of mutual funds from the Association of Mutual Funds in India
(AMFIndia.com) and displaying them in Google Sheets to use the data for various calculations.
![]() |
Mutual Funds latest NAV report |
If you don't want to go through the hassle of going through this article, I have provided a link to a sample Google Sheets file which you can save for yourself and start using.
Why Use Google Sheets for Tracking NAVs?
Google Sheets offers several advantages for tracking mutual fund NAVs:
- Real-time Updates: Google Sheets can automatically update data, ensuring you always have the latest information.
- Accessibility: Being a cloud-based platform, you can access your data from anywhere.
- Ease of Use: Google Sheets' user-friendly interface and powerful functions make data manipulation and analysis straightforward.
- Collaboration: Multiple users can view and edit the sheet simultaneously, making it ideal for collaborative work.
Open-Ended and Close-Ended Mutual Funds
Step-by-step Guide
Step 1: Accessing AMFIndia.com
Firstly, you need to understand where and how to access the mutual fund NAV data on the AMFIndia website. AMFIndia.com typically provides NAV data in a downloadable format directly from the web site
- Visit the AMFIndia Website (amfindia.com) using your favorite web browser and find the Download NAV link at the bottom of the page
AMFIndia Website homepage
- The NAV data for "open-ended" and "close-ended" mutual funds are available as separate links like indicated with red boxes in the screenshot below. The data inside the links are structured in the same format as a flat file with semi-colon separated values
Latest NAV links
- The link to open-ended mutual fund schemes typically looks like https://www.amfiindia.com/spages/NAVOpen.txt and a sample content is shown in the image below
Open-ended schemes data
- The link to close-ended mutual fund schemes typically looks like https://www.amfiindia.com/spages/NAVClose.txt and a sample content is shown in the image below
Close-ended schemes data
- As of this writing, access to the AMFI data is available free of cost to all
Step 2: Importing the Data into Google Sheets
To automate fetching the latest NAV data, we will use Google Sheets’ IMPORTDATA formula which can be used to seamlessly import and parse properly structured .csv (comma-separated value) or .tsv (tab-separated value) data from a URL. Here in our case, the data is not comma separated and there are some additional complexities which we will address later. For now, our objective is to get the full data inserted into our spreadsheet. For the sake of simplicity, here I will demonstrate with only the open-ended mutual fund data. The close-ended data URL can be imported and parsed following the same guidelines.
- Go to Google Sheets and create a new spreadsheet
- In a cell, like B2, enter the URL for the open-ended schemes' data https://www.amfiindia.com/spages/NAVOpen.txt
- Next, in the cell from where you want the data import to begin, like A3, use the IMPORTDATA formula. This will import all content from the link into the spreadsheet
- Next you can parse and display the data into structured cells in the sheet
Step 3: Parsing the Data in Google Sheets
=IF(C9="","",F9+LEN(G9)+1)
In cell I9, use the following formula to extract the value for Scheme Name:
=IF(C9="","",MID(CONCAT(A9,B9),H9+1,SEARCH(";",CONCAT(A9,B9),H9+1)-H9-1))
In cell J9, calculate and store the offset from where the search for the next field should start from:
=IF(C9="","",H9+LEN(I9)+1)
In cell K9, use the following formula to extract the value for NAV:
=IF(C9="","",MID(CONCAT(A9,B9),J9+1,SEARCH(";",CONCAT(A9,B9),J9+1)-J9-1))
In cell L9, calculate and store the offset from where the search for the next field should start from:
=IF(C9="","",J9+LEN(K9)+1)
In cell K9, use the following formula to extract the value for the date:
=IF(C9="","",MID(CONCAT(A9,B9),L9+1,LEN(CONCAT(A9,B9))-L9))
At this point you should see all the fields for the first scheme parsed neatly into columns. Use you favorite method to fill the rows below to parse all rows. The data will automatically get updated whenever you reopen the spreadsheet.
Additional Tips for Formatting Data
Now that you have the basic structure ready, you can name your header columns like you wish. To make your data more readable, you can apply formatting options:
Headers: Bold the header row.
Column Widths: Adjust the column widths to fit the content.
Conditional Formatting: Use conditional formatting to highlight important values.
Hide Columns: Hide the columns that you don't want to see, for example the columns where you calculated the offsets.
Here is how I made my final version look:
Application
You can apply this data in various creative ways, like the bumping the NAVs of your purchases against the current NAV and finding out your profitability using advanced formulas like VLOOKUP.
Conclusion
Tracking the latest NAV of mutual funds is essential for investors, and Google Sheets provides an excellent platform for doing so. By importing data from AMFIndia.com, you can ensure that you always have the most up-to-date information at your fingertips.
You can grab a copy of the spreadsheet from this link.
With this guide, you should be well-equipped to set up your own system for importing and displaying mutual fund NAVs in Google Sheets. Happy investing!
Troubleshooting Tips
Web access Issues: Ensure that the website data endpoint is accessible. Check for any authentication
requirements. At the time of this writing the data is available free and requires no additional authentication.
Data Formatting: If the imported data doesn't look right, double-check the structure of the data and adjust your formulas accordingly.
By following these steps, you'll have a powerful tool to keep track of mutual fund NAVs, helping you stay on top of your investments with ease.
About AMFIndia
Association of Mutual Funds in India, abbreviated as AMFI, is the association of all the asset management companies of SEBI registered mutual funds in India. [Wikipedia]
Note: This is not a financial advice, and I am not a financial advisor. Mutual funds appearing in the illustrations in this article is for representational purposes only and are not recommendations.
No comments:
Post a Comment