Open stellathecat opened 7 years ago
Yes, this is error. With this line I tried to remove rows with impl_volatility=NA. The correct code is spx_data = spx_data[!is.na(spx_data$impl_volatility), ] Or you may not do it. Cause I see that impl_volatility=NA only for the very first date. So if you do not remove NAs, the code will return VIX=NA for this date, and it will not affect calculations for other dates.
Ok! If you have the same plot, there is probably a detail in the conversion. At least the level should be approximately the same. I remember it was sometimes not clear how to annualize volatilities. I will check!
Yep, I just did not notice that you uploaded the script and the picture, so did not verify it till the end. The levels are very different, that's why I suppose I missed something, or my implementation is not incorrect.
Hi Vladi!
spx_data[complete.cases(spx_data), ] gives me 0 observations. I skipped this line and created a plot in the folder. Do you have the same result on your computer?