Open DF-18 opened 4 years ago
Dear Github staff,
The paper can be found here: https://www.federalreserve.gov/econres/notes/feds-notes/sriskv2-a-note-20200918.htm
Best, Marco Migueis
On Mon, Nov 2, 2020 at 4:17 AM DF-18 notifications@github.com wrote:
Hi developer,it's appreciated that u r sharing code to compute SRISK. Could u tell us the information about the paper which the code is based on? Thank u very much.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/marcomigueis/SRISKv2/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQFA5RNHSTCJRDFFMFG6P5TSNZ2KVANCNFSM4THG3D4Q .
I generate random number for 2 firms as sample and run the SRISKv2_and_SRISK.m. The output result of SRISK is nothing unexpected, but the result of SRISKv2 is all zero. Is it a bug in the code or something wrong with my data? input_data_test.zip
Dear Friend,
I have run the code with your data, and I also get zeros for most days in SRISKv2. This is not a mistake. If your data is such that simulation paths that end in positive shortfalls never happen, then SRISKv2 will be zero.
Note that in cases that SRISKv2 is zero, SRISK should be negative or also zero. That is not the case using the data you provided because I included one small modification to the SRISK algorithm, which when interacted with your specific dataset leads to strange results. Specifically, line 143 of the matlab code is as follows:
shortfall_srisk_i(i,k) = max(-kratiodbt(end,k),kratiodbt(end,k)-(1-kratio)mvt(end,k)(1+Ret_i_sim(i,k)));
I introduced max(-kratiodbt(end,k),....) in this expression because, without it, SRISK can result in some unintuitive high swings in periods of high volatility. However, when this modification of mine is combined with the dataset you used (which includes negative debt values), it results in positive values for SRISK due to the -kratiodbt(end,k) piece of the max(... , ...), which does not make sense.
If you modify line 143 to be:
shortfall_srisk_i(i,k) = kratiodbt(end,k)-(1-kratio)mvt(end,k)*(1+Ret_i_sim(i,k));
which is consistent with the definition from Brownlees and Engle (2016), you will no longer have SRISK > SRISKv2, even with your data.
Best regards, Marco Migueis
On Mon, Nov 9, 2020 at 10:45 PM DF-18 notifications@github.com wrote:
I generate random number for 2 firms as sample and run the SRISKv2_and_SRISK.m. The output result of SRISK is nothing unexpected, but the result of SRISKv2 is all zero. Is it a bug in the code or something wrong with my data? input_data_test.zip https://github.com/marcomigueis/SRISKv2/files/5514713/input_data_test.zip
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/marcomigueis/SRISKv2/issues/1#issuecomment-724431229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQFA5RLLVN47JDJGKVTQSO3SPCZPFANCNFSM4THG3D4Q .
Dear marcomigueis, thank u very much for your reply.
If I use the formulation (A) SRISKit =kDit −(1−k)Wit(1−LRMESit) to calculate the SRISK like Brownlees and Engle (2016), in order to get the same version of SRISKv2, is it correct to replace the value of SRISK with zero when LRMES is negative?
Note: LRMESit =−Et(Rit+1:t+h|Rmt+1:t+h <C)
When LRMES is negative, it means that when a systemic event happened, the firm's market cap did not fall as the market fell. Under such situation, there is no shortfalls for this firm. So the SRISK, which is capital shortfall when a systemic event happened, should be zero.
Is this logic correct?
Hi developer,it's appreciated that u r sharing code to compute SRISK. Could u tell us the information about the paper which the code is based on? Thank u very much.