Hello All…
I’ve been trying to figure this out on my own, but I have too much to get done before year end…
Here’s what I need to do in my industry lingo…
“We need to start booking the interest by product type… HOWEVER… If we are both Long and Short on the same bond we must net the interest first… “
I have a table with over 8000 records… I have set up everything to make the “book by product type” easy……
My problem is with the netting by condition…
If DINT (Interest Amount earned) is less than 0, we are Short….
If DINT is greater than 0, we are Long…
I need to group by Currency within Security… Ex… F123456, C$… F123456,U$…. etc…. and then Net (Sum) the DINT field… but only where we are Long AND Short on the same security within the same currency….
There may be 10 or 20 records for the same Security/Currency… I’ve played with record counts to get the single record securities and the multiple record securities… But I can’t figure out how to combine the multiple lines while identifying what one to net…
Security Currency DINT
F123456 C$ -100,000.00
F123456 C$ 25,000.00
F123456 C$ 42,000.00 <— Net before combining with the rest of the records
F234567 U$ 5,000,000.00
F234567 U$ 700,000.00 <—- Do not net the two amounts… Just leave as two separate records
I won't confuse the situation by rambling on about what I've tried so far… Let's just say it didn't work!
Any ideas??