# NOT RUN {
# GMAR model
params12 <- c(0.18, 0.93, 0.01, 0.86, 0.68, 0.02, 0.88)
rcm12 <- condMoments(logVIX, 1, 2, params12, to_return="regime_cmeans")
rcv12 <- condMoments(logVIX, 1, 2, params12, to_return="regime_cvars")
tcm12 <- condMoments(logVIX, 1, 2, params12, to_return="total_cmeans")
tcv12 <- condMoments(logVIX, 1, 2, params12, to_return="total_cvars")
# StMAR model
params12t <- c(0.17, 0.93, 0.01, 4.87, -0.90, 0.01, 0.98, 4.22, 1000)
rcm12t <- condMoments(logVIX, 1, 2, params12t, model="StMAR",
to_return="regime_cmeans")
rcv12t <- condMoments(logVIX, 1, 2, params12t, model="StMAR",
to_return="regime_cvars")
# G-StMAR model
params12gs <- c(0.86, 0.68, 0.02, 0.18, 0.93, 0.01, 0.11, 44)
rcv12gs <- condMoments(logVIX, 1, c(1,1), params12gs, model="G-StMAR",
to_return="regime_cvars")
tcv12gs <- condMoments(logVIX, 1, c(1,1), params12gs, model="G-StMAR",
to_return="total_cvars")
# }
Run the code above in your browser using DataLab