Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I got a dataset with hava "long" and "short" fields (in red). I need to make them "paird". look at the colored fields and you'll understend how they should be paird together.
I need to add a new field, lets say "PairRecordId" that will hold for each record its pair record.
for example, see the colored records. each pair has the same color. I would like that record with ID 61430 will have in its PairRecordId field the value 61428,
that record ID 61436 will have in its PairRecordId field the value 61433,
and hat record ID 61440 will have in its PairRecordId field the value 61431.
How can i achieve it?
Thanks, Guy
AssetId | MaturityDateTime | StrikePrice | ID | Current Rate | PosType | LongQty | ShortQty | Pos_Result | SettlPrice | long | short | PNL | Symbol | RecordDate |
586 | 12/08/2015 20:00:00.00 |
| 61428 |
| ASF | 7 | 0 | buy | 49 | 7 | 0 | $0.00 | EURUSD | 12/8/2015 19:35 |
586 | 12/08/2015 20:00:00.00 |
| 61430 |
| ASF | 0 | 0 | sell | 31 | 0 | 7 | $0.00 | EURUSD | 12/8/2015 19:37 |
586 | 12/08/2015 20:00:00.00 |
| 61431 |
| ASF | 1 | 0 | buy | 34 | 1 | 0 | $0.00 | EURUSD | 12/8/2015 19:39 |
586 | 12/08/2015 20:00:00.00 |
| 61433 |
| ASF | 0 | 6 | sell | 43 | 0 | 7 | $0.00 | EURUSD | 12/8/2015 19:40 |
586 | 12/08/2015 20:00:00.00 |
| 61436 |
| ASF | 1 | 0 | buy | 68 | 7 | 0 | $0.00 | EURUSD | 12/8/2015 19:43 |
586 | 12/08/2015 20:00:00.00 |
| 61440 |
| ASF | 0 | 0 | sell | 23 | 0 | 1 | $0.00 | EURUSD | 12/8/2015 19:46 |
What would be the criteria to make this match?
I do not see a common field, which these pairs do share.
Peter
Hi,
Each long filed should have its corresponding short field. So 7 in the short field should have its 7 in the long field.
Then this couple is done, and the next couple should be matched.
Thanks