# Copula Value At Risk

Let's suppose I have two asset in my portfolio. I want to compute Copula Value At Risk. Can you help me? This is the code I wrote:

copula='Normale, Normale';
B=handles.array;
[~, n]=size(handles.array);
for i=1:n
phat(:,i)=mle(handles.array(:,i))
end
p_1=normcdf(handles.array(:,1), phat(1,1), phat(2,1));
p_2=normcdf(handles.array(:,2), phat(1,2), phat(2,2));
handles.p1=p_1;
handles.p2=p_2;
handles.matrici.Mdati=[handles.array handles.port p_1 p_2];
U=[handles.p1 handles.p2];
handles.U=U;

guidata(handles.figure1, handles);


and

copula='Normale';
RHOHAT=copulafit('Gaussian', handles.U);
figure(1)
scatterhist(handles.U(:,1), handles.U(:,2));
i=1:100
U=copularnd('Gaussian', RHOHAT, 10000);
X=[norminv(U(:,1),0,1) norminv(U(:,2),0,1)]

axes(handles.axes1)
plot(port_ret, 'k')
legend('Rendimenti simulati')


So my problem is that I don't want a single value but n values to be plotted against the returns of my portfoglio. How can I do that? Thank you very much

-
What do you mean you don't want a single value? You mean you want a distribution for the portfolio Value at Risk? Or, do you mean you want the quantile for each security? Also, I think Copula Value at Risk might be a misleading term. Sort of implies that the Value at Risk calculation is different, when it's really just the modelling that's different. Before setting what you want up with Copulas, I might first set it up with multivariate normal (as that is equivalent to what you're doing). –  John Mar 4 '14 at 22:47
I wish I could do something like the one in this picture emeraldinsight.com/content_images/fig/1120280103027.png Even if this is a constant value.. –  Fodex Mar 5 '14 at 9:15
I have no idea what those charts are supposed to be saying. –  John Mar 5 '14 at 21:11