April 2019
Intermediate to advanced
426 pages
11h 13m
English
Finally, the 30-day weighted average of the VIX Index is written as follows:

Representing this formula in Python code gives us the following:
In [ ]: def calculate_vix_index(t1, volatility_1, t2, volatility_2, N_t1, N_t2, N_30, N_365): inner_term_1 = t1*Decimal(volatility_1)*(N_t2-N_30)/(N_t2-N_t1) inner_term_2 = t2*Decimal(volatility_2)*(N_30-N_t1)/(N_t2-N_t1) sqrt_terms = math.sqrt((inner_term_1+inner_term_2)*N_365/N_30) return 100 * sqrt_terms
Substituting with the values from near-term and next-term options provides the following:
In [ ]: vix = calculate_vix_index( t1, volatility_near, t2, volatility_next, ...
Read now
Unlock full access