Algo Hacks · · 3 min read

Interactive Brokers IV Downloader

In the article Timing Mean Reversion Using Implied Volatility we discuss an interesting method for timing mean reversion entries using the implied volatility of individual stocks.

I personally download implied volatility for free from Interactive Brokers using a simple Python script, which you can find below.

The Python script also works with Norgate data, from which it obtains a list of tickers in the selected index. The resulting format is prepared so that the data can be easily imported into RealTest.

Data are imported into RealTest using:

EventListFile: ?scriptpath?\R1000combined_data.csv

Implied volatility is then accessible via the variable Event(2).

Of course, the Python script can be used without Norgate data. However, you need to manually define the list of tickers to download. The downloaded data can also be imported into programs other than RealTest.

Please send any questions to peter@crackingmarkets.com, and I will expand this guide as needed.

If the script helped you, please share this article on social networks or your websites.

Python script: