Minimum variance portfolio weights
A portfolio invested in two stocks is not realistic. A more realistic example is to consider an equity portfolio invested in two diversified exchange traded funds (ETFs), like an ETF invested in US stocks and an ETF invested in EU stocks. In this exercise you need to use the GARCH estimation output available as usgarchfit and eugarchfit to compute the weights of the US ETF in the minimum variance portfolio invested in the US and EU ETF using the formula

Deze oefening maakt deel uit van de cursus
GARCH Models in R
Oefeninstructies
- Compute the standardized US and EU returns, together with their correlation.
- Compute the covariance and variance of the US and EU returns.
- Compute the minimum variance weights and plot them.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Compute the standardized US and EU returns, together with their correlation
stdusret <- residuals(usgarchfit, standardize = TRUE)
stdeuret <- ___
useucor <- as.numeric(___(___, ___))
print(useucor)
# Compute the covariance and variance of the US and EU returns
useucov <- ___ * sigma(___) * ___
usvar <- ___
euvar <- ___
# Compute the minimum variance weight of the US ETF in the US-EU ETF portfolio
usweight <- (euvar - ___) / (usvar + ___ - 2 * ___)
plot(usweight)