Systemic Expected Shortfall in Matlab | MATLAB | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
Systemic Expected Shortfall in Matlab
Avatar
Niqx
New Member
Forum Posts: 1
sp_UserOfflineSmall Offline
1
October 30, 2016 - 3:09 pm
sp_Permalink sp_Print sp_EditHistory

Hi, everyone,

I'm a newbie in Matlab seeking to develop my programming skills. I have the following code to compute Systemic Expected Shortfall (SES), as in the paper of Acharya et al. (2010). So, the SES is based on Marginal Expected Shortfall. This code is just for one company, but I have n companies (banks, more precisely) in my sample, everyone having its mes_training_sample, lvg_training_sample, ses_training_sample, mes and lvg. I need a for loop for computing ses for all companies at once, but it's hard at this stage to figure it out. Any info will be useful.

Thanks in advance.

num_firms = length(mes_training_sample); % Regressors X = [ones(num_firms,1) mes_training_sample lvg_training_sample]; % Regress systemic expected shortfall on marginal expected shortfall and % leverage betas = regress(ses_training_sample, X); b = betas(2); c = betas(3); ses = (b*mes_firm + c*lvg_firm)/(b+c);
Avatar
Vinod

Forum Posts: 179
sp_UserOfflineSmall Offline
2
October 30, 2016 - 3:45 pm
sp_Permalink sp_Print

I'm not sure how your question relates to ThingSpeak.

Since your question is about MATLAB programming, I would encourage you to post your question to the MATLAB Community: https://www.mathworks.com/matlabcentral/answers/

You may also want to look up the MATLAB syntax for loops: https://www.mathworks.com/help/matlab/matlab_prog/loop-control-statements.html

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: cstapels
23 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

yeseniara11

RomanFug

JamesPes

RobertBak

ScottSmiva

Amourhotte

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee