ecm ecm

Extreme Tail Stress Test without Shuffling

Scénario de test & Cas d'usage

Business Context

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 distributed system, they need to verify the calculation behavior when data shuffling is explicitly disabled, ensuring the data remains local to worker nodes where possible.
Data Preparation

Create a dataset to test boundary conditions: A copula and marginals intended for extreme tail analysis.

Copied!
1 
2DATA casuser.cop_stress;
3call streaminit(555);
4DO i = 1 to 2000;
5u_market = rand('UNIFORM');
6u_credit = rand('UNIFORM');
7OUTPUT;
8END;
9 
10RUN;
11 
12DATA casuser.marg_market;
13DO i = 1 to 2000;
14_DRAWID_=1;
15loss = rand('NORMAL', 1000, 200);
16OUTPUT;
17END;
18 
19RUN;
20 
21DATA casuser.marg_credit;
22DO i = 1 to 2000;
23_DRAWID_=1;
24loss = rand('LOGNORMAL', 6, 0.5);
25OUTPUT;
26END;
27 
28RUN;
29 

Étapes de réalisation

1
Execute ECM targeting only the top 1% tail (tailStart=0.99) and disable data shuffling.
Copied!
1 
2PROC CAS;
3ecm.ecm / copulaSample={name='cop_stress'} marginals={{name='marg_market', sampleVarName='loss', idVarValue='u_market'}, {name='marg_credit', sampleVarName='loss', idVarValue='u_credit'}} tailStart=0.99 shuffleData=FALSE OUTPUT={outSample={name='stress_results', replace=true}} outsum={outSummary={name='stress_stats', replace=true}, percentiles={{percentile=99.5}, {percentile=99.9}}} seed=111;
4 
5RUN;
6 

Expected Result


The action executes without shuffling data across nodes. The 'stress_results' table focuses heavily on the extreme tail values (>= 99th percentile), and 'stress_stats' provides high-percentile metrics.