Thursday, 4 June 2009

Continuous Trade Matching Algorithm

If someone wants to go through various OMA(Order Matching Algorithm), one can start with the basic one below from BSE. This is what I worked with during my previous job tenure.
Continuous Trade Matching Algorithm
Intro
If an order arrives in the order book of a security, it may immediately match with a counter-order should the principle of price and time priority allow matching. If the order cannot match, it remains in the order book.
The incoming bid (sequence no.8) matches orders no.6 and 4 as shown below:



Market order in MMTS I (Cash market)
An incoming market order (with no price specified) will match against opposite orders at the best price level only.
The incoming offer (sequence no.9) matches against order no.8 as shown below:
Price - 5645
Traded Volume - 25

The unmatched, residual quantity (15) of order no.9 is withdrawn from the order book.


Market order in MMTS II (Derivative and Commodities markets):

An incoming market order (with no price specified) will match against opposite orders not only at the best price level but at subsequent price levels as well.


The incoming market sell order (sequence no.9) matches against orders at three different price levels as shown below:
Price Traded volume
5645 25
5630 10
5625 5

The incoming market order matches buy orders no.8, 2 and 1 at the limit prices of the orders. In case of order no.1 the unmatched, residual quantity (10) remains in the order book.
The difference between two markets should be noted. That should be it for now.

No comments:

Efficient and Reliable UI automation without Selenium

I have been experiencing satisfaction over UI automation efforts after a half-decade of my work in automation. The reason is new age tools ...