SAS Documentation
SASĀ® Solution for Stress Testing
Reference manual - version 08.2021
Loading...
Searching...
No Matches
irmst_model_precode_simMarket_short_term.sas
1/*
2 The following SAS macro variables are available to the model at run time:
3 - ticket: SAS authentication service ticket (useful for performing operations that require authentication, i.e. interacting with REST services).
4 - rgf_protocol: Communication protocol (http/https) of the SAS Risk and Governance Framework web application
5 - rgf_host: Hostname of the SAS Risk and Governance Framework web application
6 - rgf_port: Port where the SAS Risk and Governance Framework web application is listening
7 - rgf_service: The service where the SAS Risk and Governance Framework web application is listening
8 - ds_in_portfolio: portfolio table
9 - ds_in_scenario: scenario table
10 - ds_in_counterparty: counterparty table (if used)
11 - ds_in_mitigant: credit risk mitigant table (if used)
12
13 The following libraries are pre assigned:
14 - mipport: MIP portfolio library
15 - mipcpty: MIP counterparty library
16 - mipmit: MIP credit risk mitigant library
17 - mipcf: MIP cashflow library
18 - mippmx: MIP parameter matrix library
19 - mippmx: MIP valueData library
20 - mipfunc: MIP functions library
21
22*/
23
24/*The model does not support pricing cubes unless the DISTRIBUTE_POSITIONS=YES.*/
25%let mipProcHpriskArguments = %bquote(distribute_positions = YES priceby = positions;);
26
27/* Cashflow data object key */
28%let cashflow_key = ${params.CASHFLOW.key};
29
30
31/*In this model the mip horizon is always larger (+1) because the VAR and the EC variable are based on the PD for the coming period.*/
32%let mipHorizon=%eval(&maxForecastTime.+1);
33
34
35%*irm_file_append(file = /opt/sas/repositories/risk/rqsst/irm/source/sas/misc/examples/market_risk_factors1.sas
36 , toFile = &model_input_dir./economics/scenarios_&base_dt_ymdn._&model_run_key._&run_idx./market_risk_factors1.sas
37 );
38%*irm_file_append(file = /opt/sas/repositories/risk/rqsst/irm/source/sas/misc/examples/market_risk_factors2.sas
39 , toFile = &model_input_dir./economics/scenarios_&base_dt_ymdn._&model_run_key._&run_idx./market_risk_factors2.sas
40 );
41
42
43
44
45
46/* Common Simulation Multipliers Flag */
47%let ecoSimMultiFlag = ${params.ECONSIMMULTIPLIERFLAG};
48
49
50
51
52
53
54
55
56
57
58
59/* Set logging options (based on the value of LOG_LEVEL macro variable) */
60%irm_set_logging_options();
61
62
63
64
65
66%if %upcase(&ecoSimMultiFlag.)=Y %then %do;
67
68 %let ds_scenario = scn_&run_idx..scenario_data;
69 %let ds_econSimulation = _sim_.econsim_&base_dt_ymdn._&model_run_key._&run_idx.;
70
71 %irmst_market_regenerate_econsim( ds_in_scenario = &ds_scenario.
72 , ds_in_econsim = &ds_econSimulation.
73 );
74%end;