Rank: 343068 based on 0 downloads (last 30 days) and 0 file submitted

Panagiotis Braimakis


Personal Profile:


Watch this Author's files


Comments and Ratings by Panagiotis Braimakis
Updated File Comments Rating
26 Jul 2011 Credit Risk Modeling with MATLAB These are the supporting MATLAB files for the MathWorks webinar of the same name. Author: Ameya Deoras

Michael very nice illustration. I got a small point to stress on this part of your code in Credit_VaR:

%% 2. Compute original value of portfolio
OriginalPrices = zeros(size(BondData, 1), 1);
dates = [valDate; valDate+365; valDate+2*365; valDate+3*365];

% The |prbyzero| function in the Financial Toolbox allows us to value
% these bonds.
for idx = 1 : length(Ratings)-1
ratingsMask = BondData.Rating == Ratings{idx};
OriginalPrices(ratingsMask) = prbyzero( ...
[x2mdate(BondData.Maturity(ratingsMask)) BondData.Coupon(ratingsMask)],... %x2mdate was missing
valDate, Rates.(Ratings{idx}), dates);

i think is not very optimal cause it leads to big Memory usage on larger portfolios more than 3K bonds. You can check that for bigger portfolios this is were you have memory problems.

OriginalPrices(ratingsMask) = prbyzero( ...
Ones needs to rewrite this part i guess since the direct assignment of the 0,1s ratings Mask has some problems. What do you think?

Contact us