I am having trouble filling in a few steps in the derivation.
From Martin (2017), we get the following assumptions:
- Constant continuously compounded rate $r$;
- The underlying doesn't pay dividens;
- 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: \begin{equation} 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 \end{equation} 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: \begin{equation} 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) \end{equation} 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 \begin{equation} 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). \end{equation} 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 \begin{equation} \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 \end{equation} 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.