Systemic Expected Shortfall in Matlab | MATLAB | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





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

sp_Feed sp_TopicIcon
Systemic Expected Shortfall in Matlab
No permission to create posts
October 30, 2016
3:09 pm
Avatar
Niqx
New Member
Members
Forum Posts: 1
Member Since:
October 30, 2016
sp_UserOfflineSmall Offline

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);
October 30, 2016
3:45 pm
Avatar
Vinod

MathWorks
Members
Forum Posts: 210
Member Since:
May 1, 2016
sp_UserOfflineSmall Offline

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: samdavies
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

Lakshmanaprakash S B, bettetj60, ronnievw3, bessiesj18, Pavan kumar, Williampup

Administrators: Hans: 387, lee: 457