Trading Control System with FIFO Based Inventory Calculation