Introduction

For this tutorial I have selected the following two Mutual funds:
  1. IndiaFirst Education Plan - Equity Fund

    Data Downloaded from: http://www.indiafirstlife.com/IFL-FundInformation/displayNavHistory

  2. Axis Long Term Equity Fund - Direct Growth

    Data Downloaded from: http://www.bluechipindia.co.in/MutualFund/MFInner.aspx?id=2

I have uploaded the files onto my website from where these can be downloaded directly.

I also have cleaned and converted these files into workable formats so that You do not
have to waste time in doing so.

Load all the Necessary Libraries

library(lubridate)
library(ggplot2)
library(grid)

Download Data Sets and Prepare for Analysis

# Reading Axis Mutual Fund
AXISNAV <- read.csv("http://idatasciencer.com/files/AXISNAV1.csv", header=F)
# Give names to the columns
names(AXISNAV) <- c("Date", "NAV")
# Change the Dates as Date type
AXISNAV$Date <- ymd(AXISNAV$Date)
str(AXISNAV)
## 'data.frame':    562 obs. of  2 variables:
##  $ Date: POSIXct, format: "2013-01-01" "2013-01-02" ...
##  $ NAV : num  14.9 15 15.1 15.1 15.1 ...
# Reading IndiaFirst Mutual Fund
NAV  <- read.csv("http://idatasciencer.com/files/NAV1.csv", header = F)
# Give names to the columns
names(NAV) <- c("Date", "NAV")
# Change the Dates as Date type
NAV$Date <- ymd(NAV$Date)
# View Structure of this dataset
str(NAV)
## 'data.frame':    1316 obs. of  2 variables:
##  $ Date: POSIXct, format: "2009-11-18" "2009-11-19" ...
##  $ NAV : num  10 10 10 10 10 ...

Plotting the NAVs for both the Funds

p <- ggplot(AXISNAV, aes(x = Date, y = NAV))
p + geom_line(col="red", linetype = 1) + 
  ggtitle("NAV of Axis Long Term Equity Growth Fund") + 
  xlab("Trading Dates") +
  ylab("Net Asset Value") +
  theme(plot.title = element_text(lineheight=.8, face="bold"))

q <- ggplot(NAV, aes(x = Date, y = NAV))
q + geom_line(col="blue", linetype = 1)+ 
  ggtitle("NAV of IndiaFirst Equity Fund") + 
  xlab("Trading Dates") +
  ylab("Net Asset Value") +
  theme(plot.title = element_text(lineheight=.8, face="bold"))