CAL in excel

Hello,

I’m trying to do a CAL for ten stocks in excel but for some reason the CAL doesn’t tangent the optimal risky portfolio. Does anyone know how to do it? Like it seems to work when only two securities are being used but not when I’m doing 10 stocks.
Please find the below picture. Been thinking about this for like 2 weeks now and I don’t get what is wrong.

Thanks!

Anyone that knows this or might know where I can find help?

my suggestion would be to try to get it to solve a problem for which you already know the answer (because you solved it using some other method or found it on the web or whatever) and compare what your Excel code produces to the actual answer.

I take it each dot is a portfolio and you’ve done some sort of Monte Carlo simulation to get them?
The efficient frontier is obviously supposed to be a smooth curve, which yours isn’t. Rather it’s very ragged.
I don’t know whether that’s because you haven’t plotted enough points or because you’re somehow picking the points wrong and most of the points are clustered in the interior.

And how is that CAL computed?

There are a bunch of excel codes for your problem on the web, but I have no idea which (if any) of them are good.

I had a similar issue when I was working with more than two assets. Make sure you’re using the correct weights for the optimal risky portfolio—sometimes a small mistake there throws everything off. Double-check that your covariance matrix is accurate too. For me, once I fixed that, the CAL worked fine.

1 Like

Thanks for the reply. I’m not sure how to write the code so I don’t know how to proceed honestly. Tried several guides on youtube but it doesn’t really work with 10 stocks for some reason

Okay, I think it looks good but there is still something wrong with the graphing. Now it looks like this wwhich is completly wrong.