Original link:http://tecdat.cn/?p=23130 

 To

The goal of this paper is to create a synthetic VIX that 1) reflects the VIX as closely as possible when applied to the S&P 500; 2) Relying entirely on price as input, so it can be applied to any market index.

The solution is a synthetic volatility index. \> Mov(ATR(1)/C,20,S)

Now I’m going to try the code.

# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # load historical data #***************************************************************** tickers = 'SP=^GSPC,VIX=^VIX' # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # drawing data #***************************************************************** layout(1:3) plot(SP) plot.legend('SP',SP)

matplot(scale(temp)
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # test strategy #***************************************************************** vol= SMA( SP),1/ Cl), 20 ) high= vol > SMA(vol, 40) low= vol< SMA(vol, 40) plot(SP\[index\], type='l', plotX=F, x.highlight = highlight)

# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # test strategy #***************************************************************** models = list() data$weight\[\] = NA run(data) # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # report #***************************************************************** #performance(models, T)

 

This estimate is similar to other volatility estimates provided by the TTR package.

print(cor(, use='complete.obs',method='pearson'))

 


The most popular insight

1. Use LSTM and PyTorch in Python for time series prediction

2. LSTM, a long and short term memory model, is used in Python for time series prediction analysis

3. Use R language to conduct ARIMA (exponential smoothing) analysis

4. R language multivariate Copula-GARCH-model time series prediction

5. R language copulas and financial time series cases

6. R language random fluctuation model SV is used to deal with random fluctuations in time series

7. TAR threshold autoregressive model for R language time series

8. K-shape time series clustering method of R language is used to cluster the time series of stock prices

9. Python 3 uses ARIMA model for time series prediction