Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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';
        [~, n]=size(handles.array);
        for i=1:n
        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.matrici.Mdati=[handles.array handles.port p_1 p_2];
        U=[handles.p1 handles.p2];

        guidata(handles.figure1, handles);


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

        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

share|improve this question
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.