Code covered by the BSD License  

Highlights from
Efficient Frontier using different risk return measures

image thumbnail

Efficient Frontier using different risk return measures

by

 

27 Aug 2012 (Updated )

Code for finding optimal portfolios and plotting efficient frontier for diff. risk return measures

mnvarratio( weights )
function [ nmvar ] = mnvarratio( weights )
%The function calculates the risk return ration where risk is measured in
%VaR at a given confidence level. The function's output (value of the
%ratio) is then used with "fmincon" to maximize the return to risk ratio.

%Declaring the variables used in the function
global corp ptile meanret;
%calculating daily returns of a portfolio
vardailyret=corp*weights;
%Calculating daily VaR of portfolio returns
dailyvar=prctile(vardailyret,ptile);
%Calculating the Return to Risk ratio
nmvar= -meanret*weights/dailyvar;
end

Contact us