MATLAB code empirical analysis (table 1, table 2 and figure 6) 1. Import data and set risk-free rate of return R_M=xlsread('Data_Empirical Analysis',1,'B3:BV235'); % 73 mutual fund returns r=0.001; % risk-free rate of return 2. Find five best and five worst performing mutual funds according to the Sharpe ratio mean=mean(R_M); vola=std(R_M); SR=(mean-r)./vola; % Sharpe ratio SR SR_rank=tiedrank(-SR) % SR ranking in descending order 3. Import data of the 10 mutual funds and market index clear R_M(:,1)=xlsread('Data_Empirical Analysis',2,'B3:B235'); % S&P500 R_M(:,2)=xlsread('Data_Empirical Analysis',1,'V3:V235'); % Franklin Growth Series Class A R_M(:,3)=xlsread('Data_Empirical Analysis',1,'BJ3:BJ235'); % T. Rowe Price Blue Chip Growth Fund R_M(:,4)=xlsread('Data_Empirical Analysis',1,'U3:U235'); % Franklin DynaTech Fund Class A R_M(:,5)=xlsread('Data_Empirical Analysis',1,'H3:H235'); % Brown Capital Management Small Company Fund R_M(:,6)=xlsread('Data_Empirical Analysis',1,'BA3:BA235'); % T. Rowe Price Institutional Mid-Cap Equity R_M(:,7)=xlsread('Data_Empirical Analysis',1,'AR3:AR235'); % BMO Large-Cap Growth Fund Class Y R_M(:,8)=xlsread('Data_Empirical Analysis',1,'K3:K235'); % Commerce Growth Fund R_M(:,9)=xlsread('Data_Empirical Analysis',1,'AV3:AV235'); % MainStay Large Cap Growth Fund Class A R_M(:,10)=xlsread('Data_Empirical Analysis',1,'B3:B235'); % AB Growth Fund Class B R_M(:,11)=xlsread('Data_Empirical Analysis',1,'AA3:AA235'); % Goldman Sachs Capital Growth Fund Class 4. Set parameters, range of x and compute c and lower partial moment with target c n=2; % lower partial moment order t=0.002; % target t r=0.001; x=[-2:0.00001:3]; for i=1:11 R_P.mean(:,i)=mean(x.*R_M(:,i)+(1-x)*r); % mean of portfolio return R_P R_P.LPM(:,i)=nthroot(lpm(x.*R_M(:,i)+(1-x)*r,t,n),n); % n-th root of lower partial moment for portfolio return R_P [LPM_n,t(R_P)]^(1/n) x_MLPM.ind(i)=find(R_P.LPM(:,i)==min(R_P.LPM(:,i)),1); % find index number of MLPM portfolios x_MLPM.value(i)=x(x_MLPM.ind(i)); % retrieve value of x at the MLPM portfolio c(i)=(t-(1-x_MLPM.value(i))*r)/(x_MLPM.value(i)); % compute c LPM2c(i)=nthroot(lpm(R_M(:,i),c(i),2),2) % compute lower partial moment with target c end 5. Return and downside risk of the 10 mutual funds and market index mean=mean(R_M) vola=std(R_M) LPM2t=nthroot(lpm(R_M(:,1:11),t,2),2) % lower partial moment of order 2 with target t MLPM_slope=(mean-r)./LPM2c % slope of MLPM portfolios 6. Plot portfolio lines of the 10 mutual funds and market index figure('position', [200 0 1600 850]) plot(R_P.LPM(:,1),R_P.mean(:,1),'color','k','LineWidth',1) % plot portfolio line of the index hold on plot(t-r,r,'.k','MarkerSize',16) text(t-r-0.0010,r-0.0002,'$r$','Interpreter','latex','FontSize',20,'FontName','Times New Roman') hold on plot(LPM2t(1),mean(1),'.k','MarkerSize',12) text(LPM2t(1)+0.00015,mean(1)-0.0002,'S\&P500','Interpreter','latex','FontSize',20,'FontName','Times New Roman') hold on plot(R_P.LPM(:,2),R_P.mean(:,2),'color','k','LineWidth',1) % plot portfolio line of mutual fund with SR rank 1 hold on plot(LPM2t(2),mean(2),'.k','MarkerSize',12) text(LPM2t(2)+0.00015,mean(2)-0.0002,'1','Interpreter','latex','FontSize',20,'FontName','Times New Roman') hold on plot(R_P.LPM(:,3),R_P.mean(:,3),'color','k','LineWidth',1) % plot portfolio line of mutual fund with SR rank 2 hold on plot(LPM2t(3),mean(3),'.k','MarkerSize',12) text(LPM2t(3)+0.00015,mean(3)-0.0002,'2','Interpreter','latex','FontSize',20,'FontName','Times New Roman') hold on plot(R_P.LPM(:,4),R_P.mean(:,4),'color','k','LineWidth',1) % plot portfolio line of mutual fund with SR rank 3 hold on plot(LPM2t(4),mean(4),'.k','MarkerSize',12) text(LPM2t(4)+0.00015,mean(4)-0.0002,'3','Interpreter','latex','FontSize',20,'FontName','Times New Roman') hold on plot(R_P.LPM(:,5),R_P.mean(:,5),'color','k','LineWidth',1) % plot portfolio line of mutual fund with SR rank 4 hold on plot(LPM2t(5),mean(5),'.k','MarkerSize',12) text(LPM2t(5)+0.00015,mean(5)-0.00020,'4','Interpreter','latex','FontSize',20,'FontName','Times New Roman') hold on plot(R_P.LPM(:,6),R_P.mean(:,6),'color','k','LineWidth',1) % plot portfolio line of mutual fund with SR rank 5 hold on plot(LPM2t(6),mean(6),'.k','MarkerSize',12) text(LPM2t(6)+0.00015,mean(6)-0.0002,'5','Interpreter','latex','FontSize',20,'FontName','Times New Roman') hold on plot(R_P.LPM(:,7),R_P.mean(:,7),'color','k','LineWidth',1) % plot portfolio line of mutual fund with SR rank 69 hold on plot(LPM2t(7),mean(7),'.k','MarkerSize',12) text(LPM2t(7)+0.00015,mean(7)-0.0003,'6','Interpreter','latex','FontSize',20,'FontName','Times New Roman') hold on plot(R_P.LPM(:,8),R_P.mean(:,8),'color','k','LineWidth',1) % plot portfolio line of mutual fund with SR rank 70 hold on plot(LPM2t(8),mean(8),'.k','MarkerSize',12) text(LPM2t(8)+0.00015,mean(8)+0.00015,'7','Interpreter','latex','FontSize',20,'FontName','Times New Roman') hold on plot(R_P.LPM(:,9),R_P.mean(:,9),'color','k','LineWidth',1) % plot portfolio line of mutual fund with SR rank 71 hold on plot(LPM2t(9),mean(9),'.k','MarkerSize',12) text(LPM2t(9)+0.00015,mean(9)-0.0002,'8','Interpreter','latex','FontSize',20,'FontName','Times New Roman') hold on plot(R_P.LPM(:,10),R_P.mean(:,10),'color','k','LineWidth',1) % plot portfolio line of mutual fund with SR rank 72 hold on plot(LPM2t(10),mean(10),'.k','MarkerSize',12) text(LPM2t(10)+0.00015,mean(10)-0.0003,'9','Interpreter','latex','FontSize',20,'FontName','Times New Roman') hold on plot(R_P.LPM(:,11),R_P.mean(:,11),'color','k','LineWidth',1) % plot portfolio line of mutual fund with SR rank 73 hold on plot(LPM2t(11),mean(11),'.k','MarkerSize',12) text(LPM2t(11)+0.00015,mean(11)+0.00015,'10','Interpreter','latex','FontSize',20,'FontName','Times New Roman') set(gca,'xLim',[0 0.05],'ylim',[-0.002 0.009], 'FontSize', 28,'FontName','Times New Roman','xcolor','k') ax = gca; ax.XAxis.Exponent = 0; ax.YAxis.Exponent = 0; % prevent scientific format xtickformat('%.2f') % format with 2 decimal places ytickformat('%.3f') xticks([0.01 0.02 0.03 0.04 0.05]) % selected ticks on x axes yticks([0.000 0.002 0.004 0.006 0.008]) xlabel('$$\sqrt[2]{\textrm{LPM}_{2,\tau}(R)}$$','Interpreter','latex','FontSize',28,'FontName','Times New Roman') ylabel('$$\textrm{E}(R)$$','Interpreter','latex','FontSize',28,'FontName','Times New Roman') box off % prevent box format 7. Import data 73 mutual funds and set parameters clear R_M=xlsread('Data_Empirical Analysis',1,'B3:BV235'); n=2; t=0.002; r=0.001; x=[-0.50:0.00001:1]; 8. Compute c, lower partial moment with target c and Omega ratio for i=1:73 R_P.LPM(:,i)=nthroot(lpm(x.*R_M(:,i)+(1-x)*r,t,n),n); % n-th root of lower partial moment for portfolio return R_P [LPM_n,t(R_P)]^(1/n) x_MLPM.ind(i)=find(R_P.LPM(:,i)==min(R_P.LPM(:,i)),1); % find index number of MLPM portfolios x_MLPM.value(i)=x(x_MLPM.ind(i)); % retrieve value of x at the MLPM portfolio c(i)=(t-(1-x_MLPM.value(i))*r)/(x_MLPM.value(i)); % compute c LPM2c(i)=nthroot(lpm(R_M(:,i),c(i),2),2); % compute lower partial moment with target c OM1t(i)=lpm(-R_M(:,i), -t, 1) / lpm(R_M(:,i), t, 1) % compute Omega ratio end 9. Rank correlation of downside performance measures mean=mean(R_M); vola=std(R_M); SR=(mean-r)./vola; LPM2t=nthroot(lpm(R_M,t,2),2); KR2t=(mean-t)./LPM2t; % Kappa ratio of order 2 with target t LPM2r=nthroot(lpm(R_M,r,2),2); KR2r=(mean-r)./LPM2r; % Kappa ratio of order 2 with target r UPM2r=-r+mean+LPM2r; OM2r=nthroot(UPM2r./LPM2r,2); % generalalized Omega ratio of order 2 with target r MLPM_slope=(mean-r)./LPM2c; % slope of MLPM portfolios SR_rank=tiedrank(SR); KR2t_rank=tiedrank(KR2t); KR2r_rank=tiedrank(KR2r); OM1t_rank=tiedrank(OM1t); OM2r_rank=tiedrank(OM2r); MLPM_slope_rank=tiedrank(MLPM_slope); RC=corr([SR_rank',KR2t_rank', KR2r_rank', OM1t_rank',OM2r_rank',MLPM_slope_rank'],'rows','pairwise') % rank correlations