Mutual Fund Portfolio Tracker using MS Excel
Would you like to spend next 5 minutes learning how to create an excel sheet to track your mutual fund portfolio?
NOTE: File updated on 7-FEB-2012 to fix errors. Download again if you need to.
We will use 2 simple excel features to achieve this – web queries and vlookup()
[click here to learn more about web queries in excel]
- First, lets put a tabular format for our portfolio: We can have fund name, # of units, purchase NAV (Net Asset Value, the cost of unit for your when you bought it), purchase date, total value at purchase (units * purchase NAV), current NAV (we will pull this data from internet), value as of now (units * current NAV), Profit / loss amount and profit / loss % as our table columns. Once you learn how to do this, you can add more columns depending on what / how you want to track your MF portfolio.When you finish creating the table, it would look something like this:
- Next, we will use web-queries to load the fund-names and the corresponding latest NAVs in a separate sheet. I have queried Association of Mutual Funds India [AMFI] – Latest Mutual fund NAV page since all my investments are in India. If you are in US or some other country you can query corresponding fund house / financial info aggregator sites (like google finance) to get the data. Remember to set “Refresh data on file open” on to get fresh data whenever you open the your tracker excel sheet.Since AMFI returns data in a text file with ; as delimiter, I had to parse the fund names and navs out of it using a combination of search(), left() and mid(). I will not get in to the details of how its done since you may have to process your data differently depending on source.Finally when the processing is done, we will have a table in the second sheet with all fund names and latest navs.
- Now, all we have to do is create lookup formulas (well just vlookup()) to get the latest NAV to our tracker table based on the entered fund name.
- Assuming the fund name in which you invested is in cell “c1”,
- Assuming the fund data is in table “sheet1!c1:d6000” with “column c” containing the fund name and “column d” containing latest NAV,
The formula for latest NAV can look like this:
Remember to use false for last parameter since fund names may not be sorted in alphabetical order on your source web page.
Now we will repeat this formula for all the rows in latest nav column. I have built my portfolio tracker to track 20 funds at a time. Also, you can simplify formulas using named ranges.
- Finally we will write formulas for,current value = latest nav * units held
profit/loss = current value – purchase value
profit/loss % = “profit/loss” / purchase valueYou can add some conditional formatting to beautify the table (like turning text blue for profits and red for losses etc.)
- Thats all, you have now created a real-time mf portfolio tracker. It would look something like this when done:
You can do the same for stock portfolios, commodities etc. You just need a web source that gives you latest data and five minutes of free time
Feel free to Download the mutual fund portfolio tracker excel workbook now.
Few ideas on how you can enhance this:
- Add graphs to see visually how the funds are doing
- Build some VBA to store previous NAV values of your funds so that you can see historical dates
- Instead of doing plain % of profit / loss, compute realistic growth of your funds using date of purchase, risk free rate of return etc.
Do you want to be awesome in Excel?
Here is a smart way to become awesome in Excel. Just signup for my Excel newsletter. Every week you will receive an Excel tip, tutorial, template or example delivered to your inbox. What more, as a joining bonus, I am giving away a 25 page eBook containing 95 Excel tips & tricks. Please sign-up below:
Your email address is safe with us. Our policies
More awesome tips for you:
Leave a Reply
|Do not disturb : I am scheduling a meeting||Create Cool Tag Clouds in Excel using VBA|