NOTE: PROCEDURE PRINTTO used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

3    
4    libname dc
4  ! "C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_liquidity\Journal\J
4  ! AR\CodeAndData\00_DataCollection\dc_code\CoVaR\cv_data";
NOTE: Libref DC was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: 
      C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_liquidity\Journal\J
      AR\CodeAndData\00_DataCollection\dc_code\CoVaR\cv_data
5    
6    data bankret;
7    set dc.bankret_w;
8    run;

NOTE: There were 402889 observations read from the data set DC.BANKRET_W.
NOTE: The data set WORK.BANKRET has 402889 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds
      

9    
10   data regressors;
11   set dc.covarregressors;
12   d_tb3m=lag(d_tb3m);
13   d_yieldcurve=lag(d_yieldcurve);
14   liqspread=lag(liqspread);
15   d_creditspread=lag(d_creditspread);
16   retmkt=lag(retmkt);
17   ret_re_mktadj=lag(ret_re_mktadj);
18   vix=lag(vix);
19   run;

NOTE: There were 1736 observations read from the data set DC.COVARREGRESSORS.
NOTE: The data set WORK.REGRESSORS has 1736 observations and 9 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

20   
21   proc sort data=bankret;by y w;run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.BANKRET has 402889 observations and 5 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.06 seconds
      cpu time            0.06 seconds
      

22   
23   data bankret;
24   merge bankret(in=a) regressors;
25   by y w;
26   if a;
27   run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET.
NOTE: There were 1736 observations read from the data set WORK.REGRESSORS.
NOTE: The data set WORK.BANKRET has 402889 observations and 12 variables.
NOTE: DATA statement used (Total process time):
      real time           0.08 seconds
      cpu time            0.01 seconds
      

28   
29   proc sort data=bankret;by rssd9001 y w;run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.BANKRET has 402889 observations and 12 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.07 seconds
      cpu time            0.04 seconds
      

30   
31   
32   proc quantreg data=bankret ci=resampling algorithm=interior;
33   by rssd9001;
34   model bankret = d_tb3m d_yieldcurve liqspread d_creditspread retmkt ret_re_mktadj vix
35   / quantile=0.01;
36   output out=pred_01 pred=pred_01;
37   run;

NOTE: Writing HTML Body file: sashtml.htm
NOTE: The data set WORK.PRED_01 has 402889 observations and 14 variables.
NOTE: PROCEDURE QUANTREG used (Total process time):
      real time           28.53 seconds
      cpu time            10.00 seconds
      

38   
39   
40   data pred_01;
41   set pred_01;
42   VaR_01=pred_01;
43   drop QUANTILE pred_01;
44   run;

NOTE: There were 402889 observations read from the data set WORK.PRED_01.
NOTE: The data set WORK.PRED_01 has 402889 observations and 13 variables.
NOTE: DATA statement used (Total process time):
      real time           0.05 seconds
      cpu time            0.01 seconds
      

45   
46   
47   data retbanksector;
48   set dc.ret_banksector_w;
49   if y>=1990 and y<=2022;
50   run;

NOTE: There were 1745 observations read from the data set DC.RET_BANKSECTOR_W.
NOTE: The data set WORK.RETBANKSECTOR has 1736 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

51   
52   data retbanksector;
53   merge retbanksector(in=a) regressors;
54   by y w;
55   if a;
56   run;

NOTE: There were 1736 observations read from the data set WORK.RETBANKSECTOR.
NOTE: There were 1736 observations read from the data set WORK.REGRESSORS.
NOTE: The data set WORK.RETBANKSECTOR has 1736 observations and 11 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

57   
58   
59   proc quantreg data=retbanksector ci=resampling algorithm=interior;
60   model retbanksector = d_tb3m d_yieldcurve liqspread d_creditspread retmkt ret_re_mktadj vix
61   / quantile=0.01;
62   output out=predsys_01 pred=predsys_01;
63   run;

NOTE: The data set WORK.PREDSYS_01 has 1736 observations and 13 variables.
NOTE: PROCEDURE QUANTREG used (Total process time):
      real time           0.11 seconds
      cpu time            0.09 seconds
      

64   
65   data predsys_01;
66   set predsys_01;
67   VaR_sys_01=predsys_01;
68   keep y w VaR_sys_01;
69   run;

NOTE: There were 1736 observations read from the data set WORK.PREDSYS_01.
NOTE: The data set WORK.PREDSYS_01 has 1736 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

70   
71   
72   proc quantreg data=retbanksector ci=resampling algorithm=interior;
73   model retbanksector = d_tb3m d_yieldcurve liqspread d_creditspread retmkt ret_re_mktadj vix
74   / quantile=0.5;
75   output out=predsys_50 pred=predsys_50;
76   run;

NOTE: The data set WORK.PREDSYS_50 has 1736 observations and 13 variables.
NOTE: PROCEDURE QUANTREG used (Total process time):
      real time           0.12 seconds
      cpu time            0.07 seconds
      

77   
78   data predsys_50;
79   set predsys_50;
80   VaR_sys_50=predsys_50;
81   keep y w VaR_sys_50;
82   run;

NOTE: There were 1736 observations read from the data set WORK.PREDSYS_50.
NOTE: The data set WORK.PREDSYS_50 has 1736 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

83   
84   proc sort data=bankret;by y w;run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.BANKRET has 402889 observations and 12 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.10 seconds
      cpu time            0.11 seconds
      

85   
86   data bankret;
87   merge bankret(in=a) retbanksector;
88   by y w;
89   if a;
90   run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET.
NOTE: There were 1736 observations read from the data set WORK.RETBANKSECTOR.
NOTE: The data set WORK.BANKRET has 402889 observations and 14 variables.
NOTE: DATA statement used (Total process time):
      real time           0.08 seconds
      cpu time            0.03 seconds
      

91   
92   proc sort data=bankret;by rssd9001 y w;run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.BANKRET has 402889 observations and 14 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.11 seconds
      cpu time            0.06 seconds
      

93   
94   proc quantreg data=bankret ci=resampling algorithm=interior outest=est_cond_01;
95   by rssd9001;
96   model bankret = retbanksector d_tb3m d_yieldcurve liqspread d_creditspread retmkt
96 ! ret_re_mktadj vix
97   / quantile=0.01;
98   run;

NOTE: The data set WORK.EST_COND_01 has 353 observations and 16 variables.
NOTE: PROCEDURE QUANTREG used (Total process time):
      real time           23.15 seconds
      cpu time            17.32 seconds
      

99   
100  data est_cond_01;
101  set est_cond_01;
102  rename retbanksector=coef_retbanksector;
103  rename d_tb3m=coef_d_tb3m;
104  rename d_yieldcurve=coef_d_yieldcurve;
105  rename liqspread=coef_liqspread;
106  rename d_creditspread=coef_d_creditspread;
107  rename retmkt=coef_retmkt;
108  rename ret_re_mktadj=coef_ret_re_mktadj;
109  rename vix=coef_vix;
110  match=1;
111  drop _MODEL_ _TYPE_ _ALGORITHM_ _STATUS_ bankret _QUANTILE_;
112  run;

NOTE: There were 353 observations read from the data set WORK.EST_COND_01.
NOTE: The data set WORK.EST_COND_01 has 353 observations and 11 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

113  
114  proc sort data=bankret; by y w;run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.BANKRET has 402889 observations and 14 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.09 seconds
      cpu time            0.07 seconds
      

115  data bankret;
116  merge bankret (in=a) predsys_01 predsys_50;
117  by y w;
118  if a;
119  run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET.
NOTE: There were 1736 observations read from the data set WORK.PREDSYS_01.
NOTE: There were 1736 observations read from the data set WORK.PREDSYS_50.
NOTE: The data set WORK.BANKRET has 402889 observations and 16 variables.
NOTE: DATA statement used (Total process time):
      real time           0.09 seconds
      cpu time            0.00 seconds
      

120  proc sort data=bankret; by rssd9001 y w;run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.BANKRET has 402889 observations and 16 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.11 seconds
      cpu time            0.04 seconds
      

121  
122  data bankret_and_coef;
123  merge bankret (in=a) est_cond_01;
124  by rssd9001;
125  if a;
126  run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET.
NOTE: There were 353 observations read from the data set WORK.EST_COND_01.
NOTE: The data set WORK.BANKRET_AND_COEF has 402889 observations and 26 variables.
NOTE: DATA statement used (Total process time):
      real time           0.09 seconds
      cpu time            0.00 seconds
      

127  
128  proc sort data=bankret_and_coef; by rssd9001 y w;run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET_AND_COEF.
NOTE: The data set WORK.BANKRET_AND_COEF has 402889 observations and 26 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.13 seconds
      cpu time            0.00 seconds
      

129  
130  
131  data bankret_and_coef;
132  set bankret_and_coef;
133  CoVaR_01=intercept+coef_retbanksector*VaR_sys_01+coef_d_tb3m*d_tb3m+coef_d_yieldcurve*d_yield
133! curve+coef_liqspread*liqspread+coef_d_creditspread*d_creditspread+coef_retmkt*retmkt+coef_ret
133! _re_mktadj*ret_re_mktadj+coef_vix*vix;
134  CoVaR_50=intercept+coef_retbanksector*VaR_sys_50+coef_d_tb3m*d_tb3m+coef_d_yieldcurve*d_yield
134! curve+coef_liqspread*liqspread+coef_d_creditspread*d_creditspread+coef_retmkt*retmkt+coef_ret
134! _re_mktadj*ret_re_mktadj+coef_vix*vix;
135  d_CoVaR=CoVaR_01-CoVaR_50;
136  run;

NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      6966 at 133:38   6966 at 134:38   6966 at 135:17   
NOTE: There were 402889 observations read from the data set WORK.BANKRET_AND_COEF.
NOTE: The data set WORK.BANKRET_AND_COEF has 402889 observations and 29 variables.
NOTE: DATA statement used (Total process time):
      real time           0.11 seconds
      cpu time            0.00 seconds
      

137  
138  data d_CoVaR;
139  set bankret_and_coef;
140  keep rssd9001 y w d_CoVaR;
141  run;

NOTE: There were 402889 observations read from the data set WORK.BANKRET_AND_COEF.
NOTE: The data set WORK.D_COVAR has 402889 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.05 seconds
      cpu time            0.01 seconds
      

142  
143  data Var_01;
144  set pred_01;
145  if var_01~=.;
146  keep rssd9001 y w var_01;
147  run;

NOTE: There were 402889 observations read from the data set WORK.PRED_01.
NOTE: The data set WORK.VAR_01 has 395923 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds
      

148  
149  data d_CoVaR_VaR;
150  merge d_CoVaR (in=a) var_01;
151  by rssd9001 y w;
152  if a;
153  run;

NOTE: There were 402889 observations read from the data set WORK.D_COVAR.
NOTE: There were 395923 observations read from the data set WORK.VAR_01.
NOTE: The data set WORK.D_COVAR_VAR has 402889 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.08 seconds
      cpu time            0.03 seconds
      

154  
155  data bankmktcap;
156  set dc.bankret_w;
157  drop bankret;
158  run;

NOTE: There were 402889 observations read from the data set DC.BANKRET_W.
NOTE: The data set WORK.BANKMKTCAP has 402889 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.00 seconds
      

159  
160  data d_CoVaR_VaR;
161  merge d_CoVaR_VaR(in=a) bankmktcap;
162  by rssd9001 y w;
163  run;

NOTE: There were 402889 observations read from the data set WORK.D_COVAR_VAR.
NOTE: There were 402889 observations read from the data set WORK.BANKMKTCAP.
NOTE: The data set WORK.D_COVAR_VAR has 402889 observations and 6 variables.
NOTE: DATA statement used (Total process time):
      real time           0.09 seconds
      cpu time            0.06 seconds
      

164  
165  
166  data d_CoVaR_VaR;
167  set d_CoVaR_VaR;
168  if w>=10 then yw=cats(y, 'W',w);
169  if w<10 then yw=cats(y, 'W0',w);
170  d_covar_dollar_raw=d_covar*mktcap;
171  q=qtr(input(yw,weeku7.));
172  if w=0 then q=1;
173  run;

NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      8502 at 170:27   
NOTE: There were 402889 observations read from the data set WORK.D_COVAR_VAR.
NOTE: The data set WORK.D_COVAR_VAR has 402889 observations and 9 variables.
NOTE: DATA statement used (Total process time):
      real time           0.28 seconds
      cpu time            0.14 seconds
      

174  
175  
176  proc means data=d_CoVaR_VaR noprint;
177  var d_covar var_01 d_covar_dollar_raw;
178  by rssd9001 y q;
179  output out= d_CoVaR_VaR_qtr (drop= _TYPE_ _FREQ_ ) sum=d_covar var_01 d_covar_dollar_raw;
180  run;

NOTE: There were 402889 observations read from the data set WORK.D_COVAR_VAR.
NOTE: The data set WORK.D_COVAR_VAR_QTR has 30780 observations and 6 variables.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.17 seconds
      cpu time            0.15 seconds
      

181  
182  data dc.CoVaR;
183  set d_CoVaR_VaR_qtr;
184  run;

NOTE: There were 30780 observations read from the data set WORK.D_COVAR_VAR_QTR.
NOTE: The data set DC.COVAR has 30780 observations and 6 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           1:16.62
      cpu time            33.18 seconds
      
