PROGRAM NOTES

 The following R program will execute the Minneapolis Fed version of the CLASS model.  The default
 structure of the program (as it exists in the zip file) will generate projections using the 
 "extreme U-shaped recession" that is shown on the "COVID-19 stress test tool" web page listed below:

 https://www.minneapolisfed.org/banking/financial-studies-and-community-banking/run-your-own-stress-test-on-large-banks

 A more detailed description of the Minneapolis version of the model can be found in the article on stress
 testing for large banks in the COVID-19 pandemic available here:

 https://www.minneapolisfed.org/article/2020/capital-stress-testing-for-large-banks-in-light-of-the-covid-19-pandemic

 The model generates invidual projections for the 21 domestic banks described in the above article.  The firm-level
 projections are combined to form a representative projection for the industry.  Importantly, the individual
 firm balance sheets are held constant over the projection horizon.  As such, total assets, liabilities, 
 and risk-weighted assets remain fixed at their starting levels over the projection period.  In addition,
 the model assumes that dividends are held constant over the projection period at the 2019q4 levels and all
 share buybacks are eliminated in the projection period.  

 The default structure of the program and underlying data is based on a starting point of 2019q4.  Data from 
 this period are actual observations and all future observations are projections.  Note that the losses 
 used for operational risk, counterparty default, and the global market shock are based on the official 
 results from the DFAST2020 exercise.  The zip file contains five separate hypothetical scenarios that can be
 used to generate projections of capital under stress.  Alternatively, users can construct their own 
 scenarios and run those through the model if they choose.

 The program generates four CSV output files that are described below:

   estimated_model_coefficients.csv
     This file contains all of the necessary model coefficients as estimated by 
     the Minneapolis Fed version of the CLASS model (the coefficient value, the standard error,
     and the associated t-stat and p-value are included in the file).

   aggregate_projections.csv
     This file contains the combined firm-level projections that represent the industry aggregate
     shown in the chart on the "COVID-19 stress test tool" web page.  The aggregate totals of 
     common equity tier 1 capital (cet1), risk-weighted assets (rwa), average total assets (avg_assets),
     the CET1 capital ratio (cap_ratio), the simple leverage ratio (lev_ratio) and the change in total
     CET1 from the q0 starting point (cet1_drop) are included.  Values listed for the ratios are 
     percentages (i.e., 7.35 = 7.35%) and the remaining items are all reported in billions of dollars.

   firm_projections.csv
     This file contains firm-level data for the same variables that are reported in the aggregate_projections.csv file.  
     In addition, the file contains a new variable (breach) which takes on the value of 1 for quarters
     in which a firm's CET1 capital level below the "capital threshold" (defined as the statutory minimum of 4.5% of RWA plus the
     applicable GSIB surcharge).

   firm_breaches.csv
       This is a summary file which simply reports whether or not a firm had their projected CET1 level fall
       below the firm-specific "capital threshold" level.  A value of 1 indicates that such a breach occured 
       at some point during the projection horizon and a value of 0 indicates that the capital level stayed above
       the appropriate threshold.


Instructions for running the Minneapolis Fed version of the CLASS model
   1. The model is programmed in R and can be run using either R or Rstudio.

   2. Extract the full set of material contained in the zip file into a 
      a folder (for example, C:\mpls_stress_test).

   3. The folder should contain the following items once the extraction is complete:
       
       C:\mpls_stress_test\macro_data_hist.csv
           The historical macroeconomic data used to estimate the model.

       C:\mpls_stress_test\macro_data_proj.csv
           The hypothetical macroeconomic data used to generate the projections.  This
           file contains 5 separate scenarios:  the DFAST2020 baseline scenario (fed_baseline),
           the DFAST2020 severely adverse scenario (fed_severe), and the three U-shaped COVID
           recessions (u_normal, u_severe, and u_extreme).

       C:\mpls_stress_test\y9_bhc_data.csv
           The historical firm-level balance sheet and income statement data (derived from the Y-9C report).

       C:\mpls_stress_test\mpls_stress_test_model.R 
           The R program that estimates the model and generates the projections associated with the 
           hypothetical scenario data.

       C:\mpls_stress_test\read_me.TXT
           A text file version of the "program notes".

       C:\mpls_stress_test\output
           The folder that contains the 4 CSV output files generated by the model (and described above).

   4. Open the R program once the zip file has been successfully extracted.  Adjust the following variables
      in Part 2 (specify starting parameters) of the program:
       
       wksp      - the name of the folder where the zip file was extracted (i.e., "c:\\mpls_stress_test\\)
 
       scen_nm   - the name of the hypothetical scenario to use for generating the projections.  It
                   needs to be set equal to one of the following values:  fed_baseline, fed_severe,
                   u_normal, u_severe, or u_extreme.

   5. Run the program from within R or RStudio
