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.
Alexandre Catarino
Hi Raul Silvania ,
We have created the following GitHub issues to implement this feature:
Add Implied Volatility Rank API #3265
Enable Greeks and Implied Vol. from Options History Request #3083
Unfortunately, we haven't started working on it yet.
One possible implementation at algorithm level would be using dictionaries for Maximum and Minimum indications keyed by option contract Symbol and update them with the options contract implied volatility and start the algorithm one year before the first trade.
Raul Esteves
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!