MR-specific configuration
Scopes
The scope describes which data is loaded and unloaded.
Each request to the Data Load Controller contains a scope. In the default implementation, the as-of date scope is turned into a directory and all the files in that directory are loaded. When unloading data, the scope is turned into a RemoveWhere clause to be run on the datastore.
There are three different scopes in the default implementation.
Scope | Description |
---|---|
Configuration Scope | This scope is used for configuration files, including the parameters which are fetched by the parameters API. Data in this scope typically has a “start date” rather than an as-of date. The files in this scope are found in the “configuration” directory. This scope has no parameters. |
Historical Scope | This scope is used for historical summary data. This data is not at the trade level and does not include recent dates. Instead it is at the aggregate level (for example, book and legal entity) and contains a long history. The files in this scope are found in the “historical” directory. This scope has no parameters. |
As-Of Date Scope | This scope is for the daily trade-level files. The files in this scope are found in directories whose names match the requested date. This scope is parameterized by as-of date. For example: "scope":{ "AsOfDate": "2018-09-27" } |
Topic Aliases
Each input file is loaded with a topic (see Input file formats). Topic aliases are used to group those topics.
Atoti Market Risk contains the following topic aliases:
Alias | Description | Topic |
---|---|---|
StaticSensiPillars | Static pillars for Tenor, Maturity and Moneyness | Tenors, Maturities, Moneyness |
DynamicSensiPillars | Dynamic pillars for Tenor, Maturity and Moneyness | DynamicTenors, DynamicMaturities, DynamicMoneyness |
SensiPillars | StaticSensiPillars & DynamicSensiPillars | StaticSensiPillars, DynamicSensiPillars |
DailySensiConfig | The whole configuration for the sensitivities based on an as-of date scope | RiskFactorsCatalogue, MarketData, SensiLadders, MarketDataSets, CorporateAction |
SensiConfig | DailySensiConfig & SensiPillars | DailySensiConfig, SensiPillars |
Sensitivities | Sensitivity metrics | Delta, Gamma, Vega, Volga, Theta, Cash, Vanna, Correlation, CrossGamma |
AllSensi | Data for one day in the sensitivity cube | DailySensiConfig, Sensitivities |
ParentChild | Parent-child stores, that is, with a tree structure | BookParentChild, LegalEntityParentChild, CounterpartyParentChild, Counterparties |
Attributes | Attributes related to the underlying, currency, and scenario | TradeAttributes, FXRates, Scenarios, Countries, MarketShifts, SignOffDigestStore |
AllConfiguration | The entire static configuration | RoundingMethods, Quantiles, SensiPillars |
AllAttributes | The whole configuration: DailySensiConfig, ParentChild, and Attributes | DailySensiConfig, ParentChild, Attributes |
AllFacts | Main data (sensi, var, pnl) for all the cubes | TradePnLs, PnL, AllSensi, BaseStore, PnLBaseStore, SensiBaseStore |
All | Everything | AllAttributes, AllFacts |
Configuration Properties
The following properties can be set in mr.properties
:
Property | Default Value | Description |
---|---|---|
mr.data-load.initial-business-dates |
(null) | If set, the set of as-of dates to load at start-up |
mr.data-load.csv.dataset |
“data” | The directory containing the CSV files. The scope directories are immediate subdirectories of this |
Initial Load
On startup, the following topic aliases are loaded (without parameters):
- AllConfiguration
Additionally, a list of as-of dates is determined as follows:
-
If the configuration parameter
mr.data-load.initial-business-dates
is set, the as-of dates listed are used. For example, in theapplication.yaml
file:mr: data-load: initial-business-dates:2018-09-28,2018-09-27
-
Otherwise, the top level of the data directory is scanned for directories whose names are dates. These dates are used for the as-of dates in the initial load. (This matches the previous start-up behavior).
For this set of as-of dates, the following topics are loaded with the “AsOfDate” field set in the scope:
-
AllAttributes
-
AllFacts
Additionally, if there is a next business date available in the data
directory, the following stores are loaded for the next day. This is
mandatory for the correct calculation of the PNL Explain especially in a
distributed environment. For instance, if
mr.data-load.initial-business-dates=2018-09-27
then 2018-09-28
will be
loaded for:
-
MarketData
-
FXRates
REST Service
HTTP POST URL: /mr-application/services/rest/dlc/execute
Body (sample):
{ "operation":"unload",
"topics":\[
"ALLSA", "ALLIMADaily"
\],
"scope":{
"AsOfDate":"2018-09-27"
}
Summary/trend data
Depending on whether the summary cubes are activated (Var-ES Summary cube, Sensi Summary cube, PnL Summary cube), the corresponding topics will load a different file into a different store:
property key | value | topic | file pattern | base store | Cube |
---|---|---|---|---|---|
cubes.enable.var-summary | true | BaseStore | **VaR-ES Cube*.csv | BaseStore | Var-ES Summary cube |
cubes.enable.var-summary | false | BaseStore | **SummaryVaR*.csv | TradePnLs | Var-ES cube |
cubes.enable.pnl-summary | true | PnLBaseStore | **PLCube*.csv | PnLBaseStore | PnL Summary cube |
cubes.enable.pnl-summary | false | PnLBaseStore | **SummaryPL*.csv | PnL | PnL cube |
cubes.enable.sensi-summary | true | SensiBaseStore | **Sensitivity Cube*.csv | SensiBaseStore | Sensi Summary cube |
cubes.enable.sensi-summary | false | SensiBaseStore | **SummarySensitivity*.csv | TradeSensitivities | Sensi cube |