Apama Capital Markets Foundation 10.7 | Capital Markets Foundation | Order Management | Risk firewall | Setting up risk firewall evaluation rules | Descriptions of default rule classes | About the OrderOperationRatioRiskFirewallRule
 
About the OrderOperationRatioRiskFirewallRule
The OrderOperationRatioRiskFirewallRule class ensures that the number of amend order operations and/or cancel order operations in a specified time window (30 seconds by default) do not exceed the allowed number of amend/cancel operations as defined by the specified ratio between amend/cancel order operations and new order operations. An amend or cancel order operation that would exceed the allowed number of amend/cancel operations is rejected by this rule. By default, both amend and cancel order operations are checked against new order operations.
The com.apama.firewall.rules.OrderOperationRatioRiskFirewallConsts object defines the constants for the configuration settings for the order operation ratio rule class, as well as their default values. You should use these constants rather than specific values in order to ensure compatibility.
Constant Name of Input Parameter
Description
RULE_CLASS_NAME
Rule class name, which is "OrderOperationRatioRiskFirewallRule".
OBJECTION_LIMIT_PARAMETER
Specifies the allowed ratio of amend/cancel orders to new orders, which determines the number of order operations (amend or cancel) that can be requested before the rule rejects the operation request. You must set a value for this parameter.
For example, suppose you set this parameter to 5. If there are 3 new orders in a 30 second window then the ratio is 15:3. This rule would allow up to 15 amend/cancel operations to those 3 new orders until another new order is received or the time window for a new order expires.
Note that, in the example, each new order is not limited to only 5 amend/cancel operations. Each of the 15 allowed operations can apply to any of the new orders.
OBJECTION_LIMIT_DEFAULT
Default value for the objection limit, which is 0 by default.
WARNING_LIMIT_PARAMETER
Specifies the allowed ratio of amend/cancel orders to new orders before the risk firewall issues a warning when it allows the operation.
WARNING_LIMIT_DEFAULT
Default value for the warning limit, which is 0 by default.
TIME_WINDOW_PARAMETER
Number of seconds in the rolling time window.
TIME_WINDOW_DEFAULT
Default number of seconds in the rolling time window, which is 30.0 by default.
CHECK_AMEND_PARAMETER
Indicates whether this risk firewall rule instance should apply to AmendOrder objects.
CHECK_AMEND_DEFAULT
Default value for whether this risk firewall rule instance should apply to AmendOrder objects. By default, this is false, which means that amend order requests are not counted as part of the total number of requests allowed within the specified time window.
CHECK_CANCEL_PARAMETER
Indicates whether this risk firewall rule instance should apply to CancelOrder objects.
CHECK_CANCEL_DEFAULT
Default value for whether this risk firewall rule instance should apply to CancelOrder objects. By default, this is false, which means that cancel order requests are not counted as part of the total number of requests allowed within the specified time window.
The following table provides information about order operation ratio rule class state information parameters. The risk firewall uses these constants as part of the state returned in the com.apama.firewall.InstanceInfo object when you call the com.apama.firewall.RiskFirewall.getRulexxxInfo() set of actions.
Constant Name of Output Parameter
Description
NEW_ORDER_PER_WIN_OUTPUT
Number of new orders in the current time window.
ORDER_OPS_PER_WIN_OUTPUT
Number of order operations (amend or cancel) in the current time window.