\( \newcommand{\bm}[1]{\boldsymbol{#1}} \newcommand{\textm}[1]{\textsf{#1}} \newcommand{\textnormal}[1]{\textsf{#1}} \def\T{{\mkern-2mu\raise-1mu\mathsf{T}}} \newcommand{\R}{\mathbb{R}} % real numbers \newcommand{\E}{{\rm I\kern-.2em E}} \newcommand{\w}{\bm{w}} % bold w \newcommand{\bmu}{\bm{\mu}} % bold mu \newcommand{\bSigma}{\bm{\Sigma}} % bold mu \newcommand{\bigO}{O} %\mathcal{O} \renewcommand{\d}[1]{\operatorname{d}\!{#1}} \)

Exercises

Choose one or several assets (e.g., stocks or cryptocurrencies) for the following exercises.

Exercise 2.1 (Price time series) Choose one asset and plot the price time series using both a linear and a logarithmic scale. Compare the plots and comment.

Exercise 2.2 (Return time series) Choose one asset and plot the linear returns and log-returns. Compare the plots and comment.

Exercise 2.3 (Volatility envelope) Choose one asset and compute the volatility (square root of the average of the squared returns over \(k\) samples) on a rolling-window basis in two ways:

  1. Left-aligned window: at each time \(t\), use the samples \(t-k+1, \dots, t\). Try different values of \(k\), observe the effect, and discuss.
  2. Centered window: at each time \(t\), use the samples \(t-\lfloor k \rfloor/2, \dots, t+\lceil k \rceil/2 - 1\). Try different values of \(k\), observe the effect, and discuss.

Finally, compare the left-aligned and centered rolling-window approaches and discuss.

Exercise 2.4 (Return distribution) Choose one asset and perform the following tasks:

  1. Plot histograms of the log-returns at different frequencies. Compare the plots and comment.
  2. Draw Q–Q plots to focus on the tail distribution. Do the returns follow a Gaussian distribution?
  3. Compute the skewness and kurtosis to see if they correspond to a Gaussian distribution.

Exercise 2.5 (Return autocorrelation) Choose one asset and perform the following tasks:

  1. Plot the autocorrelation function of the log-returns at various frequencies. Compare the plots and comment.
  2. Repeat the process using squared returns instead of log-returns. Compare these plots and comment.

Exercise 2.6 (Asset correlation) Choose several stocks and perform the following tasks:

  1. Compute the cross-correlations and plot a heatmap.
  2. Compute the correlation between each of the stocks and the index. Discuss the results.
  3. Compute the correlation between a stock and a cryptocurrency. Discuss the result and the implications.