Tabulating contributions by strike prices

Since the VIX Index is composed of prices of calls and puts options expiring on an average of 30 days, each option of the chosen maturity date contributes to the VIX Index calculation by a certain amount. This amount is given as the general formula:

Here, T is the time to expiration of the option, R is the risk-free interest rate to expiration of the option, Ki is the strike price of the ith OTM option, and △Ki is the half-difference on either side of Ki such that △Ki= 0.5(Ki+1-Ki-1).

We can represent this formula by the following calculate_contrib_by_strike() function:

In [ ]: def calculate_contrib_by_strike(delta_k, ...

Get Mastering Python for Finance - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.