Home

Pre-Trade Risk Check Module User Manual

image

Contents

1. 15 Pre Trade Risk Check Module User Manual memory_config conf memory properties The name of a configuration file that contains values used to allocate internal tables For more information about memory options see Memory File cpu_config conf cpu properties The name of configuration file that contains options to set up affinity masks dont_lock_memory Indicates that pages mapped into the address space of the risk check module process should not be locked This parameter is used on Linux platform only infinite_orderid Indicates that an unlimited number of CIOrdID can be generated to forward trader orders to CME Globex By default the number of ClOrdID is limited to 1073736823 no_order_time_check Specifies whether value of TransactTime 60 tag should be checked use_recorded_order_id_map The name of the order mapping file holding information about orders For more information see Order Mapping File 16 Pre Trade Risk Check Module User Manual Contact us sales btobits com Global Headquarters US Client Support and Delivery Center EPAM Systems Inc 41 University Drive Suite 202 Newtown PA 18940 Phone 1 267 759 9000 Fax 1 267 759 8989 17
2. Table 3 User Limits Limit Description ProhibitTrading Turns on off the trading activity for the User MaxOrderQty Specifies the maximum order quantity for particular User MaxDailyLoss Specifies maximum amount of daily loss for particular User DuplicateOrderThrottle Specifies how many duplicate orders User is permitted to send per second Two orders are considered to be duplicate as long as they have the same Pre Trade Risk Check Module User Manual e Security value tag 107 e Order Side value tag 54 e Price value taken from a market data file For more information about market data file see Market Data File e User name tag 10001 MaxOrderRate Specifies how many orders User is allowed to send per second Table 4 Instrument Limits Limit Description MaxNetPosition Specifies the maximum allowed difference between total open long and open short positions on a given trading day for certain User MaxShortPosition Specifies the maximum permitted short position amount for certain instrument for certain User MaxLongPosition Specifies the maximum permitted long position amount for certain instrument for certain User Important MaxOrderQty set at User level overrides MaxOrderQty set on Account level The A override means that the risk check module will check this limit at User level and will ignore Account See Relationship between Account
3. OFF Account A2 Instrument ES MaxLongPosition Value 0 Account A2 Users U3 Account A2 User U3 ProhibitTrading Value false Account A2 User U3 MaxOrderQty State OFF Account A2 User U3 MaxOrderQty Value 0 Account A2 User U3 MaxDailyLoss State OFF Account A2 User U3 MaxDailyLoss Value 0 00 Account A2 User U3 DuplicateOrderThrottle State OFF Account A2 User U3 DuplicateOrderThrottle Value 0 Account A2 User U3 MaxOrderRate State OFF Account A2 User U3 MaxOrderRate Value 0 Pre Trade Risk Check Module User Manual Account A2 User U3 Instruments NQ Account A2 User U3 Instrument NQ MaxNetPosition State OFF Account A2 User U3 Instrument NQ MaxNetPosition Value 0 Account A2 User U3 Instrument NQ MaxShortPosition State OFF Account A2 User U3 Instrument NQ MaxShortPosition Value 0 Account A2 User U3 Instrument NQ MaxLongPosition State OFF Account A2 User U3 Instrument NQ MaxLongPosition Value 0 Risk Check Module Configuration The configuration of the risk check module is stored in conf risk_check_engine properties Table 5 shows all supported parameters Table 5 Risk Check Module configuration parameters Option Default Description Value RiskEngine LogLevel INFO Specifies logging level Valid values FOLLOW_FIXENGINE FATAL ERROR WARNING INFO DEBUG RiskEngine VerboseLog false Specifies whether more detailed i
4. the following limits at this level e Account Limits e Instrument Limits Pre Trade Risk Check Module User Manual Table 1 Account Limits Limit Description ProhibitTrading Turn on off the trading activity for the account MaxOrderQty Specifies the maximum order quantity for the whole Account MaxDailyLoss Specifies maximum amount of daily loss for the whole Account Table 2 Instrument Limits Limit Description MaxNetPosition Specifies the maximum allowed difference between total open long and open short positions on a given trading day for the whole Account MaxShortPosition Specifies the maximum permitted short position amount for certain instrument for the whole Account MaxLongPosition Specifies the maximum permitted long position amount for certain instrument for the whole Account User Level Limits The User level allows to determine additional risk limits for a User working with certain Account Figure 3 Account and User level limits Account 1 Account Limits ProhibitTrading MaxOrderQty MaxDailyLoss Instrument Limits ShortPosition LongPosition NetPosition Instrument Limits ShortPosition LongPosition NetPosition User Limits ProhibitTrading MaxOrderQty MaxDailyLoss DuplicateOr der Throttle MaxOrderRate You can set the following limits at this level e User Limits e Instrument Limits
5. current version of the risk check module supports 1 trader session only exchanges 1 The total number of exchange sessions Please note that the current version of the risk check module supports 1 exchange session only risk_engine_config conf risk check engine properties The name of a configuration file that contains the risk check module configuration parameters For more information see Risk Check Module Configuration fix engine config conf engine properties The name of the configuration file that contains FIX sessions configuration exchange_sessions conf exchange_session properties The name of the configuration file that contains CME Global session configuration options For more information see CME Global Session Configuration trader_sessions conf trader_session properties The name of a configuration file that contains trader sessions configuration options For more information see Trader Session Configuration limits conf limits properties The name of the configuration file that contains pre defined risk rules lock_file rcm lock The name of a temporary lock file internally used by the risk check module pid_file rcm pid The file name that contains the current PID of the risk check module process tmpfs The folder name internally used by the risk check module shared_data The folder name that contains engine log file
6. Al User Ul MaxOrderQOty State OFF Account Al User Ul MaxOrderQty Value 2 Account Al User Ul MaxDailyLoss State OFF Account Al User Ul MaxDailyLoss Value 200 00 Account Al User Ul DuplicateOrderThrottle State OFF Account Al User Ul DuplicateOrderThrottle Value 3 Account Al User Ul MaxOrderRate State ON Account Al User Ul MaxOrderRate Value 4 Account Al User Ul Instruments NO ES Account Al User U1 Instrument NQ MaxNetPosition State OFF Account Al User U1 Instrument NQ MaxNetPosition Value 10 Account Al User U1 Instrument NQ MaxShortPosition State OFF Account Al User U1 Instrument NQ MaxShortPosition Value 10 Account Al User U1 Instrument NQ MaxLongPosition State OFF Account Al User U1 Instrument NQ MaxLongPosition Value 10 Account Al User U1 Instrument ES MaxNetPosition State OFF Account Al User Ul Instrument ES MaxNetPosition Value 10 Account Al User U1 Instrument ES MaxShortPosition State OFF Account Al User Ul Instrument ES MaxShortPosition Value 10 Pre Trade Risk Check Module User Manual OFF 10 Account Al User Ul Instrument ES MaxLongPosition State Account Al User Ul Instrument ES MaxLongPosition Value Limits of U2 user Account Al User U2 ProhibitTrading Value false Account Al User U2 MaxOrderQty State OFF Account Al User U2 MaxOrderQty Value 0 Account Al User U2 MaxDailyLoss State OFF Account Al User U2 MaxDailyLoss Value 0 00 A
7. FIX gateway server providing order routing capabilities and pre trade risk check based on predefined set of limits This is a daemon process that communicates with traders and CME Globex platforms Figure 1 Risk Check Module A r Ny Pre Trade HAY Risk Check M i Module Traders Risk check module relies on FIX protocol as a communication layer between Trader s Order Entry System and CME Globex The following messages are supported e New Order Single MsgType D e Order Cancel Request MsgType F e Order Cancel Replace Request MsgType G e Execution Report MsgType 8 e Order Cancel Reject MsgType 9 E Note Risk check module is fully compliant with workflow supported by CME Globex Link FIX 4 2 interface The risk check module ensures that traders operate according to pre trade limits specified by a risk administrator A Important All pre trade risk checks are performed with minimal latency impact How to Configure Risk Check Module Workflow Configure the risk check module See Risk Check Module Configuration for more information Configure trader session s See Trader Session Configuration for more information Configure session s to exchage See CME Globex Session Configuration for more information SN E Configure pre trade risk limits See Risk Limits Configuration for more information Pre Trade Risk Limits The pre trade risk limits is intended to restrict trading
8. Loss Value OFF 200 00 Each limit in the configuration file has two parameters State and Value The State parameter specifies whether given limit is enabled and should be checked The value OFF disables given limit value so it will not be checked The Value parameter contains actual value of certain risk limit The ProhibitTrading has only Value parameter Instruments which A1 account is allowed to trade and relevant limits Account Al Instruments NQ ES Account Al Instrument NQ MaxNetPosition State ON Account Al Instrument NQ MaxNetPosition Value 10 Account Al Instrument NQ MaxShortPosition State OFF Account Al Instrument NQ MaxShortPosition Value 10 Account Al Instrument NQ MaxLongPosition State OFF Account Al Instrument NQ MaxLongPosition Value 10 Account Al Instrument ES MaxNetPosition State ON Account Al Instrument ES MaxNetPosition Value 11 Account Al Instrument ES MaxShortPosition State OFF Account Al Instrument ES MaxShortPosition Value 100 Account Al Instrument ES MaxLongPosition State OFF Account Al Instrument ES MaxLongPosition Value 100 E Note List of supported instruments is stored in conf instruments dat file See Instruments File for more information List of Users allowed to trade on behalf of A1 account Account Al Users Ul U2 Limits of U1 user Account Al User Ul ProhibitTrading Value false Account
9. Pre Trade Risk Check Module User Manual Version 1 2 2015 08 11 www b2bits com BeBITs lt tJam gt Pre Trade Risk Check Module User Manual Table of Contents OVERVIEW bets OS 3 How to Configure Risk Check Module Workflow ccccccssccssssesssscesssecssseecsseeessaesessuecseeeecsaseseauecseseeceeeesaeeessuesseaeesseees 3 Pre Trade Risk limits cecciseceesuss savicciesaedessosaguciessgeessiacaucavessuxdsovagauunrssasetesvacsuesesogsndenssntgvasseasuten saptveaessa Vasesonndessbingeusebesceds 3 Account Level LIMIES EE EE a tai 4 User Level Limitada drid nta 5 Relationship between Account and User Levels ccccccccesssecesseneececseaeeceeceaaeceeeeaaeeeeeesaeceeeeaaeeeeeeaaeceeseaaeeeeseaeeseeeaas 6 Workflow to Check Limits icon idilio 7 Risk Limits Configuration cccccccesccccssecesssecssscecseeessaeessssecseeeessaessssaecseeeeceseeessueesessesseeecsaeesssuessessecseeeseaeessauesseneesseees 7 Risk Check Module Configuration escort eii 10 CME Globex Session Configuration ita 12 Trader Session Configuration uvaner exeecesancoeevh dica 12 MEL A 13 IAstruments li A A ce 13 Order Mapping File wissciicsesscciesesccivessaccuvessaccvuvveanccuvveccvuvseaccueyveacevevveaccuevveacecevuenaceusveascvevveancuuvveacevevvenccueyveacevevvaaccvevvess 13 Memory He 13 A NS 14 Command Line OPtiONs viii did idad 15 CONTACT US se 17 Pre Trade Risk Check Module User Manual Overview The Pre Trade Risk Check Module RCM is a
10. Pre Trade Risk Check Module User Manual Linux StackTraceOnSigUSR2 false Specifies whether to output a stack trace when SIGUSR2 signals is received This parameter is used on Linux platform only Rap port 9002 Specifies RAP listen port Rap ListenInterface 127 0 0 1 Specifies RAP local IP address to bind to CME Globex Session Configuration The configuration of CME Globex session is stored in conf exchange_session properties file The following example shows how to configure a session Specifying a session name to be configured Exchange Sessions MYCME Exchange Sessions is used to group configuration parameters of a certain session You can use any name for the parameter value Indicate whether the session is intended to connect to CME Globex Exchange Session MYCME CME true Specify the local time to start and terminate CME Globex session Exchange Session MYCME StartTime 04 05 Exchange Session MYCME TerminateTime 03 55 Specify the rest of options that are related to FIX protocol HBI 30 E Exchange Session MYCM Exchange Session MYCME Host 127 0 0 1 Exchange Session MYCME Port 10007 Exchange Session MYCME SenderCompID RISKCHECK Exchange Session MYCME TargetCompID CME SenderLocationID US NY SenderSubID 3C2 TargetSubID G Logon UserName AAA Exchange Session MYCM Exchange Session MYCM Exchange Session MYCM Eo da E
11. activity taking place on a given day It is possible to restrict activities of one or multiple traders at the same time Risk check module can process new orders order cancelation or order modification requests Pre Trade Risk Check Module User Manual When the risk check module receives a new order it decides whether to forward it to CME Globex by checking all risk limits associated with this order If the order breaches any of limits it will be rejected The same workflow is supported for order cancelation and modification requests You can configure the risk limits at Account and User levels Account is associated with FIX Account 1 tag and defines highest level of risk limits hierarchy Orders with value of Account 1 tag different from what is defined in Risk check module settings will be rejected Each Account can be associated with multiple Users Name of each User should be unique among all Accounts Name of User is communicated via custom FIX tag User 10001 Figure 2 shows Account and User level hierarchy Important Orders with value of User 10001 tag different from what is defined in the risk check module settings will be rejected Figure 2 Account and User levels Account 1 Account Limits Instrument Limits User Limits Instrument Limits User Limits Instrument Limits Account Level Limits The Account level allows you to set risk limits for orders associated with the same trading account You can set
12. ample 4 85 5 1 GEZ9 C9375 The name of the market data file with actual data is defined in the selector file market data mkt selector dat The risk check module use this file to load actual market data periodically every X minutes Instruments File The list of supported instruments is stored in conf instruments dat file in which instrument names are separated with a newline character Order Mapping File The risk check module uses its own unique CIOrdID to forward orders to CME Globex and therefore it keeps information about relationship between incoming orders received from traders and outgoing orders forwarded to CME Globex Order mapping is preserved in the file with the following naming format orderids lt date gt lt timestamp gt dat A new order mapping file is created at the beginning of each new trading day Memory File Max amount of data structures the risk check module can operate are stored in conf memory properties 13 Pre Trade Risk Check Module User Manual Table 6 Memory parameters RatioToOrderBookSize Option Default Description Value RiskEngine Tables MaxAccounts 5000 Specifies the total number of accounts on which the risk check module can operate RiskEngine Tables MaxOrderBookSize 100000 Specifies the total number of orders on which the risk check module can operate RiskEngine Tables ClordlDMap RelativeCapacity 2 Specifies a value used to define size of ClOrdID mapping
13. and User Levels for more information Relationship between Account and User Levels If you set only some of limits at User level the rest of limit values will be copied from respective limits that are set at Account level Figure 4 shows this case Figure 4 Copy Override Account 1 Pr ohibitTrading MaxOrderQty MaxDailyLoss Override User Limits Pr ohibitTrading MaxOrderQty 30 MaxDailyLoss DuplicateOrderThrottle MaxOrderRate 2 false The MaxOrderQty is processed in a different way When you set MaxOrderQty value at User level its value overrides corresponding Account level value This means that when a new order is received risk check module checks MaxOrderQty value at User level only It ignores Account level limit For example if you set MaxOrderQty to 10 at Account level and set MaxOrderQty to 30 at User level then the risk check module will forward all incoming orders to CME Globex as long as their quantity value do not exceed 30 Pre Trade Risk Check Module User Manual Workflow to Check Limits When a new order is received the risk check module does the following 1 Checks all limits at Account level 2 Checks all limits at User Level Risk Limits Configuration The configuration of pre trade risk limits is stored in conf limits properties file You can modify this file directly or via RCM Manager The following example illustrates how to configure the risk limits at Accou
14. ccount Al User U2 DuplicateOrderThrottle State OFF Account Al User U2 DuplicateOrderThrottle Value 7 Account Al User U2 MaxOrderRate State OFF Account Al User U2 MaxOrderRate Value 0 Account Al User U2 Instruments NQ Account Al User U2 Instrument NQ MaxNetPosition State ON Account Al User U2 Instrument NQ MaxNetPosition Value 10 Account Al User U2 Instrument NQ MaxShortPosition State OFF Account Al User U2 Instrument NQ MaxShortPosition Value 0 Account Al User U2 Instrument NQ MaxLongPosition State OFF Account Al User U2 Instrument NQ MaxLongPosition Value 0 The account A2 is configured in the same way Account A2 ProhibitTrading Value false Account A2 MaxOrderQty State OFF Account A2 MaxOrderQty Value 0 Account A2 MaxDailyLoss State OFF Account A2 MaxDailyLoss Value 0 00 Account A2 Instruments NQ ES Account A2 Instrument NQ MaxNetPosition State OFF Account A2 Instrument NQ MaxNetPosition Value 0 Account A2 Instrument NQ MaxShortPosition State OFF Account A2 Instrument NQ MaxShortPosition Value 0 Account A2 Instrument NQ MaxLongPosition State OFF Account A2 Instrument NQ MaxLongPosition Value 0 Account A2 Instrument ES MaxNetPosition State OFF Account A2 Instrument ES MaxNetPosition Value 0 Account A2 Instrument ES MaxShortPosition State OFF Account A2 Instrument ES MaxShortPosition Value 0 Account A2 Instrument ES MaxLongPosition State
15. d dd Hd Exchange Session MYCM Exchange Session MYCME Logon Password BBB Exchange Session MYCME Logon ApplicationSystemName App Exchange Session MYCME Logon TradingSystemVersion ver dd dad Exchange Session MYCME Logon ApplicationSystemVendor vendor Trader Session Configuration The configuration of a trader s session is stored in conf trader_session properties The following example shows how to configure the session Specify a session name to be configured Trader Sessions TRADERO 12 Pre Trade Risk Check Module User Manual Trader Sessions is used to group configuration parameters of a certain session You can use any name for the parameter value Specify default parameters Trader Sessions Default SenderCompID RISKCHEK Trader Sessions Default Version FIX42 Trader Sessions Default StartTime 03 05 Trader Sessions Default TerminateTime 02 55 Specify specific parameters for the TRADERO session Trader Session TRADERO TargetCompID TRADERO Market Data File There are two files where you can define prices e market data market data 1 dat e market data market data 2 dat Each market data file contains Bid and Ask prices for every supported security The file has the following format lt bid gt lt ask gt lt security gt The records are separated with a newline character A security value must correspond to the value of Security Desc 107 tag For ex
16. nformation should be logged RiskEngine LoadOrderFileOnStart true Specifies whether information about orders should be loaded from an order mapping file specified by command line option use recorded order id map For more information about the order mapping file see Order Mapping File RiskEngine LoadPersistentFIXLogOnStart true Specifies whether aggregated risk should be recalculated at risk module start reading FIX messages from FIX log files RiskEngine SendVerboseOrderRejects false Specifies level of details provided in tag 58 when an incoming order is rejected RiskEngine EvictFinishedOrdersFromBook true Specifies whether information about order should be removed once it is cancelled rejected filled RiskEngine EvictFinishedClordIDMapping true Specifies whether ClOrdID mapping details should be removed once order is cancelled rejected filled RiskEngine KeepFilledClordIDMapping true Specifies whether information about filled orders should be kept The parameter is checked if RiskEngine EvictFinishedClordIDMapping true Value of true is recommended for correct trade busts processing 10 Pre Trade Risk Check Module User Manual RiskEngine OrderLatencyMeasurement false Specifies whether to collect information about order processing latency RiskEngine CME UseNextExpectedMsgSeqNum true Specifies whether to use tag 789 from Logout message to get the next val
17. nt and User levels Figure 5 Example of risk limits configuration ProhibitTrading MaxOrderQty MaxDailyLoss A1 false OFF 2 OFF 200 Instrument MaxNetPosition MaxShortPosition MaxLongPosition NQ ON 10 OFF 10 ON 11 ES ON 11 OFF 100 OFF 100 U1 ProhibitTrading MaxOrderQty MaxDailyLoss DuplicateOrderThrottle MaxOrderRate false OFF 2 OFF 200 OFF 3 ON 4 Instrument MaxNetPosition MaxShortPosition MaxLongPosition NQ OFF 10 OFF 10 OFF 10 ES OFF 10 OFF 10 OFF 10 U2 ProhibitTrading MaxOrderQty MaxDailyLoss DuplicateOrderThrottle MaxOrderRate false OFF 0 OFF 0 OFF 7 OFF 0 Instrument MaxNetPosition MaxShortPosition MaxLongPosition NQ OFF 10 OFF 10 OFF 10 A2 ProhibitTrading MaxOrderQty MaxDailyLoss false OFF 0 OFF 0 Instrument MaxNetPosition MaxShortPosition MaxLongPosition NQ OFF 0 OFF 0 OFF 0 ES OFF 0 OFF 0 OFF 0 U3 ProhibitTrading MaxOrderQty MaxDailyLoss DuplicateOrderThrottle E O false OFF 0 OFF 0 OFF 0 OFF 0 Instrument MaxNetPosition MaxShortPosition MaxLongPosition NQ OFF 0 OFF 0 OFF 0 Configuration matching shown on Figure 5 will look so List of account levels to be configured Accounts Al A2 Limits of A1 account Account Al ProhibitTrading Value false Account A1l MaxOrderQty State OFF Pre Trade Risk Check Module User Manual Account Al MaxOrderQty Value 2 Account Al MaxDailyLoss State Account Al MaxDaily
18. table TableSize RiskEngine Tables MaxOrderBookSize RiskEngine Tables ClordIDMap RelativeCapacity RatioToOrderBookSize RiskEngine Tables OrderIDReserveForUserCancel Reserved RiskEngine Tables MaxNbboSymbols Reserved CPU File The risk check module allows specifying CPU level parameters that are stored in conf cpu properties file Table 7 CPU level parameters Option Default Description Value PinProcessTo CPUMask 0 Specifies CPU affinity of the risk check module process The CPU affinity is represented as a bitmask with the lowest order bit corresponding to the first logical CPU and the highest order bit corresponding to the last logical CPU The value O indicates that taskset is used to set CPU affinity TraderThreads ParallelRiskCheck false Specifies whether to perform risk checks concurrently TraderThreads RecvSpin none Specifies which type of synchronization object to use Valid values none SF sockets EpollTCPThreads CPUMask 0 Specifies CPU affinity for a dedicated thread where the system function epoll is used EpollTCPThreads RecvSpin none Specifies which type of synchronization object to use Valid values none SF sockets 14 Pre Trade Risk Check Module User Manual Command Line Options Table 8 Command line options Option Default Value Description traders 1 The total number of trader sessions Please note that the
19. ue of tag 34 expected by CME Globex RiskEngine ServiceStartTime 03 00 Specifies the FIX sessions start time local time RiskEngine ServiceStopTime 02 00 Specifies the FIX sessions stop time local time RiskEngine StaleOrderMistimeSeconds 60 Specifies time interval defining stale order If the difference between the current UTC time and time taken from tag 60 in New Order message is greater than the supplied parameter value then the risk check module rejects such order Note that value O disables this parameter Exchange Sessions Reconnectinterval 10 Specifies the time interval between reconnection attempts when restoring communications link StorageType persistent Specifies a storage type to be used Valid values Value Decription persistant File storage slow and safe persistentCached Improved file storage fast and safe persistentMM Memory mapped file storage fast and safe transient Memory storage quick but angerous null simple storage that does not store anything Linux StackTraceOnFaults false Specifies whether to output a stack trace when SIGSEGV or SIGBUS signals are received This parameter is used on Linux platform only Linux StackTraceOnAbort false Specifies whether to output a stack trace when SIGABRT signals is received This parameter is used on Linux platform only 11

Download Pdf Manuals

image

Related Search

Related Contents

Sun Blade X6250 Server Module Embedded Lights Out Manager  DA-HDTV-SDI USER MANUAL HDMI/DVI to SDI CONVERTER w/o  Stanislas Carré de Malberg  PCI Windows Driver Software User`s Manual  Cobalt Aquatics E-X-T Canister Filter Owner`s Manual PDF  Bryant 312AAV Furnace User Manual  LG DH3130S home cinema system  Service  

Copyright © All rights reserved.
Failed to retrieve file