The `ecm` action creates a sample of the enterprise-wide loss (aggregate loss) by combining a copula simulation with the marginal empirical distributions of losses in business lines. This action is essential for Economic Capital Modeling, allowing for the calculation of risk metrics such as Value-at-Risk (VaR) and Tail Value-at-Risk (TVaR) by simulating the joint distribution of risks based on a specified dependency structure (copula) and individual loss data (marginals).
| Parameter | Description |
|---|---|
| copulaSample | Specifies the name of the input table that contains the copula simulation in uniform margins. This table must be in a form that the outuniform parameter in the copulaSimulate action generates. |
| marginals | Specifies the list of input tables that contain the empirical samples of the marginal distributions of business lines for which copula modeling is done. Each entry allows mapping specific columns. |
| output | Specifies the details of the output table to which to write the sample of the enterprise-wide loss, including the optional 'outSample' sub-parameter. |
| outsum | Specifies the details of the output table to which to write estimates of summary statistics, percentiles, and tail values-at-risk (TVaR). |
| analysisVariables | Specifies the names of the marginal variables that you want to analyze. These must be a subset of the marginal variables in the copula simulation table. |
| seed | Specifies the seed for the pseudorandom number generator. If 0 (default), a random seed is used. |
| tailStart | Specifies the empirical distribution function (EDF) value where the tail region starts. Default is 0.8. |
Creates a simulated copula table (uniform distributions) and two marginal loss tables (Log-Normal and Gamma distributions) representing two business lines, 'Corp' and 'Retail'.
| 1 | |
| 2 | DATA casuser.copula_sim; |
| 3 | call streaminit(12345); |
| 4 | DO i = 1 to 5000; |
| 5 | u_corp = rand('UNIFORM'); |
| 6 | u_retail = rand('UNIFORM'); |
| 7 | OUTPUT; |
| 8 | END; |
| 9 | |
| 10 | RUN; |
| 11 | |
| 12 | DATA casuser.marg_corp; |
| 13 | call streaminit(12345); |
| 14 | DO i = 1 to 5000; |
| 15 | _DRAWID_=1; |
| 16 | _AGGSEV_ = rand('LOGNORMAL', 5, 1); |
| 17 | OUTPUT; |
| 18 | END; |
| 19 | |
| 20 | RUN; |
| 21 | |
| 22 | DATA casuser.marg_retail; |
| 23 | call streaminit(67890); |
| 24 | DO i = 1 to 5000; |
| 25 | _DRAWID_=1; |
| 26 | _AGGSEV_ = rand('GAMMA', 3); |
| 27 | OUTPUT; |
| 28 | END; |
| 29 | |
| 30 | RUN; |
| 31 |
Generates an enterprise-wide loss sample by combining the pre-generated copula simulation with the marginal distributions for 'Corp' and 'Retail'.
| 1 | |
| 2 | PROC CAS; |
| 3 | ecm.ecm / copulaSample={name='copula_sim'} marginals={{name='marg_corp', sampleVarName='_AGGSEV_', idVarValue='u_corp'}, {name='marg_retail', sampleVarName='_AGGSEV_', idVarValue='u_retail'}} OUTPUT={outSample={name='ecm_output', replace=true}} seed=123; |
| 4 | |
| 5 | RUN; |
| 6 |
Performs ECM analysis requesting specific Tail Value-at-Risk (TVaR) levels (95%, 99%), additional percentiles (50th, 90th), and standard summary statistics, saving the results to a separate summary table.
| 1 | |
| 2 | PROC CAS; |
| 3 | ecm.ecm / copulaSample={name='copula_sim'} marginals={{name='marg_corp', idVarValue='u_corp'}, {name='marg_retail', idVarValue='u_retail'}} analysisVariables={'u_corp', 'u_retail'} outsum={outSummary={name='ecm_stats', replace=true}, tVaRLevels={{percentileLevel=95}, {percentileLevel=99}}, percentiles={{percentile=50}, {percentile=90}}, summaryStatistics={{statistic='MEAN'}, {statistic='STDDEV'}}} OUTPUT={outSample={name='ecm_detailed', replace=true}, varName='Total_Loss'} seed=98765; |
| 4 | |
| 5 | RUN; |
| 6 |
A retail bank needs to calculate its Economic Capital by aggregating operational risks from two main business lines: 'Internal Fraud' and 'IT System Failures'. The Risk Manageme...
A global insurance company is modeling aggregate losses across three distinct portfolios: Auto, Home, and Health. To ensure stability in the tail of the distribution, they requi...
A financial institution is performing a 'Stress Test' focusing exclusively on extreme catastrophic events (the top 1% of losses). For reproducibility and auditing purposes on a ...