Hi,
I would need your help to solve the below query.
I have to eliminate the strikes if CHG_IN_DI is 0, the grouping should be done based on symbol, Expiry_dt and Timestamp.
In my data, there are many symbols, expiry dates for same timestamp.
let me know if you have any queries.
Input | ||||||
SYMBOL | EXPIRY_DT | STRIKE_PR | TYP | CLOSE | CHG_IN_DI | TIMESTAMP |
ABC | 26-Nov-20 | 450 | CE | 102 | 0 | 30-Oct-20 |
ABC | 26-Nov-20 | 460 | CE | 21.2 | 16500 | 30-Oct-20 |
ABC | 26-Nov-20 | 470 | CE | 17.2 | 15000 | 30-Oct-20 |
ABC | 26-Nov-20 | 450 | BE | 24.25 | 12000 | 30-Oct-20 |
ABC | 26-Nov-20 | 460 | BE | 27.1 | 0 | 30-Oct-20 |
ABC | 26-Nov-20 | 470 | BE | 34.35 | 1500 | 30-Oct-20 |
Output | ||||||
SYMBOL | EXPIRY_DT | STRIKE_PR | TYP | CLOSE | CHG_IN_DI | TIMESTAMP |
ABC | 26-Nov-20 | 470 | CE | 17.2 | 15000 | 30-Oct-20 |
ABC | 26-Nov-20 | 470 | BE | 34.35 | 1500 | 30-Oct-20 |
Solved! Go to Solution.
Hi @hillard
Here is a workflow for the task. I think grouping in done on Typ too
Output:
Workflow:
Hope this helps 🙂 Please check and let me know.
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍
Hi @hillard
Here is a another approach. This assumes the data is already sorted in order.
Workflow:
Hope this helps 🙂 Let me know which works best for you.
Without any doubt you got the output.
However, it seems I didn't explain the problem clearly or I'm not sure the given solution will help me?
let me put it in different way.
I want to find the strike that is common in "Type", means same strike should present in both "BE" and "CE" and that strike doesn't contain zero in " change in DI".
In the first step, you have eliminated the zero which is good and second step I'm not sure, it will pick something which is common in both "BE" and "CE"...sample just pick the first or last row right? kindly assist..thanks!
or even if you can help me to find a way to eliminate the strikes in both "CE" and "BE" based on condition change in "OI"?
Hi @hillard
It makes more sense now here is a workflow based on the logic.
workflow:
Please check and let me know.
Thank you much!