IV Rank is calculated as 100 * (current IV - 1-year IV Low) / (1-year IV High - 1-year IV Low). I'm trying to figure out how I can calculate this in the main.py for backtesting. I tried to call slice.OptionChains.Value.ImpliedVolatility and just feed the data into a list, but then I get stuck in trying to figure out how to find the IV highs and lows for the 52week time window (the data is called each minute, that's a lot of data to parse).

I'm still new to this API, I would like to hear some thoughts.

I'm eventually going to simulate TastyWork strategies (high IVR > 50%, sell straddles ATM, take 20%). This isn't a new strategy, but it's something that worked for me. I just want to see if it's sustainable long-term.

Author