Volatility and correlation of FX returns
In this exercise, you will discover evidence of volatility and serial dependence in daily and weekly exchange-rate log-returns. The dataset fx
contains daily log-returns for the "EUR_USD", "GBP_USD", "JPY_USD" and "CHF_USD" exchange rates while fx_w
contains the corresponding weekly log-returns. Both are in your workspace.
Note that foreign exchange trading takes place every day of the week although the lower volume of trading at weekends leads to an unusual weekly correlation cycle which will be evident in one of the pictures you create.
This exercise is part of the course
Quantitative Risk Management in R
Exercise instructions
- Plot the multivariate time series
fx
andfx_w
with the optiontype = "h"
. - Use
acf()
to make acf plots for bothfx
and the absolute values offx
. - Use
apply()
to conduct the Ljung-Box test, with a lag of 10, on the components offx
and then their absolute values. - Use
acf()
to make acf plots for bothfx_w
and the absolute values offx_w
. - Use
apply()
to conduct the Ljung-Box test, with a lag of 10, on the components offx_w
and then their absolute values.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Plot fx and fx_w
# Make acf plots of fx and the absolute values of fx
acf(___)
# Apply the Ljung-Box test to the components of fx and their absolute values
apply(___, 2, Box.test, lag = ___, type = ___)
# Make acf plots of fx_w and the absolute values of fx_w
# Apply the Ljung-Box test to the components of fx_w and their absolute values
apply(___, 2, Box.test, lag = ___, type = ___)