SAS Documentation
SASĀ® Solution for Stress Testing
Reference manual - version 08.2021
Loading...
Searching...
No Matches
calculation_config.sas
Go to the documentation of this file.
1/*
2 Copyright (C) 2015 SAS Institute Inc. Cary, NC, USA
3*/
4
5/**
6 \file
7 \brief The table CALCULATION_CONFIG contains a list of fields to calculate. It allows for expressions based on previous period fields.
8
9 |PK |Variable |Type |Not Null * |Label |Description |
10 |---|--------------------------|------------------|-----------|-------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
11 | | WORKGROUP | VARCHAR(32) | Y | Risk Workgroup | Risk Workgroup |
12 | | MODELING_SYSTEM | VARCHAR(150) | Y | Modeling System (Name and Version) | Expected format: <i>&lt;Modeling System Name&gt; <b>[</b>(&lt;Version&gt;)<b>]</b></i>. |
13 | | ANALYSIS_TYPE | VARCHAR(32) | Y | Analysis Type | Analysis type (FR_HTM or AFS) |
14 | | MAP_TYPE | VARCHAR(100) | Y | Map Type | Indicates which target table the mapping refers to. |
15 | | PREV_PERIOD_VAR | VARCHAR(32) | N | Previous Period Variable | Name of a field to pull from the previous period data set |
16 | | PREV_PERIOD_VAR_RENAME | VARCHAR(32) | N | Name for Previous Period Variable | Name to assign to the field pulled from the previous period data set. If empty, the assigned name will be PREV_<field_name> |
17 | | TARGET_VAR_NAME | VARCHAR(32) | N | Target Variable Name | Name of the target variable |
18 | | EXPRESSION_TXT | VARCHAR(4096) | N | Expression text | Expression. Can be any of the following: <br> - &lt;Variable Name&gt;: it will result in the variable being renamed. <br> - =&lt;assignment&gt; (i.e.: = Var1 + Var2): any valid SAS statement. <br> - &lt;Blank&gt;: This expression will be ignored. |
19 | | MAPPING_DESC | VARCHAR(1024) | N | Mapping Description | (Optional) Description about the purpose of the mapping rule. |
20 | | TARGET_VAR_LENGTH | VARCHAR(32) | N | Target Variable Length | (Optional) Set the length of the target variable (i.e.: $32. for characters or 8. for numeric variables). |
21 | | TARGET_VAR_LABEL | VARCHAR(150) | N | Target Variable Label | (Optional) Set the label for the target variable (Do not include quotes!). |
22 | | TARGET_VAR_FMT | VARCHAR(32) | N | Target Variable Format | (Optional) Set the format of the target variable. |
23 (*) indicates a not-nullable variable.
24
25
26 \details
27
28 If multiple fields are needed from the previous period data set, these should be defined in separate rows.
29
30 For example, to set Z = sum(X from previous period, Y from previous period) on CREDIT_RISK_DETAIL, this table may have the following entries (Note that the third row could be combined into the second row):
31
32 |WORKGROUP |MODELING_SYSTEM |ANALYSIS_TYPE |MAP_TYPE |PREV_PERIOD_VAR |PREV_PERIOD_VAR_RENAME |TARGET_VAR_NAME |EXPRESSION_TXT |MAPPING_DESC |TARGET_VAR_LENGTH |TARGET_VAR_LABEL |TARGET_VAR_FMT |
33 |----------|----------------|--------------|---------------------|-------------------------|-----------------------|---------------------|---------------------|------------------------|------------------|-----------------|-----------------|
34 | * | * | * | CREDIT_RISK_DETAIL | X | PREV_X | | | Pull previous period X | | | |
35 | * | * | * | CREDIT_RISK_DETAIL | Y | PREV_Y | | | Pull previous period Y | | | |
36 | * | * | * | CREDIT_RISK_DETAIL | | | Z | SUM(PREV_X, PREV_Y) | Calculate Z | 8. | Z | |
37
38 Note: If any calculations are based on fields that could be adjusted (e.g. via an Allocation Rule Set), the VAR_DEPENDENCY_CONFIG table should also be updated with similar expressions.
39
40 \ingroup ddlStaticAnalytics
41 \author SAS Institute Inc.
42 \date 2018
43*/
44CREATE TABLE &LIBREF..calculation_config (
45 WORKGROUP VARCHAR(32) label='Risk Workgroup',
46 MODELING_SYSTEM VARCHAR(150) label='Modeling System (Name and Version)',
47 ANALYSIS_TYPE VARCHAR(32) label='Analysis Type',
48 MAP_TYPE VARCHAR(100) label='Map Type',
49 PREV_PERIOD_VAR VARCHAR(32) label='Previous Period Variable',
50 PREV_PERIOD_VAR_RENAME VARCHAR(32) label='Name for Previous Period Variable',
51 TARGET_VAR_NAME VARCHAR(32) label='Target Variable Name',
52 EXPRESSION_TXT VARCHAR(4096) label='Expression',
53 MAPPING_DESC VARCHAR(1024) label='Mapping Description ',
54 TARGET_VAR_LENGTH VARCHAR(32) label='Target Variable Length',
55 TARGET_VAR_LABEL VARCHAR(150) label='Target Variable Label',
56 TARGET_VAR_FMT VARCHAR(32) label='Target Variable Format'
57 );