---------------------------------------------------------------------------------------------------------------- 


This folger contains all programs and data needed to replicate the main results presented in 

----------------------------------------------------------------------------------------------------------------

        Macroeconomic Factors and Micro-Level Bank Behavior
        Claudia Buch, Sandra Eickmeier, Esteban Prieto 
        Forthcoming in the Journal of Money, Credit and Banking

----------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!! In order for all programs to run properly make sure that the path to the programs/data is: !!!!!!!!!!
!!!!!!!!!!!!!!!! C:\CodesJMCB15042013\ReplicaBuchEickmeierPrieto (unzip on the 'C:\' directory) !!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
----------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------- 

The Matlab Program
"REPLICA_FAVAR_BuchEickmeierPrieto.m" 
produces as output (printed on the Matlab screen)  tables corresponding to:  

Table 1: Correlation between Median Banking Variables
Table 2: Cumulated Variance Shares Explained by the First 15 Principal Components 
         Calculated from Datasets Associated with Individual Banking Variables 
Table 4: Forecast Error Variance Decomposition
Table 5: Dispersion of Common and Idiosyncratic Components 

and figures corresponding to:

Figure 1: Impulse Response Functions of Macroeconomic Factors
Figure 2: Impulse Response Functions of Median Banking Variables 
Figure 3: Impulse Response Functions of Macroeconomic Factors from 
          the Baseline FAVAR and a VAR without Micro-Level Information 
Figure 4: Monetary Policy Shock Series
Figure 5: Impulse Response Functions of Individual Banks (5th to 95th Quantiles) 

---------------------------------------------------------------------------------------------------------------- 

---------------------------------------------------------------------------------------------------------------- 

The main Stata program "REPLICA_REGRESSIONS_BuchEickmeierPrieto.do" produces a .txt file named "RegressionResults.txt" 
which contains the results corresponding to:
Table 6: Regression Results

The Stata Program "GenRegData.do" is directly called by the main Stata program "REPLICA_REGRESSIONS_BuchEickmeierPrieto.do". 
"GenRegData.do" transforms the Matlab Output and the data files into a Stata compatible form.

---------------------------------------------------------------------------------------------------------------- 

---------------------------------------------------------------------------------------------------------------- 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!  Note: first run the Matlab program "REPLICA_FAVAR_BuchEickmeierPrieto.m" before running Stata !!!!!!!!
!!!!!!!!!! Stata needs as input data (the bank level impulse responses) produced in the Matlab Program. !!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
---------------------------------------------------------------------------------------------------------------- 

---------------------------------------------------------------------------------------------------------------- 

The Folder contains 4 txt files which contain the data needed to replicate the results.

The file MacroData.txt contains log-first differenced data on GDP, Prices, House Prices and the level series of the Federal Funds Rate.
The file BankData.txt contains the seasonally adjusted and break-in-mean corrected bank level variables.

    The Dimesion of this matrix is (t = 93,n = 7360). The first 5 columns correspond to the NPL, CAP, ROE, Loan Growth and Non-Interest Income series
    of the median bank. 
    The remaining 7355 series correspond to the individual bank level series. The series are ordered blockwise, that is: 
    there are 1471 NPL series, followed by 1471 CAP series, followed by 1471 ROE series, followed by 1471 Loan Growth series , 
    followed by 1471 non-interest income series.
    The ordering of banks within each block is identical across the blocks.

The file BankNr.txt contains unique identfiers for each bank within each variable-block.
The file BankChar.txt contains the time-series averages of the bank characteristics used in the regression exercise.

---------------------------------------------------------------------------------------------------------------- 


---------------------------------------------------------------------------------------------------------------- 

Finally, there is a folder called "bepfcts" which contains additional Matlab functions and scripts called by the main function
"REPLICA_FAVAR_BuchEickmeierPrieto.m". 
Please make sure that the folder "bepfcts" is included in the Matlab search path (for more info type 'help addpath' in Matlab's Command Window)! 


---------------------------------------------------------------------------------------------------------------- 
