Question 1

1. Suppose \(X\) and \(W\) are independent random variables, and \(X\) is exponential with standard deviation of 2 and \(W\) is discrete random variable with \(P(W=2)=P(W=-2)=\frac{1}{2}\)

  1. Find the .10 -quantile for \(V=\frac{1}{1+X}\)
  2. Determine the distribution of \(Y=W \cdot X\)
  3. Determine the .20 quantile of \(Z=\frac{1}{1+Y}\)

(a) \(\textbf{Solution.}\qquad\) Recall that the standard deviation of exponential distribution is of the form, \[ SD(X)=\frac{1}{\lambda}=2 \] this implies that \(\lambda=2\). Therefore, \(X\sim\mathrm{Exp}\left(\lambda=\frac{1}{2}\right)\) and its corresponding cdf is , \[ F(x)=1-e^{-x/2} \] The distribution of \(V\) can be written as,

\[\begin{align} \mathbb{P}(V\leq v) & =\mathbb{P}\left(\frac{1}{1+X}\leq v\right)\nonumber \\ & =\mathbb{P}\left(\frac{1}{v}-1\leq X\right)\nonumber \\ & =1-\mathbb{P}\left(X\leq\frac{1}{v}-1\right)\nonumber \\ & =\exp\left\{ -\frac{1}{2}\left(\frac{1}{v}-1\right)\right\} \label{eq:1} \end{align}\]

where \(v\in\left[0,1\right]\). We can solve for 0.1-quantile of \(V\) by solving for \(v\) in equation (\ref{eq:1}).

\[\begin{align*} \exp\left\{ -\frac{1}{2}\left(\frac{1}{v}-1\right)\right\} & =0.1\\ -\frac{1}{2}\left(\frac{1}{v}-1\right) & =\mathrm{log}(0.1)\\ \frac{1}{v} & =-2\log(0.1)+1\\ v & =\frac{1}{1-2\log(0.1)} \end{align*}\] Thus, 0.1-quantile of \(V\) is, \[ v_{0.1}\approx0.178 \]

   

(b) \(\mathbf{Solution.}\qquad\) We can compute distribution of \(Y\) as follows,

\[\begin{align} \mathbb{P}(Y\leq y) & =\mathbb{P}(WX\leq y)\nonumber \\ & =\mathbb{P}(WX\leq y\mid W=2)\mathbb{P}(W=2)+\mathbb{P}(WX\leq y\mid W=-2)\|P(W=-2)\nonumber \\ & =\frac{1}{2}\mathbb{P}(2X\leq y)+\frac{1}{2}\mathbb{P}(-2X\leq y)\nonumber \\ & =\frac{1}{2}\mathbb{P}\left(X\leq\frac{y}{2}\right)+\frac{1}{2}\mathbb{P}\left(X\geq-\frac{y}{2}\right)\label{eq:2} \end{align}\]

Then the equation (\ref{eq:2}) can be written as,

\[ \mathbb{P}\left(Y\leq y\right)=\left\{ \begin{array}{ll} {1-\frac{1}{2}\exp\left\{ -\frac{1}{4}|y|\right\} } & {\text{ if }y>0}\\ {\frac{1}{2}\exp\left\{ -\frac{1}{4}|y|\right\} } & {\text{ if }y\leq0} \end{array}\right. \]

which distribution is double exponential distribution with parameters \(\mu=0\) and \(\lambda=\frac{1}{4}\).

   

(c) \(\mathbf{Solution.}\qquad\) To find the 0.2-quantile of \(Y\), we first compute the distribution of \(Z\),

\[\begin{align} \mathbb{P}\left(Z\leq z\right) & =\mathbb{P}\left(\frac{1}{1+Y}\leq z\right)\nonumber \\ & =\mathbb{P}\left(\frac{1}{z}\leq1+Y\right)\nonumber \\ & =\mathbb{P}\left(\frac{1}{z}-1\leq Y\right)\nonumber \\ & =1-\mathbb{P}\left(Y\leq\frac{1}{z}-1\right)\nonumber \\ & =\frac{1}{2}\exp\left\{ -\frac{1}{4}\left(\frac{1}{z}-1\right)\right\} \label{eq:3} \end{align}\]

where \(0\leq z\leq1\). Then setting equation (\ref{eq:3}) equal to 0.2, we have

\[\begin{align*} \log(0.4) & =-\frac{1}{4}\left(\frac{1}{z}-1\right)\\ -4\log(0.4)+1 & =\frac{1}{z}\\ z & =\frac{1}{1-4\log(0.4)}\\ z & \approx0.214 \end{align*}\]

Question 2

2. Suppose have portfolio of 100 million dollars. Compute the relative value-at-risk, valueat-risk, and expected shortfall for \(\alpha=.004\) for the following cases.

  1. Distribution of returns is normally distributed with a mean of 0 and standard deviation of .02
  2. Distribution of log-returns is normally distributed with a mean of 0 and standard deviation of .02. Hint: Can use Monte Carlo approach for computing this.
  3. Distribution of returns has a \(t\) distribution with a mean of 0 and standard deviation of .02 for the cases of \(\nu=11,6,3\)

Clarification/Hints: For \((\mathrm{c}),\) you will need to set the scale parameter, \(\lambda,\) appropriately to get standard deviations being \(.025,\) and you will need to relate quantiles from the R-function “qt” which is for standard t-distribution with quantile of \(t_{\nu}(\mu, \lambda)\) for the appropriate \(\mu\) and \(\lambda\)

(a) \(\mathbf{Solution.}\qquad\) We are given \(R_{t}\sim N\left(0,\left(.02\right)^{2}\right)\). To find 0.004 quantile, we use qnorm R function,

## [1] -0.0530414

Then we know the value of relative VaR is,

\[ \tilde{\mathrm{VaR}}=0.053 \]

and the value at risk is,

\[ \mathrm{VaR}=100(0.053)=5.3\text{ million} \]

Next we compute \(ES_{0.004}\),

\[ ES_{0.04}=\frac{1}{0.004}\int_{0.053}^{\infty}xf(x)dx \]

where \(f(x)\sim N\left(0,(0.02)^{2}\right)\).

\[\begin{align} = & \frac{1}{0.004}\left(\frac{1}{\sqrt{2\pi}(0.02)}\right)\int_{0.053}^{\infty}xe^{\frac{-x^{2}}{2(0.02)^{2}}}dx\label{eq:4} \end{align}\]

We perform the change of variable,

\[\begin{align*} u & =\frac{x^{2}}{2(0.02)^{2}}\\ du & =\frac{1}{(0.02)^{2}}xdx \end{align*}\]

Then equation (\ref{eq:4}) becomes,

\[\begin{align*} = & \frac{1}{0.004}\left(\frac{0.02}{\sqrt{2\pi}}\right)\int_{3.517}^{\infty}e^{-u}du\\ = & \frac{-1}{0.004}\left(\frac{0.02}{\sqrt{2\pi}}\right)\left[\left.e^{-u}\right|_{3.517}^{\infty}=-e^{-3.517}\right]\\ = & \frac{5}{\sqrt{2\pi}}e^{-3.517}\\ \approx & 0.0592 \end{align*}\]

Thus, the shortfall is, \[ 100(0.0592)=5.92\text{ million} \]

   

(b) \(\mathbf{Solution.}\qquad\) We are given that the log-returns are distributed, \(\tilde{R}_{t}\sim N\left(0,\left(.02\right)^{2}\right)\). In order to find 0.004 quantile, we use the VaR from part a) and apply the following transformation,

\[ e^{\widetilde{R}_{t}}-1=R_{t} \]

Thus 0.004 quantile for \(R_{t}\) is, \[ e^{-0.053}-1=-0.0516 \]

So the relative value at risk is,

\[ \tilde{\mathrm{VaR}}=0.0516 \]

and the value at risk is,

\[ \mathrm{VaR}=100(0.0516)=5.16\text{ million} \]

Next we compute \({ES}_{0.04}\) from the following R code using Monte Carlo simulation.

## [1] 0.0574643

From the R code above, \[ ES_{0.004}\approx0.0575 \] And the shortfall is, \[ 100(0.0575)=5.75\text{ million} \]

   

(c) \(\mathbf{Solution.}\qquad\) In order to compute relative value-at-risk, value- at-risk, and expected shortfall, we will use the following custom R functions. We will also use these functions in questions 3c) and 3d).

First we can compute value-at-risk and relative value at-risk using the following R code to get the quantiles.

Thus we have the following results,
(#tab:q2c_table1)Comparison of Relative VaR and VaR estimates
\(\nu = 11\) \(\nu = 6\) \(\nu = 3\)
Relative VaR 0.058 0.064 0.073
VaR (mm) 5.850 6.370 7.300

Next, the following R code computes the expected shortfall by Monte Carlo simulation.

Thus the resulting expected shortfalls and shortfalls are,
(#tab:q2c_table2)Comparison of Expected Shortfall
\(\nu = 11\) \(\nu = 6\) \(\nu = 3\)
ES 0.069 0.080 0.111
Shortfall (mm) 6.898 7.971 11.147

Question 3

3. In Canvas in the Data subdirectory under files is the data set of the daily price data of the Russell 2000 from Jan \(/ 2018\) to Dec \(/ 2019\).

  1. Generate plots of adjusted closing price and log returns (based on adjusted closing price) as a function of time and give a brief summary what the plots show.
  2. Generate summary statistics, skewness, kurtosis, histogram, and boxplot of the log(adjusted closing price return) - give a brief summary of interesting data features discovered based on this analysis. Hint: Can get skewness and kurtosis from R-package “fBasics”.
  3. Estimate the mean and standard deviation of the log-returns, and then using a \(t-\) distribution and picking degrees of freedom based on kurtosis, estimate the relative VaR corresponding to \(\alpha=.005 .\) Also, compare this estimate of the relative VaR with the estimate generated by simply using the .005 -quantile of the log-returns.
  4. Based on the t-distributional model, derive an estimate of the expected shortfall for a 10 million dollar portfolio. Hint: Can use Monte Carlo approach for computing this.

(a) \(\mathbf{Solution.}\qquad\) Below in the following R code we extract adjusted close price price data and compute log returns to plot.

The adjusted close price plot shows that that Russell 2000 reached its peak around September 2018 and steadily declined until the end of 2018. Since the beginning of 2019, the price rebounded. The log-return plot looks like a (weakly) stationary time series. From this plot we can also see that the largest return occurred at the end of December 2018.

   

(b) \(\mathbf{Solution.}\qquad\) Below we build a summary table of the log-returns.

(#tab:q3b_table)Summary Statistics of Log-Returns
Statistics
Min. -0.045
1st Qu. -0.005
Median 0.001
Mean 0.000
3rd Qu. 0.007
Max. 0.048
Std. Dev. 0.011
Skewness -0.432
Kurtosis 5.097

Next we show the histogram and box plot of log(adjusted closing price return),

First we note from the summary table that the median of log returns is close to its mean, indicating that we have a symmetric. The skewness is -0.432 which also indicates the distribution is symmetric, potentially with a slight left skew. Finally we note that the excess kurtosis is 2.097 which indicates that the distribution of log returns is heavy tailed.

   

(c) \(\mathbf{Solution.}\qquad\) Below we estimate relative VaR from t-distribution and also compute VaR from the log-returns.

(#tab:q3c_code)Comparison of Relative VaRs of Log-Returns
0.5%
Relative VaR t-dist. 0.031
Relative VaR 0.036

Indeed the estimated relative VaR is close to the relative VaR of the log-returns.

   

(d) \(\mathbf{Solution.}\qquad\) Below we derive an estimate of the expected shortfall using Monte Carlo simulation.

(#tab:q3d_code)Expected Shortfall of t-distribution Model
0.5%
ES 0.038
Shortfall (mm) 0.384