# Deriving the VIX formula

I am having trouble filling in a few steps in the derivation.

From Martin (2017), we get the following assumptions:

1. Constant continuously compounded rate $$r$$;
2. The underlying doesn't pay dividens;
3. Under the risk-neutral measure, the underlying follows $$dS_t = r S_t dt + \sigma_t dZ_t$$.

The fair strike on a variance swap maturing in $$T$$ must then be such that $$V = E^Q \left( \int_0^T \sigma_t^2 dt \right)$$. As Neuberger (1994), we can observe that under assumption (3), Ito's Lemma implies $$(d ln S_t)^2 = \sigma_t^2 dt$$, hence \begin{align} V &= E^Q \left( \int_0^T \sigma_t^2 dt \right) \\ &= 2 E^Q \left( \int_0^T \frac{1}{S_t}dS_t + \int_0^T dln S_t \right) \\ &= 2rT - 2 E^Q \left( ln \left( \frac{S_T}{S_0} \right) \right). \end{align}

Now, this is saying that I need to price a log contract. As Carr and Madan (1998) pointed out, an application of Breeden and Litzenberger (1978) would show that any smooth function of a terminal payoff maybe approximated as: $$$$V_0^f = f(\kappa) B_0 + f'(\kappa) (c_0(\kappa) - p_0(\kappa) ) + \int_0^\kappa f''(K) p_0(K)dK + \int_\kappa^\infty f''(K) c_0(K)dK$$$$ where $$B_0$$ is the current price of a pure discount bond, $$(p_0(K),c_0(K))$$ are, respectively, the current price of puts and calls of strike K, $$\kappa$$ is the point about which the function is approximated and all those securities mature at time $$T$$.

According to Martin (2017), I should find that the price of a log contract, $$P_{log}$$ should verify: $$$$e^{rT} P_{log} := E^Q ln(S_T/S_0) = rT - e^{rT} \left( \int_0^{F_{0,T}} \frac{1}{K^2} p_0(K) dK + \int_{F_{0,T}}^\infty \frac{1}{K^2} c_0(K)dK \right)$$$$ where $$\kappa = F_{0,T} := e^{rT} S_0$$ is the point around which I approximate the value. By substituting this back into the previous equation, we get the fair strike of a variance swap as $$$$V = 2 e^{rT} \left( \int_0^{F_{0,T}} \frac{1}{K^2} p_0(K) dK + \int_{F_{0,T}}^\infty \frac{1}{K^2}c_0(K)dK \right).$$$$ While I do see that $$f(F_{0,t}) = rT$$, as well as $$f''(K) = -1/K^2$$, why exactly is the first order term null about $$\kappa = F_{0,T}$$? If I am not mistaken, by put-call parity, puts and calls at this strike should be worth the same thing.

Second question: now that I have the strike of a variance swap, how do I get the formula used by the CBOE $$$$\sigma^2 = \frac{2}{T} \sum_{i=0}^N \frac{\Delta K_i}{K_i^2} e^{rT} Q(K_i) - \frac{1}{T}\left( \frac{F}{K_0} - 1 \right)^2$$$$ where $$Q(K_i)$$ is the mid point of the bid-ask spread for the put or call, except for $$K_0$$ where it's the average of the put and call that are closest to being at the money, $$(K_i)_{i=0}^N$$ is a grid of strike prices, $$N + 1$$ is the number of contracts, where $$F$$ is a desired forward index level such that $$F = K + e^{rT}(c_0(K) - p_0(K))$$ where we pick $$K$$ to minimize $$c_0(K) - p_0(K)$$ and, finally, $$K_0$$ is the strike closest strike below $$F$$.

I do that we define the VIX as $$VIX^2(0,T) := \frac{1}{T} V$$, but I really don't know how you come up with the VIX formula from above. I can see that the first term approximate for an integral, but I really don't know where the second term comes from.

• A small trick to get to the 2d term of the final formula is explained here quant.stackexchange.com/questions/44388/… Apr 9 '20 at 15:20
• See also this answer for detailed derivations regarding variance swaps: Variance replication using options. Apr 9 '20 at 15:54
• I already looked on this website and I have no clue how to tie what they wrote to what I wrote above, hence the question. Apr 9 '20 at 16:26
• I am not sure I understand your 1st question. You've wrote: "by put-call parity, puts and calls at this strike [i.e. $F_{0,t}$] should be worth the same thing". Doesn't that explain why $f'(\kappa) (c_0(\kappa) - p_0(\kappa))=0$ for $\kappa=F_{0,t}$? Apr 9 '20 at 17:02
• For your second question, this is not an answer but something to bear in mind: for a continuum of strikes, that term will be null because we would have $K=K_0$. In general, the more strikes, the lower than term should be. So in general it should be relatively small, given also that we square it and divide by $T$. I suspect it's some asymptotic adjustment around ATM to account for the fact there might not be a quoted strike equal to the forward $F_{0,T}$. Apr 9 '20 at 17:07

The VIX formula is based on Demeterfi et. al 1999 and their final variance swap replication formula is given by: \begin{align}\label{eq:rep_formula} \mathbb{E}\big[\mathbb{V}\big] &= \frac{2}{T} \bigg[ rT -\left( \frac{S_0 e^{rT}}{S_\star} - 1 \right) - \ln \left( \frac{S_\star}{S_0} \right) \nonumber\\ &\quad+ e^{rT} \int_0^{S_\star} \frac{1}{K^2} P_0(K) \mathop{\mathrm{d} K} \\ &\quad+ e^{rT} \int_{S_\star}^\infty \frac{1}{K^2} C_0(K)\mathop{\mathrm{d} K} \bigg] \nonumber \end{align} With regards to your second question I have found the following explanation: As Jiang & Tian 2007 state, the non-integral terms can be rewritten to \begin{align*} \frac{2}{T} \left[ rT -\left( \frac{S_0 e^{rT}}{K_0} - 1 \right) - \ln \left( \frac{K_0}{S_0} \right) \right] = \frac{2}{T} \left[ \ln\left( \frac{F_0}{K_0} \right) - \left( \frac{F_0}{K_0} - 1 \right) \right] \end{align*} They then apply the Taylor series expansion to the $$\ln$$ part and ignore terms with order higher than second: $$\begin{equation*} \ln\left( \frac{F_0}{K_0} \right) = \left( \frac{F_0}{K_0} -1 \right) - \frac{1}{2}\left( \frac{F_0}{K_0} - 1 \right)^2 \end{equation*}$$ which finally yields: $$$$\frac{2}{T} \left[ rT -\left( \frac{S_0 e^{rT}}{S_\star} + 1 \right) - \ln \left( \frac{S_\star}{S_0} \right) \right] = - \frac{1}{T} \left( \frac{F_0}{K_0} - 1 \right)^2$$$$ As you said, the integrals get transformed into sums by the numerical integration approach. Also note that the sign in front of the second term is a minus: $$\begin{equation*} \mathbb{E}\big[\mathbb{V}\big] = \frac{2}{T} \left(\sum_i \frac{\Delta K_i}{K_i^2} Q(K_i) e^{rT} \right) - \frac{1}{T} \left( \frac{F_0}{K_0} - 1 \right)^2 \end{equation*}$$