Instructions:
Be verbose. Explain clearly your reasoning, methods, and results in your written work. Write clear code that is well documented. With 99% certainty, you cannot write too many code comments.
Written answers are worth 8 points. Code is worth 2 points. 10 points total.
- When finished, respond to the questions in Sakai as “done.” We will record your grade there.
- In your code repository, create a folder called “Week04.”
- In that folder, include a. a PDF with your responses. b. All code c. A README file with instructions for us to run your code
Everything must be checked into your repository by 8am Saturday 2/18. A pull will be done at that time. Documents and code checked in after the instructors pull will not be graded. Data for problems can be found in CSV files with this document in the class repository.
Problem 1
Calculate and compare the expected value and standard deviation of price at time t ?? , given each of the 3 types of price returns, assuming ?? ∼ ? 0, σ . Simulate each return equation using ?? ∼ ? 0, σ) and show the mean and standard deviation match your expectations.
Problem 2
Implement a function similar to the “return_calculate()” in this week’s code. Allow the user to specify the method of return calculation. Use DailyPrices.csv. Calculate the arithmetic returns for all prices. Remove the mean from the series so that the mean(META)=0 Calculate VaR
- Using a normal distribution.
- Using a normal distribution with an Exponentially Weighted variance (λ = 0. 94)
- Using a MLE fitted T distribution.
- Using a fitted AR(1) model.
- Using a Historic Simulation. Compare the 5 values.
Problem 3
Using Portfolio.csv and DailyPrices.csv. Assume the expected return on all stocks is 0.
This file contains the stock holdings of 3 portfolios. You own each of these portfolios. Using an exponentially weighted covariance with lambda = 0.94, calculate the VaR of each portfolio as well as your total VaR (VaR of the total holdings). Express VaR as a $. Discuss your methods and your results. Choose a different model for returns and calculate VaR again. Why did you choose that model? How did the model change affect the results?