Suppose I have the formula for computing $\mathbb E^P\big[\int_0^T v\,dt\big]$ for the variance process $v$ in the real world measure $P$. Can I set it to the VIX$^2$ price and solve for the variance risk premium? My concern is that VIX is a traded asset and its risk premium is zero and the equality does not hold. However, would it be correct to argue that VIX$^2$ is not traded and thus the procedure is correct?
I will put the above question in specific terms. Assume the variance $v$ undergoes the process $$dv = a\,dt+b\,dB$$ where $B$ is the standard Brownian motion. The transformation between the real-world and risk-neutral measures is $a_P = a_Q-\lambda_v b$ where $\lambda_v$ is the market price of variance risk, and subscripts $Q$ and $P$ denotes the risk-neutral and real-world measures, respectively. We than set $$f[a_Q,b]:=\frac1T\mathbb E^Q\Big[\int_0^T d\langle\ln S\rangle_t\Big]$$ where $f[u,v]$ denotes a function $f$ of functions $u$ and $v$.
From the vanilla option market, I calibrate the functions $a_Q$ and $b$. Now I set $f[a_Q-\lambda_vb,b]=$VIX$^2$ where VIX denotes the price TRADED on the market of a fresh start VIX of maturity $T$, to compute $\lambda_v$.
Is this correct? My rationale is that although $VIX$ is traded and thus evaluated in the risk-neutral measure $Q$, VIX$^2$ is not and therefore is evaluated in the real-world measure $P$.
Edit: I now think this is wrong because the variance swap is traded and thus should be valued in the risk-neutral measure $Q$ and we cannot obtain the risk premium this way. The correct way to estimate this is to set $$f[a_P,b]=\frac1T\int_0^T d\langle\ln S\rangle_t$$ for the realized $S_t$ to solve for $\lambda_v$.
As a matter of fact, if we have a mean reversion form for the variance process, for example, $a=-\kappa(v-v_\infty)$, which generates an asymptotic stationary variance $v_\infty$ at long time, we can simply set $$v_\infty[a_P,b]=\lim_{T\to\infty}\frac1T\int_0^T d\langle\ln S\rangle_t$$ where $S$ is the realized stock price, to compute $\lambda_v$.