Did I miss anything here?
. But that is a good concise descriptionMy point was just to see if I was missing some blindspot or something.. I am trying to understand a theoretical model and implement a monte-carlo estimator/calibration, etc. When I simulate I get results that look and feel correct (next step is to verify and test the generated samples against input parameters etc), So I really do just sum up the variance over the simulated sample paths then average the result to get the theoretical current value of VIXCurious if there is a point to this post? If your intention is to understand how VIX is computed, why not observe the white paper that defines it. "https://cdn.cboe.com/resources/futures/vixwhite.pdf" Your formula missed two attributes of the actual form:
1) the algo for discarding zero BIDs (one is a simple bypass, and the other terminates the remaining strikes further OTM)
2) your equations need to be supplied to two expirations, then combined per the CBOE formula to determine the "30-day" value! (from VIN & VIF)
Yes I've also read the whitepaper and almost finished working on a program to calculate VIX. Yes, I was following the CBOE whitepaper which is a little sloppy with notation.Curious if there is a point to this post? If your intention is to understand how VIX is computed, why not observe the white paper that defines it. "https://cdn.cboe.com/resources/futures/vixwhite.pdf" Your formula missed two attributes of the actual form:
1) the algo for discarding zero BIDs (one is a simple bypass, and the other terminates the remaining strikes further OTM)
2) your equations need to be supplied to two expirations, then combined per the CBOE formula to determine the "30-day" value! (from VIN & VIF)
library(quantmod)
getSymbols("SPY", src = "yahoo")
S0 = as.vector(Ad(tail(SPY, n=1)))
#Today+30
SPY.OPTS <- getOptionChain("SPY", "2020-12-24", auto.assign = F)
Call <- as.data.frame(SPY.OPTS$calls)
Put <- as.data.frame(SPY.OPTS$puts)
K0 = max(Put[Put$Strike<S0,]$Strike, Call[Call$Strike<S0,]$Strike)
Call_OTM <- Call[Call$Strike>=K0,]
Call_OTM$dif = c(S0-K0, diff(Call_OTM$Strike))
Put_OTM <- Put[Put$Strike<=K0,]
Put_OTM$dif = c(diff(Put_OTM$Strike),S0-K0)
T = as.numeric(difftime(as.Date("2020-12-24"), Sys.Date()))/365
r=0.09/100
VIX_imp = 100*sqrt((2*exp(r*T)/T)*
(sum(Call_OTM$Last/(Call_OTM$Strike^2)*Call_OTM$dif)+sum(Put_OTM$Last/ (Put_OTM$Strike^2) * Put_OTM$dif)))
print(VIX_imp)
I think it can be summed up as: If you want to compute VIX yourself, you can. -- The CBOE published a step by step guide to do that (their VIX white paper).This is bit complicated and out of my field, I hope someone can explain to me in short?