Description Usage Arguments Value Author(s) References Examples
View source: R/Functions_SystemicR.R
This function computes the CoVaR and the Delta CoVaR of a given financial institution i for a given quantile q.
1 | f_CoVaR_Delta_CoVaR_i_q(df_data_returns)
|
df_data_returns |
A dataframe including data: dates and stock returns |
CoVaR_i_q |
A numeric matrix |
Delta_CoVaR_i_q |
A numeric vector |
Jean-Baptiste Hasse
Adrian, Tobias, and Markus K. Brunnermeier. "CoVaR". American Economic Review 106.7 (2016): , 106, 7, 1705-1741.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Scale the entries of a vector to the interval [0,1]
# NOT RUN {
# Load data
data("data_stock_returns")
# Compute CoVaR_i_q and Delta_CoVaR_i_q
f_CoVaR_Delta_CoVaR_i_q(data_stock_returns)
# }
|
$CoVaR_i_q
[,1] [,2] [,3] [,4] [,5]
[1,] -0.005935796 -0.006311906 -0.006616653 -0.006309617 -0.006416972
[2,] -0.003822414 -0.003334609 -0.002978839 -0.002638080 -0.003372269
[,6] [,7] [,8] [,9] [,10]
[1,] -0.006543308 -0.006301242 -0.006436613 -0.006480420 -0.006348466
[2,] -0.003308349 -0.003048159 -0.003434970 -0.002873477 -0.003445770
[,11] [,12] [,13] [,14] [,15]
[1,] -0.006436159 -0.006170730 -0.006542293 -0.006335739 -0.006217191
[2,] -0.002892425 -0.003893291 -0.003101378 -0.003078690 -0.003402097
[,16] [,17] [,18] [,19] [,20]
[1,] -0.006516489 -0.006114549 -0.006190936 -0.006544210 -0.006547214
[2,] -0.002892578 -0.003569283 -0.003592142 -0.003049678 -0.002852969
[,21] [,22] [,23] [,24] [,25]
[1,] -0.00639885 -0.006103237 -0.006402404 -0.006477186 -0.006477516
[2,] -0.00327320 -0.003816598 -0.003985966 -0.003356031 -0.003093915
[,26] [,27] [,28] [,29] [,30]
[1,] -0.006112395 -0.006012870 -0.006185703 -0.006090019 -0.006405507
[2,] -0.003751110 -0.003608134 -0.003262976 -0.003685883 -0.003337674
[,31] [,32] [,33] [,34] [,35]
[1,] -0.005949641 -0.006029283 -0.006133507 -0.006321227 -0.006164174
[2,] -0.003739775 -0.003734073 -0.003488959 -0.003204236 -0.003470855
[,36] [,37] [,38] [,39] [,40]
[1,] -0.006121905 -0.006255933 -0.006562603 -0.006539840 -0.006206598
[2,] -0.003714248 -0.003537201 -0.003016154 -0.002944364 -0.003594647
[,41] [,42] [,43] [,44] [,45]
[1,] -0.006314589 -0.00610299 -0.006331868 -0.006245146 -0.006132503
[2,] -0.003213707 -0.00376524 -0.003252642 -0.003537625 -0.004112600
[,46] [,47] [,48] [,49] [,50]
[1,] -0.006515107 -0.006409260 -0.006122991 -0.006262261 -0.005879166
[2,] -0.003457328 -0.003459236 -0.003494460 -0.003279355 -0.003797498
[,51] [,52] [,53] [,54] [,55]
[1,] -0.006345985 -0.006453649 -0.006265471 -0.006397968 -0.006349148
[2,] -0.003528157 -0.003740422 -0.003414505 -0.003101587 -0.004042243
[,56] [,57] [,58] [,59] [,60]
[1,] -0.006239591 -0.005947983 -0.006036377 -0.006673354 -0.006408686
[2,] -0.003182444 -0.003910839 -0.003640605 -0.003215774 -0.003237228
[,61] [,62] [,63] [,64] [,65]
[1,] -0.005750387 -0.006657415 -0.006224351 -0.006109968 -0.006558752
[2,] -0.004218384 -0.003585953 -0.003060892 -0.003725755 -0.003096114
[,66] [,67] [,68] [,69] [,70]
[1,] -0.005353729 -0.006073068 -0.006327509 -0.006380060 -0.006170153
[2,] -0.004152939 -0.003817610 -0.003216192 -0.003611671 -0.003257714
[,71] [,72]
[1,] -0.006116092 -0.006191399
[2,] -0.003670741 -0.003857172
$Delta_CoVaR_i_q
[1] -0.002113382 -0.002977297 -0.003637814 -0.003671537 -0.003044703
[6] -0.003234958 -0.003253083 -0.003001643 -0.003606943 -0.002902696
[11] -0.003543734 -0.002277439 -0.003440915 -0.003257049 -0.002815093
[16] -0.003623911 -0.002545266 -0.002598794 -0.003494532 -0.003694245
[21] -0.003125650 -0.002286638 -0.002416438 -0.003121156 -0.003383601
[26] -0.002361285 -0.002404736 -0.002922727 -0.002404136 -0.003067833
[31] -0.002209866 -0.002295211 -0.002644548 -0.003116991 -0.002693320
[36] -0.002407657 -0.002718732 -0.003546449 -0.003595476 -0.002611951
[41] -0.003100882 -0.002337750 -0.003079225 -0.002707521 -0.002019903
[46] -0.003057779 -0.002950024 -0.002628532 -0.002982905 -0.002081667
[51] -0.002817828 -0.002713227 -0.002850966 -0.003296381 -0.002306905
[56] -0.003057147 -0.002037143 -0.002395772 -0.003457580 -0.003171458
[61] -0.001532003 -0.003071462 -0.003163460 -0.002384213 -0.003462638
[66] -0.001200789 -0.002255458 -0.003111317 -0.002768389 -0.002912438
[71] -0.002445351 -0.002334227
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.