SAS Documentation
SASĀ® Solution for Stress Testing
Reference manual - version 08.2021
Loading...
Searching...
No Matches
irmst_script_riskagg_hicopula.sas
1/* ************************************************** *
2 * COPULA Aggregation *
3 * ************************************************** */
4${function:ProcessSpreadsheetParameter(params.AGGREGATIONCONFIG,"aggConfig")}
5${function:ProcessSpreadsheetParameter(params.CORRELATIONMAPPING,"corrMapping")}
6${function:ProcessSpreadsheetParameter(params.ALLHIERARCHYROWS,"allHierarchyRows")}
7
8%let hicopulaParsedAlpha = ${params.ALPHA};
9%let hicopulaParsedSeed = ${params.SEED};
10%let hicopulaParsedNdraws = ${params.NDRAWS};
11%let hierarchyLevels = ${params.HIERARCHYLEVELS};
12
13/*Give a valid path to a temporary folder if you need to save temporary results for debugging purposes.*/
14%let debug_libname_path=${params.TESTINGDEBUG};
15%let out_libref = work;
16%macro setup_debug_libref;
17 %if %sysevalf(%bquote(&debug_libname_path.) ne %str(), boolean) %then %do;
18 /*If the debugging folder does not exist, try to create one.*/
19 %if %rsk_dir_exists(DIR=&debug_libname_path.)=0 %then %do;
20 %put NOTE: Trying to create debug directory &debug_libname_path.;
21 %rsk_mkdirs(DIR=&debug_libname_path.);
22 %end;
23 %if %rsk_dir_exists(DIR=&debug_libname_path.)=0 %then %do;
24 %put ERROR: unable to create the directory &debug_libname_path.;
25 %end;
26 %else %do;
27 %let out_libref = _debug;
28 libname _debug "&debug_libname_path.";
29 %end;
30 %end;
31%mend;
32
33%setup_debug_libref;
34
35%irmst_riskagg_hicopula_run( in_ds_corr_mapping =corrMapping
36 , in_ds_all_hierarchy_rows=allHierarchyRows
37 , in_ds_aggregate_config =aggConfig
38 , out_ds_results =RISKAGG_SUMMARY_RESULTS
39 , out_libref =&out_libref.
40 , hicopula_parsed_alpha =&hicopulaParsedAlpha.
41 , hicopula_parsed_seed =&hicopulaParsedSeed.
42 , hicopula_parsed_ndraws =&hicopulaParsedNdraws.
43 , hierarchy_levels =%quote(&hierarchyLevels.)
44 );