On Github WillahScott / capitool-slidify
Capital under stress scenarios projection tool
by WillahScott @ WiDo Stuff
Regulatory capital requirements (for financial institutions) simulation under different user-defined macoeconomic scenarios
The app is available through shinyapps.io. Click image to redirect.
Basic usage information may be found under the About tab in the application.
The Capital Requirements Directive (CRD IV) establishes the amount of capital a bank must have allocated, given as a set of functions of the estimated probability of default (for performing products), severity and exposure, one function for each different product.
The Stress Test exercise regulation put forth by the EBA requires a 3 year projection (or US Stress Test, CCAR establishes 9 quarters projection) of regulatory capital. CapiTool allows up to 3 year projection.
The (European) Stress Test exercise requires two scenarios set forth by the EBA, as well as any scenarios required by the national regulators. For the US CCAR exercise, 3 exercises are necessary, as well as two internal scenarios which the institution has to create.
CapiTool stresses the different factors (mainly probability of default and severity) and simulates the projected capital requirements under the scenario defined by the user.
The app is implemented in R through RStudio's shiny package, which needs a ui.R and server.R. Additionally all further calculations take place in the simulation.R.
CapiTool uses two loan databases:
Performing portfolio
source("simulation.R") table(performing.df$Products)
## ## Consumer Loan Credit Card Lease Mortgage ## 322 665 176 395
Defaulted portfolio
table(defaulted.df$Products)
## ## Consumer Loan Credit Card Lease Mortgage ## 310 31 171 157
by WillahScott @ WiDo Stuff