Sensitivities Cube

The Sensitivities cube provides the “greeks” functionality of the Accelerator and comprises:

  • A default data model for sensitivities

  • A reference implementation

  • Dynamic bucketing

  • Real-time and trade events

  • PnL Explain analysis

Default data model

Key points at a glance:

  • The sensitivies have their own cube

  • Each sensitivity is in a separate store

  • Each store is fed by the relevant sensitivity input file

Input Files

Out of the box, the Market Risk Accelerator will work with a predefined file format, CSV. If you produce your data in this format, you can load and use the Accelerator with no customisations needed. However, you can of course edit and configure the Accelerator to work with any format or file, database, source etc that ActivePivot is compatible with.

Sample CSV input files are included in the source distribution. These files are loaded during testing of the reference implementation and provide examples of each of the file types.

  • Risk data: A separate file for each sensitivity. Contains snapshots of portfolio sensitivities, JtD and other risk metrics on the trade (position) level. Note: For parallel loading, each measure (identified by the RiskType field) is in a separate file.

  • Trade attributes: Contains reference data for all trades and positions for each date in the cube

  • Risk factors catalog: Contains reference data for risk factors. For example, source, whether modellable/non-modellable, etc.

  • Tenors and maturities: Contains time points and labels to use for static and dynamic bucketing.

  • Market data: Contains sensitivities either in native currency or in a reference currency. If the sensitivities have been converted to a reference currency by the risk engine, the data can be used directly in the calculations. If the sensitivities are in native currency, the Market Risk Accelerator can convert them to a reference currency

  • The reference currency is controlled by a context value that the user can set at query time. The Market Risk Accelerator must be supplied with FX rates, which can be either explicit for every currency pair or expressed via a cross-currency.

  • A set of FX rates must be supplied to the Market Risk Accelerator for every business date where there are sensitivities to be converted.

For full details of the input files, see Input file formats in the Cube Reference Guide

Datastore definitions

The datastore schema contains the following stores arranged in a star schema centred on the TradeSensitivities store as the base store.

This is detailed in /risk-activepivot/src/main/java/com/activeviam/risk/ref/cfg/sensi/impl/sensiDatastoreDescription.java

  • Each sensitivity has its own datastore. The sensitivities comprise: Delta, Vega, Gamma, Vanna, and Volga.

  • From this, we populate a “Trade Sensitivities” store, which is the base store. There is no file for this store, it is populated from a tuple publisher.

  • The RiskFactorsCatalog store contains reference data for risk factors.

  • Tenors and maturities stores: Provide details of static tenors and maturities respectively

  • Dynamic tenors and maturities stores: Provide details of dynamic and tenors and maturities respectively

  • Market data store

Datastore diagram

To view the stores derived from the input files and how they connect to each other, see the MRA Input Data Diagram.

Datastore tables

For a full description of the fields in each store and how they map to the cube fields, see Sensitivities datastore definitions in the Cube Reference Guide.

Cube dimensions and measures

The sensitivities have their own cube. For a full description of the dimensions and measures provided in the reference implementation of the Sensitivities cube, see the Cube Reference Guide.

Dynamic bucketing

By default, the Accelerator aggregates sensitivities along the tenor ladders provided in the sensitivities input files. Additionally, you can select from a set of pre-configured time buckets that are defined as context values in the accelerator to linearly allocate sensitivities to arbitrary vertices on the fly.

For more information, see the Context values in the Cube Reference Guide.

Vertices

The term vertex refers to a tenor or expiry/maturity point along which a risk factor sensitivity is mapped or projected.

Examples

  • Interest rate delta: the vertices represent points along a risk-free yield curve

  • Credit spread delta: the vertices represent points along a credit spread curve

  • Commodity delta: the vertices represent time to maturity for a traded commodity

Linear interpolation to tenor ladders

A source bucket may not correspond to one distinct destination bucket, its value may have to be distributed (interpolated) over two destination buckets. For example, if sensitivities of hedges are produced by a risk system on a more granular level. Linear interpolation to prescribed points has been implemented in the Reference Implementation based on a 30/360 day count convention.

Other interpolation methods and day count conventions can be implemented as needed in the client project by implementing the respective configuration classes.

Real-time and trade events

By default, the Reference Implementation publishes snapshots of the sensitivities.

Alternatively, the supports incremental real-time updates of individual sensitivities if available from risk engine. Updates of the sensitivities records need to be coupled with trade termination events, setting the existing trade sensitivities to zero.

P&L Explain

The P&L Explain process aims to quantify the changes in the P&L from one business day to the next, based on the closing prices for each day and show the impact of each input (each change in the quote) in terms of P&L.

For example, the portion of P&L due solely to the change of one particular quote (for example, the EUR SWAP LIBOR 3Y)

The process begins with aggregation of the greeks and then uses those values in a Taylor expansion to predict the expected one-day change in P&L using the actual market data shift over one day.

Methodology

In the decomposition of P&L, the market data impact represents the change in the portfolio value from market data shifts during the day.

To calculate the market data impact on the P&L, the source of the P&L is further decomposed using Greeks and a Taylor expansion approach, which aims at allocating a P&L number to each individual quote.

Shifts and shift factors

The Accelerator supports both relative and absolute market data shifts (for more information, see the P&L impact table below). This is configurable and extendable.

The shift factor default is 1, but is configurable.

The following table shows the P&L impact calculations for each risk class, where qn is the market data quote for a given day n.

Risk class How sensitivities are represented 1st order Taylor approximation 2nd order Taylor approximation
Equity, FX Cash equivalent positions $(q2/q1-1) * sens$ 1/2(q2/q1-1) 2*sens
IR, credit, repo curves Provided in $/bp (q2-q1) * sens 1/2 (q2-q1) 2 * sens
Vega $/vol point (q2-q1) * sens 1/2 (q2-q1) 2 * sens

DHS computation

For negative interest rates, the Accelerator uses the following DHS (Displaced Historical Simulation) computations, where a is a shift value that can be configured per risk class.

1st order Taylor approximation 2nd order Taylor approximation
sens*[( q2+ a)/(q1 + a) -1] ([( q2+ a)/(q1 + a) -1]) 2*sens

Customising the methodology

In the Market Risk Accelerator, you can configure the methodology to use in the greek-based-pl-formula-rules.properties file. For more information, see greek-based-pl-formula-rules.properties.

search.js