I'm trying to find an efficient way to download the Historical ATM Implied Volatility using python.
Currently, I use the following code to get the historical volatility for some options:
vol_df = rd.get_history(universe=option_ric, fields=["IMP_VOLT],
interval="1D", start=start_date_2, end=end_date_2)
But I realized when I add too many instruments, the process starts becomes very slow.
So instead of getting the whole volatility surface and then trying to check which option is currently ATM, I was wondering if there is a faster or smarter way to do this. Using a "for" loop is also slow...
Appreciate any help.