Examining risk factors for international equity portfolio
The UK investor in UK, US, and Swiss equities is exposed to 5 risk factors; the data is contained in riskfactors
, a multivariate dataset.
In this exercise, you will recall some of the tests and techniques that you learned earlier for showing that these risk factors are heavier tailed than normal, highly volatile and subject to profound serial dependencies.
This exercise is part of the course
Quantitative Risk Management in R
Exercise instructions
- Use the appropriate function to plot
riskfactors
. - Calculate the log-returns of
riskfactors
, remove the firstNA
value for all series, and assign toreturns
. Use the appropriate function to plotreturns
. - Use
apply()
with 3 parameters to carry out the Jarque-Bera test of normality for all series. - Use
qqnorm()
to make a Q-Q plot against normal for only the 5th return series inreturns
. Then, add a reference line withqqline()
. - Use
acf()
to make a picture of the sample acfs for the returns and then the absolute values of the returns.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Plot the risk-factor data
# Calculate the log-returns, assign to returns, and plot
___ <- ___(___(___))[-1, ]
# Use apply() to carry out the Jarque-Bera test for all 5 series
# Make a Q-Q plot against normal for the 5th return series and add a reference line
___(returns[, ___])
___(returns[, ___])
# Make a picture of the sample acfs for returns and their absolute values