LoslegenKostenlos loslegen

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 Min variance weights

Diese Übung ist Teil des Kurses

GARCH Models in R

Kurs anzeigen

Anleitung zur Übung

  • 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.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# 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)
Code bearbeiten und ausführen