IMA Summary REST Service

Overview

The IMA Summary REST Service aggregates the trade-level data from the IMA cube and produces aggregate level data that can be used as input to the IMA Summary Cube.

URL

/services/rest/ima-summary

Export

The /export endpoint performs the aggregation from the trade-level data in the IMA Cube to the aggregate-level data for the IMA Summary Cube. It takes an as-of date as an input parameter and produces a CSV file for that date which is ready to load into the IMA Summary Cube.

Parameters

Parameter Default Value Type Description
date Date [YYYY-MM-DD] The as-of date
filename IMA_Summary_YYYY-MM-DD.csv String The file name for the aggregated data.
download true Boolean When true, download the generate file.
save false Boolean When true, save the generated file to the server’s local file system.

Example

GET http://localhost:8080/frtb-starter/services/rest/ima-summary/export?date=2016-06-01

Configuration

Parameter Default Value Description
ima-summary.export.directory The directory on the server’s local file system to save
ima-summary.export.file-pattern IMA_Summary_{0}.csv The default file name (for the optional parameter in the HTTP GET request). If has the following substitution:
0. As-of date
ima-summary.export.mdx-pattern (see below) The MDX query to use to generate the aggregate-level values. It has the following two substitutions:
0. Reference Currency
1. As-of date
ima-summary.export.reference-currency EUR The value of the ReferenceCurrency context value to use when executing the MDX query to generate the aggregates.
ima-summary.export.down load true The default value of the download parameter in the HTTP GET request.
ima-summary.export.save false The default value of the save parameter in the HTTP GET request.

The following query is used to generate the aggregate-level data from the IMA Cube:

WITH
  Member [Measures].[Date] AS [Dates].[Date].MemberValue
  Member [Measures].[Currency] AS "{1}"
  Member [Measures].[PnL] AS [Measures].[ES (PnL Vector) CCY]
SELECT
  NON EMPTY {
    [Measures].[Currency],
    [Measures].[PnL],
    [Measures].[Date]
  } ON COLUMNS,
  NON EMPTY Crossjoin(
    [Risk].[Data Sets].[Data Set].Members,
    [Booking].[Books].[Book].Members,
    [Organization].[Legal Entities].[Legal Entity].Members,
    [Risk].[Risk Factors].[Risk Factor].Members,
    [Risk].[Risk Classes].[RiskClass].Members,
    [Risk].[Liquidity Horizons].[Liquidity Horizon].Members
  ) ON ROWS
  FROM (
    SELECT
    [Dates].[Date].[AsOfDate].[{0}] ON COLUMNS
    FROM [InternalModelApproachCube]
  )

search.js