For a fill of side , quantity and price at time , with reference price , horizon and the end of the period : the spread capture is ; the adverse-selection cost is ; the inventory P&L is . Summed over fills, with fees, the three add up to the P&L of the fills with the final position marked at .
rs_markout.decomposition.