Risk Limit Import/Export
Overview
Ember Journal records all the changes made to risk limits. Using Journal tools, one can export or batch-modify risk limits in the system.
For more information, see the Ember Journal documentation and description of journal-to-json and journal-transform tools.
Examples
Here are some of the examples of risk related messages in the journal.
Example 1
A user "andy" defines a Maximum Order size of 100 and a Maximum Long position of 10000 for MSFT:
{
"$type":"RiskUpdateRequest",
"requestId":"EMBER-MONITOR-20210128-19:51:52.061:2081018901361852326",
"projection":"Source/Symbol",
"commands":[
{
"$type":"RiskTableCommand",
"cmdType":"INSERT",
"conditions":[
{
"$type":"RiskCondition",
"projectionKey":"Source",
"value":"*"
},
{
"$type":"RiskCondition",
"projectionKey":"Symbol",
"value":"MSFT"
}
],
"limits":[
{
"$type":"RiskLimit",
"name":"MaxOrderSize",
"value":"100"
},
{
"$type":"RiskLimit",
"name":"MaxPositionLong",
"value":"10000"
},
{
"$type":"RiskLimit",
"name":"MaxPositionShort"
}
]
}
],
"changedByUserId":"andy",
"timestamp":"2021-01-28T22:29:25.383Z"
}
Notice how a wildcard is used to apply this limit to orders from any source.
Example 2
A user "andy" defines two risk limit cases with a Maximum Order size of 10000 for USD and 13000 for EUR:
{
"$type":"RiskUpdateRequest",
"requestId":"EMBER-MONITOR-20210128-19:51:52.061:2081018901361852327",
"projection":"Currency",
"commands":[
{
"$type":"RiskTableCommand",
"cmdType":"INSERT",
"conditions":[
{
"$type":"RiskCondition",
"projectionKey":"Currency",
"value":"USD"
}
],
"limits":[
{
"$type":"RiskLimit",
"name":"MaxOrderSize",
"value":"10000"
}
]
},
{
"$type":"RiskTableCommand",
"cmdType":"INSERT",
"conditions":[
{
"$type":"RiskCondition",
"projectionKey":"Currency",
"value":"EUR"
}
],
"limits":[
{
"$type":"RiskLimit",
"name":"MaxOrderSize",
"value":"13000"
}
]
}
],
"changedByUserId":"andy",
"timestamp":"2021-01-28T22:29:49.410Z"
}