Mutual Funds Analysis wiki

Meaning of a point in various graphs that are plotted


These descriptions below assume that you have a basic understanding of returns and XIRR beforehand.
Investment duration of 3 yrs is taken for all examples.
p is the value of the point on 10-Jan-2023.
Below is the meaning of p for all graphs.

Sip Rolling Returns (XIRR %):

You invested x amount on each of: 10-Jan-2020, 10-Feb-2020, 20-Mar-2020....until 10-Dec-2022
Totally making 12*3 = 36 investments
x can be anything, but the same amount x is invested everytime.
p is the XIRR return percentage of your investment.
So this graph will show you all possible returns(XIRR) this fund generated, if you did a 3 yr SIP.
That is the meaning of rolling returns - a graph where all points are return values.

Sip Rolling Absolute Value (₹):

You invested x amount on each of: 10-Jan-2020, 10-Feb-2020, 20-Mar-2020....until 10-Dec-2022
x is what you input in the text box as monthly SIP amount.
Totally making 12*3 = 36 investments
p is the current value(₹) of your investment
So this graph will show you all possible absolute returns(₹) this fund generated, if you did a 3 yr SIP anytime.
This graph can tell you all possible final investment values this fund had generated in the past, if you do a blind SIP of say ₹10,000 in this fund.

Lumpsum Rolling Returns (CAGR %):

You invested x amount on 10-Jan-2020.
x can be anything.
p is the yearly return(%) of you investment

Lumpsum Rolling Absolute Value (₹):

You invested x amount on 10-Jan-2020.
x is what you input in the text box as the lumpsum amount.
p is the current value(₹) of your investment

Standard Deviation Rolling Annualized Monthly (Risk) (%):

We take all the monthly returns for all the dates from 10-Jan-2020 to 10-Jan-2023.
(Monthly return of 10-Jan-2023 is the return percentage of the same date compared to 10-Dec-2022)
p is the standard deviation of these monthly returns, multiplied by sqrt(12) to make it annualized.(Why?)
This is a measure of how much the returns fluctuated, which is a measure of risk.

Where is data sourced from


Index

Currently there are no sources in India which provides historical index data through API.
I manually download from https://www.niftyindices.com/reports/historical-data using a python script and upload into another repo.
I will try to update this every few months.
In case you need newer data for indices, consider using the corresponding index funds(keep in mind tracking errors).

Mutual funds

Every time you choose a fund, live data is fetched from mfapi.in
This data is always up-to-date.

How are the calculations done


There are no backend servers to this site, nothing leaves your browser.
Once you select a mutual fund or index, XIRR is calculated for all the supported investment durations (currently 1, 3, 5, 10 years), for both lumpsum and SIP investments.
(Nifty 50 index data is available from 1999, for all durations with Lumpsum and SIP rolling XIRR calcs -> a total of around 60,000 XIRR values need to be calculated)
Given the nav data - this takes around 2 mins for one fund/index, as the xirr calculations are time taking.
Which is too much to wait for a graph to load, also the browser will freeze as all the calculations will be done on your device.
To avoid this, a set of precalculated values for XIRR are stored in the website which avoids xirr calc on your device, hence skipping the 2 mins.
The size of the precalculated values is around 3MB, which is loaded to the page itself.
Everytime you open/refresh the site this 3MB is loaded again.

Calculating rolling standard deviation is also a CPU intensive time taking operation.
So the variance is calculated in a rolling fashion, based on this implementation.

Known Issues


All the logic is in the js files.
Browsers cache the js files, so when some js file contents are changed, the js files are not reloaded sometimes.
Hard refresh the page to reload the js files.