📋 Risk Rule Template
Risk Rule template has a lot of options, which are divided into 6 sections. This document will drill down into each one of the options.
Table of Contents
- RMS
- Transaction
- Restrict Fresh Order based on Order validity
- Restrict Fresh Order based on Order Type
- Restrict Order
- Restrict Fresh Order Based on LTP Based Price Band
- Restrict Fresh Market Orders Based on Market Session
- Restrict Order based on Percentage Near to Daily Price Range (DPR)
- Restrict Fresh Order based on Expiry Date
- Restrict Fresh Order based on Tender Period
- Restrict Order based on Issue Capital
- Restrict Fresh Order based on Current Day Traded Volume
- Restrict Fresh Order based on Current Day Traded Value
- Restrict Fresh Order based on Previous Day Traded Volume
- Restrict Fresh Order based on Previous Day Traded Value
- Restrict Fresh Order based on Open Interest Quantity
- Restrict Fresh Order based on Open Interest Value
- Restrict Fresh Order based on Strike Price Range
- Restrict Order which are not part of Scrip Basket – Margin (allowed)
- Restrict Order based on Entity Level Direct Restriction
- Restrict Order based on Scrip Basket Restricted
- Restrict Position Conversion
- Restrict Order based on Index Deviation Circuit Hit
- Restrict Order based on Price Difference in Market Depth
🔒 RMS
Restrict Order based on Exchange Freeze Quantity
Description: Exchange Freeze Quantity refers to the maximum number of shares or contract that a customer can buy or sell in a single order. Essentially it's a limit on a single order size to reduce potentially market disrupting trades being placed in one-go. The freeze quantity is received in exchange scrip master against respective scrip.
Applicability: This rule is applicable for CASH, FNO, Currency, Commodity and OFS Segment and not applicable for MF Segment.
⚙️ Implementation
- If Rule is ON – System should Validate, and Reject the Order based on the Order quantity placed against Exchange Freeze Quantity
- If Rule is OFF – System should not Validate the Order against Exchange Freeze Quantity
Exchange Freeze Quantity data will be received from Scrip Master file against each scrip.
Assume following data received through scrip master file:
| 📋 Cont | 📊 Seg. | 🔑 Sym | 📅 Exp. Date | 📦 Exchange Freeze Quantity |
|---|---|---|---|---|
| 1 | NSE-EQ | TCS | - | 1000 |
| 2 | NSE-EQ | ACC | - | 1000 |
| 2 | BSE-FNO | INFY | 15-SEP-2020 | 3500 |
Assume that Rule is ON
Place Order:
| 📋 Cont | 📊 Seg. | 🔑 Sym | 💱 Buy/Sell | 📅 Exp. Date | 📦 Place Order Qty | 🟢 Order Status |
|---|---|---|---|---|---|---|
| 1 | NSE-EQ | TCS | Buy | - | 1050 | Order should get Rejected |
| 2 | NSE-EQ | ACC | Buy | - | 800 | Order should get PASS |
| 3 | BSE-FNO | INFY | Sell | 15-SEP-2020 | 3600 | Order should get Rejected |
In case of Exchange Freeze Qty value in the Scrip Master is received as '0' against respective token. System should not validate and restrict the order from the contract with freeze qty value as '0'.
Restrict Order based on Exchange Daily Price Range (DPR)
Description: DPR is defined as the Daily price range for a particular scrip by the exchanges. DPR sets the maximum and minimum price range for the scrip and any orders outside that range will be rejected by the exchange.
Source of data: DPR data will be received through offline and online mode against each scrip
- Offline – Through Scrip Master
- Online – Through broadcast during intraday trading session
⚙️ Implementation
- If Rule is ON – System should Validate, and Reject the Order based on the Order Price placed against DPR
- If Rule is OFF – System should not Validate the Order against DPR
Assume following data received through scrip master file and through Broadcast:
| 📋 Cont | 📊 Seg. | 🔑 Sym | 📅 Exp. Date | 📊 DPR |
|---|---|---|---|---|
| 1 | NSE-EQ | TCS | - | 200-300 |
| 2 | NSE-EQ | ACC | - | 350-500 |
| 3 | BSE-FNO | INFY | 15-SEP-2020 | 1000-2200 |
Assume that Rule is ON
Place Order:
| 📋 Cont | 📊 Seg. | 🔑 Sym | 💱 Buy/Sell | 📅 Exp. Date | 💰 Place Order Price | 🟢 Order Status |
|---|---|---|---|---|---|---|
| 1 | NSE-EQ | TCS | Buy | - | 250 | Order should get PASS |
| 2 | NSE-EQ | ACC | Buy | - | 345 | Order should get Rejected |
| 3 | BSE-FNO | INFY | Sell | 15-SEP-2020 | 2250 | Order should get Rejected |
Restrict Order based on Exchange Maximum Single Transaction Value
Description: Maximum single transaction value is a restriction to manage risk at exchange level.
Source of data:
- Max Single Transaction value data for MCX, NCDEX and Currency Segment will be received through Scrip Master File against each scrip. For NSE/BSE it might or might not be available in scrip master.
- If Max single transaction value is not available for the scrips in the scrip master file, then system will consider the value configured in this rule/variable in the Master Config. The default value set by ARMS is 100000000.
- If Max single Transaction value is available in Scrip Master file as well as Value is configured in the Master Config Variable, then system will consider the value specified in the Scrip Master file.
- In case, if Value in the scrip Master file is mentioned as 0 or -1, then system will not consider the value specified in the scrip master file and in this case, it should consider the value configured in this rule.
- System will refer the Value configured for the respective SIP in which the order falls.
⚙️ Implementation
- If Rule is ON – System should Validate, and Reject the Order based on the Order Value placed against defined Max Single Transaction Value
- If Rule is OFF – System should not Validate the Order against Max Single Transaction Value
Assume following data received through scrip master file and configured in System:
| 📋 Cont | 📊 Seg. | 📦 Ins | 🔑 Prod | 💰 Max Single Transaction Value configured in this rule |
|---|---|---|---|---|
| 1 | NSE-EQ | All Scrips/Contracts | Margin | 6000 |
| 2 | All Equity | All Scrips/Contracts | Margin | 8000 |
| 3 | MCX | All Future | Carryforward | 9000 |
| 4 | NCDEX | All Future | Carryforward | Not Configured in this Rule |
Assume following Value available in the Scrip Master File:
| 📋 Cont | 📊 Seg. | 🔑 Sym | 📅 Exp. Date | 💰 Max Single Transaction Value available in Scrip Master File |
|---|---|---|---|---|
| 1 | MCX | GOLD | 15-SEP-2020 | 10000 |
| 2 | MCX | SILVER | 15-SEP-2020 | 0 |
| 3 | NCDEX | SILVER | 15-OCT-2020 | 12000 |
Assume Sequence Priority Master configured for Equity as ALL Equity >> All Scrips/Contracts >> Margin
Assume that Rule is ON
Place Order:
| 📋 Ord. | 📊 Seg. | 🔑 Sym | 💱 Buy/Sell | 📦 Qty | 💰 Price | 📅 Exp. Date | 💵 Order Value | ⚙️ System should Refer Max Single Transaction Value | 🟢 Order Status |
|---|---|---|---|---|---|---|---|---|---|
| 1 | NSE-EQ | TCS | Buy | 10 | 1000 | - | 10000 | 8000 (Rule) | Order should get REJECTED |
| 2 | NSE-EQ | ACC | Buy | 10 | 700 | - | 7000 | 8000 (Rule) | Order should get PASS |
| 3 | MCX | GOLD | Buy | 10 | 1200 | 15-SEP-2020 | 12000 | 10000 (Scrip) | Order should get REJECTED |
| 4 | MCX | SILVER | Buy | 10 | 1000 | 15-SEP-2020 | 10000 | 9000 (Rule) | Order should get REJECTED |
| 5 | MCX | NCDEX | Buy | 10 | 1000 | 15-SEP-2020 | 10000 | 12000 (Scrip) | Order should get PASS |
📝 Transaction
Restrict Fresh Order based on Order validity
Description: User can restrict orders based on order validity (i.e., Day, IOC, GTC, AON etc…)
⚙️ Implementation
Custom variables for this rule:
| 🔑 Variable Name | 📦 Variable Type | 📊 Variable Value | ⚙️ Default |
|---|---|---|---|
| Normal order | Multiselect Combo | 0 - select, 1 - Day, 2 - IOC, 3 - EOS, 4 - GTD, 5 - GTC, 6 - GTT, 7 - AON | 0 |
| Spread Order | Multiselect Combo | 0 - select, 1 - Day, 2 - IOC | 0 |
| Multileg order | Multiselect Combo | 0 - select, 1 - Day, 2 - IOC | 0 |
- By default, this rule should be Disable.
- This rule is not applicable for Auction Order, Bulk Deal, Block Deal order types.
- By default all the orders with any validity is allowed however member can select the required validity to restrict order based on order sources and sip combination.
- As per order sources and its associated variable value, system shall allow or disallow order with this validity for particular SIP Combination.
- On Enabling the rule, system should not allow to place fresh, square-off and modification of order on the selected validity of respective variable.
Following are the list of Validity type where system should allow to restrict the order:
| 📋 Validity Type |
|---|
| Day, IOC, EOS, GTD, GTC, GTT, AON |
Validity Restriction Rule is applicable for Normal Order, Spread Order and Multi-Leg Order.
Scenario 1 - Normal Order
| 🔑 Variable Name | 📦 Variable Type | 📝 Business Logic |
|---|---|---|
| Normal Order | DAY- Untick IOC- Tick EOS- Untick GTD- Tick GTC- Untick GTT- Untick AON- Untick | By default, Variable should be disabled. As per example: • System should ALLOW to place Fresh Normal Order in DAY, EOS and GTC Validity type. • System should ALLOW to Modify the Order in DAY, EOS and GTC Validity type. • System should ALLOW to place square-off order in DAY, EOS and GTC Validity type. • System should REJECT the fresh order placed in IOC and GTD validity type. • System should REJECT the order if member modifies the Validity from DAY to IOC. • System should REJECT the order if member modifies the Order Qty of Previously placed IOC, GTD Order. • System should REJECT the order if member modifies the Order Price of Previously placed IOC, GTD Order. • System should REJECT the Square-off Order in IOC and GTD Validity type. • This restriction rule is also applicable for orders placed from Bulk Order Entry. • System should validate and reject the orders based on the Validity Type configured for respective SIP Combination. • Proper Rejection reason message should be displayed on Order Validity rejection for Normal orders. |
Scenario 2 - Multi Leg Order
| 🔑 Variable Name | 📦 Variable Type | 📝 Business Logic |
|---|---|---|
| Multi-Leg Order | DAY- Tick IOC- Un-Tick | By default, this variable should be disable. As per example: • System should allow to place 2 Leg and 3 Leg Orders in IOC Validity. • System should Reject 2 Leg and 3 Leg Orders placed in DAY Validity. • Multileg Order should get rejected in case any one of the Leg gets rejected. • Multi Leg order should get rejected for DAY Validity while placing Fresh order, on Modification of order and on placing Square-off Order. • This restriction rule is also applicable for orders placed from Bulk Multileg Order Entry. • System should validate and reject the orders based on the Validity Type configured in Multileg Order variable type for respective SIP Combination. • Proper Rejection reason message should be displayed on Order Validity rejection for Multileg orders. |
Scenario 3 - Spread Order
| 🔑 Variable Name | 📦 Variable Type | 📝 Business Logic |
|---|---|---|
| Spread Order | DAY- Tick IOC- Un-Tick | By default, this variable should be disable. As per example: • System should allow to place Spread Orders in IOC Validity. • System should Reject Spread Orders placed in DAY Validity. • Spread orders should get rejected in case any one of the Leg gets rejected. • Spread order should get rejected for DAY Validity while placing Fresh order, on Modification of Spread order and on placing Spread Square-off Order. • System should validate and reject the orders based on the Validity Type configured in Spread Order variable type for respective SIP Combination. • Proper Rejection reason message should be displayed on Order Validity rejection for Spread Orders. |
Validation:
- System should validate the Rules based on the SIP Combination as per the sequence priority define in the Sequence priority master for Segment and Instrument.
- By default, all the Transaction Order Validity Restriction Rules should be disable.
- This rule is applicable for Cash, Derivative, Currency and commodity segments and not applicable for MF and IPO segments.
Restrict Fresh Order based on Order Type
Description: User can restrict orders based on order types and every Order type will be mentioned in the variables (i.e., RL LIMIT, SL LIMIT, RL MKT, SL MKT, Bulk deal, Block deal, Auction Order).
⚙️ Implementation
By default, this rule should be Disable (i.e. Default Variable value as BLANK).
On Enabling the rule, system should not allow to place fresh and modification of order on the selected 'Order Type' of respective variable.
System should allow to select Multiple Order Type through multi select combo option.
Following are the list of Order Type where system should allow to restrict the order:
| 📋 Order Type |
|---|
| Regular Limit | Regular Market | Stop-Loss Limit | Stop-Loss Market Block Deal | Bulk Deal | Auction Order |
Following are the list of Applicable Order Type and Applicable Segments:
| 📋 Order Entry Mode | 📦 Applicable Order Type | 📊 Applicable Segments |
|---|---|---|
| Normal Order | Regular Limit Regular Market Stop-Loss Limit Stop-Loss Market Block Deal Bulk Deal Auction Order | Applicable for all All Segments whereas Auction Order, Block Deal and Bulk Deal Order types are applicable only for Equity segments. |
| Multi-Leg Order | Regular limit Regular Market | Applicable for Derivative, Currency and Commodity Segments |
| Spread Order | Regular limit Regular Market | Applicable for Derivative, Currency and Commodity Segments |
Order Type Restriction Rule is applicable for Normal Order, Spread Order and Multi-Leg Order.
Normal Order Validation
Assume member has set following configuration in the system for an SIP Combination in Risk Rule Template:
| 🔑 Variable Name | 📦 Variable Value | 📝 Business Logic |
|---|---|---|
| Normal Order | Regular Limit- Un-Tick Stop-Loss Limit- Un-Tick Block Deal- Un-Tick Auction Order- Un-Tick Regular Market- Tick Stop-Loss Market- Tick Bulk Deal- Tick | • Check box option should be provided against each items of Normal Order Variable. • By default, all the checkbox option should be Un-ticked. • System should allow to PASS the normal order for the order type which is Un-ticked and should REJECT the normal order for the order type which is Ticked Assume, as per the member configuration set in Variable Value Column: • System should allow to PASS Normal order placed for Order Type: Regular Limit, Stop-Loss Limit, Block Deal, Auction Order • System should REJECT the Normal Order placed for Order Type: Regular Market, Stop-Loss Market, Bulk Deal • Fresh Order placed in the Order Type which is selected should get REJECTED (i.e. Regular Market, Stop-Loss Market and Bulk Deal as per example). • Modification of Order (i.e. either of Qty, Price) in the restricted order type should get REJECTED. • System should REJECT the order type modification of Normal order from 'RL Limit' to 'RL Market' or 'SL Market' as per configuration set. • System should REJECT the order type modification of Normal order from 'SL Limit' to 'SL Market' (or) 'RL Market' as per configuration set. • This restriction rule is also applicable for normal orders placed from Bulk Order Entry. • System should validate and reject the orders based on the Order Type configured for respective SIP Combination. • Proper Rejection reason message should be displayed on Order Type rejection for Normal orders. |
Multi-Leg Order Validation
Assume member has set following configuration in the system for an SIP Combination in Risk Rule Template:
| 🔑 Variable Name | 📦 Variable Value | 📝 Business Logic |
|---|---|---|
| Multi-Leg Order | Regular Limit- Un-Tick Regular Market- Tick | • Check box option should be provided against each items of Multi-Leg Order Variable. • By default, all the checkbox option should be Un-ticked. • System should allow to PASS the Multi-Leg order for the Order Type which is Un-ticked and should REJECT the Multi-Leg order for the Order Type which is Ticked Assume, as per the member configuration set in Variable Value Column: • Fresh Multi-Leg Order (i.e 2-Leg or 3-Leg) placed in Order Type- 'Regular Limit' should get PASSED. • Fresh Multi-Leg order (i.e 2-Leg or 3-Leg) placed in Order Type- 'Regular Market' System should REJECT. • System should REJECT the Modification of Multi-Leg order (i.e 2-Leg or 3-Leg) placed in the Order Type which is selected (i.e. Regular Market order as per example). • This restriction rule is also applicable for orders placed from Bulk Multileg Order Entry. • System should validate and reject the orders based on the Order Type configured in Multileg Order variable type for respective SIP Combination. • Proper Rejection reason message should be displayed on Order Type rejection for Multileg orders. |
Spread Order Validation:
| 🔑 Variable Name | 📦 Variable Value | 📝 Business Logic |
|---|---|---|
| Spread Order | Regular Limit- Tick Regular Market- Un-Tick | • Check box option should be provided against each items of Spread Order Variable. • By default, all the checkbox option should be Un-ticked. • System should allow to PASS the Spread Order for the Order Type which is Un-ticked and should REJECT the Multi-Leg order for the Order Type which is Ticked Assume, as per the member configuration set in Variable Value Column: • Fresh Spread Order placed in Order Type- 'Regular Limit' should get REJECT. • Fresh Spread order placed in Order Type- 'Regular Market' System should REJECT. • System should REJECT the Modification of Spread order placed in the Order Type which is selected (i.e. Regular Limit order as per example). • This restriction rule is also applicable for Spread orders placed from Multileg Order Entry and bulk Multi-Leg Order Entry. • System should validate and reject the orders based on the Order Type configured in Spread Order variable type for respective SIP Combination. • Proper Rejection reason message should be displayed on Order Type rejection for Spread orders. |
Validation:
- System should validate the Rules based on the SIP Combination as per the sequence priority define in the Sequence priority master for Segment and Instrument.
- By default, all the Transaction Order Type Restriction Rules should be disable.
- This rule is applicable for Cash, Derivative, Currency and commodity segments and not applicable for MF and IPO segments.
- This rule should get validated for FRESH buy/sell orders placed from different mode of order entries like Normal Order Entry, Multi-Leg Order Entry, Spread Order Entry, Bulk Order Entry and Bulk Multileg Order Entry.
- This rule should get validated for MODIFICATION of buy/Sell order from different mode of order entries like Normal Order Entry, Multi-Leg Order Entry, Spread Order Entry, Bulk Order Entry and Bulk Multileg Order Entry.
- Proper rejection reason should be displayed to the user
Restrict Order
Description: Restrict Order rule is used to restrict the orders, for example, restrict fresh buy or sell order.
⚙️ Implementation
By default, this rule should be Disable (i.e. Default Variable value as OFF).
On Enabling the rule, system should not allow to place Fresh Buy/Sell, Today's Buy/Sell Position Square off, Uploaded Buy/Sell Position Square off.
Rules Name: Restrict Order
| 🔑 Variable Name | 📦 Variable Type | 📊 Variable Value | ⚙️ Default |
|---|---|---|---|
| Fresh Buy | Toggle | Enable / Disable | disable |
| Fresh Sell | Toggle | Enable / Disable | disable |
| Today's Buy Position Square off | Toggle | Enable / Disable | disable |
| Today's Sell Position Square off | Toggle | Enable / Disable | disable |
| Uploaded Buy Position Square off | Toggle | Enable / Disable | disable |
| Uploaded Sell Position Square off | Toggle | Enable / Disable | disable |
- Fresh Buy enable means that Fresh Buy Order is not allowed.
- Fresh Sell enable means that Fresh Sell Order is not allowed.
- Today's Buy Position Square off enable means that Todays Buy Position square off is not allowed. System will restrict the today's buy position square off (i.e., Sell) order against today's buy position
- Today's Sell Position Square off enable means that Todays Sell Position square off is not allowed. System will restrict the today's sell position square off (i.e., Buy) order against today's sell position.
- Uploaded Buy Position Square off enable means that Uploaded (Expiry) Buy Position square off is not allowed. System will restrict the Uploaded buy position square off (i.e., Sell) order against Uploaded buy position
- Uploaded Sell Position Square off enable means that Uploaded (Expiry) Sell Position square off is not allowed. System will restrict the Uploaded sell position square off (i.e., Buy) order against Uploaded sell position
Validation
Fresh Buy Qty to be considering on following action:
- While Placing Buy order in any Scrip where Sell Open Position is Not available.
- While Placing Buy Qty greater than the Sell Open Position Qty.
- While Modifying Buy Pending Order Qty greater than the Previous Order Qty
Fresh Sell Qty to be considering on following action:
- While Placing Sell Order in any Scrip where Buy Open Position is Not available.
- While Placing Sell Qty greater than the Buy Open Position Qty.
- While Modifying Sell Pending Order Qty greater than the Previous Order Qty.
Today's Buy- Square-off to be consider on following action:
- While Placing Sell Order in any Scrip where Buy Open Position is available.
Today's Sell- Square-off to be consider on following action:
- While Placing Buy Order in any Scrip where Sell Open Position is available.
Uploaded Buy- Square-off to be consider on following action:
- While Placing Sell Order in any Scrip where Buy Open Uploaded Position is available.
Uploaded Sell- Square-off to be consider on following action:
- While Placing Buy Order in any Scrip where Sell Open Uploaded Position is available
Example
Assume having following data for User-RET1:
- RETK1- NSEEQ-ACC-BUY 10 QTY.
- RETK1- NSE FNO-BANKNIFTY-SELL 1 LOT
Assume the following Rule is ON:
| 🔑 Variable Name | ⚙️ ON/OFF |
|---|---|
| Fresh Buy | ON |
| Fresh Sell | OFF |
| Today's Buy Position Square off | ON |
| Today's Sell Position Square off | ON |
| Uploaded Buy Position Square off | OFF |
| Uploaded Sell Position Square off | ON |
Place Order:
| 📋 Cont | 📊 Seg. | 🔑 Sym | 💱 Buy/Sell | 📅 Exp. Date | 📦 Qty/lot | 🟢 Order Status |
|---|---|---|---|---|---|---|
| 1 | NSE-EQ | TCS | Buy | - | 2 | Order should get REJECTED against FRESH BUY |
| 2 | NSE-EQ | RELIANCE | Sell | - | 1 | Order should get PASS against FRESH SELL |
| 2 | NSE-EQ | ACC | Sell | - | 1 | Order should get Rejected against TODAY'S BUY POSITION SQUARE OFF |
| 3 | NSE-FNO | BANKNFITY | BUY | 15-SEP-2020 | 1 | Order should get Rejected against UPLOADED SELL POSITION SQUARE OFF |
Restrict Fresh Order Based on LTP Based Price Band
Description: LTP Based Price Band is used to restrict the order in which the Order Price is out of derived Price range based on the LTP of respective scrips. In case, if LTP is not available for any of the scrip - then system shall consider the Last Close Price of the respective scrip to derive the price range.
Applicability: This rule is applicable for Cash, Derivative, Currency and Commodity Segment and not applicable for OFS, IPO and MF Segments.
Implementation
- If Rule is ON – System should Validate, and Reject the Order based on the LTP-Based Price Band.
- If Rule is OFF – System should not Validate the Order against LTP-Based Price Band.
Validation
- System should not validate the Order from the scrip against this LTP Price Band rule if LTP of the scrip doesn't falls under the 'Lower LTP' and 'Upper LTP' value defined in this rule.
- System should accept the order if Order Price is within the derived Price range based on current LTP of the scrip and defined LTP Price Band %.
- In case of Buy Order – System should consider the Buy Lower Range for minimum and Buy Upper Range for maximum price.
- In Case of Sell Order- System should consider the Sell Lower Range for minimum and Sell Upper Range for maximum price.
- System should reject the order if Order Price is out of derived price range.
Configuration Example
Assume following data defined in LTP Based Price Band:
| 📋 Cont | 🏢 Seg. | 📊 Instrument | 📈 Range Start | 📈 Range End | 💰 Buy Lower Range | 💰 Buy Upper Range | 💰 Sell Lower Range | 💰 Sell Upper Range |
|---|---|---|---|---|---|---|---|---|
| 1 | NSE-EQ | EQUITY | 2000 | 4000 | 5 | 20 | 6 | 40 |
Assume that Rule is ON
Place Order: TCS LTP Price: 3589.65
| 📊 Calculation | 📈 Percentage | 💰 Formula | 💰 Derived Value |
|---|---|---|---|
| Buy Lower Range | 5% | =3589.65*5%= 179.4825 | =3589.65 - 179.4825 = 3410.1675 |
| Buy Upper Range | 20% | =3589.65*20%=717.93 | =3589.65 + 717.93 = 4307.58 |
| Sell Lower Range | 6% | =3589.65*6%=215.379 | =3589.65 - 215.379 = 3374.271 |
| Sell Upper Range | 40% | =3589.65*40%=1435.86 | =3589.65 + 1435.86 = 5025.51 |
Order Status: