user guide: value-at-risk

56
Front Arena Your Intelligent Engine User Guide: Value-at-Risk PRIME 2019.4 Refer to the Front Arena Knowledgebase for a complete list of valid releases. FCA4376-22 January 2020

Upload: others

Post on 05-Dec-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Front Arena Your Intelligent Engine

User Guide: Value-at-Risk PRIME 2019.4 Refer to the Front Arena Knowledgebase for a complete list of valid releases.

FCA4376-22

January 2020

Notices

Copyright Copyright © 2020. By Fidelity National Information Services (FIS).

FIS, the FIS logo, and Front Arena are trademarks or registered trademarks of FIS, or its subsidiaries in the U.S. and other countries. All other trade names are trademarks or registered trademarks of their respective holders.

This document and the software described within are copyrighted with all rights reserved. No part of this document may be reproduced, transcribed, transmitted, stored in an electronic retrieval system, or translated into any language in any form by any means without prior written permission of FIS. FIS makes no warranties, express or implied, in this document. In no event shall FIS be liable for damages of any kind, direct or indirect, arising out of the use of this document or the information contained within.

Confidentiality statement This document contains information that is confidential or proprietary to FIS (or its direct or indirect subsidiaries). By accepting this document, you agree that: (1) if there is any pre-existing contract containing disclosure and use restrictions between your company and FIS, you and your company will use this information in reliance on and submit to the terms of any such pre-existing context; or (2) if there is no contractual relationship between you or your company and FIS, you and your Company agree to protect this information and not reproduce, disclose, or use the information in any way, except as may be required by law.

Disclaimer The screens and illustrations are representative of those created by the software, and are not always exact copies of what appears on the computer monitor. Companies, names, and data used in examples herein are fictitious unless otherwise noted. The material in this document is for information only, and is subject to change without notice. FIS reserves the right to make changes in the product design and installation software without reservation and without notice to users.

Supplementary legal notice for product documentation Any information expressed in this document regarding standard practice or conventions in financial markets or in the administration or functioning of banks is included to provide context to information provided about our products and services and thereby clarify how these products and services function. Such information is expressed in good faith but FIS accepts no liability for its accuracy or validity. Users are responsible for verifying the validity and accuracy of such information to their own satisfaction.

Products belonging to third party suppliers other than FIS or its subsidiaries are mentioned in this document only as information to the reader and are not to be regarded as specific recommendations. FIS or its subsidiaries does not guarantee the quality of these products, their performance, or their usage for any special purpose.

Contents 1 ....... Introduction................................................................................................................................... 6

2 ....... Risk factor specifications ............................................................................................................ 7

2.1..... Definition .............................................................................................................................. 7

2.2..... Risk types ............................................................................................................................. 7

2.2.1 .... Equity ...................................................................................................................... 7 2.2.2 .... FX ........................................................................................................................... 7 2.2.3 .... Interest rate ............................................................................................................. 8 2.2.4 .... Credit ...................................................................................................................... 8 2.2.5 .... Volatility .................................................................................................................. 9 2.2.6 .... Commodity .............................................................................................................. 9 2.2.7 .... Other types ...........................................................................................................10

3 ....... Risk factor dynamics and perturbations .................................................................................11

3.1..... Definition ............................................................................................................................11

3.2..... Perturbation and dynamics for different risk types.............................................................11

3.2.1 .... Equity and Commodity .........................................................................................11 3.2.2 .... FX .........................................................................................................................11 3.2.3 .... Interest rate ...........................................................................................................12 3.2.4 .... Credit ....................................................................................................................13 3.2.5 .... Volatility ................................................................................................................13

4 ....... Risk factor configuration in PRIME ..........................................................................................14

4.1..... Questions to answer before starting the configuration ......................................................14

4.2..... Risk factor Grouping application ........................................................................................14

4.3..... Risk factor Specification application ..................................................................................17

5 ....... Parametric Value-at-Risk ...........................................................................................................21

5.1..... Calculation principles .........................................................................................................21

5.2..... Calculation of delta values in PRIME .................................................................................22

5.3..... Example with two equity positions .....................................................................................23

5.4..... Example with a zero-coupon bond position in a foreign currency .....................................23

5.5..... Comparing with the Risk Metrics approach .......................................................................25

5.6..... Volatility and correlation risk data ......................................................................................26

5.7..... Conversion of the FX volatility and correlation data ..........................................................29

5.8..... Trading Manager columns .................................................................................................30

6 ....... Scenario analysis .......................................................................................................................34

6.1..... Calculation principles .........................................................................................................34

6.2..... Example with two equity positions .....................................................................................35

6.3..... Example zero-bond position in a foreign currency.............................................................35

6.4..... Scenario risk data ..............................................................................................................36

6.5..... Trading Manager columns .................................................................................................38

6.5.1 .... Selecting from a list of existing scenarios ............................................................38 6.5.2 .... Using a scenario template ....................................................................................38 6.5.3 .... Creating a new risk factor scenario ......................................................................39 6.5.4 .... Scenario columns in the Portfolio Sheet ..............................................................40

7 ....... Scenario Value-at-Risk ..............................................................................................................41

7.1..... Calculation principles .........................................................................................................41

7.2..... Numerical example ............................................................................................................43

7.3..... Trading Manager columns .................................................................................................44

7.4..... Trading Manager example view .........................................................................................46

8 ....... Upgrading from Front Arena 2 ..................................................................................................47

8.1..... Configuration differences ...................................................................................................47

8.2..... Calculation differences .......................................................................................................47

8.3..... Performance differences ....................................................................................................48

8.4..... ARENA Functions and ARENA Standard Calculations .....................................................48

8.5..... Consolidated Risk Package ...............................................................................................48

9 ....... Working with scenarios programmatically ..............................................................................50

9.1..... ARENA Function: rf_scenario() ..........................................................................................50

9.2..... ARENA Standard Calculation: RiskFactorScenario() ........................................................50

9.3..... ACM class: FRiskFactorScenarioBuilder ...........................................................................50

9.4..... ACM class: FShiftVectors and FExplicitScenario ..............................................................50

10 ..... Programmatic access methods ................................................................................................51

10.1... General ..............................................................................................................................51

10.2... ARENA Standard Calculation: ParametricValueAtRisk() ..................................................51

10.2.1 .. Function syntax.....................................................................................................51 10.2.2 .. Object types ..........................................................................................................51 10.2.3 .. Parameters ...........................................................................................................51 10.2.4 .. Default values .......................................................................................................51

10.3... ARENA Standard Calculation: RiskFactorScenario() ........................................................52

10.3.1 .. Function syntax.....................................................................................................52 10.3.2 .. Object types ..........................................................................................................52 10.3.3 .. Parameters ...........................................................................................................52 10.3.4 .. Default values .......................................................................................................52

10.4... ARENA Function: value_at_risk() ......................................................................................53

10.4.1 .. Function syntax.....................................................................................................53 10.4.2 .. Entity types ...........................................................................................................53 10.4.3 .. Parameters ...........................................................................................................53 10.4.4 .. Default values .......................................................................................................53

10.5... ARENA Function: rf_scenario() ..........................................................................................54

11 ..... References ..................................................................................................................................55

Figures Figure 1: Creation of a risk factor group in the Choice List Editor..........................................................15

Figure 2: Mapping of an equity instrument to a risk factor group ...........................................................15

Figure 3: Mapping of a yield curve to a risk factor group .......................................................................16

Figure 4: Creation of an equity risk factor specification .........................................................................18

Figure 5: Creation of an interest rate risk factor specification ................................................................19

Figure 6: Creation of a credit risk factor specification ............................................................................20

Figure 7: Volatility and correlation risk data files ....................................................................................27

Figure 8: Volatility and correlation file formats .......................................................................................27

Figure 9: Pointer to the risk data files in the arena.ini configuration file .................................................29

Figure 10: Selecting the column for parametric VaR in the Portfolio Sheet ...........................................31

Figure 11: Parametric VaR in the Trading Manager Portfolio Sheet ......................................................32

Figure 12: Risk factor rows in the Vertical Portfolio Sheet .....................................................................32

Figure 13: Parametric VaR report using the standard reporting framework ..........................................33

Figure 14: Example of a scenario file .....................................................................................................37

Figure 15: File format settings in a risk factor specification ...................................................................37

Figure 16: Applying a scenario to the calculated value Theoretical Value .............................................38

Figure 17: Scenario template for importing scenarios from file ..............................................................38

Figure 18: Risk Factor Scenario Shift Vector .........................................................................................39

Figure 19: Scenario columns in the Portfolio Sheet – stress test scenarios ..........................................40

Figure 20: Scenario VaR in the Trading Manager Portfolio Sheet .........................................................46

User Guide: Value-at-Risk (FCA4376-22)

1 Introduction 6 of 56

1 Introduction This document describes the Value-at-Risk (VaR) functionality available in the Front Arena 4 track. It includes the following main topics:

• Risk factor specifications • Perturbation of risk factors • Parametric Value-at-Risk (VaR) • Scenario analysis and stress testing • Scenario Value-at-Risk (VaR) • Generation of risk factor data • Upgradability • Programmatic access methods to Value-at-Risk

The document covers important definitions, calculation principles, data formats, preparation and configuration, available VaR columns, and how to work with the functionality in PRIME.

The document is intended for anyone who needs to understand and use this functionality in Front Arena. Target readers are end users and application managers.

The entire PRIME functionality is included in the default module and does not require installation of any separate modules or Python libraries.

Tip: Because VaR calculations are very computationally demanding, it is recommended that they are run using the APS and server-side distribution. For more information, refer to System Administration: Distributed Processing Using PACE (FCA4619).

User Guide: Value-at-Risk (FCA4376-22)

2 Risk factor specifications 7 of 56

2 Risk factor specifications This section provides the definition of the risk factor specifications used in the entire VaR functionality and describes how to configure these in PRIME. Defining the risk factor space represents the major data preparation that needs to be performed before it is possible to start using the functionality.

2.1 Definition The basis for the entire VaR calculation is a set of risk factor specifications or simply risk factors, denoted with P in this document. These specifications can be regarded as detailed descriptions of the market data variables that represent the financial risk of a position.

There are typically many ways to represent the risk of a given position and, moreover, the representation used for VaR purposes does not necessarily have to be the same as the one used for pricing purposes. When they differ, risk factor specifications typically involve an extra level of aggregation and standardization of the market data variables used for pricing purposes.

An example of this is mapping individual equity prices to a common equity risk factor. Another example is usage of a zero-interest-rate yield curve with generic time buckets, as opposed to a benchmark curve involving specific instruments and dates.

2.2 Risk types

2.2.1 Equity Equity risk factors are expressed as stock spot prices or index spot prices represented by the stock or index instrument. The price is always expressed as the instrument currency per unit stock or index.

In case an index is modelled from its underlying stocks, the NonSplitIndexes configuration dictates the choice of a risk factor for a position.

Futures/forwards cannot be expressed as individual risk factors. The chosen risk factor for equity-related instruments is always the corresponding spot price (which, however, can be derived from a future price).

Example Stock instrument = BMW, Instrument currency = EUR

Risk factor = EUR per BMW

Index instrument = S&P 500, Instrument currency = USD

Risk factor = USD per S&P 500

2.2.2 FX FX risk factors are expressed as a currency against a base currency. The base currency is in turn determined by the list FX Base Currency in Valuation Parameters.

Example FX Base Currency = EUR, Currency instrument = USD

Risk factor = EUR per USD

User Guide: Value-at-Risk (FCA4376-22)

2 Risk factor specifications 8 of 56

FX Base Currency = EUR, Currency instrument = JPY

Risk factor = EUR per JPY

2.2.3 Interest rate Interest rate risk factors are expressed as annually compounded actual/365 zero-coupon rates for a generic period and are represented as curves of type Benchmark and Spread. The interest rate risk factor can alternatively be expressed as zero-coupon spot prices, with a currency determined by the yield curve currency. The choice is determined by the IR Risk Factor list in the Risk Factors Specification application.

Example Yield Curve = USD-SWAP, currency = USD, period = 1Y, 2Y, 3Y

Risk factor = 1Y USD-SWAP zero rate, annually comp, act/365

Risk factor = 2Y USD-SWAP zero rate, annually comp, act/365

Risk factor = 3Y USD-SWAP zero rate, annually comp, act/365

Or, if a zero-coupon price representation is used instead:

Risk factor = USD per unit 1Y USD-SWAP zero-coupon bond

Risk factor = USD per unit 2Y USD-SWAP zero-coupon bond

Risk factor = USD per unit 3Y USD-SWAP zero-coupon bond

Note that the underlying benchmark prices used to calibrate the zero rates are not considered a risk factor and are only used to determine the level of the zero rates.

2.2.4 Credit Credit risk factors are expressed as either a hazard rate or a zero-coupon spread rate (determined by the Curve Format list in the Yield Curve Definition application), defined as annually compounded actual/365 rates for a generic period. The credit risk factors are represented as curves of type Spread, Attribute Spread, or Instrument Spread.

All spread layers within the same spread curve are by default treated homogenously and as one single credit risk factor. However, for attribute spread curves, it is possible to specify an optional attribute type and associated value, and thereby create more granular credit risk factors.

In case of spread hierarchies (for example, a hierarchy made up of an attribute spread curve and an instrument spread curve), the credit risk factor refers to each individual spread curve.

Example Spread curve = CREDIT-BOND, period = 1Y, 2Y, 3Y and Curve format = Hazard Rate Curve

Risk factor = 1Y CREDIT-BOND hazard rate, annual comp, act/365

Risk factor = 2Y CREDIT-BOND hazard rate, annual comp, act/365

Risk factor = 3Y CREDIT-BOND hazard rate, annual comp, act/365

Example Spread curve = CREDIT-BOND, period = 1Y, 2Y, 3Y and Curve format = Zero-Coupon Curve

Risk factor = 1Y CREDIT-BOND zero-coupon rate, annual comp, act/365

User Guide: Value-at-Risk (FCA4376-22)

2 Risk factor specifications 9 of 56

Risk factor = 2Y CREDIT-BOND zero-coupon rate, annual comp, act/365

Risk factor = 3Y CREDIT-BOND zero-coupon rate, annual comp, act/365

Example Attribute spread curve = CDS_USD, issuer = IBM, CSC, period = 1Y, 2Y, 3Y and Curve format = Hazard Rate Curve

Risk factor = 1Y CDS_USD-IBM hazard rate, annual comp, act/365Risk factor = 2Y CDS_USD-IBM hazard rate, annual comp, act/365

Risk factor = 3Y CDS_USD-IBM hazard rate, annual comp, act/365

Risk factor = 1Y CDS_USD-CSC hazard rate, annual comp, act/365

Risk factor = 2Y CDS_USD-CSC hazard rate, annual comp, act/365

Risk factor = 3Y CDS_USD-CSC hazard rate, annual comp, act/365

Example Instrument spread curve = IS-CREDIT, period = 1Y, 2Y, 3Y and Curve format = Zero-Coupon Curve

Risk factor = 1Y IS-CREDIT zero-coupon rate, annual comp, act/365

Risk factor = 2Y IS-CREDIT zero-coupon rate, annual comp, act/365

Risk factor = 3Y IS-CREDIT zero-coupon rate, annual comp, act/365

2.2.5 Volatility Volatility risk factors are expressed as percentage volatility points for generic time to expiry points represented as volatility structures.

Example Parametric Volatility Structure = VOLIBM, expiry periods = 3m, 6m, 9m

Risk factor = 3m VOLIBM

Risk factor = 6m VOLIBM

Risk factor = 9m VOLIBM

Note that all other volatility surface dimensions are grouped together per expiry point. For example, all volatilities with the same expiry but with a different strike or underlying maturity are regarded as one single volatility risk factor.

2.2.6 Commodity Commodity risk factors are expressed either as commodity spot prices represented by the commodity instrument, or as commodity forward prices using price curves.

When the commodity instrument is used, the instrument currency and the instrument quotation type determine how the risk factor is expressed.

Example Commodity instrument = GOLD, Currency = USD, Instrument quotation = troy ounce

Risk factor = USD per troy ounce GOLD

User Guide: Value-at-Risk (FCA4376-22)

2 Risk factor specifications 10 of 56

When the commodity price curve is used, the curve currency and the curve quotation type determine how the risk factor is expressed.

Example Price curve = CORN-COMMODITY, period = 3m, 6m, 9m, Yield curve quotation = bushel, Yield curve currency = USD

Risk factor = USD per bushel 3m CORN-COMMODITY

Risk factor = USD per bushel 6m CORN-COMMODITY

Risk factor = USD per bushel 9m CORN-COMMODITY

2.2.7 Other types There are many other risk factor types that are of interest, such as dividend and correlation. Moreover, you may sometimes want to represent an equity risk factor in terms of future prices, interest rate risk factors as benchmark prices, credit risk factors as par CDS rates, and finally, volatility risk factors in the expiry, strike, and underlying maturity dimension.

All these types are supported by the new calculation engine and the scenario processing capabilities, and are already used to implement several desk risk measures. However, there is not yet an application and storage support in place to allow for these to be defined as risk factor specifications and to be used in a VaR calculation. Such support will be added in future releases.

User Guide: Value-at-Risk (FCA4376-22)

3 Risk factor dynamics and perturbations 11 of 56

3 Risk factor dynamics and perturbations

3.1 Definition Two main types of perturbations or shifts are supported: relative and absolute shifts. These two types in turn reflect the process assumption of the risk factor: geometric or arithmetic.

Risk factor returns or changes will be denoted with R in this document and are defined as:

PGeometric : R Arithmetic : R PP∆

= = ∆

where P equals risk factor level.

In many cases, the choice of the risk factor dynamics is defined indirectly by the choice of a shift type. It is also possible to tag a risk factor to be of type geometric or arithmetic. This in turn will influence the way shifts are performed in parametric VaR, and will therefore affect the way of generating risk data.

3.2 Perturbation and dynamics for different risk types

3.2.1 Equity and Commodity These prices can be modelled as geometric and arithmetic risk factors, and hence shifted both in absolute and relative terms.

Example A spot price of 100 EUR per BMW, which is shifted 2% in relative terms and at the same time 5 EUR in absolute terms, will produce a new price equal to:

100 * 1.02 + 5 = 107 EUR per BMW

Example A forward price of 1,200 USD per troy ounce, which is shifted 5% in relative terms and at the same time 200 USD in absolute terms, will produce a new price equal to:

1,200 * 1.05 + 200 = 1,460 USD per troy ounce

3.2.2 FX FX risk factors can only be modelled as geometric risk factors and hence only relative shifts are applicable. As a result of expressing all shifts against a common base currency, a shift in an FX risk factor is propagated and applied onto all FX rates that involve the shifted currency.

Example Assume FX Base Currency = EUR

Then consider a relative shift of 1% in FX risk factor EUR per USD.

Assuming also another currency JPY, this will result in the following shifted FX rates:

USD per EUR * 1/1.01, USD per JPY * 1/1.01, JPY per USD * 1.01

Note that the same relative shift is applied independently of the Liquid Cross Rate setting in the Currency Pairs definition.

User Guide: Value-at-Risk (FCA4376-22)

3 Risk factor dynamics and perturbations 12 of 56

3.2.3 Interest rate The interest rate risk factors can be modelled as geometric and arithmetic risk factors, and hence shifted both in absolute and relative terms.

Example A USD-SWAP 1Y zero rate of 4.00% that is shifted with 1% in relative terms and 0.01 in absolute terms will give a new zero rate equal to:

4.00% * 1.01 + 0.01% = 4.05%

If the same rate had been expressed as a zero-coupon price of 0.961538 USD per USD-SWAP 1Y zero-coupon bond, the same relative and absolute shift would have produced the following new zero-coupon price:

0.961538 * 1.01 + 0.01 = 0.981154 USD per USD-SWAP 1Y zero-coupon bond

For rates used in the valuation that do not correspond to any of the interest rate risk factors, the shift is determined by a shift function. This shift function is defined by the list Yield Shift Shield on the Valuation Parameters Risk tab with the most common types being Rectangle and Triangle.

Example Assume three zero-rate risk factors for the periods 1Y, 2Y, and 3Y, with rates equal to 4.00%, 4.50%, and 5.00%.

Consider then a valuation of an instrument that requires a rate corresponding to 1.5Y.

This valuation rate will be determined from the yield curve, based on the points defined in the yield curve and the interpolation method. Note that these points are typically dictated by the benchmark instruments and may not agree with the risk factor periods.

Assume that the rate is 4.25%.

Consider an absolute shift of 0.5 for the 2Y zero-rate risk factor. The new 2Y zero rate will be:

4.50% + 0.5% = 5.00%

In case of the rectangle shift function, the same shift will be applied to all rates between 1Y and 2Y. Hence, the new valuation rate will be:

4.25% + 0.5% = 4.75%

In case of the triangle shift function, the same shift will be applied linearly between 1Y and 2Y, as well as 2Y and 3Y. In this case, the new valuation rate will be:

4.25% + 0.5% * (1.5Y - 1Y) / (2Y - 1Y) = 4.25% + 0.5% * 0.5 = 4.50%

In the latter case, the valuation rate would also be affected by a shift in the 1Y zero rate.

In case zero-coupon prices are used to represent the interest rate risk factors, the propagated shift is implemented as an absolute yield shift, but the shift size is modified to reflect a shift in the price. The calculation procedure is best illustrated with an example:

Example Consider the same example as described previously. The valuation rate of 4.25% corresponds to a zero-coupon price equal to:

1 / (1+0.0425)1.5 = 0.9395

User Guide: Value-at-Risk (FCA4376-22)

3 Risk factor dynamics and perturbations 13 of 56

Then, consider a relative shift of 1% on the 2Y zero-coupon bond price. The equivalent absolute shift in yield is now calculated by the following steps:

1. First, the relative shift is applied to the 1.5Y zero-bond price: 0.9395 * 1.01 = 0.9489

2. Second, the corresponding shifted rate is calculated as: (1/0.9489)1/1.5 -1 = 3.56%

The difference between 3.56% and 4.25% (which is equal to 0.69%) is the absolute shift that will now be applied in the same way as before.

For the rectangle shift function, the new valuation rate will be:

4.25% - 0.69% = 3.56%

For the triangle shift function, the new valuation rate will be:

4.25% - 0.69% * (1.5Y - 1Y) / (2Y - 1Y) = 4.25% - 0.69% * 0.5 = 3.91%

3.2.4 Credit The credit risk factors can be modelled as geometric and arithmetic risk factors, and hence shifted both in absolute and relative terms.

Example A CDS_USD-IBM 1Y hazard rate of 0.25% that is shifted 1% in relative terms and 0.10 in absolute terms will give a new hazard rate equal to:

0.25% * 1.01 + 0.10% = 0.35%

Credit risk factors expressed as zero-coupon spreads are treated in the same way as described in the previous text.

For credit rates used in valuation that do not correspond to any of the credit risk factors, the shift is determined by a shift function. This shift function is defined by the list Yield Shift Shape on the Valuation Parameters Risk tab, with the most common types being Rectangle and Triangle.

Note that a shift in an interest rate risk factor can indirectly create a shift in a hazard rate or zero-coupon spread, as a result of the recalibration of the credit risk factors.

3.2.5 Volatility The volatility risk factors can be modelled as geometric and arithmetic risk factors, and hence shifted both in absolute and relative terms.

Example A VOLIBM 3m volatility and the value of 30.0% that is shifted 1% in relative terms and 5% in absolute terms will give a new volatility value equal to:

30.0% * 1.01 + 5.0% = 35.3%

All volatilities with the same expiry but different strike and possibly underlying maturity will be shifted in the same way. Hence, another VOLIBM 3m volatility for a different strike of, for example, 32.0% would at the same time change to:

32.0% * 1.01 + 5.0% = 37.3%

For volatility values used in valuation that do not correspond to any of the volatility risk factors, the shift will be determined by a shift function. This shift function is defined by the list Volatility Shift Shape on the Valuation Parameters Risk tab, with the most common types being Rectangle and Triangle.

User Guide: Value-at-Risk (FCA4376-22)

4 Risk factor configuration in PRIME 14 of 56

4 Risk factor configuration in PRIME This section describes general questions that need to be answered before starting to configure the PRIME system for VaR and scenario calculations. It also covers the main steps and applications involved when configuring risk factor specifications in PRIME.

4.1 Questions to answer before starting the configuration Before any of the VaR functionality can be used in PRIME, it is necessary to define and configure the risk factor specifications, that is, to define the risk factor space to be used in the calculations.

This involves answering questions such as:

• What types of risk factors are relevant? • What prices and parameters should be grouped together? • What is the relevant choice of risk factor dynamics? • What number of buckets and attributes is relevant?

It is important to distinguish this process from the activity to define prices and parameters for pricing and desk risk purposes. These two can be the same, but many times the pricing risk factor space is too large when all positions are considered; hence, it is often necessary to work with a parallel and more simplified view when performing risk calculations.

Note that the base value (that is, the theoretical value) is always determined by the pricing configuration. The risk factor specifications only dictate how changes to this base value are performed.

In an implementation project, the first activity is usually to configure PRIME to perform the desired pricing and desk risk calculations. This involves defining and creating instruments, yield curves, volatility structures, prices, FX rates, as well as selecting the appropriate valuation models.

In addition, if you want to perform calculations such as VaR, you also need to define the risk factor specifications. There are two main applications used for this purpose in PRIME, both available from the Administration Console window in the folder Risk Factors. The applications are called Grouping and Specifications.

4.2 Risk factor Grouping application The risk factor Grouping application is available from the Administration Console application, in a folder named Risk Factors. The main purpose of this application is to allow for prices and parameters to be grouped together and treated as one risk entity from the risk point of view.

Note that all prices and parameters that should be included in the risk calculation need to be mapped to a risk factor group. This includes prices and parameters that are not aggregated with others (but regarded as their own risk factor entity).

The definition of a risk factor group is performed in two steps:

1. Create a choice list item in RiskFactorGroup.

The following graphic shows the creation of a new risk factor group called JPY_Equity. The purpose of this group can be, for example, to group together all stocks traded in the JPY

User Guide: Value-at-Risk (FCA4376-22)

4 Risk factor configuration in PRIME 15 of 56

stock market. This would mean all Japanese equities would move together in any risk calculation, receiving the same shift as defined by the user.

Figure 1: Creation of a risk factor group in the Choice List Editor

By entering the keyword Arithmetic in the choice list Description field, PRIME treats all risk factor specifications associated with the risk factor group as arithmetic. This will affect delta calculations in parametric VaR, as well as the generation of risk data – both volatility and correlation, and scenario files. For any other description value, the risk factor will be assumed to be geometric.

2. Map prices and parameters to the new risk factor group using the Grouping application:

Figure 2: Mapping of an equity instrument to a risk factor group

The previous graphic shows the mapping of the stock instrument Nippon Steel to a risk factor group called JPY_Equity. A new mapping is performed by clicking the Add button and then entering a risk factor type, curr/parameter, risk factor group, and weight. When you have finished, click Add.

Each mapping shows up as a new line in the application, and the information is stored in the database upon selecting File>Save in the Administration Console window.

Figure 2 also shows that the stocks Mitsubishi Motors and Sony are mapped to the same risk factor group JPY_Equity. This means that all these three stocks will be treated as one unified risk factor in a risk calculation, and their prices will be shifted in the same way.

User Guide: Value-at-Risk (FCA4376-22)

4 Risk factor configuration in PRIME 16 of 56

The Weight field is only applicable when using the risk factor functionality in PRIME for extracting values for different risk factors from the mapped prices and parameters. The weight is used to determine how much a specific price or parameter in a risk factor group will contribute to the overall risk factor value.

In a similar way, it is possible to group together multiple yield curves, spread curves, and volatility structures. The following graphic illustrates the mapping of a yield curve called GBP/DEPO-IRS to a risk factor group called GBP_Swap. The application shows another mapping for the GBP-SWAP curve to the same group. Note that the curve GBP-GOV is mapped to another risk factor group called GBP_Gov, and hence will be treated as a different risk entity in the calculations.

Figure 3: Mapping of a yield curve to a risk factor group

You can map yield curves of type Benchmark and Spread Curves defined in the zero-coupon format to an Interest Rate risk factor group. Curves of type Spread, Attribute Spread, and Instrument Spread expressed in the hazard rate or zero-coupon format can be mapped to a risk factor group of type Credit if you want to treat the spread as a credit risk factor.

PRIME treats all individual layers as separate risk factors. If a rate is constructed from a hierarchy of curves, mapping both the base curve and the spread curve along with the associated shifts will result in multiple shifts being applied to the total rate.

Hierarchies of volatility structures are treated as one single volatility structure where the top structure is used to match the risk factor groups and associated shifts. A volatility shift is always applied to the total volatility. In this regard, hierarchies of volatility structures are currently treated somewhat differently compared to hierarchies of yield curves.

For commodity, you can create and map either a commodity instrument or a commodity curve to risk factor groups of type Commodity.

Because FX risk factors are represented as a currency against a base currency, the most common and relevant risk factor grouping is to create one group per currency, and then map each currency instrument. The list FX Base Currency in Valuation Parameters will determine the base currency.

As for the factor types Interest Rate, Volatility, FX, Equity, and Commodity, it is also possible to define a default mapping, by linking a currency to a risk factor group. For an instrument or parameter, PRIME always looks first for an explicit risk factor mapping. If it cannot find a mapping, it will then look for a default mapping using the currency of the parameter or instrument.

When using default mappings, the following restrictions apply:

• Spread curves are not considered for type Interest Rate. • Default mappings are not supported for type Credit.

User Guide: Value-at-Risk (FCA4376-22)

4 Risk factor configuration in PRIME 17 of 56

• Volatility spread structures are not considered for type Volatility. • Equity indexes not defined as NonSplitIndexes are not considered for type Equity.

This default feature can be used to reduce the number of explicit mappings that are needed. It can also be viewed as a way to control for the risk that new parameters and prices are not picked up in the risk calculations.

4.3 Risk factor Specification application The risk factor Specification application is available from the Administration Console application, in a folder called Risk Factors. The purpose of this application is twofold:

• The first is to define the risk factor specifications based on the risk factor groups. • The second is to specify the risk data file information and some additional configurations

used in the VaR calculation.

This section focuses on the parts relevant for specifying the risk factor specifications. The other features are covered in section 5.6 Volatility and correlation risk data.

Following the creation of all risk factor groups and the mapping of prices and parameters, the final step is to produce a complete risk factor specification, along with a name called external ID. The external ID will be used to reference the risk factor specification in many different situations, for example, when feeding risk data into the calculation or when displaying risk factor delta values.

It is possible to define and work with multiple risk factor specifications. The active specification is defined by Risk Factor Spec Header in the Parameter Override window. To create a new one, select an application folder called Specification, right-click, and select New. To save, select File>Save in the Administration Console window.

The lower part of the application is used to define specifications. A new specification is created by clicking the Add button and then selecting a risk factor group, bucket, attribute type, attribute value, and providing an external ID. The ID can be a string of arbitrary format.

User Guide: Value-at-Risk (FCA4376-22)

4 Risk factor configuration in PRIME 18 of 56

For equity and FX risk factor specifications, no additional information is needed after creating the risk factor group. All that is needed is to create an external ID. See the following graphic for an example (the field Bucket and the lists Attribute Type and Attribute Value are left empty):

Figure 4: Creation of an equity risk factor specification

Each new specification shows up as a new line in the application. To save the information to the database, select File>Save in the Administration Console.

For an interest rate, credit, or volatility risk factor group, it is necessary to add information about a period or bucket to fully define the risk factor specification. When adding a new item, you must also provide information in the Bucket field. See the following graphic for an example.

For commodity, it is necessary to add information about a period or bucket in case the commodity risk factor group refers to a commodity curve. On the other hand, if the commodity group refers to a commodity instrument, no additional information is needed.

For interest rate risk specifications, you also need to select whether the risk factor should be of type zero rate or zero-coupon price. This is controlled by a list called IR Risk Factor.

User Guide: Value-at-Risk (FCA4376-22)

4 Risk factor configuration in PRIME 19 of 56

Figure 5: Creation of an interest rate risk factor specification

Finally, in the case of credit risk factor groups including attribute spread curves, you can optionally add information about the attribute type, and in turn the attribute value. See Figure 6 for an example. This makes it possible to create a separate credit risk factor per attribute spread layer, and hence apply different scenario, volatility, or correlation data in a risk calculation. Note that a similar granular definition is not possible for the different spreads in instrument spread curves; in this case, all instrument spreads in the same curve are always treated homogenously and as one single risk factor.

User Guide: Value-at-Risk (FCA4376-22)

4 Risk factor configuration in PRIME 20 of 56

Figure 6: Creation of a credit risk factor specification

A typical risk factor configuration involves hundreds and even thousands of specifications. It is recommended to perform the configuration with help of Python scripts. Scripts are also useful for automating maintenance tasks, such as adding specifications for a new price or parameter.

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 21 of 56

5 Parametric Value-at-Risk The calculation and display of parametric Value-at-Risk (VaR) in PRIME involves the following steps:

1. Create a risk factor specification, see sections 4.2 Risk factor Grouping application and 4.3 Risk factor Specification application.

2. Choose the active risk factor specification in Parameter Override. 3. Define the import of risk data (volatilities and correlation files), see sections 5.6 Volatility

and correlation risk data and 5.7 Conversion of the FX volatility and correlation data. 4. Select parametric VaR columns in the Trading Manager Portfolio Sheet, see section 5.8

Trading Manager columns.

This section starts with a description of the calculation principles and provides detailed examples of how calculations are performed in PRIME. After that, the necessary file formats and configurations are described. Finally, the section explains how to select and use parametric VaR columns in the Trading Manager.

5.1 Calculation principles The parametric VaR calculation used in PRIME is based on a delta-normal approach. The core assumptions in this model are:

• Risk factors, P, are either geometric or arithmetic with risk factor returns, R, defined as: PGeometric : R Arithmetic : R P

P∆

= = ∆

• Risk factor returns, R, are multivariate, normally distributed with zero mean:

100 R ~ N(0, )× Σ where:

1 12 1n 1

2 21 2n 2

n n1 n2 n

0 ... 0 1 ... 0 ... 00 ... 0 1 ... 0 ... 0

C... ... ... ... ... ... ... ... ... ... ... ...0 0 ... ... 1 0 0 ...

σ ρ ρ σ σ ρ ρ σ Σ = σ× ×σ = × ×

σ ρ ρ σ The risk data needed for this calculation are volatilities and correlations. The volatilities are expressed as a daily standard deviation of the relative risk factor changes in percent.

• Changes in theoretical value are linearly dependent on the risk factor returns:

1 1 n nV D 100 R D 100 R ... D 100 R∆ = × × = × × + + × ×

V P VGeometric : D R Arithmetic : D R P100 P P P 100 P

∂ ∆ ∂= = = = ∆

×∂ ×∂ The delta vector represents the change in the theoretical value given a small change in each risk factor alone. Hence, if a position is sensitive to 10 risk factors, the position will generate 10 delta values.

The linear dependence along with assumption of normally distributed returns implies that the change in the value will also be normally distributed:

TV ~ N(0,D D )∆ ×Σ×

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 22 of 56

For longer holding periods, H days, it is assumed that the daily risk factor returns are the same and independent. In this case, the H-day change in value will be distributed as:

TV ~ N(0,H D D )∆ × ×Σ× VaR defined as the percentile value for a given one-sided confidence level, L, is calculated as:

TValue at Risk -conf _ factor(L) H D D= × × ×Σ× The function conf_factor(L) translates a confidence level to a confidence factor (for example, 95% to 1.65).

In case of only two risk factors, the expression simplifies to:

2 2 2 21 1 2 2 1 2 1 2 12Value at Risk -conf _ factor(L) H D D 2 D D= × × ×σ + ×σ + × × ×σ ×σ ×ρ

Parametric Value at Risk per Risk Factor is calculated in the same way as the regular parametric VaR but with only one risk factor. It allows you to decompose the parametric VaR into the underlying risk factors, and hence get a view on which risk factors contribute to the total VaR, as well as on the level of the contribution. It is calculated as the following, with a one-sided confidence level L and a holding period of H days:

2 21 1Value at Risk -conf _ factor(L) H D= × × ×σ

Expected shortfall is defined as the expected loss, given that the loss exceeds the VaR value. In this case, when the calculation is based on a parametric distribution, the expected shortfall is equivalent to VaR with a more restrictive confidence level. The mathematical definition used is the following, with a one-sided confidence level L and a holding period of H days, formulated by Yamai and Yoshiba [1]:

( ) 1[Δ (Δ )]1

[ Δ ]Δ | Δ Δ

1−≤−

−= − − ≥ = = −

LV VaR VL

E VIExpected Shortfall E V V VaR V

L

( )

( ) ( ) ( )22 112 2

ΔΔ2 21

1 2 (1 ) 2

−−−− −

−∞

= − =…= =…− −∫

LLVaR VVaR V t

σ σσte dt eL σ π L π

( )

( )

2_2

1 2

=−

conf factor L

e σL π

5.2 Calculation of delta values in PRIME The VaR delta in PRIME is calculated numerically by applying either a scaled 1% relative shift or a scaled 0.01 absolute shift to the risk factor value. The scale factor in both cases is 10,000.

For an equity price risk factor such as BMW, and with a price 200 EUR per BMW and a position equal to 5,000, the different deltas are calculated as:

( )( )

[ ]

BMW

10,000 V(P 1 0.01/10,000 ) - V(P)V VGeometric : D100 P / P 100 P / P 10,000 P 1 0.01/10,000 P

100P

10,000 Q P 1.000001- Q P0.01 Q P 0.01 5,000 200 10,000

100 0.01

× × + ∂ ∆ = ≈ = =×∂ ×∆ × × + − ×

× × × ×= = × × = × × =

×

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 23 of 56

[ ][ ]( )

[ ]

BMW

10,000 V(P 0.01/10,000) - V(P)V VArithmetic : D100 P 100 P 100 10,000 (P 0.01/10,000) P

10,000 Q (P 0.000001) - Q P0.01 Q 0.01 5,000 50

100 0.01

× +∂ ∆= ≈ = =

×∂ ×∆ × × + −

× × + ×= = × = × =

×

For more information on the calculation of relative shifts for different risk factor types, see section 3 Risk factor dynamics and perturbations, as well as the two following examples.

5.3 Example with two equity positions Consider a small portfolio consisting of only two stock positions:

1

1

2

2

P 100 EUR per Stock 1Q 2,000 shares in Stock 1P 200 EUR per Stock 2Q 500 shares in Stock 2

====

Assume also the following available risk data:

1 2 121.5 % 2.0 % 0.8σ = σ = ρ = Assuming geometric risk factors, the different VaR delta values are calculated as:

1 1 1

2 2 2

D 0.01 Q P 0.01 2,000 100 2,000D 0.01 Q P 0.01 500 200 1,000

= × × = × × == × × = × × =

Finally, a 95% VaR with 10-day holding period is calculated as:

2 2 2 21 1 2 2 1 2 1 2 12

2 2 2 2

Value at Risk -conf _ factor(L) H D D 2 D D

-1.65 10 2,000 1.5 1,000 2.0 2 2,000 1,000 1.5 2.0 0.8 -24,727 EUR

= × × ×σ + ×σ + × × ×σ ×σ ×ρ =

= × × × + × + × × × × × =

5.4 Example with a zero-coupon bond position in a foreign currency

Consider a position in a zero-coupon bond in a foreign currency with the following data:

M = Maturity = 2011-03-11

N = Nominal = 1,000,000 USD

Assume the FX base currency and PL currency is EUR, and the valuation date is T = 2009-09-11.

Assume the following geometric FX and interest rate zero-coupon price risk factors:

1 1

2 2

3

P USD per zero coupon bond with maturity at T 2010 - 09 -11P USD per zero coupon bond with maturity at T 2011- 09 -11P EUR per USD

= == ==

The risk factors have the following values:

1 1

2 2

3

r 3.00 % P 0.97087 USD per bondr 3.20 % P 0.93895 USD per bondP 0.6 EUR per USD

= == ==

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 24 of 56

The risk factors have the following risk data:

1 2 3 12 13 230.17 % 0.1 % 0.9 % 0.4 -0.03 -0.15σ = σ = σ = ρ = ρ = ρ =

or equivalently:

2

2

2

0.17 0.17 0.1 0.4 -0.17 0.9 0.03 0.0289 0.0068 -0.004590.17 0.1 0.4 0.1 -0.1 0.9 0.15 0.0068 0.01 -0.0135

-0.17 0.9 0.03 -0.1 0.9 0.15 0.9 -0.00459 -0.0135 0.81

× × × × Σ = × × × × =

× × × × Assume further that the yield curve points used to value the instrument coincide with the interest rate risk factors:

1 2

365 365365T -T T -T365

1 21 2

1 1 1r -1 -1 3.00% r -1 3.20% P 0.97087 P

= = = = =

Assuming the linear interpolation, the valuation rate for the zero-coupon bond is:

2 11 2 1 2

2 1 2 1

T - M M - Tr r r r (1- ) r 0.5041 3.00 % 0.4959 3.20 % 3.09918 %T - T T - T

= × + × = α× + α × = × + × =

(M-T)/365 1.496

1 1P 0.95537 USD(1 r) (1 0.0309918)

= = =+ +

This gives a value, expressed in the PL currency EUR, equal to:

3V P P N 0.6 0.95537 1,000,000 573,222 EUR= × × = × × = The value V clearly depends on all the three risk factors P1, P2, and P3. The delta expression used in delta-normal VaR for the instrument is given by:

1 1 2 2 3 3V D 100 R D 100 R D 100 R∆ = × × + × × + × × Then, consider the calculation of different delta values:

11 1

VD100 P / P

∂=

×∂ As described in section 3.2 Perturbation and dynamics for different risk types, the shift of an interest rate zero-coupon bond is performed by applying a modified zero-rate shift and by using the shift function.

The calculation of modified zero-rate shift:

365 1M-T 1.4961 1r - (1 r) - (1 0.0309918) -0.00000069

P (1 0.01/10,000) 0.95537

∆ = + = + = × + Assuming the shift function is triangle, the applied shift will be:

1r r 0.5041 -0.00000069 -0.00000035∆ = α×∆ = × = Delta is finally calculated as:

1 3 (M-T)/365 1.4961

10,000 N 1,000,000D P - V 10,000 0.6 - 573,222 2,890100 0.01 (1 r r ) (1 0.0309914)

= × × = × × = × + + ∆ +

The delta with respect to the other zero-coupon bond is calculated in exactly the same way. This gives a delta value equal to:

2D 2,843=

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 25 of 56

The delta with respect to the FX risk factor is calculated as:

[ ]3 33

3 3 3 3

3

10,000 P (1 0.01/10,000) N P - P N PV VD100 P / P 100 P / P 100 0.01

0.01 P N P 0.01 V 0.01 573,222 5,732

× × + × × × ×∂ ∆= ≈ = =

×∂ ×∆ ×

= × × × = × = × = Finally, a 95% VaR with 1-day holding period is calculated as:

T

T

Value at Risk -conf _ factor(L) H D D

0.0289 0.0068 -0.00459-1.65 1 (2,890 2,843 5,732) 0.0068 0.01 -0.0135 (2,890 2,843 5,732)

-0.00459 -0.0135 0.81

-8,461 EUR

= × × ×Σ× =

= × × × × =

=

5.5 Comparing with the Risk Metrics approach The standard Risk Metrics approach involves mapping all cash flows to adjacent risk factors and creating an equivalent position in the risk factor zero-coupon bonds. There are several ways to perform such cash flow mapping. The recommended approach by Risk Metrics is based on the simple proportional allocation, determined by the location of the cash flow between two risk factor vertices.

Continuing with the previous example, the allocation of the cash flow is done as:

21

2 1

T - MZero coupon bonds with maturity T 0.5041T - T

= = α =

12

2 1

M - TZero coupon bonds with maturity T 1- 0.4959T - T

= = α =

The original zero-coupon position is then split up into a position in two zero-coupon bonds:

3 1 1 3 2 2V P CF P P CF P= × × + × × where:

11

P NCFP×

= α× and

22

P NCF (1- )P×

= α ×

The change in the value is by construction linear, with respect to the three risk factors:

3 1 1 3 2 2 1 1 2 2 3

3 1 1 3 2 2 3 1 1 2 2 31 2

1 2 3

3 3 3 31 2

1 2 3

V P CF P P CF P (CF P CF P ) P

P P CF P P CF P (CF P CF P ) 100 P100 P 100 P100 P 100 P 100 P

P P N P (1- ) P N P P N 100 P100 P 100 P100 P 100 P 100 P

∆ = × ×∆ + × ×∆ + × + × ×∆ =

× × × × × × + × ×∆×∆ ×∆= × + × + × =

×α× × × α × × × × ×∆×∆ ×∆= × + × + ×

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 26 of 56

The corresponding delta values in the Risk Metrics approach are:

31

P P N 0.6 0.5041 0.95537 1,000,000D 2,890100 100

×α× × × × ×= = =

32

P (1- ) P N 0.6 0.4959 0.95537 1,000,000D 2,843100 100

× α × × × × ×= = =

33

P P N 0.6 0.95537 1,000,000D 5,732100 100× × × ×

= = =

These are exactly the same delta values as produced through the numerical delta calculations in section 5.4 Example with a zero-coupon bond position in a foreign currency; hence, the VaR value in PRIME will coincide with the Risk Metrics value. This is no coincidence because the numerical calculation in section 5.4, when taken to its limit, gives:

11 1

1 1 1 1 1

33 3

1 1

rV 1 V r 1 V r rD P P100 P / P 100 r r P 100 r r P

P N P1 r r 1 r 1P P N P P N P100 r r P 100 r 100

∂∂ ∂ ∂ ∂ ∂ ∂= = × × × × ≈ × × × × =

×∂ ∂ ∂ ∂ ∂ ∂ ∂

× ×∂ ∂ ∂ ∂= × × × × = × × × × = ×α× × ×

∂ ∂ ∂ ∂ This is the same expression as produced by the Risk Metrics approach. What at first can appear as a somewhat unintuitive numerical delta calculation is motivated exactly by this fact – it was designed to replicate the Risk Metrics approach for simple cash flows.

However, the PRIME approach is more generic, because the numerical delta approach and the calculation procedure will apply to any type of instrument, including non-linear contracts such as options.

Important: The replication of the Risk Metrics approach assumes that IR Risk Factor is set to Price, and Yield Shift Shape is set to Triangle. For any other setting, the PRIME calculation will correspond to a somewhat different cash flow mapping approach.

5.6 Volatility and correlation risk data The parametric VaR calculations require risk data in terms of volatilities and correlations. This data needs to be supplied through text files and will be imported into the PRIME client when starting the calculation process.

The calculation requires two separate files: one for the volatility data and one for the correlation data. The external IDs for risk factors are used as identifiers of the data. One row in the file corresponds to one risk data value.

For volatilities, the first column contains the external ID and then the volatility data expressed in percentage terms.

For correlations, the first column contains pairs of external IDs and then the correlation data. The assumption is that the file contains a triangular matrix of the correlation data, including the diagonal with 1s. Therefore, the correlation file needs to include a correlation entry for each external ID with respect to itself and the value of 1.

It is required that the number of risk factors specified in the volatility and correlations files is equal to the number of risk factors configured in the mapped risk factor specification. If this is not the case, then the parametric VaR column will show an error. Therefore, each external ID present in the specification must also be present in the volatility and correlations file.

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 27 of 56

See the following graphic for an example of what the volatility and correlation files typically look like:

Figure 7: Volatility and correlation risk data files

The necessary information about the risk file names and formats is stored in the risk factor specification header. See the following graphic for an example:

Figure 8: Volatility and correlation file formats

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 28 of 56

The following is a description of the input fields relevant for the parametric VaR risk data files:

Field Description

Column Delimiter Sign used to separate an external ID from risk values in the files.

Comment Char Sign used to determine what rows in the files are comment rows only and will be excluded from the risk data extraction.

Volatility File Name Name of the file containing the volatility file data.

Base Curr Determines the base currency for the imported risk data. If different from the FX base currency, the FX-related data will be converted. See section 5.7 Conversion of the FX volatility and correlation data.

Volatility Yield Column Location of yield volatilities. This choice is only applicable to interest rate risk factors. If IR Risk Factor is set to Yield, these values will be imported and used as volatilities for interest rate risk factors.

Volatility Price Column Location of price volatilities. If IR Risk Factor is set to Price, these values will be imported and used as volatilities for interest rate risk factors.

Correlation File Name Name of the file containing the correlation risk data.

Correlation Column Location of the correlation values.

ID field delimiter Sign used to determine the split for the external IDs in the correlation data.

The field VaR Scale is used to define a confidence level and a holding period expressed as a single scale factor. This field is only applicable when using the old ARENA Function value_at_risk(). Use the scale factor to adjust VaR to display the desired level of confidence and holding period. For example, if you want a 95% VaR, and the data is unadjusted, then the scale factor would be 1.65 (assuming a one-day holding period). If you want a 95% VaR, and the data has already been adjusted for a 95% confidence interval, then the scale factor should be 1 (again, assuming a one-day holding period).

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 29 of 56

The location of the risk data files is determined by a file pointer setting called FCS_DIR_RISK, in the arena.ini configuration file (see the following graphic for an example). In this case, PRIME looks for the risk data in the folder C:\RiskMetricsData\.

Figure 9: Pointer to the risk data files in the arena.ini configuration file

The data files are typically placed on a central file server with generic names, so that the risk data updates can be done by placing a new version of the risk data with the same file names on the server. The next time someone tries to access these files, the new risk data is used in the calculations.

5.7 Conversion of the FX volatility and correlation data The FX base currency determines the base currency for the FX risk factors in the calculation. If this is different from the base currency in the risk factor specification, PRIME automatically tries to convert the FX-related volatilities and correlations in the file before a VaR calculation.

For example, if the FX base currency is set to EUR, all FX risk factors are defined as EUR per currency. If the base currency in the risk factor specification is USD, it means that that the FX risk factors in the risk data files are expressed as USD per currency.

In this case, PRIME tries to convert the FX risk volatilities and correlations expressed for USD per currency into equivalent volatilities and correlations for EUR per currency.

Important prerequisites for this conversion to work are the following:

• Existence of a risk factor specification for the file base currency. • Existence of a risk factor specification and file risk data for the FX base currency. • Involved risk factors are modelled as geometric risk factors.

For the previous example, this means that there must exist a risk factor specification for both the EUR and USD currency, and the file must also contain the risk data for the FX risk factor USD per EUR.

The principles used for the conversion are best illustrated with an example. Assume the settings previously mentioned and consider positions denominated in GBP and USD. In this case, the relevant FX risk factors in the VaR calculation will be P1 = EUR per GBP and P2 = EUR per USD.

The risk file is assumed to contain volatilities and correlation for the FX risk factors P3 = USD per GBP and P4 = USD per EUR.

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 30 of 56

Assume the following risk data: 3 4 340.8 0.9 0.7σ = σ = ρ =

Assuming risk factor returns, R, are expressed as continuously compounded rates, the return of EUR per GBP is simply the arithmetic difference of the returns for USD per GBP and USD per EUR:

1,t -1 1,t 3,t 3,t -1 3,t 4,t1,t 3,t 4,t

1,t -1 1,t -1 4,t 4,t -1 3,t -1 4,t -1

P P P / P P PR ln ln ln - ln R - R

P P P / P P P ∆

= = = = =

From this, it follows that the converted volatility for EUR per GBP can be calculated as:

2 2 2 21 3 4 3 4 34- 2 0.8 0.9 - 2 0.8 0.9 0.7 0.66σ = σ + σ ×σ ×σ ×ρ = + × × × =

For the FX risk factor EUR per USD, the following return relationship holds:

2,t -1 2,t 4,t2,t 4,t

2,t -1 2,t -1 4,t 4,t -1 4,t -1

P P P1R ln ln - ln -RP P P / P P

∆= = = = =

The expression for converted volatility for EUR per USD simplifies to:

2 4 0.9σ = σ = The correlation between P1 and P2 can be calculated analogously as:

1,t 2,t 3,t 4,t 4,t 3,t 4,t 4,t 4,t12

1 2 1 2 1 2

2 24 3 4 34

2 23 4 3 4 34 4

Cov(R ,R ) Cov(R - R ,-R ) Cov(R ,-R ) Cov(-R , -R )

- 0.9 - 0.8 0.9 0.7 0.510.66 0.9- 2

+ρ = = = =

σ ×σ σ ×σ σ ×σ

σ σ ×σ ×ρ × ×= = =

×σ + σ ×σ ×σ ×ρ ×σ

The conversion of a correlation between two FX risk factors not involving the file base currency USD or an FX risk factor and another non-FX risk factor is performed in exactly the same manner.

5.8 Trading Manager columns Parametric VaR is accessible as columns in the Portfolio Sheet and as columns/rows in the Vertical Portfolio Sheet. It can be found in the column group Value at Risk (see the following graphic).

In the Vertical Portfolio Sheet, it is calculated per risk factor, and three columns are available for the calculation:

• Parametric Value at Risk • Parametric Value at Risk Delta • Parametric Value at Risk Volatility

The columns Parametric Value at Risk Delta and Parametric Value at Risk Volatility show the delta and volatility used in the parametric VaR calculation. By default, the calculation is based on the active risk factor specification defined in Parameter Override, and it uses the risk data files defined in the risk factor specification. See section 5.6 Volatility and correlation risk data for more information.

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 31 of 56

When you select the column Parametric Value at Risk or Parametric Expected Shortfall (in the Portfolio Sheet) or the row Parametric Value at Risk (in the Vertical Portfolio Sheet), click the Parameters button. The Apply Parameters window is displayed:

Figure 10: Selecting the column for parametric VaR in the Portfolio Sheet

The Apply Parameters window requires the following parametric VaR specific calculation input, in addition to the standard display currency and column label settings:

Field Description

Confidence Interval One-sided percentile value expressed in percent. Default = The settings specified in the Risk Factor Specification application.

Holding Period Period in the VaR calculation expressed in days. Default = 1.

Value at Risk Base Column Select the column for applying the scenario: • Theoretical Total Profit/Loss • Theoretical Value

Risk Factor Type Select the type of the risk factor which the VaR calculation must be based on. Default = Total.

Volatility File File path including the file name for the volatility risk data.

Correlation File File path including the file name for the correlation risk data.

The possibility to change risk data files enables creating a column which uses a specific set of volatility and correlation data. For example, you can use this to add a column for stressed risk data (that is, double volatilities) or for data based on a turbulent historical period. If only a file name is specified, PRIME looks in the directory associated with FCS_DIR_RISK in the arena.ini file.

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 32 of 56

In the Risk Factor Type list (found in the Apply Parameters window), you can select one risk type at a time. Selecting Total means that all risk factors are used in the calculations. Selecting, for example, Interest Rate means that only interest rate risk factors are processed.

PRIME shows one column per risk factor type (see the following graphic). For each column, the calculation only involves the risk factors belonging to the corresponding risk factor type:

Figure 11: Parametric VaR in the Trading Manager Portfolio Sheet

In the Vertical Portfolio Sheet, it is possible to add rows with different parameterizations, showing different types of risk factors, different confidence levels, and so on:

Figure 12: Risk factor rows in the Vertical Portfolio Sheet

User Guide: Value-at-Risk (FCA4376-22)

5 Parametric Value-at-Risk 33 of 56

It is possible to select and add multiple versions of the Value at Risk column but with different confidence levels, holding periods, or risk data files. To change values, use the Apply Parameters functionality.

The columns Parametric Value at Risk and Parametric Expected Shortfall work as any other calculated value and column in the Portfolio Sheet (for example, when applying a grouping), and their values are recalculated in real time if the application receives a new trade or market data update.

Reports are created using the standard reporting framework. See the following graphic for an example:

Figure 13: Parametric VaR report using the standard reporting framework

User Guide: Value-at-Risk (FCA4376-22)

6 Scenario analysis 34 of 56

6 Scenario analysis PRIME enables processing of the scenarios specified in scenario files using a built-in scenario template, available in the Trading Manager Open Scenario window. Similarly to other types of scenarios, these scenarios can be applied to any other calculated value and will generate one column per scenario.

The typical usage of this functionality is to process a set of stress test scenarios (Asian Crisis, Black Monday, Bond Rally) or historical or simulated scenarios in a simulation-based VaR calculation. The common fact for all these scenarios is that different shifts are applied to individual risk factors, and that they all involve risk factors across many risk factor types.

The calculation and display of scenarios through scenario files in PRIME involves the following steps:

1. Create a risk factor specification, see sections 4.2 Risk factor Grouping application and 4.3 Risk factor Specification application.

2. Choose the active risk factor specification in Parameter Override. 3. Define a scenario file using the format described in section 6.4 Scenario risk data. 4. Import the scenario and apply it using the Open Scenario window in the Trading Manager

Portfolio Sheet, see section 5.8 Trading Manager columns.

This section starts with a description of the calculation principles and provides detailed examples of how calculations are performed in PRIME. After that, the file formats are described, and finally, how to select and use scenario columns in the Trading Manager is explained.

6.1 Calculation principles The scenario calculation using scenario files involves shifting one or multiple risk factor specifications as specified by the scenarios included in the files. In this context, a single scenario is defined as:

• A set of risk factor specifications, for example, P1, P2, P3,…, Pn. • For each risk factor specification Pi, a pair of relative and additive shifts, i i( rel , abs )∆ ∆ .

The relative shift is expressed as a multiplicative factor. For risk factors of type Interest Rate, Credit, and Volatility, the additive shift is expressed as a basis point shift. An absolute yield shift of 0.05 is interpreted as a 5 bps shift, and if the original rate is 4.12%, the shifted rate will be 4.17%.

The shifted value for risk factor Pi is calculated as: inew

i i iP P rel abs= ×∆ + ∆ .

For a detailed description of how each type of risk factors is defined and shifted, see sections 2 Risk factor specifications and 3 Risk factor dynamics and perturbations. Note that the shift calculation for interest rate risk factors is sensitive to the IR Risk Factor setting in the Risk Factor Specification application.

The scenario can in principle be applied to any calculated value and with the result expressed in relative, relative percent, or absolute terms. If we denote the original calculation with V(P1, P2, P3,…, Pn), applying a scenario on all these risk factors will generate a new absolute value as follows:

1 2 3 nnew new new new new

1 1 1 2 2 2 3 3 3 n n n

V (P ,P ,P ,.., P )

V(P rel abs ,P rel abs ,P rel abs ,..., P rel abs )

=

×∆ + ∆ ×∆ + ∆ ×∆ + ∆ ×∆ + ∆

User Guide: Value-at-Risk (FCA4376-22)

6 Scenario analysis 35 of 56

6.2 Example with two equity positions Consider a small portfolio consisting of only two stock positions:

1

1

2

2

P 100 EUR per Stock 1Q 2,000 shares in Stock 1P 200 EUR per Stock 2Q 500 shares in Stock 2

====

The theoretical value for the portfolio is calculated as:

1 1 2 2V Q P Q P 2,000 100 500 200 300,000 EUR= × + × = × + × = Now assume the following available scenario risk data:

Scenario 1 Scenario 2

∆rel ∆abs ∆rel ∆abs

P1 1.02 0.0 0.98 3.0

P2 1.03 0.0 0.95 2.0

Applying Scenario 1 produces the following new theoretical value: new new new

1 1 2 2V Q P Q P 2,000 100 1.02 500 200 1.03 307,000 EUR= × + × = × × + × × = Applying Scenario 2 produces the following new theoretical value:

new new new1 1 2 2V Q P Q P 2,000 (100 0.98 3.0) 500 (200 0.95 2.0) 298,000 EUR= × + × = × × + + × × + =

Expressed in relative terms, Scenario 1 results in 7,000 EUR and Scenario 2 in -2,000 EUR.

6.3 Example zero-bond position in a foreign currency Consider a position in a zero-coupon bond in a foreign currency with the following data:

M = Maturity = 2011-03-11

N = Nominal = 1,000,000 USD

Assume the FX base currency and PL currency is EUR, and the valuation date is:

T = 2009-09-11.

Assume the following FX and interest rate zero-coupon price risk factors:

1 1

2 2

3

P USD per zero coupon bond with maturity at T 2010 - 09 -11P USD per zero coupon bond with maturity at T 2011- 09 -11P EUR per USD

= == ==

The risk factors have the following values:

1 1

2 2

3

r 3.00 % P 0.97087 USD per bondr 3.20 % P 0.93895 USD per bondP 0.6 EUR per USD

= == ==

Assume further that the yield curve points used to value the instrument coincide with the interest rate risk factors:

1 2

365 365365T -T T -T365

1 21 2

1 1 1r -1 -1 3.00% r -1 3.20% P 0.97087 P

= = = = =

User Guide: Value-at-Risk (FCA4376-22)

6 Scenario analysis 36 of 56

Assuming the linear interpolation, the valuation rate for the zero-coupon bond is:

2 11 2 1 2

2 1 2 1

T - M M - Tr r r r (1- ) r 0.5041 3.00 % 0.4959 3.20 % 3.09918 %T - T T - T

= × + × = α× + α × = × + × =

(M-T)/365 1.496

1 1P 0.95537 USD(1 r) (1 0.0309918)

= = =+ +

This gives a value, expressed in the PL currency EUR, equal to:

3V P P N 0.6 0.95537 1,000,000 573,222 EUR= × × = × × = Then, assume the following available scenario risk data:

Scenario 1 Scenario 2

∆rel ∆abs ∆rel ∆abs

P1 1.01 0.0 0.98 0.0

P2 1.02 0.0 0.99 0.0

P3 0.99 0.0 1.02 0.0

As described in section 3.2 Perturbation and dynamics for different risk types, the shift of an interest rate zero-coupon bond is performed by calculating a modified zero-rate shift and by using the shift function.

The calculation of the modified zero-rate shift for P1:

365 1M-T 1.496

11 1r - (1 r) - (1 0.0309918) -0.00683517

P 1.01 0.96492

∆ = + = + = ×

The calculation of the modified zero-rate shift for P2:

365 1M-T 1.496

21 1r - (1 r) - (1 0.0309918) -0.01356

P 1.02 0.97448

∆ = + = + = ×

Assuming the shift function is triangle, the total applied shift will be:

1 2r r (1- ) r 0.5041 -0.00683517 0.4959 -0.01356 -0.01017∆ = α×∆ + α ×∆ = × + × = This gives a new zero-coupon bond price:

new(M-T)/365 1.496

1 1P 0.96964 USD(1 r r) (1 0.0309918 - 0.01017)

= = =+ + ∆ +

Finally, the new theoretical value for Scenario 1 is now calculated as follows: new new new

3V P P N 0.99 0.6 0.96964 1,000,000 575,967 EUR= × × = × × × = Expressed in relative terms, Scenario 1 results in 2,745 EUR.

6.4 Scenario risk data Scenario calculations require the risk data to be expressed as shifts. This data is typically supplied through text files and is imported into the PRIME client when starting the calculation process.

External IDs for risk factors are used as identifiers of the risk data. One row in the scenario file corresponds to one risk factor. The first column contains the external ID with each scenario then

User Guide: Value-at-Risk (FCA4376-22)

6 Scenario analysis 37 of 56

represented as a pair of two columns. For each pair, the first column represents the relative shift, and the second column represents the additive shift.

See the following graphic for an example of a scenario file containing four scenarios. The first scenario entry for SEKXS represents a relative shift of 1.05618 and 0 additive shift. In the same scenario, EURXS will be shifted in relative terms by a factor of 0.87828 and 0 additive shift.

For additive shifts and interest rate and credit risk factors, the shifts are expressed in percent. For example, an additive shift in interest rates from 3.1% to 3.0% must be entered as 1.0,0.1. The same rule applies to volatility surfaces. A change from 40% to 42% must be entered as 1.0,2.0.

Figure 14: Example of a scenario file

The value delimiter is determined by the Column Delimiter field in the active risk factor specification. Comment lines are determined by the Comment Char field (see the following graphic). If the first tag in a comment line is denoted LABELS, the text entries for this line are interpreted and used as scenario names. When viewing scenarios in the Trading Manager Portfolio Sheet, these names are, for example, displayed as column labels.

Figure 15: File format settings in a risk factor specification

The default directory for scenario files is determined by a file pointer setting called FCS_DIR_RISK in the arena.ini configuration file.

User Guide: Value-at-Risk (FCA4376-22)

6 Scenario analysis 38 of 56

6.5 Trading Manager columns The processing of the risk factor scenarios and the display of the scenario results work in the same way as for any other scenario in the Trading Manager. The starting point is to select a column containing the calculated value and then to apply the scenario.

This can be done in one of the two ways:

• In the Select Columns window, by selecting a column and clicking the Scenario button. • By selecting a column in the Portfolio Sheet, right-clicking, and selecting Apply Scenario.

Either way, the Open Scenario window will appear where you can select from a list of existing scenarios. Alternatively, you can create a new scenario by selecting New and defining a scenario from scratch, or you can use the template option Risk Factor Scenario From File to create a scenario from shifts in a scenario file.

6.5.1 Selecting from a list of existing scenarios See the following graphic for an example of applying a scenario called StressTesting to the Theoretical Value column:

Figure 16: Applying a scenario to the calculated value Theoretical Value

6.5.2 Using a scenario template The template option Risk Factor Scenario From File should be used for importing and creating a scenario derived from multiple shifts for a set of risk factor specifications in a file. Clicking the button Use opens a new window, which is used to control what scenarios are being created:

Figure 17: Scenario template for importing scenarios from file

User Guide: Value-at-Risk (FCA4376-22)

6 Scenario analysis 39 of 56

Field Description

Name Name of the scenario.

Default Display Type

Scenario result display: Absolute, Relative, or Relative Percent.

Scenario File File path including the file name for the scenario data.

Column Start Specifies the first scenario to include. Default = blank = 1.

Column End Specifies the last scenario to include. Default = blank = number of scenarios.

Risk Type Select the total VaR and/or VaR per risk factor type. Default = Total.

The fields Column Start and Column End let you select a subset of the scenarios included in the file. This is particularly useful when you want to analyse only one or a few scenarios (for example, a given date in a scenario file containing historical scenarios).

Important: The whole scenario file is read into a memory, and if the number of risk factors and scenarios is large, this can consume a considerable amount of memory. If you know in advance that a certain number of scenarios should be processed, it is recommended to create a file containing only this number of scenarios, as opposed to maintaining a large file containing all possible scenarios and then using Column Start and Column End to cut out the relevant scenarios.

The list Risk Type dictates what risk factors from the file are applied. Selecting Total means that scenarios for all risk factors are extracted and applied. Selecting, for example, Interest Rate means that only scenarios for interest rate risk factors are processed.

6.5.3 Creating a new risk factor scenario Alternatively, the user can define a risk factor scenario from scratch using the Scenario Editor:

1. In the Open Scenario window, click New. 2. In the tree, select Miscellaneous>Risk Factor Specification>Create Vector and click

Add. 3. Select values for Risk Factor Spec Header, Risk Factor Type, Risk Factor Group, Risk

Factor Spec, and define your shift. Then click OK.

Figure 18: Risk Factor Scenario Shift Vector

User Guide: Value-at-Risk (FCA4376-22)

6 Scenario analysis 40 of 56

6.5.4 Scenario columns in the Portfolio Sheet The following graphic illustrates an example view in the Portfolio Sheet. It shows a stress test scenario view. Here, each column shows the change in theoretical value when applying the shifts specified in the corresponding scenario in the file. Note that the scenario names entered as LABELS in the file appear in the Portfolio Sheet as labels of the columns.

Figure 19: Scenario columns in the Portfolio Sheet – stress test scenarios

The scenario columns work as any other calculated value and column in the Portfolio Sheet (for example, when applying a grouping), and their values are recalculated in real time if the application receives a new trade or market data update. Similarly, reports are created using the standard reporting framework.

Note: To see values based on FX scenarios in the Scenario Value at Risk column, an FX matrix must be used in the valuation tree. For most instruments, this depends on the display currency. To show FX risk contribution on instrument rows, it is necessary to set the P/L currency as the display currency. (This is applicable for all columns including FX risk, not just the Scenario Value at Risk column.)

User Guide: Value-at-Risk (FCA4376-22)

7 Scenario Value-at-Risk 41 of 56

7 Scenario Value-at-Risk PRIME enables calculation of scenario-based Value-at-Risk (VaR) where the scenarios can be either historical or simulated (Monte Carlo).

The calculation and display of scenario VaR in PRIME involves the following steps:

1. Create a risk factor specification, see sections 4.2 Risk factor Grouping application and 4.3 Risk factor Specification application.

2. Choose the active risk factor specification in Parameter Override. 3. Generate a scenario file using the format described in 6.4 Scenario risk data, either

externally or using the built-in scenario generators – refer to User Guide: FRiskFactorData (FCA4995).

4. Select scenario VaR columns in the Trading Manager Portfolio Sheet, see section 7.3 Trading Manager columns.

For large scale scenario-based VaR risk calculations, the recommended approach is to use the Risk Cube. This component facilitates the persistent storage of scenario PV calculations in a result database, and it uses the built-for-purpose OLAP technology to calculate and report scenario-based VaR from these sets of pre-computed PV values. The solution supports the historisation of large volumes of calculated values, detailed trade level drill-down, and historical analysis of VaR values.

This section starts with a description of the calculation principles and provides a numerical example of how calculations are performed in PRIME. After that, how to select and use scenario VaR columns in the Trading Manager is described.

7.1 Calculation principles The first step in the calculation of scenario VaR is processing scenarios. The scenarios are applied to theoretical values as described in section 6 Scenario analysis and produce a vector of scenario PV values. Assuming the scenario file contains M number of scenarios for N risk factors, the result is as follows:

1 2 3 i i 1 Mscenario PV vector (thVal , thVal , thVal ,..., thVal , thVal ,..., thVal )+= Each element in the vector is the new theoretical value (thVali) generated by applying and processing the theoretical value (thVal) for a scenario (i) involving N number of risk factors.

A scenario PV vector will be generated for each displayed row in the Portfolio Sheet: total, subtotal, or individual position. All three sheets are determined by the grouping that is applied to the trade selection.

Each scenario in the scenario PV vector is given a weight (probability). All scenarios are equally weighted by default, but with the possibility to use weights according to an exponential weighting scheme. The weight applied to each scenario is modified using the decay factor, which can be applied as a column parameter.

By design, calculations are reused automatically within a position and for different groupings. For example, the scenario processing a bond position made up of 20 trades will involve one common scenario calculation for the instrument part and one for the trade-related payments. These results will then be reused when calculating a total and subtotals involving the bond position.

The second step is to construct the probability function. This involves creating a sorted PV vector:

1 2 3 i i 1 Msorted scenario PV vector (W , W , W ,..., W , W ,..., W )+=

User Guide: Value-at-Risk (FCA4376-22)

7 Scenario Value-at-Risk 42 of 56

The sorted theoretical values are denoted W. Here, W1 denotes the worst outcome, W2 the second worst outcome, W3 the third worst outcome, while WM denotes the best outcome.

The probability function is constructed as a stepwise linear function, where an exponential decay scheme is used for the probability of each scenario which gives the possibility to add more weight to more recent scenarios:

M ji 1 ii i 1

k k i i 1 kk 1 k 1 jM 1i 1 i i 1 i j 0

X - W W - XP(x X) F(X) p p for W X W and p

W - W W - W

−+ +

+= = −+ + =

λ≤ = = × + × ≤ ≤ =

λ∑ ∑

∑The corresponding inverse function, X as a function of F, on the same interval is:

( )

( ) ( )( ) ( )

( ) ( )

i 1 ii 1 i i k i 1 kk 1 k 1

i 1 ik kk 1 k 1

i i 1

i 1 i i i 1 i 1 i

i 1 i

(W - W ) F X W p - W pX(F)

p p

for F W F F W

(W - W ) F W F W - W F WF W F W

++ += =

+= =

+

+ + +

+

× + × ×= =

≤ ≤

× + × ×=

∑ ∑∑ ∑

In cases where the probability F coincides with the left interval, the function simplifies to:

iX W for F M i= × = The third and final step involves the calculation of the VaR value. For a given one-sided confidence level L, this corresponds to solving for VaR in the equation:

P(x - thVal VaR) F(VaR thVal) 1- L≤ = + = The solution involves identifying the index i satisfying:

( ) ( )i i 1F W (1- L) F W +≤ ≤

Ten solve for VaR using the corresponding inverse function:

( ) ( ) ( )i 1 ii i

i 1 i

W WVaR (1- L) F W W thValF W F W

+

+

− = × − + − −

Other related risk metrics available as a part of the VaR calculation for the same set of scenarios are:

• Worst Case • Shortfall VaR • Contribution VaR • Marginal VaR

Worst Case of order n is defined as the nth smallest value in the sorted scenario PV vector:

Worst Case of order 1 = W1 - thVal

Worst Case of order 2 = W2 - thVal

Worst Case of order 3 = W3 - thVal

Shortfall VaR is defined as the expected value of all outcomes given that the VaR value is exceeded. Along with the worst-case outcomes, this measure gives additional information about the tail of the PV distribution and indicates how bad it can get on really bad days.

User Guide: Value-at-Risk (FCA4376-22)

7 Scenario Value-at-Risk 43 of 56

The calculation is performed by calculating the expected value of the scenario outcomes smaller than VaR as follows (for i and i+1):

𝑆𝑆ℎ𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑉𝑉𝑜𝑜𝑉𝑉 =∑ 𝑊𝑊𝑘𝑘𝑝𝑝𝑘𝑘

𝐹𝐹(𝑊𝑊𝑖𝑖+1)𝑖𝑖+1𝑘𝑘=1 − ∑ 𝑊𝑊𝑘𝑘𝑝𝑝𝑘𝑘

𝐹𝐹(𝑊𝑊𝑖𝑖)𝑖𝑖𝑘𝑘=1

𝐹𝐹(𝑊𝑊𝑖𝑖+1) − 𝐹𝐹(𝑊𝑊𝑖𝑖)× [(1 − 𝐿𝐿) − 𝐹𝐹(𝑊𝑊𝑖𝑖)] + �

𝑊𝑊𝑘𝑘𝑝𝑝𝑘𝑘𝐹𝐹(𝑊𝑊𝑖𝑖)

𝑖𝑖

𝑘𝑘=1

− 𝑜𝑜ℎ𝑉𝑉𝑜𝑜𝑜𝑜

Incremental VaR for a subset of trades (children) is defined as the change in parent VaR in a hierarchy of trades (grouping) when excluding the children trades from the parent level.

The calculation is performed by subtracting the PV vector for the subset of trades from the overall parent level PV vector, sorting the new PV vector, and calculating a new VaR value.

This measure will answer questions such as: "What will happen with total VaR if a subset of trades was removed or closed out?".

Note: Incremental VaR can be both positive or negative and quite different from the standalone VaR for the same trades – it all depends on the correlations between involved risk factors and the composition of trades making up the overall parent level.

Contribution VaR for a subset of trades (children) is defined as the VaR value using the same scenario(s) that cause(s) the top-level VaR value. While incremental VaR always refers to the level immediately above in a grouping hierarchy, contribution VaR always refers to the top level.

Because contribution VaR is based on the same scenario(s), this measure is by definition and construction additive, that is, the sum of all values at a given grouping level will be equal to the contribution VaR for the level immediately above.

Marginal VaR for a subset of trades (children) is defined as the contribution VaR for the subset of trades divided by the theoretical value for the same subset of trades.

This measure will answer questions such as: "What will happen to total VaR if the theoretical value of a subset of trades is increased or decreased with a small amount?".

7.2 Numerical example Assume 250 scenarios and the following calculated scenario PV vector for a selection of trades:

scenario PV vector (4,500, 3,700, 4,100,...,3,800)= Then assume that the sorted scenario number and PV vector look as follows. Assume also that the decay factor is equal to 1:

sorted scenario numbers (40, 10, 100, 200, 5, 178, 241, 15, 78,...,167)= sorted scenario PV vector (3,400, 3, 450, 3, 490, 3, 497, 3, 498, 3,520, 3,570, 3,600, 3,645,..., 4,500)=

1 1 1sorted probabilities ( , ,..., )250 250 250

=

For a 97% confidence level, the solution is found in the interval:

7 8k k

k 1 k 1

7 8p 0.028 0.03 p 0.032250 250= =

= = ≤ ≤ = =∑ ∑

The corresponding elements from the sorted scenario PV vector are:

7 8W 3,570 and W 3,600= =

i i+1for W thVal VaR W thVal− ≤ ≤ −

User Guide: Value-at-Risk (FCA4376-22)

7 Scenario Value-at-Risk 44 of 56

Finally, assuming the thVal equals 4,010, a 97% confidence level scenario Value-at-Risk is calculated as:

( )3,600 3,570VaR ( ) (1 0.97) 0.028 3,570 4,010 4250.032 0.028

−= × − − + − = −

The worst-case outcomes are retrieved directly from the sorted scenario PV vector:

Worst Case of order 1 = 3,400 – 4,010 = – 610

Worst Case of order 2 = 3,450 – 4,010 = – 560

Worst Case of order 3 = 3,490 – 4,010 = – 520

Shortfall VaR is calculated by linearly interpolating between the following two tail-expected values:

i 1k k

i 1k 1 nn 1

W p 3,400 3,450 3,490 3,497 3,498 3,520 3,570 3,600 3,5038 8 8 8 8 8 8 8p

+

+= =

= + + + + + + + =

∑∑

i

k ki

k 1 nn 1

W p 3,400 3,450 3,490 3,497 3,498 3,520 3,570 3,4897 7 7 7 7 7 7p= =

= + + + + + + =

∑∑

( )3,503 3,489Short fall VaR ( ) (1 0.97) 0.028 3,489 4,010 5140.032 0.028

−= × − − + − = −

Consider now that you want to calculate incremental VaR for a subset of trades included in the original trade selection, and assume that the subset generates the following PV vector:

subset scenario PV vector (400, 600, 100,...,500)= A new parent VaR is calculated by excluding the subset of trades. This is performed by calculating a new parent PV vector where the subset vector results are eliminated element by element:

new scenario PV vector (4,500 - 400, 3,700 - 600,...,3,800 - 500) (4,100, 3,100,...,3,300)= = A new VaR is then calculated in the usual way, by sorting the vector and calculating the percentile:

new VaR -450= Finally, incremental VaR is calculated by subtracting the new VaR from the original VaR values:

Incremental VaR VaR - new VaR -425 450 25= = + =

Contribution VaR for the subset of trades is calculated from the same scenarios used to calculate the total VaR value. The seventh value in the sorted PV vector corresponded to scenario number 241, and the eighth value corresponded to scenario number 15. Given these scenario index values and the corresponding scenario PVs, the calculation of contribution VaR follows the same procedure as standalone VaR.

Finally, marginal VaR is calculated by dividing the contribution VaR by the theoretical value for the subset of trades.

7.3 Trading Manager columns Scenario VaR is accessible as a set of columns in the Portfolio Sheet and can be found in a column group called Value at Risk. By default, the calculation is based on the active risk factor specification, defined in the Parameter Override window.

User Guide: Value-at-Risk (FCA4376-22)

7 Scenario Value-at-Risk 45 of 56

The following columns are available:

• Scenario Value at Risk • Scenario Expected Shortfall • Scenario Incremental Value at Risk • Scenario Contribution Value at Risk • Scenario Marginal Value at Risk • Scenario Worst Case

When you double-click the column Scenario Value at Risk, Scenario Expected Shortfall, Scenario Incremental Value at Risk, Scenario Contribution Value at Risk, or Scenario Marginal Value at Risk, a parameter window is displayed, requiring the following VaR specific calculation input, in addition to the standard display currency and column label settings:

Field Description

Stored Scenario Mandatory name of a stored scenario containing all the scenarios to be used in the VaR calculation.

Value at Risk Base Column Base column value that will be shifted in the calculation. Select either Theoretical Total Profit/Loss or Theoretical Value. The default value is Theoretical Value.

Confidence Level One-sided percentile value expressed in percent. The default value is 95.

Decay Factor Decay factor determining how much weight is put on each scenario. Default value is 1, giving equal weight to all scenarios.

When you select the Scenario Worst Case column, a parameter window is displayed requiring the following VaR specific calculation input, in addition to the standard display currency and column label settings:

Field Description

Stored Scenario Mandatory name of a stored scenario containing all the scenarios to be used in the VaR calculation.

Value at Risk Base Column Base column value that will be shifted in the calculation. Select either Theoretical Total Profit/Loss or Theoretical Value. The default value is Theoretical Value.

Worst Case Index Index indicating which scenario is of interest. Number 1 gives the worst case, 2 gives the second worst case, and so on.

PRIME reuses all scenario PV calculations for the different risk measures for the same stored scenario.

It is possible to select and add multiple versions of the Scenario Value at Risk column but with different settings. To change the values, it is currently necessary to remove and then add again a new column reflecting the new settings.

The scenario VaR columns work as any other column in the Portfolio Sheet (for example, when applying a grouping), and their values are recalculated automatically if the application receives a new trade or market data update. Similarly, reports are created using the standard reporting framework.

User Guide: Value-at-Risk (FCA4376-22)

7 Scenario Value-at-Risk 46 of 56

7.4 Trading Manager example view See the following graphic for an example view of the Trading Manager Portfolio Sheet. It illustrates scenario VaR calculations for all risk factors for a trade selection grouped by sub-portfolio, and displays VaR, shortfall, incremental, contribution, marginal, and the first worst-case outcome:

Figure 20: Scenario VaR in the Trading Manager Portfolio Sheet

For example, top-level VaR for the whole TestMasterEQ is equal to -562,358,637 EUR. For a portfolio called Equity CFD, the standalone VaR is equal to -100,169,768 EUR.

The incremental VaR for Equity CFD is -81,794,442 EUR. This shows how much the parent VaR will change if these trades are removed. In this case, the top-level VaR would change from -562,358,637 EUR to -480,564,195 EUR.

For the same set of trades, the contribution VaR is -100,169,768 EUR. This is the scenario outcome when evaluating the trades using the scenario that generates the top-level VaR. The marginal VaR for this set of trades is -0.010, and it represents the sensitivity of the top-level VaR for small changes in the theoretical value for the set of trades.

The user can drill down to see VaR calculation results on an individual position level. For example, the ETF(S)-CS(100)-Q(C)-ManyDiv position has a standalone VaR equal to -14,941 EUR.

Note: The scenario VaR columns are typically demanding from a performance point of view, because they involve the full revaluation of all positions for each scenario.

To speed up the calculations, the processing can be distributed across multiple cores using a combination of multi-threading and portfolio slicing. With portfolio slicing, instruments in a portfolio are distributed across multiple PACE workers and are processed in parallel.

However, the portfolio slicing feature does not apply to the more advanced scenario VaR columns: Scenario Contribution Value at Risk, Scenario Incremental Value at Risk, and Scenario Marginal Value at Risk. For these columns, all calculations are done in a single worker.

User Guide: Value-at-Risk (FCA4376-22)

8 Upgrading from Front Arena 2 47 of 56

8 Upgrading from Front Arena 2 This section contains important information relevant for customers using the VaR functionality in Front Arena 2 looking to upgrade to Front Arena 4. It includes information on configuration, calculation, and performance differences, ASQL and Python access, the Consolidated Risk Package, and finally documentation.

The new VaR functionality is generally available in the PRIME 2010.1 release. The functionality is included in the default module and does not require installation of any separate modules or libraries. The functionality is available as a set of columns and the scenario functionality in the Trading Manager, ARENA Standard Calculations, and ported ARENA Functions.

Because many customers are using the risk functionality to process scenarios as part of a larger market risk solution, the new ARENA Risk Cube component may be of interest in many cases. This component extends the market risk capabilities of Front Arena with powerful features for a detailed drill-down, reporting, and persistent storage of large numbers of risk values.

8.1 Configuration differences The general principle is that the same configuration continues to apply also in Front Arena 4. This means that all calculations are based on the same risk factor configuration as in previous releases, using the applications Risk Factor Grouping and Risk Factor Specification.

Configuration of FX risk factors assumes a base currency that is used to determine which FX currency pairs are treated as risk factors. In Front Arena 2, the base currency was implicitly determined by the accounting currency. In Front Arena 4, the base currency is explicitly determined by the FX Base Currency list in the Valuation Parameters application.

The support for commodity has been added to PRIME 2010.2 in Front Arena 4, and it works similarly to Front Arena 2. Note that the solution currently does not support mapping of commodity price curves and working with these as with commodity risk factors.

There are no major changes to the risk file formats. The scenario file format has been extended to allow for scenario labels. A comment line starting with the key word LABELS is interpreted as scenario names and displayed as column labels when applying a scenario in the Trading Manager.

In PRIME 2010.2, the support has been added for modelling risk factors as either geometric or arithmetic. By default, all risk factors are treated as geometric. To model a risk factor as arithmetic, you must type the word Arithmetic in the choice list Description field for the risk factor group. For any other content in the Description field, the risk factor is modelled as geometric.

8.2 Calculation differences The known differences between Front Arena 4 and Front Arena 2 include the following:

• Front Arena 2 does not apply any bucket shift beyond the last bucket in the specification, whereas Front Arena 4 applies a shift equal to the size of the last bucket.

• Front Arena 4 treats all individual yield curve layers as separate risk factors, and a shift will be applied on the specific layer and propagated up in the yield curve hierarchy.

• Compared to Front Arena 4, Front Arena 2 in some cases uses a different set of valuation parameters in the valuation, which can cause using different risk factors.

• A different choice of the base currency causes different currency risk factors to be involved, and if the risk data is incomplete or inconsistent, a different risk value is generated.

User Guide: Value-at-Risk (FCA4376-22)

8 Upgrading from Front Arena 2 48 of 56

• In PRIME 2011.1, a sign has been embedded in the VaR calculation. For parametric VaR, the value is always negative. For scenario VaR, sign is dictated by the scenario results relative to the theoretical value. In all except extreme scenario cases, the scenario VaR can be expected to be negative.

8.3 Performance differences For parametric VaR, the real-time performance has improved at the cost of increased memory and startup time when comparing Front Arena 4 with Front Arena 2. For example, a benchmark calculation including 270 risk factors and 3,200 positions consumes twice as much memory compared to Front Arena 2, takes 25% more startup time, but updates 5 times faster.

For the scenario processing and scenario VaR including the ARENA Function rf_scenario(), the performance is better in most cases for all performance metrics in the Front Arena 4 release. For example, processing 200 scenarios for the previously mentioned benchmark portfolio consumes 5 times less memory, takes 3 times less startup time, and updates 10 times faster.

The rf_scenario() function in the new version has been optimised to perform optimally when making repeated calls using the same entity and scenario file, but with a different scenario number.

8.4 ARENA Functions and ARENA Standard Calculations ARENA Functions continue to be supported to help customers upgrade to the new PRIME version. The decision as to which functions to port, including entities and arguments, is very much dictated by customer usage, priorities, and upgrade plans.

The following ARENA Functions are supported in Front Arena 4:

• value_at_risk() • value_ rf_scenario()

Note that these functions have only been ported partially. For more information about the supported entities and arguments, refer to ARENA Functions in Front Arena Help (FCA4131).

The following ARENA Standard Calculations have been added:

• ParametricValueAtRisk() replaces the ARENA Function value_at_risk() • RiskFactorScenario() replaces the ARENA Function rf-scenario() • UsedRiskFactorSpecifications() replaces the AEL Function rf_list() These new Standard Calculations API functions are intended to be used to access risk calculations from Python. For more information about the function syntax, parameters, and return values, refer to Standard Calculations in Reference: AEF Browser standalone version (FCA4033).

Note: Support for the ARENA Functions rf_volatility(), rf_correlation(), and rf_covariance() which existed in PRIME 2010.1 has been removed in PRIME 2010.2.

8.5 Consolidated Risk Package The Consolidated Risk Package available in earlier releases is no longer supported in Front Arena 4, but much has and will continue to be replaced with the equivalent functionality.

• ASQL applications called .Risk/ProcessScenarios, .Risk/SensitivityAnalysis, .Risk/ScenarioAnalysis, .Risk/ValueAtRisk, and .Risk/ValueAtRisk/Trade are replaced with new columns and the scenario functionality in the Trading Manager.

User Guide: Value-at-Risk (FCA4376-22)

8 Upgrading from Front Arena 2 49 of 56

• The time series functionality for storing and maintaining risk factor values in the ADM database is replaced with a new script called FRiskFactorData (refer to User Guide: FRiskFactorData (FCA4995) for more information).

• The application .Risk/HistoricalScenario is replaced with a new script called FRiskFactorData (refer to User Guide: FRiskFactorData (FCA4995) for more information).

• There is no equivalent functionality that replaces the ASQL applications.Risk/ValueAtRisk/RFGroup and .Risk/ValueAtRisk/RiskFactor.

• There is no equivalent functionality for generating Monte Carlo scenarios similar to what used to be possible with .Risk/MonteCarloScenario.

User Guide: Value-at-Risk (FCA4376-22)

9 Working with scenarios programmatically 50 of 56

9 Working with scenarios programmatically There are several ways of accessing and manipulating scenarios programmatically in PRIME. This section aims to give an overview of different options and their relative merits.

9.1 ARENA Function: rf_scenario() The rf_scenario function makes it possible to work with scenarios more easily than from the Information Manager. Due to certain architectural constraints, rf_scenario is usually somewhat slower than the other techniques listed in the following text; hence, it is recommended that rf_scenario is mainly used to support old ASQL queries in an upgrade.

9.2 ARENA Standard Calculation: RiskFactorScenario() The Standard Calculation RiskFactorScenario() provides essentially the same functionality as the rf_scenario ARENA Function. It is an easy way of accessing file-based scenarios on the theoretical value on a range of entities. It is limited in the sense that it is fixed on the theoretical value.

9.3 ACM class: FRiskFactorScenarioBuilder This is the most flexible approach, where the user can create a scenario (either from file or through explicit parameters) and then apply that scenario to any Standard Calculation or ARENA Calculation Interface calculation. It is straightforward to use and supports the widest range of scenario parameterisations.

9.4 ACM class: FShiftVectors and FExplicitScenario It is possible to explicitly construct scenarios using the underlying Trading Manager technology directly in Python. That is, creating instances of FShiftVector populated with shift functions, filters, snoop targets, and shift sizes, and then building a scenario by stacking such vectors on top of each other in a dimension. This is not the recommended approach because it is prone to errors, and it ties in with the specific ADFL implementation of different risk factors quite heavily, making the resulting Python code susceptible to changes in the valuation tree architecture.

User Guide: Value-at-Risk (FCA4376-22)

10 Programmatic access methods 51 of 56

10 Programmatic access methods

10.1 General This section describes the functions which provide easy access to the VaR risk calculations from Python and ASQL. The Arena Calculation Interface provides another, more advanced, method for a programmatic access to calculated values in PRIME.

The ARENA functions are mainly offered to support upgrading customers that are using ASQL and Information Manager for their current reporting. New customers are recommended to use the Trading Manager as the main application and basis for their reporting.

10.2 ARENA Standard Calculation: ParametricValueAtRisk()

10.2.1 Function syntax Object.ParametricValueAtRisk (calculationSpace, currency, riskFactorType, confidenceInterval, holdingPeriod): denominatedvalue

10.2.2 Object types instrument, trade, tradefilter, portfolio

10.2.3 Parameters Parameter Description

Currency Currency used to express theoretical value and VaR

riskFactorType None = Total, Equity, Interest Rate, Equity, FX, Volatility, Credit

confidenceInterval Percentage value, for example, 0.95 or 0.99

holdingPeriod Number of days in the VaR calculation, for example, 1 or 10

10.2.4 Default values Parameter Default value

Currency FX Base Currency in Valuation Parameters

riskFactorType None

confidenceInterval 0.95

holdingPeriod 1

User Guide: Value-at-Risk (FCA4376-22)

10 Programmatic access methods 52 of 56

Example cs = acm.Calculations().CreateStandardCalculationsSpaceCollection() p = acm.FPortfolio['All Trading'] calc = p.Calculation().ParametricValueAtRisk(cs) cs = acm.Calculations().CreateStandardCalculationsSpaceCollection() t = acm.FTrade['17385'] calc = t.Calculation().ParametricValueAtRisk(cs, 'EUR', 'Interest Rate', 0.99, 10)

10.3 ARENA Standard Calculation: RiskFactorScenario()

10.3.1 Function syntax Object.RiskFactorScenario (calculationSpace, filename, currency, riskFactorType, columnRangeStart, columnRangeEnd): array(denominatedvalue)

10.3.2 Object types instrument, trade, tradefilter, portfolio

10.3.3 Parameters Parameter Description

Filename Name of the scenario file containing the scenarios. If no file path is specified, PRIME will look for the file in the directory associated with FCS_DIR_RISK in the arena.ini file.

Currency Currency used to express theoretical value and VaR

riskFactorType None = Total, Equity, Interest Rate, Equity, FX, Volatility, Credit

columnRangeStart First scenario to process in the file (indexing starts with 0)

columnRangeEnd Last scenario to process in the file (indexing starts with 0)

10.3.4 Default values Parameter Default value

Currency P/L currency in Valuation Parameters

riskFactorType None

columnRangeStart 0

columnRangeEnd Number of scenarios in the file – 1

Example cs = acm.Calculations().CreateStandardCalculationsSpaceCollection() p = acm.FPortfolio['All Trading'] calc = p.Calculation().RiskFactorScenario(cs,'stresstestscenarios.txt') cs = acm.Calculations().CreateStandardCalculationsSpaceCollection() t = acm.FTrade['17385']

User Guide: Value-at-Risk (FCA4376-22)

10 Programmatic access methods 53 of 56

calc = t.Calculation().RiskFactorScenario(cs, 'C:\RiskData\scenarios.txt', 'EUR', 'Interest Rate', 0, 10) cs = acm.Calculations().CreateStandardCalculationsSpaceCollection() t = acm.FTrade['17385'] calc = t.Calculation().RiskFactorScenario(cs, 'C:\RiskData\scenarios.txt', 'EUR', 'Interest Rate', 5, 5)

10.4 ARENA Function: value_at_risk()

10.4.1 Function syntax value_at_risk (entity, filename, column, riskFactorType, riskFactorGroup, HistFXRisk)

10.4.2 Entity types trade, tradefilter, portfolio

10.4.3 Parameters Parameter Description

Filename Not supported

Column Not supported

riskFactorType None = Total, Equity, Interest Rate, Equity, FX, Volatility, Credit

riskFactorGroup Not supported

HistFXRisk Only value 0 = Historical cash flows are excluded

10.4.4 Default values Parameter Default value

riskFactorType None = Total

The VaR scale in the active risk factor specification is used to determine the confidence level and the holding period, and is assumed to be entered as a single factor: conf _ factor(L) H× .

Example SELECT p.prfid, value_at_risk(p) FROM portfolio p WHERE p.prfid = 'All Trading' SELECT t.trdnbr, value_at_risk(t,,,'Interest Rate') FROM trade t

User Guide: Value-at-Risk (FCA4376-22)

10 Programmatic access methods 54 of 56

WHERE t.trdnbr = '17385'

10.5 ARENA Function: rf_scenario() For information about the ARENA Function rf_scenario(), refer to ARENA Functions in Front Arena Help (FCA4131).

User Guide: Value-at-Risk (FCA4376-22)

11 References 55 of 56

11 References [1] Yamai Y., Yoshiba T. (2002), "On the Validity of Value-at-Risk: Comparative Analyses with Expected Shortfall", Monetary and economic studies, p. 61.

Contact the Front Arena documentation team at: [email protected]