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    libname retdata
5  ! "C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_liquidity\Journal\J
5  ! AR\CodeAndData\00_DataCollection\dc_data";
NOTE: Libref RETDATA 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_data
6    
7    proc import datafile =
7  ! "C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_liquidity\Journal\J
7  ! AR\CodeAndData\00_DataCollection\dc_code\CoVaR\cv_data\banklist_new_12162022_updated_final.xl
7  ! sx" DBMS=xlsx OUT=banklist replace;
8    SHEET="banklist_new_12162022"; GETNAMES=YES; quit;

NOTE: One or more variables were converted because the data type is not supported by the V9 
      engine. For more details, run with options MSGLEVEL=I.
NOTE: The import data set has 444 observations and 40 variables.
NOTE: WORK.BANKLIST data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           0.08 seconds
      cpu time            0.07 seconds
      

9    
10   data banklist; set banklist;
11   treat=adopted;
12   rssd9001=entity;
13   keep treat rssd9001 permco;
14   run;

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

15   
16   data banklist;set banklist;if rssd9001~=.; if permco~=.; run;

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

17   
18   proc sort data=banklist;by permco;run;

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

19   
20   data banklist; set banklist; by permco; if last.permco;run;

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

21   
22   /*banking sector value-weighted weekly return*/
23   data bankret;
24   set dc.bankreturn;
25   run;

NOTE: There were 5811460 observations read from the data set DC.BANKRETURN.
NOTE: The data set WORK.BANKRET has 5811460 observations and 9 variables.
NOTE: DATA statement used (Total process time):
      real time           1.19 seconds
      cpu time            0.23 seconds
      

26   
27   
28   data bankret;
29   set bankret;
30   y=year(DATE);
31   w=week(DATE);
32   prc=abs(prc);
33   mktcap=prc*shrout;
34   ret_log=log(1+ret);
35   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).
      31782 at 32:5    31782 at 33:11   33309 at 34:9    33309 at 34:14   
NOTE: There were 5811460 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.BANKRET has 5811460 observations and 13 variables.
NOTE: DATA statement used (Total process time):
      real time           1.40 seconds
      cpu time            0.42 seconds
      

36   
37   proc means data=bankret noprint;
38   var ret_log;
39   by permno y w;
40   output out= bankret_w (drop= _TYPE_ _FREQ_ ) sum=ret_log;
41   run;

NOTE: There were 5811460 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.BANKRET_W has 1214812 observations and 4 variables.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           1.94 seconds
      cpu time            1.20 seconds
      

42   
43   data bankret_w;
44   set bankret_w;
45   ret=exp(ret_log)-1;
46   drop ret_log;
47   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).
      6863 at 45:5    6863 at 45:17   
NOTE: There were 1214812 observations read from the data set WORK.BANKRET_W.
NOTE: The data set WORK.BANKRET_W has 1214812 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.08 seconds
      cpu time            0.01 seconds
      

48   
49   proc means data=bankret noprint;
50   var mktcap;
51   by permno y w;
52   output out= mktcap_w (drop= _TYPE_ _FREQ_ ) mean=mktcap;
53   run;

NOTE: There were 5811460 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.MKTCAP_W has 1214812 observations and 4 variables.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           1.90 seconds
      cpu time            1.34 seconds
      

54   
55   data retmktcap_w;
56   merge bankret_w (in=a) mktcap_w;
57   by permno y w;
58   if a;
59   run;

NOTE: There were 1214812 observations read from the data set WORK.BANKRET_W.
NOTE: There were 1214812 observations read from the data set WORK.MKTCAP_W.
NOTE: The data set WORK.RETMKTCAP_W has 1214812 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.25 seconds
      cpu time            0.12 seconds
      

60   
61   proc sort data=retmktcap_w ; by y w;run;

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

62   
63   proc means data=retmktcap_w noprint;
64   var mktcap;
65   by y w;
66   output out= totalbankmktcap (drop= _TYPE_ _FREQ_ ) sum=totalbankmktcap;
67   run;

NOTE: There were 1214812 observations read from the data set WORK.RETMKTCAP_W.
NOTE: The data set WORK.TOTALBANKMKTCAP has 1745 observations and 3 variables.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.16 seconds
      cpu time            0.12 seconds
      

68   
69   proc means data=retmktcap_w noprint;
70   var mktcap;
71   by y w;
72   output out= meanbankmktcap (drop= _TYPE_ _FREQ_ ) mean=meanbankmktcap;
73   run;

NOTE: There were 1214812 observations read from the data set WORK.RETMKTCAP_W.
NOTE: The data set WORK.MEANBANKMKTCAP has 1745 observations and 3 variables.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.17 seconds
      cpu time            0.09 seconds
      

74   
75   data retmktcap_w;
76   merge retmktcap_w (in=a) totalbankmktcap;
77   by y w;
78   if a;
79   run;

NOTE: There were 1214812 observations read from the data set WORK.RETMKTCAP_W.
NOTE: There were 1745 observations read from the data set WORK.TOTALBANKMKTCAP.
NOTE: The data set WORK.RETMKTCAP_W has 1214812 observations and 6 variables.
NOTE: DATA statement used (Total process time):
      real time           0.20 seconds
      cpu time            0.20 seconds
      

80   
81   data retmktcap_w;
82   set retmktcap_w;
83   ret_weighted=ret*mktcap/totalbankmktcap;
84   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).
      6863 at 83:17   
NOTE: There were 1214812 observations read from the data set WORK.RETMKTCAP_W.
NOTE: The data set WORK.RETMKTCAP_W has 1214812 observations and 7 variables.
NOTE: DATA statement used (Total process time):
      real time           0.13 seconds
      cpu time            0.06 seconds
      

85   
86   proc means data=retmktcap_w noprint;
87   var ret_weighted;
88   by y w;
89   output out= ret_banksector_w (drop= _TYPE_ _FREQ_ ) sum=retbanksector;
90   run;

NOTE: There were 1214812 observations read from the data set WORK.RETMKTCAP_W.
NOTE: The data set WORK.RET_BANKSECTOR_W has 1745 observations and 3 variables.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.15 seconds
      cpu time            0.04 seconds
      

91   
92   data ret_banksector_w;
93   merge ret_banksector_w(in=a) meanbankmktcap;
94   by y w;
95   run;

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

96   
97   data dc.ret_banksector_w;
98   set ret_banksector_w;
99   run;

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

100  
101  
102  /*individual banks' weekly return*/
103  data bankret;
104  set retdata.returndata;
105  run;

NOTE: There were 65416295 observations read from the data set RETDATA.RETURNDATA.
NOTE: The data set WORK.BANKRET has 65416295 observations and 20 variables.
NOTE: DATA statement used (Total process time):
      real time           21.68 seconds
      cpu time            5.29 seconds
      

106  
107  proc sort data=bankret;by permco;run;

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

108  proc sort data=banklist;by permco;run;

NOTE: There were 401 observations read from the data set WORK.BANKLIST.
NOTE: The data set WORK.BANKLIST has 401 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

109  
110  data bankret;
111  merge bankret(in=a) banklist;
112  by permco;
113  if a;
114  run;

NOTE: There were 65416295 observations read from the data set WORK.BANKRET.
NOTE: There were 401 observations read from the data set WORK.BANKLIST.
NOTE: The data set WORK.BANKRET has 65416295 observations and 22 variables.
NOTE: DATA statement used (Total process time):
      real time           25.79 seconds
      cpu time            6.53 seconds
      

115  
116  
117  proc sort data=bankret;by rssd9001 date;run;

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

118  
119  data bankret;
120  set bankret;
121  if rssd9001~=.;
122  y=year(date);
123  w=week(date);
124  prc=abs(prc);
125  mktcap=prc*shrout;
126  ret_log=log(1+ret);
127  if y>=1990 and y<=2022;
128  keep rssd9001 y w ret_log mktcap;
129  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).
      7876 at 124:5    7876 at 125:11   8206 at 126:9    8206 at 126:14   
NOTE: There were 65416295 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.BANKRET has 1975842 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           15.05 seconds
      cpu time            1.85 seconds
      

130  
131  proc sort data=bankret noduprecs;by _all_;run;

NOTE: There were 1975842 observations read from the data set WORK.BANKRET.
NOTE: 44631 duplicate observations were deleted.
NOTE: The data set WORK.BANKRET has 1931211 observations and 5 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.43 seconds
      cpu time            0.40 seconds
      

132  
133  proc means data=bankret noprint;
134  var ret_log;
135  by rssd9001 y w;
136  output out= bankret_w (drop= _TYPE_ _FREQ_ ) sum=bankret_log;
137  run;

NOTE: There were 1931211 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.BANKRET_W has 412536 observations and 4 variables.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.82 seconds
      cpu time            0.07 seconds
      

138  
139  proc means data=bankret noprint;
140  var mktcap;
141  by rssd9001 y w;
142  output out= bankmktcap_w (drop= _TYPE_ _FREQ_ ) mean=mktcap;
143  run;

NOTE: There were 1931211 observations read from the data set WORK.BANKRET.
NOTE: The data set WORK.BANKMKTCAP_W has 412536 observations and 4 variables.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           1.15 seconds
      cpu time            0.26 seconds
      

144  
145  
146  data bankret_w;
147  set bankret_w;
148  bankret=exp(bankret_log)-1;
149  drop bankret_log;
150  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).
      1689 at 148:9    1689 at 148:25   
NOTE: There were 412536 observations read from the data set WORK.BANKRET_W.
NOTE: The data set WORK.BANKRET_W has 412536 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.00 seconds
      

151  
152  data bankobscount;
153  set bankret_w;
154  count=1;
155  run;

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

156  
157  proc sort data=bankobscount;by rssd9001;run;

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

158  
159  proc means data=bankobscount noprint;
160  var count;
161  by rssd9001;
162  output out= bankobscount (drop= _TYPE_ _FREQ_ ) sum=bankobscount;
163  run;

NOTE: There were 412536 observations read from the data set WORK.BANKOBSCOUNT.
NOTE: The data set WORK.BANKOBSCOUNT has 401 observations and 2 variables.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.06 seconds
      cpu time            0.00 seconds
      

164  
165  data bankobscount;
166  set bankobscount;
167  samplebank=1;
168  if bankobscount<260 then samplebank=0;
169  drop bankobscount;
170  run;

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

171  
172  data bankret_w;
173  merge bankret_w(in=a)  bankobscount;
174  by rssd9001;
175  if a;
176  run;

NOTE: There were 412536 observations read from the data set WORK.BANKRET_W.
NOTE: There were 401 observations read from the data set WORK.BANKOBSCOUNT.
NOTE: The data set WORK.BANKRET_W has 412536 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.07 seconds
      cpu time            0.01 seconds
      

177  
178  data bankret_w;
179  merge bankret_w(in=a)  bankmktcap_w;
180  by rssd9001 y w;
181  if a;
182  run;

NOTE: There were 412536 observations read from the data set WORK.BANKRET_W.
NOTE: There were 412536 observations read from the data set WORK.BANKMKTCAP_W.
NOTE: The data set WORK.BANKRET_W has 412536 observations and 6 variables.
NOTE: DATA statement used (Total process time):
      real time           0.11 seconds
      cpu time            0.04 seconds
      

183  
184  
185  
186  data bankret_w;
187  set bankret_w;
188  if samplebank=1;
189  drop samplebank;
190  run;

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

191  
192  data dc.bankret_w;
193  set bankret_w;
194  run;

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

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           3:20.61
      cpu time            45.73 seconds
      
