#PROJECT-4: Mutual Fund(Indian) Performance based on Five Key Indicators

knitr::opts_chunk$set(root.dir = "C:/Users/rsman/Documents/PERS FOLDERS/RAJDEEP/INVESTMENTS/ANALYSIS/DATA")
library(lubridate)
library(stringr)
library(pander)
library(data.table)
library(xlsx)
library(dplyr)
library(scales)
library(ggplot2)
library(Quandl)
library(tabulizer)
library(knitr)
library(kableExtra)
library(formattable)
library(DT)
library(rio)
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(root.dir = "C:/Users/rsman/Documents/PERS FOLDERS/RAJDEEP/INVESTMENTS/ANALYSIS/DATA")
getwd()

[1] “C:/Users/rsman/Documents/PERS FOLDERS/RAJDEEP/INVESTMENTS/ANALYSIS/DATA”

###Functions
colFmt1 = function(x,color){
  outputFormat = knitr::opts_knit$get("rmarkdown.pandoc.to")
  if(outputFormat == 'latex')
    paste("\\textcolor{",color,"}{",x,"}",sep="")
  else if(outputFormat == 'html')
    paste("<font color='",color,"'>",x,"</font>",sep="")
  else
    x
}

colFmt = function(x,color){
  outputFormat = knitr::opts_knit$get("rmarkdown.pandoc.to")
  if(outputFormat == 'html')
    paste("<font color='",color,"'>",x,"</font>",sep="")
  else
    x
}

makeCharac <- function(rx.vr){
  new.vr <- as.character(rx.vr)
  return(new.vr)
}

makeNumeric <- function(rx.vr){
  new.vr <- as.numeric(rx.vr)
  return(new.vr)
}


###End Functions

CWD <- "C:/Users/rsman/Documents/PERS FOLDERS/RAJDEEP/INVESTMENTS/ANALYSIS/DATA/"
setwd("C:/Users/rsman/Documents/PERS FOLDERS/RAJDEEP/INVESTMENTS/ANALYSIS/DATA")
CWD <- getwd()
knitr::opts_chunk$set(echo = TRUE)
pandoc.header(colFmt("Section-1: MF Performance using Valuresearchonline Data", 'red'), 1, 'setext')

Section-1: MF Performance using Valuresearchonline Data

data.org <- function(rx.df){
  rx.df <- rx.df[-1:-5,]
  for (ctr in 1: ncol(rx.df)) {
    rx.df[,ctr]<- makeCharac(rx.df[,ctr])
    }
  
  colnames(rx.df) <- rx.df[1,]
  rx.df <- rx.df[-1,]
  return(rx.df)
  
}

vr.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_snapshot.csv"), header = FALSE))
vr_x.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_snapshot_1.csv"), header = FALSE))
vr_y.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_snapshot_2.csv"), header = FALSE))
vr.df <- rbind(vr.df, vr_x.df, vr_y.df)
vr.df <- data.org(vr.df)

vr2.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_returns.csv"), header = FALSE))
vr2.df <- data.org(vr2.df)
vr2_lt.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_returns_lt.csv"), header = FALSE))
vr2_lt.df <- data.org(vr2_lt.df)
vr2.df <- merge(vr2.df, vr2_lt.df, by.x = "Fund Name", by.y = "Fund Name")

vr2_x.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_returns_1.csv"), header = FALSE))
vr2_x.df <- data.org(vr2_x.df)
vr2_x_lt.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_returns_1_lt.csv"), header = FALSE))
vr2_x_lt.df <- data.org(vr2_x_lt.df)
vr2_x.df <- merge(vr2_x.df, vr2_x_lt.df, by.x = "Fund Name", by.y = "Fund Name")


vr2_y.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_returns_2.csv"), header = FALSE))
vr2_y.df <- data.org(vr2_y.df)
vr2_y_lt.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_returns_2_lt.csv"), header = FALSE))
vr2_y_lt.df <- data.org(vr2_y_lt.df)
vr2_y.df <- merge(vr2_y.df, vr2_y_lt.df, by.x = "Fund Name", by.y = "Fund Name")

vr2.df <- rbind(vr2.df, vr2_x.df, vr2_y.df)

vr3.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_risk.csv"), header = FALSE))
vr3_x.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_risk_1.csv"), header = FALSE))
vr3_y.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_risk_2.csv"), header = FALSE))
vr3.df <- rbind(vr3.df, vr3_x.df, vr3_y.df)
vr3.df <- data.org(vr3.df)

vr4.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_portfolio.csv"), header = FALSE))
vr4_x.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_portfolio_1.csv"), header = FALSE))
vr4_y.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_portfolio_2.csv"), header = FALSE))
vr4.df <- rbind(vr4.df, vr4_x.df, vr4_y.df)
vr4.df <- data.org(vr4.df)

vr5.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_nav.csv"), header = FALSE))
vr5_x.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_nav_1.csv"), header = FALSE))
vr5_y.df <- as.data.frame(read.csv(paste0(CWD,"/PERFORMANCE/vr_nav_2.csv"), header = FALSE))
vr5.df <- rbind(vr5.df, vr5_x.df, vr5_y.df)

analysis.df <- as.data.frame(read.xlsx(paste0(CWD,"/PERFORMANCE/ratio_analysis.xlsx"), sheetIndex = 1, header = TRUE))





vr.df <- merge(vr.df, vr2.df, by.x = "Fund Name", by.y = "Fund Name")
vr.df <- merge(vr.df, vr3.df, by.x = "Fund Name", by.y = "Fund Name")
vr.df <- merge(vr.df, vr4.df, by.x = "Fund Name", by.y = "Fund Name")

rm(vr2.df)
rm(vr3.df)
rm(vr4.df)

r_sq.vr <- as.numeric(as.character(analysis.df[analysis.df$type=="r_sq",2]))
beta.vr <- as.numeric(as.character(analysis.df[analysis.df$type=="beta",2]))
alpha.vr <- as.numeric(as.character(analysis.df[analysis.df$type=="alpha",2]))
sharpe_ratio.vr <- as.numeric(as.character(analysis.df[analysis.df$type=="sharpe_ratio",2]))
expense_ratio.vr <- as.numeric(as.character(analysis.df[analysis.df$type=="expense_ratio",2]))*100
max.values <- c(r_sq.vr, beta.vr, alpha.vr, sharpe_ratio.vr, expense_ratio.vr)

r_sq.min <- as.numeric(as.character(analysis.df[analysis.df$type=="r_sq",3]))
beta.min <- as.numeric(as.character(analysis.df[analysis.df$type=="beta",3]))
alpha.min <- as.numeric(as.character(analysis.df[analysis.df$type=="alpha",3]))
sharpe_ratio.min <- as.numeric(as.character(analysis.df[analysis.df$type=="sharpe_ratio",3]))
expense_ratio.min <- as.numeric(as.character(analysis.df[analysis.df$type=="expense_ratio",3]))*100
min.values <- c(r_sq.min, beta.min, alpha.min, sharpe_ratio.min, expense_ratio.min)

########

aa.mf <- vr.df

aa.mf$`R-Squared` <- makeNumeric(aa.mf$`R-Squared`)
aa.mf$Beta <- makeNumeric(aa.mf$Beta)
aa.mf$Alpha <- makeNumeric(aa.mf$Alpha)
aa.mf$`Sharpe Ratio` <- makeNumeric(aa.mf$`Sharpe Ratio`)
aa.mf$`Expense Ratio (%)` <- makeNumeric(aa.mf$`Expense Ratio (%)`)
aa.mf$`1 Yr Ret (%).x` <- makeNumeric(aa.mf$`1 Yr Ret (%).x`)
aa.mf$`3 Yr Ret (%)` <- makeNumeric(aa.mf$`3 Yr Ret (%)`)
aa.mf$`5 Yr Ret (%)` <- makeNumeric(aa.mf$`5 Yr Ret (%)`)
aa.mf$`10 Yr Ret (%)` <- makeNumeric(aa.mf$`10 Yr Ret (%)`)
aa.mf$`Net Assests (Cr).x`<- makeNumeric(aa.mf$`Net Assests (Cr).x`)

#Remove all NA from aa.mf
if (nrow(aa.mf[is.na(aa.mf$`Expense Ratio (%)`),])>0) {
  aa.mf <- aa.mf[-which(is.na(aa.mf$`Expense Ratio (%)`)),]
}

if (nrow(aa.mf[is.na(aa.mf$`R-Squared`),])>0) {
  aa.mf <- aa.mf[-which(is.na(aa.mf$`R-Squared`)),]
}

if (nrow(aa.mf[is.na(aa.mf$`Sharpe Ratio`),])>0) {
  aa.mf <- aa.mf[-which(is.na(aa.mf$`Sharpe Ratio`)),]
}

if (nrow(aa.mf[is.na(aa.mf$Alpha),])>0) {
  aa.mf <- aa.mf[-which(is.na(aa.mf$Alpha)),]
}

if (nrow(aa.mf[is.na(aa.mf$Beta),])>0) {
  aa.mf <- aa.mf[-which(is.na(aa.mf$Beta)),]
}

vr.df.new <- aa.mf
vr.df.new$Launch <- gsub(",","",vr.df.new$Launch)
vr.df.new$Launch <- gsub(" ","/",vr.df.new$Launch)
#vr.df.new$Launch <- as.Date(vr.df.new$Launch, "%m/%d/%Y")
vr.df.new$Launch <- mdy(vr.df.new$Launch)


#aa.mf <- vr.df
aa.mf$rank1 <- as.numeric(substr(aa.mf$`1 Yr Rank.x`,1,unlist(str_locate(aa.mf$`1 Yr Rank.x`,"/"))[,1]-1))
aa.mf <- aa.mf[-which(is.na(aa.mf$rank1)),]
selected.mf <- aa.mf[aa.mf$rank1 <=10,]
selected.mf <- aa.mf

r_sq.avg <- mean(selected.mf$`R-Squared`)
beta.avg <- mean(selected.mf$Beta)
alpha.avg <- mean(selected.mf$Alpha)
sharpe_ratio.avg <- mean(selected.mf$`Sharpe Ratio`)
expense_ratio.avg <- mean(selected.mf$`Expense Ratio (%)`)
avg.values <- c(r_sq.avg, beta.avg, alpha.avg, sharpe_ratio.avg, expense_ratio.avg)
tmp.df <- data.frame(matrix(ncol =1, nrow =0))
tmp.df <- rbind(tmp.df, r_sq.avg, beta.avg, alpha.avg, sharpe_ratio.avg, expense_ratio.avg)
colnames(tmp.df) <- c("avg")
analysis.df <- cbind(analysis.df, tmp.df)

##### old loc


mf.filter <- function(mf.rx, values.rx ){
  
  rsq.rx<- values.rx[1]
  beta.rx <- values.rx[2] 
  alpha.rx <- values.rx[3]
  shrpe.rx <- values.rx[4]
  exp.rx <- values.rx[5]
  
  mf.rx <- mf.rx[mf.rx$`R-Squared`>=rsq.rx,]
  mf.rx <- mf.rx[mf.rx$Beta >= beta.rx,]
  mf.rx <- mf.rx[mf.rx$Alpha>= alpha.rx,]
  mf.rx <- mf.rx[mf.rx$`Sharpe Ratio`>= shrpe.rx,]
  mf.rx <- mf.rx[mf.rx$`Expense Ratio (%)`<= exp.rx,]
  
  return(mf.rx)
  
}

pandoc.header(colFmt("1A: MF's filtered on optimal values of R-Sq, Alpha, Beta, Sharpe Ratio & Exp-Ratio", 'blue'), 1, 'setext')

1A: MF’s filtered on optimal values of R-Sq, Alpha, Beta, Sharpe Ratio & Exp-Ratio

#knitr::kable(analysis.df, caption = colFmt("Filter Values", "blue"))

##$$$$$
paste(colFmt( "Rations/Values used to Compare Mutual Funds (Average Value is based on Present Market Status", "blue"))

[1] “Rations/Values used to Compare Mutual Funds (Average Value is based on Present Market Status

analysis.df[1:5, 1:4] %>%
  mutate(
    Ser.No = row.names(.),
    Factor = (type),
    Max.Value = (value),
    Min.Value = (min),
    Average.Value =(avg)
  ) %>%
  select(Ser.No,Factor, Max.Value, Min.Value, Average.Value) %>%
  kable(escape = F) %>%
  kable_styling("hover", full_width = F) %>%
  column_spec(5, width = "3cm")
Ser.No Factor Max.Value Min.Value Average.Value
1 r_sq 0.750 0.600 0.6661051
2 beta 1.100 1.000 0.9215903
3 alpha 2.000 1.400 -0.4654380
4 sharpe_ratio 1.500 0.750 0.3729178
5 expense_ratio 0.015 0.025 1.2148922
##$$$$$


##Filter with max values
top.mf<- mf.filter(aa.mf, max.values)
rownames(top.mf) <- NULL
row.ctr <- nrow(top.mf)
paste(colFmt( "Mutual Funds Meeting the Maximum Criteria", "blue"))

[1] “Mutual Funds Meeting the Maximum Criteria

top.mf[1:row.ctr,c(1,37,35,36,33,6,7,22)] %>%
  mutate(
    Ser.No = row.names(.),
    Fund = (`Fund Name`),
    R_Sq = (`R-Squared`),
    Beta = (Beta),
    Alpha = (Alpha),
    Sharpe_Ratio = (`Sharpe Ratio`),
    Exp_Ratio = (`Expense Ratio (%)`),
    Return_1Yr =(`1 Yr Ret (%).x`),
    Return_5Yr =(`5 Yr Ret (%)`),
    
  ) %>%
  select(Ser.No,Fund, R_Sq, Beta, Alpha, Sharpe_Ratio, Exp_Ratio, Return_1Yr, Return_5Yr) %>%
  kable(escape = F) %>%
  kable_styling("hover", full_width = F)
Ser.No Fund R_Sq Beta Alpha Sharpe_Ratio Exp_Ratio Return_1Yr Return_5Yr
NA NA NA NA NA NA NA NA NA
##filter with min values
top.mf<- mf.filter(aa.mf, min.values)
rownames(top.mf) <- NULL
row.ctr <- nrow(top.mf)
paste(colFmt( "Mutual Funds Meeting the Minimum Criteria", "blue"))

[1] “Mutual Funds Meeting the Minimum Criteria

top.mf[1:row.ctr,c(1,37,35,36,33,6,7,22)] %>%
  mutate(
    Ser.No = row.names(.),
    Fund = (`Fund Name`),
    R_Sq = (`R-Squared`),
    Beta = (Beta),
    Alpha = (Alpha),
    Sharpe_Ratio = (`Sharpe Ratio`),
    Exp_Ratio = (`Expense Ratio (%)`),
    Return_1Yr =(`1 Yr Ret (%).x`),
    Return_5Yr =(`5 Yr Ret (%)`),
    
  ) %>%
  select(Ser.No,Fund, R_Sq, Beta, Alpha, Sharpe_Ratio, Exp_Ratio, Return_1Yr, Return_5Yr) %>%
  kable(escape = F) %>%
  kable_styling("hover", full_width = T)
Ser.No Fund R_Sq Beta Alpha Sharpe_Ratio Exp_Ratio Return_1Yr Return_5Yr
1 ICICI Prudential All Seasons Bond Fund - Direct Plan 0.73 1.08 1.48 1.23 0.77 12.44 9.76
2 Kotak Dynamic Bond Fund - Direct Plan 0.71 1.03 1.73 1.34 0.43 11.93 9.85
3 Mirae Asset Dynamic Bond Fund - Direct Plan 0.64 1.19 2.01 1.28 0.78 17.08 NA
4 SBI Dynamic Bond Fund - Direct Plan 0.80 1.46 1.40 1.11 1.03 16.32 9.82
##filter wiht average values
top.mf<- mf.filter(aa.mf, avg.values)
rownames(top.mf) <- NULL
paste(colFmt( "Mutual Funds Meeting the Average Criteria", "blue"))

[1] “Mutual Funds Meeting the Average Criteria

row.ctr <- nrow(top.mf)
top.mf[1:row.ctr,c(1,37,35,36,33,6,7,22)] %>%
  mutate(
    Ser.No = row.names(.),
    Fund = (`Fund Name`),
    R_Sq = (`R-Squared`),
    Beta = (Beta),
    Alpha = (Alpha),
    Sharpe_Ratio = (`Sharpe Ratio`),
    Exp_Ratio = (`Expense Ratio (%)`),
    Return_1Yr =(`1 Yr Ret (%).x`),
    Return_5Yr =(`5 Yr Ret (%)`),
    
  ) %>%
  select(Ser.No,Fund, R_Sq, Beta, Alpha, Sharpe_Ratio, Exp_Ratio, Return_1Yr, Return_5Yr) %>%
  kable(escape = F) %>%
  kable_styling("hover", full_width = T)
Ser.No Fund R_Sq Beta Alpha Sharpe_Ratio Exp_Ratio Return_1Yr Return_5Yr
1 Aditya Birla Sun Life Income Fund - Direct Plan 0.87 1.64 -0.10 0.67 0.25 12.72 8.43
2 Axis Dynamic Bond Fund 0.73 1.24 0.44 0.80 0.65 13.23 8.46
3 Axis Dynamic Bond Fund - Direct Plan 0.73 1.24 1.24 1.07 0.22 13.94 9.43
4 BNP Paribas Flexi Debt Fund - Direct Plan 0.80 1.21 0.46 0.84 0.66 11.82 8.54
5 Canara Robeco Dynamic Bond Fund - Direct Plan 0.84 1.42 -0.44 0.55 1.04 12.80 8.46
6 Canara Robeco Income Fund - Direct Plan 0.85 1.29 0.50 0.87 0.85 12.80 8.56
7 Edelweiss Dynamic Bond Fund - Direct Plan 0.75 1.41 1.05 0.97 0.31 13.36 8.51
8 Edelweiss Dynamic Bond Fund - Regular Plan 0.75 1.40 0.40 0.77 1.04 12.44 7.71
9 ICICI Prudential All Seasons Bond Fund - Direct Plan 0.73 1.08 1.48 1.23 0.77 12.44 9.76
10 IDFC Dynamic Bond Fund - Direct Plan 0.83 1.68 0.94 0.94 0.99 16.51 9.60
11 Kotak Bond Fund - Direct Plan 0.83 1.56 0.12 0.72 0.78 13.33 8.41
12 Kotak Dynamic Bond Fund - Direct Plan 0.71 1.03 1.73 1.34 0.43 11.93 9.85
13 Kotak Dynamic Bond Fund - Regular Plan 0.70 1.03 1.12 1.09 1.08 11.20 9.17
14 L&T Flexi Bond Fund - Direct Plan 0.83 1.28 0.84 0.98 0.96 13.01 9.20
15 L&T Triple Ace Bond Fund 0.70 1.47 0.70 0.83 0.61 14.93 7.79
16 L&T Triple Ace Bond Fund - Direct Plan 0.71 1.47 1.01 0.92 0.29 15.31 8.47
17 LIC MF Bond Fund - Direct Plan 0.87 1.39 -0.14 0.65 0.18 12.56 7.72
18 Nippon India Income Fund - Direct Plan 0.87 1.79 0.93 0.95 0.87 15.82 9.30
19 PGIM India Dynamic Bond Fund - Direct Plan 0.84 1.41 1.21 1.08 0.82 12.83 9.63
20 Quantum Dynamic Bond Fund - Direct Plan 0.75 1.26 0.77 0.92 0.56 14.16 NA
21 Quantum Dynamic Bond Fund - Regular Plan 0.75 1.26 0.66 0.88 0.68 14.02 NA
22 SBI Dynamic Bond Fund - Direct Plan 0.80 1.46 1.40 1.11 1.03 16.32 9.82
23 Tata Digital India Fund - Direct Plan 0.88 0.95 0.93 0.62 1.06 -12.66 NA
24 Tata Income Fund - Direct Plan 0.77 1.23 0.00 0.66 1.07 12.67 8.19
aa.mf$plus_ctr <- 0 
aa.mf$plus_factors <- ""


filter_ctr <- function(a1.mf, values.rx ){
  
  a1.mf$plus_ctr <- 0 
  a1.mf$plus_factors <- ""
  
  rsq.vx<- values.rx[1]
  beta.vx <- values.rx[2] 
  alpha.vx <- values.rx[3]
  sharpe_ratio.vx <- values.rx[4]
  expense_ratio.vx <- values.rx[5]
  
  a1.mf[a1.mf$`R-Squared` >= rsq.vx,]$plus_ctr <- 1
  a1.mf[a1.mf$`R-Squared` >= rsq.vx,]$plus_factors <- "R_Sq"
  
  a1.mf[a1.mf$Beta >= beta.vx,]$plus_ctr <- a1.mf[a1.mf$Beta >= beta.vx,]$plus_ctr +1
  a1.mf[a1.mf$Beta >= beta.vx,]$plus_factors <- paste0(a1.mf[a1.mf$Beta >= beta.vx,]$plus_factors,"-Beta")
  
  a1.mf[a1.mf$Alpha >= alpha.vx,]$plus_ctr <- a1.mf[a1.mf$Alpha >= alpha.vx,]$plus_ctr +1
  a1.mf[a1.mf$Alpha >= alpha.vx,]$plus_factors <- paste0(a1.mf[a1.mf$Alpha >= alpha.vx,]$plus_factors,"-Alpha")
  
  a1.mf[a1.mf$`Sharpe Ratio` >= sharpe_ratio.vx,]$plus_ctr <- a1.mf[a1.mf$`Sharpe Ratio` >= sharpe_ratio.vx,]$plus_ctr +1
  a1.mf[a1.mf$`Sharpe Ratio` >= sharpe_ratio.vx,]$plus_factors <- 
    paste0(a1.mf[a1.mf$`Sharpe Ratio` >= sharpe_ratio.vx,]$plus_ctr,"-Sharpe_Ratio")
  
  a1.mf[a1.mf$`Expense Ratio (%)` <= expense_ratio.vx,]$plus_ctr <- a1.mf[a1.mf$`Expense Ratio (%)` <= expense_ratio.vx,]$plus_ctr +1
  a1.mf[a1.mf$`Expense Ratio (%)` <= expense_ratio.vx,]$plus_factors <- 
    paste0(a1.mf[a1.mf$`Expense Ratio (%)` <= expense_ratio.vx,]$plus_factors, "-Exp_Ratio")
  
  a1.mf <- a1.mf[order(a1.mf$`5 Yr Ret (%)`, decreasing = TRUE),]
  
  return(a1.mf)

  
}

pandoc.header(colFmt("1B: MF's filtered on Four out of Five Criteria", 'blue'), 1, 'setext')

1B: MF’s filtered on Four out of Five Criteria

top.mf <- filter_ctr(aa.mf, max.values)
top.mf <- top.mf[top.mf$plus_ctr >= 4,]
rownames(top.mf) <- NULL
value.string <- paste0("R-Sq:",analysis.df$value[1],", Beta:-",
                       analysis.df$value[2],", Alpha:-",
                       analysis.df$value[3],", Sharpe Ratio:-",
                       analysis.df$value[4],", Expense Ratio:-",
                       analysis.df$value[5])

value.string <- paste("MF's Meeting Max Values of Four our of Five Criteria ",  value.string)
row.ctr <- nrow(top.mf)
paste(colFmt(value.string, "blue"))

[1] “MF’s Meeting Max Values of Four our of Five Criteria R-Sq:0.75, Beta:-1.1, Alpha:-2, Sharpe Ratio:-1.5, Expense Ratio:-0.015

top.mf[1:row.ctr,c(1,37,35,36,33,6,7,22)] %>%
  mutate(
    Ser.No = row.names(.),
    Fund = ('Fund Name'),
    R_Sq = color_tile("white", "orange")(`R-Squared`),
    Beta = color_tile("white", "green")(Beta),
    Alpha = color_tile("white", "blue")(Alpha),
    Sharpe_Ratio = color_tile("white", "purple")(`Sharpe Ratio`),
    Exp_Ratio = (`Expense Ratio (%)`),
    Return_1Yr =color_tile("white", "red")(`1 Yr Ret (%).x`),
    Return_5Yr =color_tile("white", "red")(`5 Yr Ret (%)`),
    
  ) %>%
  select(Ser.No,Fund, R_Sq, Beta, Alpha, Sharpe_Ratio, Exp_Ratio, Return_1Yr, Return_5Yr) %>%
  kable(escape = F) %>%
  kable_styling("hover", full_width = T) %>%
  scroll_box(width = "100%", height = "300px")
Ser.No Fund R_Sq Beta Alpha Sharpe_Ratio Exp_Ratio Return_1Yr Return_5Yr
1 Fund Name 0.84 0.72 3.29 1.63 0.40 18.39 11.03
2 Fund Name 0.84 0.72 3.20 1.61 0.54 18.23 10.90
3 Fund Name 0.13 2.66 7.23 1.91 0.26 14.48 9.15
4 Fund Name 0.13 2.79 7.23 1.75 0.75 14.50 8.94
5 Fund Name 0.20 2.65 5.91 1.56 0.40 10.29 8.88
6 Fund Name 0.21 3.62 7.94 1.55 0.23 11.54 8.79
7 Fund Name 0.06 1.32 3.99 1.57 0.59 8.69 8.76
8 Fund Name 0.30 3.08 6.55 1.70 0.31 10.67 8.74
9 Fund Name 0.27 2.79 6.17 1.79 0.28 10.30 8.68
10 Fund Name 0.19 2.44 5.97 1.86 0.34 10.91 8.67
11 Fund Name 0.36 3.97 8.14 1.69 0.29 10.53 8.59
12 Fund Name 0.31 1.71 4.43 2.72 0.19 8.45 8.40
13 Fund Name 0.43 3.56 7.16 1.76 0.25 10.61 8.38
14 Fund Name 0.26 1.54 4.32 2.88 0.39 8.42 8.37
15 Fund Name 0.36 3.97 7.88 1.54 0.59 10.20 8.35
16 Fund Name 0.16 1.99 4.80 1.66 0.19 9.79 8.28
17 Fund Name 0.25 2.61 6.11 1.96 0.28 10.16 8.23
18 Fund Name 0.50 1.29 3.58 3.95 0.11 7.57 8.18
19 Fund Name 0.19 1.10 3.39 2.91 0.33 7.57 8.16
20 Fund Name 0.31 2.73 5.51 1.51 0.42 9.15 8.16
21 Fund Name 0.32 1.72 4.19 2.42 0.41 8.21 8.15
22 Fund Name 0.33 1.61 4.30 2.99 0.28 8.34 8.15
23 Fund Name 0.32 1.13 3.40 3.66 0.28 7.42 8.13
24 Fund Name 0.16 1.99 4.64 1.54 0.39 9.61 8.11
25 Fund Name 0.19 2.44 5.47 1.53 0.81 10.39 8.11
26 Fund Name 0.32 1.10 3.36 3.77 0.23 7.79 8.09
27 Fund Name 0.46 1.52 4.08 3.53 0.12 8.07 8.07
28 Fund Name 0.15 1.22 3.44 2.21 0.41 7.86 8.06
29 Fund Name 0.38 1.73 4.16 2.57 0.27 8.10 8.03
30 Fund Name 0.30 1.71 4.24 2.44 0.35 8.36 8.03
31 Fund Name 0.19 1.10 3.26 2.73 0.45 7.44 8.02
32 Fund Name 0.17 1.25 3.43 2.26 0.23 8.11 8.02
33 Fund Name 0.24 1.93 4.51 1.91 0.17 7.88 8.01
34 Fund Name 0.40 1.26 3.54 3.61 0.32 7.62 7.95
35 Fund Name 0.13 1.26 3.35 1.88 0.44 7.75 7.94
36 Fund Name 0.15 1.22 3.31 2.06 0.50 7.76 7.93
37 Fund Name 0.44 1.36 3.62 3.42 0.23 7.47 7.93
38 Fund Name 0.17 1.25 3.28 2.07 0.38 7.95 7.88
39 Fund Name 0.39 1.60 4.03 2.87 0.40 8.36 7.88
40 Fund Name 0.38 1.73 3.96 2.30 0.49 7.88 7.83
41 Fund Name 0.41 1.55 3.72 2.67 0.33 7.74 7.78
42 Fund Name 0.46 1.53 3.91 3.22 0.28 7.91 7.77
43 Fund Name 0.33 1.63 3.88 2.35 0.58 8.02 7.70
44 Fund Name 0.41 1.62 3.80 2.53 1.05 7.80 7.68
45 Fund Name 0.31 1.11 2.88 2.70 0.93 6.85 7.67
46 Fund Name 0.50 1.30 3.17 3.05 0.65 7.08 7.65
47 Fund Name 0.30 1.71 3.90 2.03 0.65 8.03 7.65
48 Fund Name 0.45 1.23 3.48 3.89 0.15 8.04 7.62
49 Fund Name 0.41 1.54 3.50 2.35 0.55 7.49 7.57
50 Fund Name 0.38 1.32 2.98 2.23 0.30 7.03 7.57
51 Fund Name 0.45 1.37 3.29 2.80 0.56 7.14 7.57
52 Fund Name 0.25 2.62 5.52 1.52 0.83 9.57 7.56
53 Fund Name 0.40 1.26 3.15 2.89 0.78 7.16 7.55
54 Fund Name 0.26 1.54 3.47 1.83 1.21 7.50 7.47
55 Fund Name 0.45 1.23 3.28 3.48 0.35 7.82 7.41
56 Fund Name 0.34 1.12 2.73 2.50 0.83 7.17 7.37
57 Fund Name 0.41 1.71 3.77 2.20 0.21 7.54 7.12
58 Fund Name 0.42 1.71 3.53 1.85 0.46 7.28 6.86
59 Fund Name 0.32 2.41 5.16 1.79 0.02 8.32 NA
60 Fund Name 0.32 2.39 5.15 1.82 0.02 8.32 NA
61 Fund Name 0.25 1.12 3.48 3.40 0.32 8.05 NA
62 Fund Name 0.25 1.15 2.60 1.83 1.14 7.18 NA
top.mf <- filter_ctr(aa.mf, min.values)
top.mf <- top.mf[top.mf$plus_ctr >= 4,]
rownames(top.mf) <- NULL
value.string <- paste0("R-Sq:",analysis.df$min[1],", Beta:-",
                       analysis.df$min[2],", Alpha:-",
                       analysis.df$min[3],", Sharpe Ratio:-",
                       analysis.df$min[4],", Expense Ratio:-",
                       analysis.df$min[5])
value.string <- paste("MF's Meeting Min Values of Four our of Five Criteria ",  value.string)
row.ctr <- nrow(top.mf)
paste(colFmt(value.string, "blue"))

[1] “MF’s Meeting Min Values of Four our of Five Criteria R-Sq:0.6, Beta:-1, Alpha:-1.4, Sharpe Ratio:-0.75, Expense Ratio:-0.025

top.mf[1:row.ctr,c(1,37,35,36,33,6,7,22)] %>%
  mutate(
    Ser.No = row.names(.),
    Fund = ('Fund Name'),
    R_Sq = color_tile("white", "orange")(`R-Squared`),
    Beta = color_tile("white", "green")(Beta),
    Alpha = color_tile("white", "blue")(Alpha),
    Sharpe_Ratio = color_tile("white", "purple")(`Sharpe Ratio`),
    Exp_Ratio = (`Expense Ratio (%)`),
    Return_1Yr =color_tile("white", "red")(`1 Yr Ret (%).x`),
    Return_5Yr =color_tile("white", "red")(`5 Yr Ret (%)`),
    
  ) %>%
  select(Ser.No,Fund, R_Sq, Beta, Alpha, Sharpe_Ratio, Exp_Ratio, Return_1Yr, Return_5Yr) %>%
  kable(escape = F) %>%
  kable_styling("hover", full_width = T) %>%
  scroll_box(width = "100%", height = "300px")
Ser.No Fund R_Sq Beta Alpha Sharpe_Ratio Exp_Ratio Return_1Yr Return_5Yr
1 Fund Name 0.92 0.78 1.74 1.25 0.69 17.31 11.12
2 Fund Name 0.84 0.72 3.29 1.63 0.40 18.39 11.03
3 Fund Name 0.84 0.72 3.20 1.61 0.54 18.23 10.90
4 Fund Name 0.95 1.01 2.33 0.04 0.92 -11.46 10.84
5 Fund Name 0.71 0.58 2.57 1.49 0.34 16.63 10.80
6 Fund Name 0.87 0.82 1.63 1.17 0.17 17.86 10.47
7 Fund Name 0.71 0.58 2.24 1.39 0.64 16.28 10.43
8 Fund Name 0.87 0.82 1.42 1.12 0.33 17.63 10.20
9 Fund Name 0.18 7.32 13.76 0.91 1.58 16.42 10.13
10 Fund Name 0.95 1.00 1.46 0.00 1.73 -12.33 9.90
11 Fund Name 0.71 1.03 1.73 1.34 0.43 11.93 9.85
12 Fund Name 0.60 0.76 1.98 1.60 0.79 12.03 9.84
13 Fund Name 0.80 1.46 1.40 1.11 1.03 16.32 9.82
14 Fund Name 0.73 1.08 1.48 1.23 0.77 12.44 9.76
15 Fund Name 0.84 1.41 1.21 1.08 0.82 12.83 9.63
16 Fund Name 0.83 1.68 0.94 0.94 0.99 16.51 9.60
17 Fund Name 0.73 1.24 1.24 1.07 0.22 13.94 9.43
18 Fund Name 0.18 7.37 13.19 0.78 1.80 15.84 9.30
19 Fund Name 0.87 1.79 0.93 0.95 0.87 15.82 9.30
20 Fund Name 0.65 1.09 1.18 1.05 0.85 13.82 9.21
21 Fund Name 0.83 1.28 0.84 0.98 0.96 13.01 9.20
22 Fund Name 0.70 1.03 1.12 1.09 1.08 11.20 9.17
23 Fund Name 0.13 2.66 7.23 1.91 0.26 14.48 9.15
24 Fund Name 0.85 1.72 0.35 0.79 1.28 15.21 9.11
25 Fund Name 0.80 1.46 0.65 0.87 1.65 15.63 9.06
26 Fund Name 0.73 1.08 0.77 0.95 1.34 11.70 9.00
27 Fund Name 0.13 2.79 7.23 1.75 0.75 14.50 8.94
28 Fund Name 0.24 3.34 6.92 1.43 0.35 10.90 8.88
29 Fund Name 0.20 2.65 5.91 1.56 0.40 10.29 8.88
30 Fund Name 0.21 4.60 9.52 1.32 0.20 15.04 8.83
31 Fund Name 0.21 3.62 7.94 1.55 0.23 11.54 8.79
32 Fund Name 0.06 1.32 3.99 1.57 0.59 8.69 8.76
33 Fund Name 0.18 3.16 6.77 1.35 0.29 11.11 8.74
34 Fund Name 0.30 3.08 6.55 1.70 0.31 10.67 8.74
35 Fund Name 0.27 2.79 6.17 1.79 0.28 10.30 8.68
36 Fund Name 0.19 2.44 5.97 1.86 0.34 10.91 8.67
37 Fund Name 0.64 0.73 1.40 1.37 0.30 10.70 8.64
38 Fund Name 0.68 0.57 1.66 1.83 0.30 10.35 8.63
39 Fund Name 0.13 2.56 5.29 1.03 0.37 9.76 8.63
40 Fund Name 0.13 2.92 6.00 1.00 0.36 10.17 8.62
41 Fund Name 0.44 1.01 1.57 1.02 0.40 9.67 8.61
42 Fund Name 0.38 4.37 8.23 1.35 0.25 11.41 8.60
43 Fund Name 0.36 3.97 8.14 1.69 0.29 10.53 8.59
44 Fund Name 0.66 1.08 0.77 0.91 0.61 12.24 8.58
45 Fund Name 0.85 1.29 0.50 0.87 0.85 12.80 8.56
46 Fund Name 0.24 3.33 6.61 1.26 0.67 10.56 8.55
47 Fund Name 0.80 1.21 0.46 0.84 0.66 11.82 8.54
48 Fund Name 0.21 4.60 9.26 1.22 0.56 14.65 8.52
49 Fund Name 0.68 0.57 1.53 1.74 0.45 10.20 8.51
50 Fund Name 0.75 1.41 1.05 0.97 0.31 13.36 8.51
51 Fund Name 0.83 1.41 0.28 0.78 1.75 11.99 8.48
52 Fund Name 0.34 3.55 6.97 1.46 0.35 10.76 8.48
53 Fund Name 0.71 1.47 1.01 0.92 0.29 15.31 8.47
54 Fund Name 0.65 1.10 0.39 0.75 1.46 13.15 8.47
55 Fund Name 0.73 1.24 0.44 0.80 0.65 13.23 8.46
56 Fund Name 0.24 3.60 7.25 1.32 0.10 11.26 8.45
57 Fund Name 0.20 2.23 4.62 1.30 0.13 5.91 8.44
58 Fund Name 0.38 4.33 8.04 1.28 0.10 11.13 8.43
59 Fund Name 0.31 1.71 4.43 2.72 0.19 8.45 8.40
60 Fund Name 0.23 3.12 6.43 1.35 0.21 11.22 8.39
61 Fund Name 0.18 3.16 6.43 1.17 0.61 10.77 8.38
62 Fund Name 0.43 3.56 7.16 1.76 0.25 10.61 8.38
63 Fund Name 0.26 1.54 4.32 2.88 0.39 8.42 8.37
64 Fund Name 0.35 4.92 9.36 1.32 0.30 11.71 8.36
65 Fund Name 0.36 3.97 7.88 1.54 0.59 10.20 8.35
66 Fund Name 0.29 3.45 6.81 1.35 0.29 10.40 8.34
67 Fund Name 0.21 3.62 7.58 1.37 0.58 11.18 8.34
68 Fund Name 0.34 3.48 6.90 1.49 0.29 10.10 8.33
69 Fund Name 0.27 3.26 6.34 1.25 0.31 10.14 8.31
70 Fund Name 0.19 2.72 5.32 1.08 0.43 8.01 8.29
71 Fund Name 0.60 1.00 0.60 0.82 0.46 11.60 8.29
72 Fund Name 0.16 1.99 4.80 1.66 0.19 9.79 8.28
73 Fund Name 0.38 4.36 7.92 1.19 0.50 11.08 8.26
74 Fund Name 0.13 2.55 4.89 0.82 0.82 9.25 8.26
75 Fund Name 0.13 2.92 5.55 0.79 0.81 9.68 8.23
76 Fund Name 0.25 2.61 6.11 1.96 0.28 10.16 8.23
77 Fund Name 0.50 1.29 3.58 3.95 0.11 7.57 8.18
78 Fund Name 0.19 1.10 3.39 2.91 0.33 7.57 8.16
79 Fund Name 0.31 2.73 5.51 1.51 0.42 9.15 8.16
80 Fund Name 0.32 1.72 4.19 2.42 0.41 8.21 8.15
81 Fund Name 0.33 1.61 4.30 2.99 0.28 8.34 8.15
82 Fund Name 0.35 4.91 9.07 1.20 0.67 11.34 8.14
83 Fund Name 0.32 1.13 3.40 3.66 0.28 7.42 8.13
84 Fund Name 0.16 1.99 4.64 1.54 0.39 9.61 8.11
85 Fund Name 0.19 2.44 5.47 1.53 0.81 10.39 8.11
86 Fund Name 0.25 2.84 5.82 1.40 0.20 9.72 8.10
87 Fund Name 0.32 1.10 3.36 3.77 0.23 7.79 8.09
88 Fund Name 0.46 1.52 4.08 3.53 0.12 8.07 8.07
89 Fund Name 0.30 3.42 6.60 1.28 0.40 10.14 8.07
90 Fund Name 0.15 1.22 3.44 2.21 0.41 7.86 8.06
91 Fund Name 0.20 2.67 5.12 1.03 1.15 9.46 8.05
92 Fund Name 0.38 1.73 4.16 2.57 0.27 8.10 8.03
93 Fund Name 0.30 1.71 4.24 2.44 0.35 8.36 8.03
94 Fund Name 0.19 1.10 3.26 2.73 0.45 7.44 8.02
95 Fund Name 0.17 1.25 3.43 2.26 0.23 8.11 8.02
96 Fund Name 0.06 1.34 3.32 1.09 1.29 7.95 8.01
97 Fund Name 0.24 1.93 4.51 1.91 0.17 7.88 8.01
98 Fund Name 0.38 4.34 7.64 1.05 0.50 10.70 7.98
99 Fund Name 0.11 2.73 5.34 0.82 0.35 7.96 7.96
100 Fund Name 0.40 1.26 3.54 3.61 0.32 7.62 7.95
101 Fund Name 0.13 1.26 3.35 1.88 0.44 7.75 7.94
102 Fund Name 0.15 1.22 3.31 2.06 0.50 7.76 7.93
103 Fund Name 0.44 1.36 3.62 3.42 0.23 7.47 7.93
104 Fund Name 0.27 2.80 5.51 1.31 0.95 9.60 7.92
105 Fund Name 0.24 3.60 6.75 1.06 0.60 10.75 7.91
106 Fund Name 0.34 3.56 6.42 1.09 0.85 10.20 7.89
107 Fund Name 0.17 1.25 3.28 2.07 0.38 7.95 7.88
108 Fund Name 0.39 1.60 4.03 2.87 0.40 8.36 7.88
109 Fund Name 0.23 3.13 6.00 1.10 0.61 10.78 7.87
110 Fund Name 0.44 3.56 6.65 1.41 0.73 10.08 7.84
111 Fund Name 0.38 1.73 3.96 2.30 0.49 7.88 7.83
112 Fund Name 0.30 3.07 5.70 1.13 1.13 9.77 7.81
113 Fund Name 0.70 1.47 0.70 0.83 0.61 14.93 7.79
114 Fund Name 0.41 1.55 3.72 2.67 0.33 7.74 7.78
115 Fund Name 0.46 1.53 3.91 3.22 0.28 7.91 7.77
116 Fund Name 0.34 3.48 6.40 1.18 0.80 9.54 7.77
117 Fund Name 0.41 1.07 3.41 4.60 0.18 7.83 7.74
118 Fund Name 0.05 1.23 3.08 0.98 0.34 6.42 7.74
119 Fund Name 0.36 4.16 7.36 1.05 0.23 9.63 7.72
120 Fund Name 0.75 1.40 0.40 0.77 1.04 12.44 7.71
121 Fund Name 0.20 2.43 5.22 1.42 0.05 9.65 7.71
122 Fund Name 0.33 1.63 3.88 2.35 0.58 8.02 7.70
123 Fund Name 0.41 1.62 3.80 2.53 1.05 7.80 7.68
124 Fund Name 0.87 1.04 6.42 0.16 0.90 -5.82 7.67
125 Fund Name 0.31 1.11 2.88 2.70 0.93 6.85 7.67
126 Fund Name 0.50 1.30 3.17 3.05 0.65 7.08 7.65
127 Fund Name 0.30 1.71 3.90 2.03 0.65 8.03 7.65
128 Fund Name 0.39 1.01 3.24 4.49 0.15 7.66 7.65
129 Fund Name 0.42 1.07 3.29 4.33 0.31 7.70 7.63
130 Fund Name 0.36 4.16 7.25 0.99 0.36 9.49 7.63
131 Fund Name 0.45 1.23 3.48 3.89 0.15 8.04 7.62
132 Fund Name 0.25 2.85 5.38 1.10 0.55 9.25 7.62
133 Fund Name 0.27 3.25 5.63 0.83 1.11 9.28 7.60
134 Fund Name 0.41 1.54 3.50 2.35 0.55 7.49 7.57
135 Fund Name 0.38 1.32 2.98 2.23 0.30 7.03 7.57
136 Fund Name 0.45 1.37 3.29 2.80 0.56 7.14 7.57
137 Fund Name 0.25 2.62 5.52 1.52 0.83 9.57 7.56
138 Fund Name 0.40 1.26 3.15 2.89 0.78 7.16 7.55
139 Fund Name 0.39 1.01 3.13 4.26 0.25 7.55 7.54
140 Fund Name 0.29 3.46 6.08 0.91 0.92 9.63 7.51
141 Fund Name 0.26 1.54 3.47 1.83 1.21 7.50 7.47
142 Fund Name 0.45 1.23 3.28 3.48 0.35 7.82 7.41
143 Fund Name 0.32 2.74 4.80 0.94 1.02 8.39 7.39
144 Fund Name 0.34 1.12 2.73 2.50 0.83 7.17 7.37
145 Fund Name 0.20 1.44 3.07 1.38 0.28 7.46 7.31
146 Fund Name 0.24 1.90 3.75 1.22 1.00 7.00 7.26
147 Fund Name 0.94 1.03 1.83 0.04 0.85 -14.58 7.23
148 Fund Name 0.30 3.41 5.74 0.77 1.25 9.21 7.23
149 Fund Name 0.14 1.27 2.73 1.19 1.04 7.11 7.22
150 Fund Name 0.19 2.41 4.78 1.12 0.65 9.16 7.17
151 Fund Name 0.41 1.71 3.77 2.20 0.21 7.54 7.12
152 Fund Name 0.17 1.80 3.35 0.87 0.21 5.58 7.03
153 Fund Name 0.38 1.29 2.29 1.08 1.04 6.25 6.90
154 Fund Name 0.42 1.71 3.53 1.85 0.46 7.28 6.86
155 Fund Name 0.87 1.04 4.90 0.10 2.14 -7.19 6.30
156 Fund Name 0.97 1.00 1.75 0.04 1.15 -18.06 5.20
157 Fund Name 0.93 1.08 5.29 -0.49 1.41 -31.09 -1.39
158 Fund Name 0.93 1.08 3.84 -0.54 2.49 -31.87 -2.72
159 Fund Name 0.32 2.41 5.16 1.79 0.02 8.32 NA
160 Fund Name 0.32 2.39 5.15 1.82 0.02 8.32 NA
161 Fund Name 0.25 1.12 3.48 3.40 0.32 8.05 NA
162 Fund Name 0.25 1.15 2.60 1.83 1.14 7.18 NA
163 Fund Name 0.64 1.19 2.01 1.28 0.78 17.08 NA
164 Fund Name 0.63 1.20 0.65 0.82 1.47 15.81 NA
165 Fund Name 0.36 4.51 8.34 1.24 0.79 11.35 NA
166 Fund Name 0.36 4.54 8.73 1.41 0.30 11.84 NA
167 Fund Name 0.75 1.26 0.77 0.92 0.56 14.16 NA
168 Fund Name 0.75 1.26 0.66 0.88 0.68 14.02 NA
169 Fund Name 0.84 1.06 6.87 0.17 0.88 -6.45 NA
170 Fund Name 0.84 1.06 6.05 0.14 1.38 -6.92 NA
171 Fund Name 0.97 1.00 1.80 -0.49 1.21 -32.66 NA
top.mf <- filter_ctr(aa.mf, avg.values)
top.mf <- top.mf[top.mf$plus_ctr >= 4,]
rownames(top.mf) <- NULL
value.string <- paste0("R-Sq:",round(analysis.df$avg[1], digits = 2),", Beta:-",
                       round(analysis.df$avg[2], digits = 2),", Alpha:-",
                       round(analysis.df$avg[3], digits = 2),", Sharpe Ratio:-",
                       round(analysis.df$avg[4], digits = 2),", Expense Ratio:-",
                       round(analysis.df$avg[5], digits = 2))
value.string <- paste("MF's Meeting Average Values of Four our of Five Criteria ",  value.string)
row.ctr <- nrow(top.mf)
paste(colFmt(value.string, "blue"))

[1] “MF’s Meeting Average Values of Four our of Five Criteria R-Sq:0.67, Beta:-0.92, Alpha:–0.47, Sharpe Ratio:-0.37, Expense Ratio:-1.21

top.mf[1:row.ctr,c(1,37,35,36,33,6,7,22)] %>%
  mutate(
    Ser.No = row.names(.),
    Fund = ('Fund Name'),
    R_Sq = color_tile("white", "orange")(`R-Squared`),
    Beta = color_tile("white", "green")(Beta),
    Alpha = color_tile("white", "blue")(Alpha),
    Sharpe_Ratio = color_tile("white", "purple")(`Sharpe Ratio`),
    Exp_Ratio = (`Expense Ratio (%)`),
    Return_1Yr =color_tile("white", "red")(`1 Yr Ret (%).x`),
    Return_5Yr =color_tile("white", "red")(`5 Yr Ret (%)`),
    
  ) %>%
  select(Ser.No,Fund, R_Sq, Beta, Alpha, Sharpe_Ratio, Exp_Ratio, Return_1Yr, Return_5Yr) %>%
  kable(escape = F) %>%
  kable_styling("hover", full_width = T) %>%
  scroll_box(width = "100%", height = "300px")
Ser.No Fund R_Sq Beta Alpha Sharpe_Ratio Exp_Ratio Return_1Yr Return_5Yr
1 Fund Name 0.92 0.78 1.74 1.25 0.69 17.31 11.12
2 Fund Name 0.84 0.72 3.29 1.63 0.40 18.39 11.03
3 Fund Name 0.84 0.72 3.20 1.61 0.54 18.23 10.90
4 Fund Name 0.95 1.01 2.33 0.04 0.92 -11.46 10.84
5 Fund Name 0.71 0.58 2.57 1.49 0.34 16.63 10.80
6 Fund Name 0.87 0.82 1.63 1.17 0.17 17.86 10.47
7 Fund Name 0.71 0.58 2.24 1.39 0.64 16.28 10.43
8 Fund Name 0.82 0.80 0.85 0.96 0.58 16.59 10.28
9 Fund Name 0.87 0.82 1.42 1.12 0.33 17.63 10.20
10 Fund Name 0.89 0.81 1.04 1.05 0.42 18.20 10.15
11 Fund Name 0.88 0.74 0.75 0.98 0.51 17.67 10.14
12 Fund Name 0.86 0.84 0.60 0.91 0.40 16.48 9.96
13 Fund Name 0.89 0.77 1.10 1.07 0.55 17.59 9.93
14 Fund Name 0.72 0.74 0.94 0.94 0.79 15.78 9.92
15 Fund Name 0.86 0.84 0.59 0.91 0.45 16.48 9.90
16 Fund Name 0.71 1.03 1.73 1.34 0.43 11.93 9.85
17 Fund Name 0.80 1.46 1.40 1.11 1.03 16.32 9.82
18 Fund Name 0.73 1.08 1.48 1.23 0.77 12.44 9.76
19 Fund Name 0.82 0.80 0.28 0.83 1.18 15.89 9.67
20 Fund Name 0.84 1.41 1.21 1.08 0.82 12.83 9.63
21 Fund Name 0.78 0.71 0.28 0.81 0.64 15.88 9.63
22 Fund Name 0.83 1.68 0.94 0.94 0.99 16.51 9.60
23 Fund Name 0.87 0.74 0.22 0.84 0.96 17.14 9.56
24 Fund Name 0.89 0.81 0.45 0.90 1.03 17.52 9.48
25 Fund Name 0.87 0.69 -0.23 0.72 0.58 14.09 9.46
26 Fund Name 0.73 1.24 1.24 1.07 0.22 13.94 9.43
27 Fund Name 0.78 0.71 0.00 0.74 0.92 15.53 9.32
28 Fund Name 0.83 0.69 0.79 0.98 0.52 16.30 9.30
29 Fund Name 0.87 1.79 0.93 0.95 0.87 15.82 9.30
30 Fund Name 0.72 0.74 0.41 0.81 1.04 15.23 9.29
31 Fund Name 0.65 1.09 1.18 1.05 0.85 13.82 9.21
32 Fund Name 0.83 1.28 0.84 0.98 0.96 13.01 9.20
33 Fund Name 0.81 0.76 0.45 0.87 0.22 17.99 9.18
34 Fund Name 0.70 1.03 1.12 1.09 1.08 11.20 9.17
35 Fund Name 0.13 2.66 7.23 1.91 0.26 14.48 9.15
36 Fund Name 0.85 1.72 0.35 0.79 1.28 15.21 9.11
37 Fund Name 0.80 1.46 0.65 0.87 1.65 15.63 9.06
38 Fund Name 0.73 1.08 0.77 0.95 1.34 11.70 9.00
39 Fund Name 0.13 2.79 7.23 1.75 0.75 14.50 8.94
40 Fund Name 0.24 3.34 6.92 1.43 0.35 10.90 8.88
41 Fund Name 0.20 2.65 5.91 1.56 0.40 10.29 8.88
42 Fund Name 0.03 0.99 3.79 1.64 0.92 9.24 8.87
43 Fund Name 0.47 1.26 1.24 0.85 0.45 15.75 8.84
44 Fund Name 0.21 4.60 9.52 1.32 0.20 15.04 8.83
45 Fund Name 0.21 3.62 7.94 1.55 0.23 11.54 8.79
46 Fund Name 0.87 0.62 0.33 0.89 0.14 13.67 8.78
47 Fund Name 0.06 1.32 3.99 1.57 0.59 8.69 8.76
48 Fund Name 0.18 3.16 6.77 1.35 0.29 11.11 8.74
49 Fund Name 0.30 3.08 6.55 1.70 0.31 10.67 8.74
50 Fund Name 0.83 1.68 0.20 0.74 1.80 15.63 8.72
51 Fund Name 0.60 0.99 1.01 0.98 0.28 11.84 8.69
52 Fund Name 0.27 2.79 6.17 1.79 0.28 10.30 8.68
53 Fund Name 0.06 0.93 3.47 2.25 0.31 7.87 8.68
54 Fund Name 0.19 2.44 5.97 1.86 0.34 10.91 8.67
55 Fund Name 0.68 0.57 1.66 1.83 0.30 10.35 8.63
56 Fund Name 0.81 0.76 -0.04 0.74 0.68 17.45 8.63
57 Fund Name 0.13 2.56 5.29 1.03 0.37 9.76 8.63
58 Fund Name 0.13 2.92 6.00 1.00 0.36 10.17 8.62
59 Fund Name 0.70 0.84 1.25 1.26 0.76 11.70 8.61
60 Fund Name 0.44 1.01 1.57 1.02 0.40 9.67 8.61
61 Fund Name 0.38 4.37 8.23 1.35 0.25 11.41 8.60
62 Fund Name 0.36 3.97 8.14 1.69 0.29 10.53 8.59
63 Fund Name 0.66 1.08 0.77 0.91 0.61 12.24 8.58
64 Fund Name 0.85 1.29 0.50 0.87 0.85 12.80 8.56
65 Fund Name 0.24 3.33 6.61 1.26 0.67 10.56 8.55
66 Fund Name 0.80 1.21 0.46 0.84 0.66 11.82 8.54
67 Fund Name 0.21 4.60 9.26 1.22 0.56 14.65 8.52
68 Fund Name 0.68 0.57 1.53 1.74 0.45 10.20 8.51
69 Fund Name 0.75 1.41 1.05 0.97 0.31 13.36 8.51
70 Fund Name 0.80 1.62 -0.19 0.62 1.39 13.32 8.51
71 Fund Name 0.83 1.41 0.28 0.78 1.75 11.99 8.48
72 Fund Name 0.34 3.55 6.97 1.46 0.35 10.76 8.48
73 Fund Name 0.71 1.47 1.01 0.92 0.29 15.31 8.47
74 Fund Name 0.73 1.24 0.44 0.80 0.65 13.23 8.46
75 Fund Name 0.84 1.42 -0.44 0.55 1.04 12.80 8.46
76 Fund Name 0.24 3.60 7.25 1.32 0.10 11.26 8.45
77 Fund Name 0.20 2.23 4.62 1.30 0.13 5.91 8.44
78 Fund Name 0.87 1.64 -0.10 0.67 0.25 12.72 8.43
79 Fund Name 0.38 4.33 8.04 1.28 0.10 11.13 8.43
80 Fund Name 0.02 1.28 2.89 0.50 0.97 7.21 8.41
81 Fund Name 0.80 0.55 -0.23 0.67 0.44 12.10 8.41
82 Fund Name 0.83 1.56 0.12 0.72 0.78 13.33 8.41
83 Fund Name 0.31 1.71 4.43 2.72 0.19 8.45 8.40
84 Fund Name 0.87 1.79 0.14 0.74 1.62 14.96 8.40
85 Fund Name 0.23 3.12 6.43 1.35 0.21 11.22 8.39
86 Fund Name 0.18 3.16 6.43 1.17 0.61 10.77 8.38
87 Fund Name 0.43 3.56 7.16 1.76 0.25 10.61 8.38
88 Fund Name 0.26 1.54 4.32 2.88 0.39 8.42 8.37
89 Fund Name 0.46 1.25 0.76 0.72 1.14 15.02 8.37
90 Fund Name 0.35 4.92 9.36 1.32 0.30 11.71 8.36
91 Fund Name 0.83 1.29 0.03 0.70 1.62 12.25 8.36
92 Fund Name 0.87 0.61 -0.15 0.74 0.66 13.12 8.36
93 Fund Name 0.36 3.97 7.88 1.54 0.59 10.20 8.35
94 Fund Name 0.29 3.45 6.81 1.35 0.29 10.40 8.34
95 Fund Name 0.21 3.62 7.58 1.37 0.58 11.18 8.34
96 Fund Name 0.34 3.48 6.90 1.49 0.29 10.10 8.33
97 Fund Name 0.27 3.26 6.34 1.25 0.31 10.14 8.31
98 Fund Name 0.85 1.71 -0.35 0.60 1.91 14.51 8.30
99 Fund Name 0.19 2.72 5.32 1.08 0.43 8.01 8.29
100 Fund Name 0.60 1.00 0.60 0.82 0.46 11.60 8.29
101 Fund Name 0.16 1.99 4.80 1.66 0.19 9.79 8.28
102 Fund Name 0.38 4.36 7.92 1.19 0.50 11.08 8.26
103 Fund Name 0.13 2.55 4.89 0.82 0.82 9.25 8.26
104 Fund Name 0.13 2.92 5.55 0.79 0.81 9.68 8.23
105 Fund Name 0.25 2.61 6.11 1.96 0.28 10.16 8.23
106 Fund Name 0.77 1.23 0.00 0.66 1.07 12.67 8.19
107 Fund Name 0.50 1.29 3.58 3.95 0.11 7.57 8.18
108 Fund Name 0.09 2.35 4.19 0.56 0.90 7.05 8.18
109 Fund Name 0.19 1.10 3.39 2.91 0.33 7.57 8.16
110 Fund Name 0.31 2.73 5.51 1.51 0.42 9.15 8.16
111 Fund Name 0.32 1.72 4.19 2.42 0.41 8.21 8.15
112 Fund Name 0.33 1.61 4.30 2.99 0.28 8.34 8.15
113 Fund Name 0.30 0.97 3.07 3.84 0.33 6.99 8.15
114 Fund Name 0.35 4.91 9.07 1.20 0.67 11.34 8.14
115 Fund Name 0.32 1.13 3.40 3.66 0.28 7.42 8.13
116 Fund Name 0.16 1.99 4.64 1.54 0.39 9.61 8.11
117 Fund Name 0.19 2.44 5.47 1.53 0.81 10.39 8.11
118 Fund Name 0.06 0.95 3.28 2.03 0.30 8.32 8.10
119 Fund Name 0.25 2.84 5.82 1.40 0.20 9.72 8.10
120 Fund Name 0.91 0.98 -0.20 -0.08 0.87 -12.95 8.09
121 Fund Name 0.32 1.10 3.36 3.77 0.23 7.79 8.09
122 Fund Name 0.64 0.98 -0.05 0.58 0.45 9.47 8.09
123 Fund Name 0.46 1.52 4.08 3.53 0.12 8.07 8.07
124 Fund Name 0.30 3.42 6.60 1.28 0.40 10.14 8.07
125 Fund Name 0.15 1.22 3.44 2.21 0.41 7.86 8.06
126 Fund Name 0.20 2.67 5.12 1.03 1.15 9.46 8.05
127 Fund Name 0.66 1.08 0.20 0.69 1.08 11.66 8.03
128 Fund Name 0.38 1.73 4.16 2.57 0.27 8.10 8.03
129 Fund Name 0.30 1.71 4.24 2.44 0.35 8.36 8.03
130 Fund Name 0.19 1.10 3.26 2.73 0.45 7.44 8.02
131 Fund Name 0.17 1.25 3.43 2.26 0.23 8.11 8.02
132 Fund Name 0.24 1.93 4.51 1.91 0.17 7.88 8.01
133 Fund Name 0.38 4.34 7.64 1.05 0.50 10.70 7.98
134 Fund Name 0.11 2.73 5.34 0.82 0.35 7.96 7.96
135 Fund Name 0.40 1.26 3.54 3.61 0.32 7.62 7.95
136 Fund Name 0.13 1.26 3.35 1.88 0.44 7.75 7.94
137 Fund Name 0.29 0.95 2.84 3.44 0.58 6.73 7.93
138 Fund Name 0.15 1.22 3.31 2.06 0.50 7.76 7.93
139 Fund Name 0.44 1.36 3.62 3.42 0.23 7.47 7.93
140 Fund Name 0.27 2.80 5.51 1.31 0.95 9.60 7.92
141 Fund Name 0.24 3.60 6.75 1.06 0.60 10.75 7.91
142 Fund Name 0.34 3.56 6.42 1.09 0.85 10.20 7.89
143 Fund Name 0.17 1.25 3.28 2.07 0.38 7.95 7.88
144 Fund Name 0.06 0.93 2.72 1.50 1.07 7.07 7.88
145 Fund Name 0.39 1.60 4.03 2.87 0.40 8.36 7.88
146 Fund Name 0.23 3.13 6.00 1.10 0.61 10.78 7.87
147 Fund Name 0.44 1.01 1.05 0.85 0.90 9.12 7.86
148 Fund Name 0.44 3.56 6.65 1.41 0.73 10.08 7.84
149 Fund Name 0.38 1.73 3.96 2.30 0.49 7.88 7.83
150 Fund Name 0.30 3.07 5.70 1.13 1.13 9.77 7.81
151 Fund Name 0.70 1.47 0.70 0.83 0.61 14.93 7.79
152 Fund Name 0.41 1.55 3.72 2.67 0.33 7.74 7.78
153 Fund Name 0.46 1.53 3.91 3.22 0.28 7.91 7.77
154 Fund Name 0.34 3.48 6.40 1.18 0.80 9.54 7.77
155 Fund Name 0.06 0.95 2.97 1.73 0.55 8.00 7.75
156 Fund Name 0.41 1.07 3.41 4.60 0.18 7.83 7.74
157 Fund Name 0.87 1.51 -0.55 0.53 0.98 12.17 7.74
158 Fund Name 0.05 1.23 3.08 0.98 0.34 6.42 7.74
159 Fund Name 0.87 1.39 -0.14 0.65 0.18 12.56 7.72
160 Fund Name 0.36 4.16 7.36 1.05 0.23 9.63 7.72
161 Fund Name 0.75 1.40 0.40 0.77 1.04 12.44 7.71
162 Fund Name 0.20 2.43 5.22 1.42 0.05 9.65 7.71
163 Fund Name 0.33 1.63 3.88 2.35 0.58 8.02 7.70
164 Fund Name 0.41 1.62 3.80 2.53 1.05 7.80 7.68
165 Fund Name 0.87 1.04 6.42 0.16 0.90 -5.82 7.67
166 Fund Name 0.31 1.11 2.88 2.70 0.93 6.85 7.67
167 Fund Name 0.50 1.30 3.17 3.05 0.65 7.08 7.65
168 Fund Name 0.30 1.71 3.90 2.03 0.65 8.03 7.65
169 Fund Name 0.39 1.01 3.24 4.49 0.15 7.66 7.65
170 Fund Name 0.42 1.07 3.29 4.33 0.31 7.70 7.63
171 Fund Name 0.34 0.94 3.10 4.46 0.34 7.52 7.63
172 Fund Name 0.36 4.16 7.25 0.99 0.36 9.49 7.63
173 Fund Name 0.80 1.21 -0.47 0.50 1.21 10.86 7.62
174 Fund Name 0.85 1.28 -0.46 0.53 1.88 11.60 7.62
175 Fund Name 0.45 1.23 3.48 3.89 0.15 8.04 7.62
176 Fund Name 0.25 2.85 5.38 1.10 0.55 9.25 7.62
177 Fund Name 0.27 3.25 5.63 0.83 1.11 9.28 7.60
178 Fund Name 0.19 2.69 4.61 0.67 0.99 7.26 7.59
179 Fund Name 0.42 0.98 3.08 4.54 0.17 7.45 7.59
180 Fund Name 0.87 1.63 -0.84 0.46 0.72 11.93 7.57
181 Fund Name 0.41 1.54 3.50 2.35 0.55 7.49 7.57
182 Fund Name 0.41 0.98 3.06 4.46 0.15 7.46 7.57
183 Fund Name 0.38 1.32 2.98 2.23 0.30 7.03 7.57
184 Fund Name 0.45 1.37 3.29 2.80 0.56 7.14 7.57
185 Fund Name 0.25 2.62 5.52 1.52 0.83 9.57 7.56
186 Fund Name 0.40 1.26 3.15 2.89 0.78 7.16 7.55
187 Fund Name 0.39 1.01 3.13 4.26 0.25 7.55 7.54
188 Fund Name 0.42 0.97 3.01 4.38 0.26 7.37 7.53
189 Fund Name 0.29 3.46 6.08 0.91 0.92 9.63 7.51
190 Fund Name 0.34 0.93 2.95 4.16 0.50 7.35 7.51
191 Fund Name 0.26 1.54 3.47 1.83 1.21 7.50 7.47
192 Fund Name 0.42 0.98 2.94 4.18 0.27 7.33 7.47
193 Fund Name 0.45 1.23 3.28 3.48 0.35 7.82 7.41
194 Fund Name 0.32 2.74 4.80 0.94 1.02 8.39 7.39
195 Fund Name 0.04 1.21 2.69 0.74 1.05 5.94 7.38
196 Fund Name 0.34 1.12 2.73 2.50 0.83 7.17 7.37
197 Fund Name 0.20 1.44 3.07 1.38 0.28 7.46 7.31
198 Fund Name 0.11 2.73 4.71 0.53 1.19 7.06 7.27
199 Fund Name 0.24 1.90 3.75 1.22 1.00 7.00 7.26
200 Fund Name 0.94 1.03 1.83 0.04 0.85 -14.58 7.23
201 Fund Name 0.14 1.27 2.73 1.19 1.04 7.11 7.22
202 Fund Name 0.19 2.41 4.78 1.12 0.65 9.16 7.17
203 Fund Name 0.95 0.85 9.14 0.38 1.18 20.89 7.17
204 Fund Name 0.87 1.38 -0.71 0.46 1.08 11.81 7.13
205 Fund Name 0.41 1.71 3.77 2.20 0.21 7.54 7.12
206 Fund Name 0.67 1.46 -0.21 0.06 0.36 -0.11 7.10
207 Fund Name 0.17 1.80 3.35 0.87 0.21 5.58 7.03
208 Fund Name 0.38 1.29 2.29 1.08 1.04 6.25 6.90
209 Fund Name 0.42 1.71 3.53 1.85 0.46 7.28 6.86
210 Fund Name 0.88 0.95 0.02 -0.07 0.63 -11.35 6.63
211 Fund Name 0.20 1.45 2.33 0.50 0.83 6.68 6.56
212 Fund Name 0.99 0.98 1.21 0.01 0.56 -17.28 6.53
213 Fund Name 0.96 0.99 1.08 -0.07 0.69 -16.27 6.48
214 Fund Name 0.97 0.97 2.99 0.07 0.98 -13.62 6.37
215 Fund Name 0.88 1.16 -0.02 0.08 1.21 -1.12 6.36
216 Fund Name 0.98 0.95 0.59 -0.09 0.72 -17.60 6.29
217 Fund Name 0.96 0.96 -0.30 -0.09 1.08 -12.92 6.17
218 Fund Name 0.97 1.02 0.54 -0.10 1.00 -15.50 6.11
219 Fund Name 0.97 0.93 8.47 -0.24 1.15 -22.49 6.04
220 Fund Name 0.93 0.99 2.40 -0.01 0.52 -10.39 5.77
221 Fund Name 0.97 0.96 0.28 -0.11 1.06 -17.64 5.47
222 Fund Name 0.97 0.94 1.00 -0.07 0.65 -16.58 5.32
223 Fund Name 0.96 1.03 -0.36 -0.14 1.11 -17.93 5.31
224 Fund Name 0.97 1.00 1.75 0.04 1.15 -18.06 5.20
225 Fund Name 0.90 0.96 0.07 -0.11 0.80 -17.49 5.10
226 Fund Name 0.96 0.99 1.19 -0.06 0.58 -10.27 4.98
227 Fund Name 0.94 1.06 -0.04 -0.07 0.85 -19.29 4.95
228 Fund Name 0.97 0.94 1.60 0.01 0.95 -12.04 4.92
229 Fund Name 0.96 0.94 2.43 -0.13 0.65 -12.49 4.65
230 Fund Name 0.98 0.96 -0.38 -0.07 1.18 -15.05 4.21
231 Fund Name 0.99 0.99 2.85 0.09 0.07 -17.53 4.20
232 Fund Name 0.99 0.99 2.87 0.09 0.07 -17.55 4.18
233 Fund Name 0.99 0.98 2.76 0.09 0.08 -17.43 4.15
234 Fund Name 0.98 0.97 1.20 0.01 0.58 -14.53 4.09
235 Fund Name 0.99 0.99 2.54 0.07 0.10 -17.94 3.99
236 Fund Name 0.99 0.99 2.67 0.08 0.28 -17.74 3.98
237 Fund Name 0.98 0.97 2.63 0.08 0.11 -17.18 3.98
238 Fund Name 0.88 0.93 0.70 -0.08 0.89 -14.19 3.89
239 Fund Name 0.99 0.99 2.36 0.07 0.30 -18.14 3.82
240 Fund Name 0.99 0.98 2.58 0.08 0.10 -17.48 3.71
241 Fund Name 0.98 0.96 2.21 0.06 0.46 -17.65 3.48
242 Fund Name 0.99 1.00 0.86 -0.01 0.05 -19.61 3.45
243 Fund Name 1.00 1.00 0.74 -0.01 0.05 -19.62 3.43
244 Fund Name 0.99 1.00 0.85 -0.01 0.10 -19.65 3.42
245 Fund Name 0.99 0.98 0.92 0.00 0.24 -19.08 3.38
246 Fund Name 1.00 0.98 -0.24 -0.06 0.46 -19.09 3.36
247 Fund Name 0.99 1.00 0.93 0.00 0.05 -19.63 3.35
248 Fund Name 0.99 1.00 0.76 -0.01 0.09 -19.79 3.29
249 Fund Name 0.99 0.98 2.13 0.06 0.55 -17.59 3.27
250 Fund Name 0.99 0.98 0.80 -0.01 0.42 -19.22 3.26
251 Fund Name 1.00 1.00 -0.22 -0.06 0.14 -19.58 3.26
252 Fund Name 0.99 1.00 0.74 -0.01 0.10 -19.84 3.22
253 Fund Name 0.99 1.00 0.66 -0.02 0.10 -19.99 3.19
254 Fund Name 0.99 0.98 0.55 -0.02 0.05 -19.59 3.18
255 Fund Name 0.99 1.00 0.67 -0.02 0.17 -19.89 3.14
256 Fund Name 0.99 1.00 0.81 -0.01 0.14 -19.77 3.12
257 Fund Name 0.99 0.96 0.40 -0.03 0.74 -19.76 3.12
258 Fund Name 0.99 0.98 1.86 0.04 0.61 -18.03 3.09
259 Fund Name 0.99 1.00 0.49 -0.03 0.10 -19.66 3.03
260 Fund Name 0.99 1.00 0.48 -0.03 0.30 -20.12 3.02
261 Fund Name 0.99 1.01 0.43 -0.03 0.29 -20.28 2.95
262 Fund Name 0.99 0.99 0.53 -0.02 0.10 -19.83 2.94
263 Fund Name 0.99 1.00 0.44 -0.03 0.30 -19.75 2.93
264 Fund Name 0.96 1.10 0.12 -0.11 1.11 -17.69 2.89
265 Fund Name 0.98 0.98 1.68 0.03 1.06 -17.82 2.77
266 Fund Name 0.99 0.98 0.03 -0.05 0.26 -19.97 2.76
267 Fund Name 0.99 0.98 0.20 -0.04 0.53 -19.88 2.70
268 Fund Name 0.99 1.00 0.19 -0.04 0.47 -19.69 2.68
269 Fund Name 0.99 1.00 0.30 -0.03 0.05 -19.85 2.68
270 Fund Name 0.99 1.00 0.07 -0.05 0.45 -19.98 2.62
271 Fund Name 0.99 0.98 -0.01 -0.05 0.33 -19.62 2.59
272 Fund Name 0.99 1.01 0.02 -0.05 0.69 -20.60 2.49
273 Fund Name 0.99 0.96 -0.02 -0.05 1.09 -20.02 2.38
274 Fund Name 0.99 0.98 -0.21 -0.06 0.58 -19.78 2.35
275 Fund Name 0.99 0.98 -0.42 -0.07 0.84 -20.37 2.32
276 Fund Name 0.99 1.00 -0.31 -0.06 1.02 -20.02 2.16
277 Fund Name 0.93 0.98 4.85 -0.49 1.21 -26.34 -0.07
278 Fund Name 0.96 0.95 0.99 -0.52 1.12 -30.02 -1.79
279 Fund Name 0.89 0.96 8.62 -0.32 0.57 -26.65 -1.89
280 Fund Name 0.89 1.28 -0.43 0.04 1.05 -3.55 NA
281 Fund Name 0.99 1.00 1.05 0.00 0.07 -19.56 NA
282 Fund Name 0.32 2.41 5.16 1.79 0.02 8.32 NA
283 Fund Name 0.32 2.39 5.15 1.82 0.02 8.32 NA
284 Fund Name 0.99 1.00 0.89 -0.01 0.05 -19.70 NA
285 Fund Name 0.99 0.99 2.89 0.09 0.05 -17.54 NA
286 Fund Name 0.03 1.29 3.24 0.73 0.66 7.79 NA
287 Fund Name 0.99 0.99 0.87 -0.01 0.20 -19.22 NA
288 Fund Name 0.99 0.98 2.82 0.09 0.50 -17.23 NA
289 Fund Name 1.00 1.00 -0.08 -0.05 0.26 -19.21 NA
290 Fund Name 0.99 1.00 0.88 -0.01 0.10 -19.56 NA
291 Fund Name 0.99 0.99 2.93 0.09 0.10 -17.54 NA
292 Fund Name 0.25 1.12 3.48 3.40 0.32 8.05 NA
293 Fund Name 0.25 1.15 2.60 1.83 1.14 7.18 NA
294 Fund Name 0.64 1.19 2.01 1.28 0.78 17.08 NA
295 Fund Name 0.98 0.99 4.82 0.11 0.74 -13.75 NA
296 Fund Name 0.36 4.51 8.34 1.24 0.79 11.35 NA
297 Fund Name 0.36 4.54 8.73 1.41 0.30 11.84 NA
298 Fund Name 0.75 1.26 0.77 0.92 0.56 14.16 NA
299 Fund Name 0.75 1.26 0.66 0.88 0.68 14.02 NA
300 Fund Name 0.93 0.98 1.01 -0.07 0.58 -16.86 NA
301 Fund Name 0.99 1.00 0.90 -0.01 0.07 -19.70 NA
302 Fund Name 0.84 1.06 6.87 0.17 0.88 -6.45 NA
303 Fund Name 0.97 1.00 1.80 -0.49 1.21 -32.66 NA
304 Fund Name 0.97 0.99 1.75 -0.49 1.21 -32.50 NA
305 Fund Name 0.97 1.00 0.99 -0.52 1.21 -33.84 NA
306 Fund Name 0.88 0.95 0.93 0.62 1.06 -12.66 NA
307 Fund Name 0.99 1.00 0.91 0.00 0.07 -19.70 NA
308 Fund Name 0.99 0.99 2.90 0.09 0.07 -17.53 NA
pandoc.header(colFmt("1C: MF's filtered on Return and Holdings", 'blue'), 1, 'setext')

1C: MF’s filtered on Return and Holdings

top.mf <- aa.mf[, c(1,7,20,22,24,44)]
top.mf <- top.mf[order(top.mf, decreasing = TRUE),]
top.mf$aax <- top.mf$`10 Yr Ret (%)`
top.mf <- top.mf[1:15,]

rownames(top.mf) <- NULL
value.string <- paste("Top 15 MF's with highest 10 Year Return ")
row.ctr <- nrow(top.mf)
paste(colFmt(value.string, "blue"))

[1] “Top 15 MF’s with highest 10 Year Return

top.mf[1:row.ctr,] %>%
  mutate(
    Ser.No = row.names(.),
    Fund = (`Fund Name`),
    Return_1_Yr = color_tile("white", "orange")(`1 Yr Ret (%).x`),
    Return_3_Yr = color_tile("white", "green")(`3 Yr Ret (%)`),
    Return_5_Yr = color_tile("white", "blue")(`5 Yr Ret (%)`),
    Return_Ten_Yr = color_tile("white", "red")(aax),
    NAV = color_tile("white", "purple")(`Net Assests (Cr).y`)
    
  ) %>%
  select(Ser.No,Fund, Return_1_Yr, Return_3_Yr,Return_5_Yr,Return_Ten_Yr, NAV) %>%
  kable(escape = F) %>%
  kable_styling("hover", full_width = T) %>%
  scroll_box(width = "100%", height = "300px")
Ser.No Fund Return_1_Yr Return_3_Yr Return_5_Yr Return_Ten_Yr NAV
1 UTI Value Opportunities Fund - Regular Plan -16.52 -1.19 0.96 7.83 3,294
2 UTI Value Opportunities Fund - Direct Plan -15.99 -0.48 1.68 NA 3,294
3 UTI Unit Linked Insurance Plan - Direct Plan -9.43 1.04 4.33 NA 3,896
4 UTI Unit Linked Insurance Plan -9.99 0.45 3.73 6.77 3,896
5 UTI Ultra Short Term Fund - Regular Plan 2.54 5.37 6.59 7.55 1,659
6 UTI Ultra Short Term Fund - Direct 3.13 6.00 7.20 NA 1,659
7 UTI Treasury Advantage Fund - Regular Plan -4.39 3.14 5.30 7.13 2,029
8 UTI Treasury Advantage Fund - Direct Plan -4.28 3.28 5.45 NA 2,029
9 UTI Transportation and Logistics Fund - Regular Plan -32.79 -16.11 -5.68 9.90 808.00
10 UTI Transportation and Logistics Fund - Direct Plan -32.10 -15.15 -4.60 NA 808.00
11 UTI Short Term Income Fund - Regular Plan -3.10 2.88 5.24 7.46 1,826
12 UTI Short Term Income Fund - Direct Plan -2.71 3.36 5.75 NA 1,826
13 UTI Sensex Exchange Traded Fund -17.53 2.95 NA NA 5,658
14 UTI Retirement Benefit Pension Fund - Regular Plan -10.10 -0.81 3.57 6.27 2,453
15 UTI Retirement Benefit Pension Fund - Direct Plan -9.52 -0.23 4.19 NA 2,453
top.mf <- aa.mf[, c(1,7,20,22,24,44)]
top.mf <- top.mf[order(top.mf$`5 Yr Ret (%)`, decreasing = TRUE),]
top.mf$aax <- top.mf$`10 Yr Ret (%)`
top.mf <- top.mf[1:15,]

rownames(top.mf) <- NULL
value.string <- paste("Top 15 MF's with highest 5 Year Return ")
row.ctr <- nrow(top.mf)
paste(colFmt(value.string, "blue"))

[1] “Top 15 MF’s with highest 5 Year Return

top.mf[1:row.ctr,] %>%
  mutate(
    Ser.No = row.names(.),
    Fund = (`Fund Name`),
    Return_1_Yr = color_tile("white", "orange")(`1 Yr Ret (%).x`),
    Return_3_Yr = color_tile("white", "green")(`3 Yr Ret (%)`),
    Return_5_Yr = color_tile("white", "blue")(`5 Yr Ret (%)`),
    Return_Ten_Yr = color_tile("white", "red")(aax),
    NAV = color_tile("white", "purple")(`Net Assests (Cr).y`)
    
  ) %>%
  select(Ser.No,Fund, Return_1_Yr, Return_3_Yr,Return_5_Yr,Return_Ten_Yr, NAV) %>%
  kable(escape = F) %>%
  kable_styling("hover", full_width = T) %>%
  scroll_box(width = "100%", height = "300px")
Ser.No Fund Return_1_Yr Return_3_Yr Return_5_Yr Return_Ten_Yr NAV
1 Nippon India Gilt Securities Fund - Direct Plan 17.31 10.88 11.12 NA 1,204
2 IDFC Government Securities Fund - Constant Maturity Plan - Direct Plan 18.39 12.40 11.03 NA 195.00
3 IDFC Government Securities Fund - Constant Maturity Plan - Regular Plan 18.23 12.29 10.90 9.37 195.00
4 Mirae Asset Emerging Bluechip Fund - Direct Plan -11.46 1.84 10.84 NA 7,412
5 SBI Magnum Constant Maturity Fund - Direct Plan 16.63 10.91 10.80 NA 573.00
6 ICICI Prudential Constant Maturity Gilt Fund - Direct Plan 17.86 11.00 10.47 NA 121.00
7 SBI Magnum Constant Maturity Fund 16.28 10.54 10.43 9.73 573.00
8 Aditya Birla Sun Life Government Securities Fund - Direct Plan 16.59 10.02 10.28 NA 272.00
9 ICICI Prudential Constant Maturity Gilt Fund 17.63 10.77 10.20 NA 121.00
10 IDFC Government Securities Fund - Investment Plan - Direct Plan 18.20 10.24 10.15 NA 518.00
11 SBI Magnum Gilt Fund - Direct Plan 17.67 9.65 10.14 NA 2,251
12 ICICI Prudential Long Term Bond Fund - Direct Plan 16.42 10.09 10.13 NA 839.00
13 Kotak Gilt Investment Provident Fund and Trust Plan - Direct Plan 16.48 9.92 9.96 NA 449.00
14 Nippon India Gilt Securities Fund 16.25 9.80 9.96 9.29 1,204
15 Nippon India Gilt Securities PF 16.26 9.80 9.96 NA 1,204
top.mf <- aa.mf[, c(1,7,20,22,24,44)]
top.mf <- top.mf[order(top.mf$`3 Yr Ret (%)`, decreasing = TRUE),]
top.mf$aax <- top.mf$`10 Yr Ret (%)`
top.mf <- top.mf[1:15,]

rownames(top.mf) <- NULL
value.string <- paste("Top 15 MF's with highest 3 Year Return ")
row.ctr <- nrow(top.mf)
paste(colFmt(value.string, "blue"))

[1] “Top 15 MF’s with highest 3 Year Return

top.mf[1:row.ctr,] %>%
  mutate(
    Ser.No = row.names(.),
    Fund = (`Fund Name`),
    Return_1_Yr = color_tile("white", "orange")(`1 Yr Ret (%).x`),
    Return_3_Yr = color_tile("white", "green")(`3 Yr Ret (%)`),
    Return_5_Yr = color_tile("white", "blue")(`5 Yr Ret (%)`),
    Return_Ten_Yr = color_tile("white", "red")(aax),
    NAV = color_tile("white", "purple")(`Net Assests (Cr).y`)
    
  ) %>%
  select(Ser.No,Fund, Return_1_Yr, Return_3_Yr,Return_5_Yr,Return_Ten_Yr, NAV) %>%
  kable(escape = F) %>%
  kable_styling("hover", full_width = T) %>%
  scroll_box(width = "100%", height = "300px")
Ser.No Fund Return_1_Yr Return_3_Yr Return_5_Yr Return_Ten_Yr NAV
1 Tata Digital India Fund - Direct Plan -12.66 14.36 NA NA 306.00
2 SBI Technology Opportunities Fund - Direct Plan -6.30 13.11 7.29 NA 134.00
3 Nippon India Pharma Fund - Direct Plan 20.89 12.96 7.17 NA 2,190
4 Tata Digital India Fund - Regular Plan -14.14 12.41 NA NA 306.00
5 Aditya Birla Sun Life Digital India Fund - Direct Plan -8.85 12.40 8.82 NA 332.00
6 IDFC Government Securities Fund - Constant Maturity Plan - Direct Plan 18.39 12.40 11.03 NA 195.00
7 IDFC Government Securities Fund - Constant Maturity Plan - Regular Plan 18.23 12.29 10.90 9.37 195.00
8 Nippon India Pharma Fund 19.92 11.99 6.23 13.90 2,190
9 SBI Technology Opportunities Fund -7.01 11.98 6.31 11.62 134.00
10 Aditya Birla Sun Life Digital India Fund -9.65 11.37 7.96 9.65 332.00
11 Franklin India Technology Fund - Direct Plan -6.14 11.16 7.81 NA 209.00
12 ICICI Prudential Constant Maturity Gilt Fund - Direct Plan 17.86 11.00 10.47 NA 121.00
13 SBI Magnum Constant Maturity Fund - Direct Plan 16.63 10.91 10.80 NA 573.00
14 Nippon India Gilt Securities Fund - Direct Plan 17.31 10.88 11.12 NA 1,204
15 ICICI Prudential Constant Maturity Gilt Fund 17.63 10.77 10.20 NA 121.00
top.mf <- aa.mf[, c(1,7,20,22,24,44)]
top.mf <- top.mf[order(top.mf$`1 Yr Ret (%).x`, decreasing = TRUE),]
top.mf$aax <- top.mf$`10 Yr Ret (%)`
top.mf <- top.mf[1:15,]

rownames(top.mf) <- NULL
value.string <- paste("Top 15 MF's with highest 1 Year Return ")
row.ctr <- nrow(top.mf)
paste(colFmt(value.string, "blue"))

[1] “Top 15 MF’s with highest 1 Year Return

top.mf[1:row.ctr,] %>%
  mutate(
    Ser.No = row.names(.),
    Fund = (`Fund Name`),
    Return_1_Yr = color_tile("white", "orange")(`1 Yr Ret (%).x`),
    Return_3_Yr = color_tile("white", "green")(`3 Yr Ret (%)`),
    Return_5_Yr = color_tile("white", "blue")(`5 Yr Ret (%)`),
    Return_Ten_Yr = color_tile("white", "red")(aax),
    NAV = color_tile("white", "purple")(`Net Assests (Cr).y`)
    
  ) %>%
  select(Ser.No,Fund, Return_1_Yr, Return_3_Yr,Return_5_Yr,Return_Ten_Yr, NAV) %>%
  kable(escape = F) %>%
  kable_styling("hover", full_width = T) %>%
  scroll_box(width = "100%", height = "300px")
Ser.No Fund Return_1_Yr Return_3_Yr Return_5_Yr Return_Ten_Yr NAV
1 Tata India Pharma & HealthCare Fund - Direct Plan 20.90 8.37 NA NA 153.00
2 Nippon India Pharma Fund - Direct Plan 20.89 12.96 7.17 NA 2,190
3 Nippon India Pharma Fund 19.92 11.99 6.23 13.90 2,190
4 Tata India Pharma & HealthCare Fund - Regular Plan 19.07 6.58 NA NA 153.00
5 UTI Healthcare Fund - Direct Plan 18.52 6.50 2.20 NA 360.00
6 IDFC Government Securities Fund - Constant Maturity Plan - Direct Plan 18.39 12.40 11.03 NA 195.00
7 IDFC Government Securities Fund - Constant Maturity Plan - Regular Plan 18.23 12.29 10.90 9.37 195.00
8 IDFC Government Securities Fund - Investment Plan - Direct Plan 18.20 10.24 10.15 NA 518.00
9 Axis Gilt Fund - Direct Plan 17.99 9.44 9.18 NA 61.00
10 SBI Healthcare Opportunities Fund - Direct Plan 17.91 3.93 1.83 NA 853.00
11 ICICI Prudential Constant Maturity Gilt Fund - Direct Plan 17.86 11.00 10.47 NA 121.00
12 SBI Magnum Gilt Fund - Direct Plan 17.67 9.65 10.14 NA 2,251
13 ICICI Prudential Constant Maturity Gilt Fund 17.63 10.77 10.20 NA 121.00
14 DSP Government Securities Fund - Direct Plan 17.59 10.13 9.93 NA 705.00
15 IDFC Government Securities Fund - Investment Plan - Regular Plan 17.52 9.60 9.48 9.88 518.00
#print(dfSummary(top.mf[,c(1,29, 27,28,25, 5,14,18)]), max.tbl.height = 300, method = "render", footnote = NA)
knitr::opts_chunk$set(echo = TRUE)
pandoc.header(colFmt("Section-2: Interactive Tables-Debt Funds", 'red'), 1, 'setext')

Section-2: Interactive Tables-Debt Funds

pandoc.header(colFmt("2A: Values Table:- R-Sq, Alpha, Beta, Sharpe Ratio & Exp-Ratio", 'blue'), 1, 'setext')

2A: Values Table:- R-Sq, Alpha, Beta, Sharpe Ratio & Exp-Ratio

disp.df <- vr.df.new[grep("DT-", vr.df.new$Category),c(1,3,4,5,29,27,28,25)]
datatable(disp.df[order(disp.df$Category),], filter = "top", options = list(scrollY = '300px'), rownames = FALSE )
pandoc.header(colFmt("2B: Performance and Ranking Table", 'blue'), 1, 'setext')

2B: Performance and Ranking Table

disp.df <- vr.df.new[grep("DT-", vr.df.new$Category),c(1,3,16,17,18,19,20,21,22,24)]
datatable(disp.df[order(disp.df$`10 Yr Ret (%)`, disp.df$`5 Yr Ret (%)`, decreasing = TRUE),], 
          filter = "top", options = list(scrollY = '300px'), rownames = FALSE )
pandoc.header(colFmt("2C: Turnover and Risks Table", 'blue'), 1, 'setext')

2C: Turnover and Risks Table

disp.df <- vr.df.new[grep("DT-", vr.df.new$Category),c(1,3,4,8,9,23,31,32,33,34)]
datatable(disp.df[order(disp.df$Category),], filter = "top", options = list(scrollY = '300px'), rownames = FALSE )
knitr::opts_chunk$set(echo = TRUE)
pandoc.header(colFmt("Section-3: Interactive Tables-Equity Funds", 'red'), 1, 'setext')

Section-3: Interactive Tables-Equity Funds

pandoc.header(colFmt("3A: Values Table:- R-Sq, Alpha, Beta, Sharpe Ratio & Exp-Ratio", 'blue'), 1, 'setext')

3A: Values Table:- R-Sq, Alpha, Beta, Sharpe Ratio & Exp-Ratio

disp.df <- vr.df.new[grep("EQ-", vr.df.new$Category),c(1,3,4,5,29,27,28,25)]
datatable(disp.df[order(disp.df$Category),], filter = "top", options = list(scrollY = '300px'), rownames = FALSE )
pandoc.header(colFmt("3B: Performance and Ranking Table", 'blue'), 1, 'setext')

3B: Performance and Ranking Table

disp.df <- vr.df.new[grep("EQ-", vr.df.new$Category),c(1,3,16,17,18,19,20,21,22,24)]
datatable(disp.df[order(disp.df$`10 Yr Ret (%)`, disp.df$`5 Yr Ret (%)`, decreasing = TRUE),], 
          filter = "top", options = list(scrollY = '300px'), rownames = FALSE )
pandoc.header(colFmt("3C: Turnover and Risks Table", 'blue'), 1, 'setext')

3C: Turnover and Risks Table

disp.df <- vr.df.new[grep("EQ-", vr.df.new$Category),c(1,3,4,8,9,23,31,32,33,34)]
datatable(disp.df[order(disp.df$Category),], filter = "top", options = list(scrollY = '300px'), rownames = FALSE )
knitr::opts_chunk$set(echo = TRUE)
pandoc.header(colFmt("Section-4: Interactive Tables-Hybrid Funds", 'red'), 1, 'setext')

Section-4: Interactive Tables-Hybrid Funds

pandoc.header(colFmt("4A: Values Table:- R-Sq, Alpha, Beta, Sharpe Ratio & Exp-Ratio", 'blue'), 1, 'setext')

4A: Values Table:- R-Sq, Alpha, Beta, Sharpe Ratio & Exp-Ratio

disp.df <- vr.df.new[grep("HY-", vr.df.new$Category),c(1,3,4,5,29,27,28,25)]
datatable(disp.df[order(disp.df$Category),], filter = "top", options = list(scrollY = '300px'), rownames = FALSE )
pandoc.header(colFmt("4B: Performance and Ranking Table", 'blue'), 1, 'setext')

4B: Performance and Ranking Table

disp.df <- vr.df.new[grep("HY-", vr.df.new$Category),c(1,3,16,17,18,19,20,21,22,24)]
datatable(disp.df[order(disp.df$`10 Yr Ret (%)`, disp.df$`5 Yr Ret (%)`, decreasing = TRUE),], 
          filter = "top", options = list(scrollY = '300px'), rownames = FALSE )
pandoc.header(colFmt("4C: Turnover and Risks Table", 'blue'), 1, 'setext')

4C: Turnover and Risks Table

disp.df <- vr.df.new[grep("HY-", vr.df.new$Category),c(1,3,4,8,9,23,31,32,33,34)]
datatable(disp.df[order(disp.df$Category),], filter = "top", options = list(scrollY = '300px'), rownames = FALSE )