Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Econ 151a  Statistical Modeling with R for Economics and Finance

Summer 2022

Project 3

Expected project output: See syllabus

This document provides detailed instructions on how to complete the project and suggested timeline.

In Project 3, you will perform risk analysis for the Nasdaq-100 Index. You will practice volatility modeling, bootstrap, and Monte-Carlo simulation using methods introduced in class. This project will help you         understand the downside risk of the Nasdaq-100 portfolio.

1.    Obtain the daily Nasdaq-100 Index from FRED (https://fred.stlouisfed.org/series/NASDAQ100) from 1/1/2008 to date.

2.    Calculate the daily log return. Call this variable daily_ret

a.    Plot daily_ret in a time series graph. Label the axes. Do you observe any interesting patterns regarding the level and variability?

b.    Plot the daily log return histogram (use smaller bins for a smoother looking graph). Does the histogram look like the probability density function that you are familiar with (e.g.    normal)?

i.       If it looks normal, test the normality (e.g. with the Jarque-Bera test or a Q-Q plot). Bonus question. Skip if you haven’t learned this before.

Next, we will estimate a one-day VaR of a 99% confidence interval for the Nasdaq-100 Index. Suppose now is the beginning of 2022 and you have just obtained data through the end of 2021. For simplicity, you can measure VaR in terms of daily percentage profit/loss.

Note that because of randomness in Step 3 and 4, every run will produce slightly different results unless you fix the seed of R’s random number generator. If you notice that your numbers change without any   changes in your code, this is probably why.

3.    Estimate a one-day VaR with bootstrap

a.    You believe that the current market condition is very similar to the past six months, so you choose July 2021-December 2021 data as your sample.

b.   Sample with replacement 200 points. Find the 1% VaR from this draw and store it in a dataframe.

c.    Repeat step b 1000 times. After doing this, you should have 1000 1% VaR estimations.

d.   What are the mean, interquartile range, and standard deviation of these 1000 1% VaR  estimations? Plot the histogram of the 1000 1% VaR estimations. Use the mean as your final VaR estimate.

4.    Estimate a one-day VaR with Monte-Carlo. For simplicity, we assume that the log returns follow a normal distribution, regardless of your finding in 2bi.

a.    You believe that the current market condition is very similar to the past six months, so   you choose July 2021-December 2021 data as your sample. You also believe that the log returns follow a normal distribution.

b.   To perform the Monte-Carlo simulation, you need to determine the two parameters that define a normal distribution: mean and standard deviation. Hence, you estimate them    using the sample data from step 4a.

c.    Draw 200 random numbers from this distribution. Find the 1% VaR from this draw and store it in a dataframe.

d.    Repeat step b 1000 times. After doing this, you should have 1000 1% VaR estimations.

e.    What are the mean, interquartile range, and standard deviation of these 1000 1% VaR  estimations? Plot the histogram of the 1000 1% VaR estimations. Use the mean as your final VaR estimate.

5.    What’s the interpretation of your estimation from 3d and 3e? Are they similar? As an investor, does the VaR concern you?

6.    Because we are actually well into 2022, we can compare our VaR forecast to reality.1  Collect the  first 100 daily return data points from 2022; what’s the 1% VaR and how does it compare to your forecasts from Steps 3 and 4? Which method gave you a more reasonable estimate?

7.    In Steps 3 and 4, we made a lot of arbitrary choices. For example, the sample period, the sample size within each draw, the number of draws. Try some alternative values of these inputs. Discuss how your results change.

8.    (Bonus) So far, we used standard deviation as the volatility estimate. This is not ideal because it does not account for potential temporal correlation and persistence. For example, see your       graph from step 2a. Do you notice calmer vs. more volatile periods? Do some research on          volatility models and describe two popular models for stock return data.