Using GARCH Volatility Forecasts in Portfolio Covariance Estimation
Summary
The document presents a question about forecasting asset returns and conditional volatility with an ARMA and sGARCH specification, then using forecasts to build a portfolio covariance matrix. It shows an R workflow based on historical prices, log returns, an out-of-sample period, rolling one-step forecasts, and reported fitted values, sigmas, and forecast metrics.
The author reports high percentage forecast error and asks whether this is expected, as well as how forecast sigmas should enter covariance estimation across several assets. The material does not include an answer or establish that the model is correctly specified. It highlights the distinction between forecasting conditional means and volatility, while a covariance matrix also requires relationships among assets; individual volatility forecasts alone do not provide those cross-asset covariances. No portfolio results or validation beyond the displayed forecast output are supplied.
Key ideas
- The example fits an ARMA mean model and an sGARCH conditional variance model to asset returns.
- It evaluates rolling one-step forecasts using fitted values, volatility estimates, and forecast metrics.
- Conditional volatility forecasts alone do not specify the cross-asset correlations needed for a covariance matrix.
- The question provides no resolution or evidence that the model forecasts well out of sample.
Tags
Full text
# Forecasting volatility with rugarch and Covariance Matrix
# Forecasting volatility with rugarch and Covariance Matrix
I am trying to do a financial time series forecast in order to build a portfolio. I already have some code running rugarch library and I am not sure if I am forecasting correctly, after that I would like to use the sigmas (or maybe the fitted values) in order to calculate a covariance matrix so I can build a portfolio.
R code for forecasting
```
gcarso.prices=get.hist.quote(
instrument="GCARSOA1.MX",
start="2000-01-01",
end="2016-08-03",
quote = "Close",
provider = c("yahoo"), method = NULL,
origin = "1899-12-30", compression = "d",
retclass = c("zoo"), quiet = FALSE, drop = FALSE
)
gcarso=as.data.frame(gcarso.prices)
N=length(gcarso[,1])
gcarso.returns=100*(log(gcarso[2:N,])-log(gcarso[1:(N-1),]))
time <- index(gcarso.prices[2:N])
gcarso.xts <- na.omit(xts(x = gcarso.returns, order.by = time))
#Model and forecast
model=ugarchspec (
variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),
mean.model = list(armaOrder = c(1, 1)),
distribution.model = "norm"
)
modelfit=ugarchfit(model,data=gcarso.xts,out.sample=10)
modelfor=ugarchforecast(modelfit, data = NULL, n.ahead = 1, n.roll
= 10, out.sample = 10)
fitted(modelfor)
sigma(modelfor)
fpm(modelfor)
```
The output:
```
> fitted(modelfor)
2016-07-20 2016-07-21 2016-07-22 2016-07-25 2016-07-26 2016-07-27 2016-07-28 2016-07-29 2016-08-01 2016-08-02 2016-08-03
T+1 -0.245073 0.03921982 0.0120029 0.1588765 0.4137586 0.4635337 0.3734044 0.3273671 0.2226516 0.3274746 0.2945644
> sigma(modelfor)
2016-07-20 2016-07-21 2016-07-22 2016-07-25 2016-07-26 2016-07-27 2016-07-28 2016-07-29 2016-08-01 2016-08-02 2016-08-03
T+1 1.607644 1.65467 1.601347 1.593421 1.733585 1.718388 1.656873 1.603244 1.554496 1.56264 1.517701
> fpm(modelfor)
MSE MAE DAC
1 1.368462 0.9172632 0.6
```
I calculated MAPE (Mean Average Percentage Error) and it was very high (more than 100%), I would like to know if I am doing something wrong at the forecast or if its just normal to have a very bad accuracy?.
Also, if I were to use the sigmas how should I use them in order to build a covariance matrix (I am doing the same procedure as above with 5 more time series)?
Thanks in advance!Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.