I am working on an improvement of my company's order allocation system. We run a central Order Management System (OMS) but currently performance attribution from filled orders leaves room for improvement.
I look to understand how other systems handle order and trade allocation.
Example: Asset 'A'
Fill1; buy A 500 shares; avg px x1
Fill2; buy A 300 shares; avg px x2
Fill3; sell A 700 shares; avg px x3
Fill4; sell A 100 shares; avg px x4
One example how a trade could be defined is as follows:
Trade1, avg entry px=x1; avg exit px=x3 Trade2, avg entry px=x2; avg exit px=(2*x3+x4)/3
To compute performance of individual trades (not total performance as that is trivial) would you apply a FIFO-like approach or allocate filled shares and their filled price in a different way? The reason I attempt to break it down is for various reasons, among others TCA and to better analyze algorithm predictive power in detail.
Can you please share how you would approach this issue and if you know what you believe industry standard is? I want to have a better understanding before having it all spec'ed up and implemented by developers.
Edit:
To avoid confusion, my question is not at all related to order matching on the exchange/ecn side, but fill allocation and trade performance attribution on the liquidity taking side.