SAP ABAP Class CL_KFRA_VAR_CALCULATOR (Value-at-Risk Calculator)
Hierarchy
EA-FINSERV (Software Component) SAP Enterprise Extension Financial Services
   FIN-FSCM-TRM-MR (Application Component) Market Risk Analyzer
     CFM_AFWKFRA (Package) CFM Risk Analyzer Key Figure Management
Properties
Class CL_KFRA_VAR_CALCULATOR  
Short Description Value-at-Risk Calculator    
Super Class    
Instantiability of a Class 2  Public 
Final    
General Data
Message Class    
Program status     
Category 0   
Package CFM_AFWKFRA   CFM Risk Analyzer Key Figure Management 
Created 20000719   SAP 
Last change 20060703   SAP 
Shared Memory-enabled    
Fixed point arithmetic    
Unicode checks active    
Forward declarations
# Type group / Object type Type Type Description
1 TVST Type group use (TYPE-POOLS tp)  Type group use (TYPE-POOLS tp)
Interfaces
Class CL_KFRA_VAR_CALCULATOR has no interface implemented.
Friends
Class CL_KFRA_VAR_CALCULATOR has no friend class.
Attributes
# Attribute Level Visibility Read only Typing Associated Type Initial Value Description Created on
1 FLG_SAP_SERVICE Static Attribute Private Type reference (TYPE) AFWGO_FLG_SAP_SERVICE Flag for Service - Blocks all Database Updates 20051117
Methods
# Method Level Visibility Method type Description Created on
1 AGGREGATE_SIM_PL Static method Public Method Summarize VaR Acc. to Simulation Procedure 20040505
2 DELTA_GAMMA Static method Public Method Summarize Delta/Gamma Positions 20000720
3 DELTA_GAMMA_AGGREGATION Static method Private Method Delta/Gamma: Summarization Across Portfolio Hierarchy 20000720
4 ERROR_MESSAGES Static method Private Method Collect Error Messages from BAPI-Error 20000922
5 GET_PH_FOR_EVALPROC Static method Private Method Service: Read Portfolio Hierarchies for Final Results Proc. 20000720
6 PAR_KF_DEFINITION Static method Private Method Set Parameters: Read Parameters from RAD0 and RAK1 20000720
7 PAR_PATH_AGGREGATION Static method Private Method Set Parameters: Summarized Items 20000720
8 PAR_RA_INIT Static method Private Method Intialize Risk Analyzer for Variance/Covariance Approach 20000802
9 PAR_VAR_COMPUTE Static method Private Method Set Parameters: Calculate VaR from Distribution 20000720
10 SAVE_DATA Static method Private Method VaR: Data Backup 20000720
11 SET_SERVICE_MODE Static method Public Method Set Service Mode 20051117
12 SIM_KF_DEFINITION Static method Private Method Simulation: Read Parameters from RAV1 and RAG1 20000720
13 SIM_PATH_AGGREGATION Static method Private Method Simulation: Summarization Across the Portfolio Hierarchy 20000719
14 SIM_VAR_COMPUTE Static method Private Method Simulation: Calculate VaR from Distribution 20000719
15 VAR_PARAMETERIZATION Static method Public Method Summarize VaR Acc. to Parameterization Procedure 20000720
16 VAR_SIMULATION Static method Public Method Summarize VaR Acc. to Simulation Procedure 20000719
17 VAR_SIMULATION_CALC Static method Public Method Calculate VaR Acc. to Simulation Procedure 20000822
18 VAR_SIMULATION_INDEX Static method Public Method Calculate Sample Index for Confidence Level 20000919
Events
Class CL_KFRA_VAR_CALCULATOR has no event.
Types
Class CL_KFRA_VAR_CALCULATOR has no local type.
Method Signatures

Method AGGREGATE_SIM_PL Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IREF_MSG_HANDLER Call by reference Object reference (TYPE REF TO) CL_AFWGO_MSG_HANDLER2 Message Handler Endergebnisverfahren 20040505
2 Importing IT_KFBF Call by reference Type reference (TYPE) AFWKF_KFBF_T Zuordnung Kennzahl-Basiskennzahl 20040505
3 Importing I_DATASTR Call by reference Type reference (TYPE) JBRRMBID Analysestruktur 20040505
4 Importing I_EVALPROC Call by reference Type reference (TYPE) AFWGO_EVALPROC_2 Auswertungsverfahren Endergebnissätze: Definition 20040505
5 Importing I_KEYDATE Call by reference Type reference (TYPE) AFWGO_EVALDATE Stichtag 20040505
6 Importing I_PH_TESTMODE Call by reference Type reference (TYPE) AFWCH_FLAG_SELE ' ' X =PH mit Filtertestselektionen 20040510

Method AGGREGATE_SIM_PL on class CL_KFRA_VAR_CALCULATOR has no exception.

Method DELTA_GAMMA Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IREF_MSG_HANDLER Call by reference Object reference (TYPE REF TO) CL_AFWGO_MSG_HANDLER2 Message Handler Endergebnisverfahren 20000922
2 Importing IT_KFBF Call by reference Type reference (TYPE) AFWKF_KFBF_T Zuordnung Kennzahl-Basiskennzahl 20000720
3 Importing I_DATASTR Call by reference Type reference (TYPE) JBRRMBID Analysestruktur 20000720
4 Importing I_EVALPROC Call by reference Type reference (TYPE) AFWGO_EVALPROC_2 Auswertungsverfahren Endergebnissätze: Definition 20000720
5 Importing I_KEEP_DATA Call by reference Type reference (TYPE) C Verdichtungsdaten ins memory exportieren 20000720
6 Importing I_KEYDATE Call by reference Type reference (TYPE) AFWGO_EVALDATE Stichtag 20000720
7 Importing I_PH_TESTMODE Call by reference Type reference (TYPE) AFWCH_FLAG_SELE ' ' PH mit Filtertestselektionen 20040510

Method DELTA_GAMMA on class CL_KFRA_VAR_CALCULATOR has no exception.

Method DELTA_GAMMA_AGGREGATION Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_NSUM_TBP Call by reference Type reference (TYPE) RDBRA_INTF_NSUM_TBP_T RA Results Database: Items (Delta/Gamma) 20000720
2 Exporting E_PHIERA Call by reference Type reference (TYPE) AFW_PHIERA Portfolio Hierarchy 20000720
3 Importing IR_MSG Call by reference Object reference (TYPE REF TO) CL_AFWGO_MSG_HANDLER2 Message Handler: Final Results Procedure 20000922
4 Importing IT_XSUM_TBP Call by reference Type reference (TYPE) RDBRA_INTF_SUM_TBP_T RA RDB: Table Type Key Figure BKP 20000720
5 Importing I_KF Call by reference Type reference (TYPE) AFWKF_DEFINITION Test 20000720
6 Importing I_PH Call by reference Type reference (TYPE) JBRPHDEF Definitions Used to Derive Portfolio Hierarchy 20000720
7 Importing I_PH_TESTMODE Call by reference Type reference (TYPE) AFWCH_FLAG_SELE '' PH mit Filtertestselektionen 20040510

Method DELTA_GAMMA_AGGREGATION on class CL_KFRA_VAR_CALCULATOR has no exception.

Method ERROR_MESSAGES Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IREF_MSG_HANDLER Call by reference Object reference (TYPE REF TO) CL_AFWGO_MSG_HANDLER2 Message Handler: Final Results Procedure 20000922

Method ERROR_MESSAGES on class CL_KFRA_VAR_CALCULATOR has no exception.

Method GET_PH_FOR_EVALPROC Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_PH Call by reference Type reference (TYPE) AFWCH_PH_DEF_T Portfolio Hierarchy Definitions (Table) 20000720
2 Exporting E_VIEW Call by reference Type reference (TYPE) JBRSICHTID View of an Analysis Structure 20000720
3 Importing I_EVALPROC Call by reference Type reference (TYPE) AFWGO_EVALPROC_2 Evaluation Procedure Final Results Records: Definition 20000720
4 Importing I_KEYDATE Call by reference Type reference (TYPE) AFWGO_EVALDATE Auswertungsdatum 20031211

Method GET_PH_FOR_EVALPROC on class CL_KFRA_VAR_CALCULATOR has no exception.

Method PAR_KF_DEFINITION Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting E_KD0 Call by reference Type reference (TYPE) AFWKFRA_KD0 Key Figures: Positions in Risk Hierarchy 20000802
2 Exporting E_KVK Call by reference Type reference (TYPE) AFWKFRA_KVK Key Figures: Value at Risk with Parameters 20000802
3 Importing I_EVALDATE Call by reference Type reference (TYPE) AFWGO_EVALDATE Evaluation Date 20010328
4 Importing I_RAD0 Call by reference Type reference (TYPE) AFWKF_DEFINITION Test 20000720
5 Importing I_RAK1 Call by reference Type reference (TYPE) AFWKF_DEFINITION Test 20000720

Method PAR_KF_DEFINITION on class CL_KFRA_VAR_CALCULATOR has no exception.

Method PAR_PATH_AGGREGATION Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_NSUM_TBP Call by reference Type reference (TYPE) RDBRA_INTF_NSUM_TBP_T RA Selection Interface: P&L Distributions 20000720
2 Importing IR_MSG Call by reference Object reference (TYPE REF TO) CL_AFWGO_MSG_HANDLER2 Message Handler: Final Results Procedure 20000922
3 Importing I_DATASTR Call by reference Type reference (TYPE) JBRRMBID Analysis Structure 20000720
4 Importing I_EVALDATE Call by reference Type reference (TYPE) AFWGO_EVALDATE Evaluation Date 20000720
5 Importing I_KF Call by reference Type reference (TYPE) AFWKF_DEFINITION Test 20000720
6 Importing I_PH Call by reference Type reference (TYPE) JBRPHDEF Definitions Used to Derive Portfolio Hierarchy 20000720
7 Importing I_PH_TESTMODE Call by reference Type reference (TYPE) AFWCH_FLAG_SELE ' ' X =PH mit Filtertestselektionen 20040510

Method PAR_PATH_AGGREGATION on class CL_KFRA_VAR_CALCULATOR has no exception.

Method PAR_RA_INIT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting E_SPARA Call by reference Type reference (TYPE) JBRHSSPARI Parameters for Evaluations (Include) 20000802
2 Importing I_EVALDATE Call by reference Type reference (TYPE) AFWGO_EVALDATE Evaluation Date 20000802
3 Importing I_KFBF Call by reference Type reference (TYPE) AFWKF_KFBF Test 20000802

Method PAR_RA_INIT on class CL_KFRA_VAR_CALCULATOR has no exception.

Method PAR_VAR_COMPUTE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_NSUM_TVK Call by reference Type reference (TYPE) RDBRA_INTF_NSUM_TVK_T RA Results Interface: Value at Risk 20000720
2 Importing IR_MSG Call by reference Object reference (TYPE REF TO) CL_AFWGO_MSG_HANDLER2 Message Handler: Final Results Procedure 20000922
3 Importing IT_NSUM_TBP Call by reference Type reference (TYPE) RDBRA_INTF_NSUM_TBP_T RA Results Interface: P&L Distributions 20000720
4 Importing I_KFBF Call by reference Type reference (TYPE) AFWKF_KFBF VaR Determination Procedure from a Distribution 20000720
5 Importing I_SPARA Call by reference Type reference (TYPE) JBRHSSPARI Evaluation Date 20000802

Method PAR_VAR_COMPUTE on class CL_KFRA_VAR_CALCULATOR has no exception.

Method SAVE_DATA Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IR_MSG Call by reference Object reference (TYPE REF TO) CL_AFWGO_MSG_HANDLER2 Message Handler: Final Results Procedure 20000922
2 Importing IT_NSUM_TBG Call by reference Type reference (TYPE) RDBRA_INTF_NSUM_TBG_T RA RDB: Table Type Key Figure BKG - Non-Additive 20000720
3 Importing IT_NSUM_TVK Call by reference Type reference (TYPE) RDBRA_INTF_NSUM_TVK_T RA RDB: Table Type Key Figure BKV - Non-Additive 20000720
4 Importing I_EVALDATE Call by reference Type reference (TYPE) AFWGO_EVALDATE Evaluation Date 20000720
5 Importing I_EVALPROC Call by reference Type reference (TYPE) AFWGO_EVALPROC_2 Evaluation Procedure Final Results Records: Definition 20000720
6 Importing I_KFBF Call by reference Type reference (TYPE) AFWKF_KFBF Assignment of Key Figure to Basic Key Figure 20000720
7 Importing I_PHIERA Call by reference Type reference (TYPE) AFW_PHIERA Portfolio Hierarchy 20000720

Method SAVE_DATA on class CL_KFRA_VAR_CALCULATOR has no exception.

Method SET_SERVICE_MODE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_FLG_SAP_SERVICE Call by reference Type reference (TYPE) AFWGO_FLG_SAP_SERVICE Flag für Service - unterbindet alle DB-Verbuchungen 20051117

Method SET_SERVICE_MODE on class CL_KFRA_VAR_CALCULATOR has no exception.

Method SIM_KF_DEFINITION Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting E_CONFID Call by reference Type reference (TYPE) AFWKFRA_CONFIDENCE Confidence Level for VaR Calculation 20000720
2 Exporting E_DISTRIB Call by reference Type reference (TYPE) AFWKFRA_DISTRIBUTION VaR Determination Procedure from a Distribution 20000720
3 Exporting E_SIMNR Call by reference Type reference (TYPE) AFWKFRA_SIMNR Number of Simulation Runs 20000720
4 Importing I_EVALD Call by reference Type reference (TYPE) AFWGO_EVALDATE Evaluation Date 20010328
5 Importing I_KFRAG1 Call by reference Type reference (TYPE) AFWKF_DEFINITION Test 20000720
6 Importing I_KFRAV1 Call by reference Type reference (TYPE) AFWKF_DEFINITION Test 20000720

Method SIM_KF_DEFINITION on class CL_KFRA_VAR_CALCULATOR has no exception.

Method SIM_PATH_AGGREGATION Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing CT_NSUM_TBG Call by reference Type reference (TYPE) RDBRA_INTF_NSUM_TBG_T RA: Final Results for P&L Distributions 20000719
2 Importing IR_MSG Call by reference Object reference (TYPE REF TO) CL_AFWGO_MSG_HANDLER2 Message Handler: Final Results Procedure 20000922
3 Importing IT_PHTREE Call by reference Type reference (TYPE) AFWCH_PH_TREE_T Tree Structure of Portfolio Hierarchy (Table) 20000719
4 Importing IT_SUM_TBG Call by reference Type reference (TYPE) RDBRA_INTF_SUM_TBG_T RA Selection Interface: P&L Distributions 20000719
5 Importing I_LEAF Call by reference Type reference (TYPE) AFW_PHNODE Portfolio Hierarchy Node 20000719

Method SIM_PATH_AGGREGATION on class CL_KFRA_VAR_CALCULATOR has no exception.

Method SIM_VAR_COMPUTE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_NSUM_TVK Call by reference Type reference (TYPE) RDBRA_INTF_NSUM_TVK_T RA Results Interface: Value at Risk 20000720
2 Importing IR_MSG Call by reference Object reference (TYPE REF TO) CL_AFWGO_MSG_HANDLER2 Message Handler: Final Results Procedure 20000922
3 Importing IT_NSUM_TBG Call by reference Type reference (TYPE) RDBRA_INTF_NSUM_TBG_T RA Results Interface: P&L Distributions 20000720
4 Importing I_EVALD Call by reference Type reference (TYPE) AFWGO_EVALDATE Evaluation Date 20010328
5 Importing I_KFBF Call by reference Type reference (TYPE) AFWKF_KFBF VaR Determination Procedure from a Distribution 20000720

Method SIM_VAR_COMPUTE on class CL_KFRA_VAR_CALCULATOR has no exception.

Method VAR_PARAMETERIZATION Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IREF_MSG_HANDLER Call by reference Object reference (TYPE REF TO) CL_AFWGO_MSG_HANDLER2 Message Handler Endergebnisverfahren 20000922
2 Importing IT_KFBF Call by reference Type reference (TYPE) AFWKF_KFBF_T Zuordnung Kennzahl-Basiskennzahl 20000720
3 Importing I_DATASTR Call by reference Type reference (TYPE) JBRRMBID Analysestruktur 20000720
4 Importing I_EVALPROC Call by reference Type reference (TYPE) AFWGO_EVALPROC_2 Auswertungsverfahren Endergebnissätze: Definition 20000720
5 Importing I_KEYDATE Call by reference Type reference (TYPE) AFWGO_EVALDATE Stichtag 20000720
6 Importing I_PH_TESTMODE Call by reference Type reference (TYPE) AFWCH_FLAG_SELE ' ' X =PH mit Filtertestselektionen 20040510

Method VAR_PARAMETERIZATION on class CL_KFRA_VAR_CALCULATOR has no exception.

Method VAR_SIMULATION Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IREF_MSG_HANDLER Call by reference Object reference (TYPE REF TO) CL_AFWGO_MSG_HANDLER2 Message Handler Endergebnisverfahren 20000922
2 Importing IT_KFBF Call by reference Type reference (TYPE) AFWKF_KFBF_T Zuordnung Kennzahl-Basiskennzahl 20000719
3 Importing I_DATASTR Call by reference Type reference (TYPE) JBRRMBID Analysestruktur 20000719
4 Importing I_EVALPROC Call by reference Type reference (TYPE) AFWGO_EVALPROC_2 Auswertungsverfahren Endergebnissätze: Definition 20000720
5 Importing I_KEYDATE Call by reference Type reference (TYPE) AFWGO_EVALDATE Stichtag 20000719
6 Importing I_PH_TESTMODE Call by reference Type reference (TYPE) AFWCH_FLAG_SELE ' ' X =PH mit Filtertestselektionen 20040510

Method VAR_SIMULATION on class CL_KFRA_VAR_CALCULATOR has no exception.

Method VAR_SIMULATION_CALC Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting E_VAR Call by reference Type reference (TYPE) F Value-at-Risk 20000822
2 Importing IT_TBG_10 Call by reference Type reference (TYPE) RDBRA_INCL_VAL10_T RDB RA: Tabelle der GuV-Verteilung in 10er Blockung 20000822
3 Importing I_EVALD Call by reference Type reference (TYPE) AFWGO_EVALDATE Auswertungsdatum 20010328
4 Importing I_KFBF Call by reference Type reference (TYPE) AFWKF_KFBF Zuordnung Kennzahl-Basiskennzahl 20000822
# Exception Resumable Description Created on
1 NO_CALC VaR kann nicht berechnet werden 20000925

Method VAR_SIMULATION_INDEX Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing I_ADDON Value transfer Type reference (TYPE) I 1 Add-on (0,1) 20010220
2 Importing I_CONFIDENCE Value transfer Type reference (TYPE) F Konfidenzniveau 20000919
3 Importing I_SIZE Value transfer Type reference (TYPE) I Simulationsumfang 20000919
4 Returning R_INDEX Value transfer Type reference (TYPE) I VaR-Index 20000919

Method VAR_SIMULATION_INDEX on class CL_KFRA_VAR_CALCULATOR has no exception.
History
Last changed by/on SAP  20060703 
SAP Release Created in 462_10