SamuelGuillemet / SEAK

SEAK, emulates a financial broker which allows you to buy and sell stocks at market price, place limit orders inside an order book and get the market data in real time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

implement performance measurements along the pipeline

TheoJ-A opened this issue · comments

Here is an example of log execution:

21:34:34.236 [QFJ Message Processor] DEBUG (pfe_broker.quickfix_server.ServerApplication) - Received message: BeginString=FIX.4.2|BodyLength=112|MsgType=D|MsgSeqNum=201|SenderCompID=user1|SendingTime=20231212-20:34:34.236|TargetCompID=SERVER|ClOrdID=199|HandlInst=2|OrderQty=1|OrdType=1|Side=2|Symbol=ACGL|TransactTime=20231212-20:34:34|CheckSum=144
21:34:34.236 [QFJ Message Processor] DEBUG (pfe_broker.quickfix_server.ServerApplication) - Received new Single Order
21:34:34.238 [order-stream-d7da1e4c-b8ce-4501-a509-59e6ade1259d-StreamThread-1] DEBUG (pfe_broker.order_stream.OrderIntegrityCheckService) - Checking integrity of order {"username": "user1", "symbol": "ACGL", "quantity": 1, "side": "SELL"}
21:34:34.243 [order-stream-d7da1e4c-b8ce-4501-a509-59e6ade1259d-StreamThread-1] DEBUG (pfe_broker.order_stream.OrderIntegrityCheckService) - Market order {"username": "user1", "symbol": "ACGL", "quantity": 1, "side": "SELL"} accepted
21:34:34.244 [pool-2-thread-1] DEBUG (pfe_broker.market_matcher.MarketDataConsumer) - Reading last stock data for ACGL
21:34:34.247 [pool-2-thread-1] DEBUG (pfe_broker.market_matcher.MarketMatcher) - Matching order {"username": "user1", "symbol": "ACGL", "quantity": 1, "side": "SELL"} with market data {"open": 47.2631, "high": 47.342, "low": 47.2258, "close": 47.3, "volume": 1025}
21:34:34.249 [trade-stream-10ba225d-5bdb-4b5f-a791-381070aaf28a-StreamThread-1] DEBUG (pfe_broker.trade_stream.TradeIntegrityCheckService) - Checking integrity of trade {"order": {"username": "user1", "symbol": "ACGL", "quantity": 1, "side": "SELL"}, "symbol": "ACGL", "price": 47.29999923706055, "quantity": 1}
21:34:34.250 [trade-stream-10ba225d-5bdb-4b5f-a791-381070aaf28a-StreamThread-1] DEBUG (pfe_broker.trade_stream.TradeIntegrityCheckService) - Trade {"order": {"username": "user1", "symbol": "ACGL", "quantity": 1, "side": "SELL"}, "symbol": "ACGL", "price": 47.29999923706055, "quantity": 1} accepted
21:34:34.252 [pool-4-thread-1] DEBUG (pfe_broker.quickfix_server.ServerApplication) - Sending message: BeginString=FIX.4.2|BodyLength=84|MsgType=8|AvgPx=47.29999923706055|CumQty=0|ExecID=799|ExecTransType=2|OrderID=199|OrderQty=1|OrdStatus=2|Side=2|Symbol=ACGL|ExecType=2|LeavesQty=0|CheckSum=112

Figure_1

Experiment:

  • 100 Buy request every 100ms
  • 100 Sell request every 100ms

image