28%let sas_risk_workgroup_dir = ${globals.sas_risk_workgroup_dir};
31%let cycle_key = ${context.cycle.key};
34%let analysis_run_key = ${context.analysisRun.key};
37%let current_dt_ymd = %sysfunc(date(), yymmddd10.);
38%let current_tm_tod = %sysfunc(time(), tod10.);
40%let custom_AnalysisName =${params.ANALYSISDATANAME};
44%let ValueAtRisk_Level = ${params.VARLEVEL};
47%include
"&sas_risk_workgroup_dir./groups/Public/SASRiskManagementCore/cycles/&cycle_key./init.sas" / lrecl = 32000 source2;
54%irm_rest_get_rgf_cycle(key = &cycle_key.
55 , host = &rgf_protocol:
57 , tgt_ticket = &tgt_ticket.
59 , outVarTicket = ticket
60 , outSuccess = httpSuccess
61 , outResponseStatus = responseStatus
65 call symputx(
"cycle_baseDt", baseDt,
"L");
66 call symputx(
"cycle_entityId", entityId,
"L");
71data &ds_out_model_result.;
72 set &ds_in_model_result.(where=(collateral NE 1));
73 retain Economic_Capital . Component_Economic_Capital . ValueAtRisk . Component_ValueAtRisk . ExpectedLoss .;
75 if simulationPart=
"VALUEATRISK" then ValueAtRisk=mean;
76 if simulationPart=
"ECONOMIC_CAPITAL" then Economic_Capital=mean;
77 if simulationPart=
"COMPONENT_VALUEATRISK" then Component_ValueAtRisk=mean;
78 if simulationPart=
"COMPONENT_ECONOMIC_CAPITAL" then Component_Economic_Capital=mean;
79 if simulationPart=
"EXPECTEDLOSS" then ExpectedLoss=mean;
80 ValueAtRisk_Alpha=&ValueAtRisk_Level.;
81 if last.instid then output;