I have a data set and I am looking to extract records where the following paramaters are the same:
CONTRACT_DT
DESK_CD
OFFICE_CD
CONTRACT_QTY
The data should then be matched by Buy/Sell being opposite (ie Buy with Sell and Sell with Buy) and also where the PERIOD_CD is different.
I thought about creating an INDEX for the first part, however I am unsure how to approach the second part.
The aim is to calculate the net position of a data set and then remove trades where the above conditions are met and then re-calculate the net position.