Ok so this is a real simple watch list indicator to help (maybe) give me some idea which strikes get pinned on Options Exp.
My question is: I want to make an "if then" statement that takes all my NaN results and makes them zero, so that when I click on my Custom Pain column, all the highest results go to the top and all the NaN's go to the bottom. I hope this makes sense. Also if anyone else has a better approach, I would love to see. Thank you.
- I start by making a custom watch list with just SPX.
- Then I run an options scan on my SPX watch list and I filter "Days to Exp" to capture just those options that pertain to the up coming Options Exp.
- I then add columns for price, volume, open interest and this custom column. (I know this makes A LOT of assumptions about whether the volume is net short or long plus a bazillion other things)
- Then I click on the columns to get a sense of what is being most heavily traded, what has the most open interest and which delta's the market makers have to hedge in order to remain market neutral.
def Pain = ((bid + ask)/2) * volume; plot R = Pain/1000;