Question
Run the following code, using R, to simulate 15-day log returns assuming that daily log returns are t-distributed with parameters (0.0002,0.012,4). The number of simulations
Run the following code, using R, to simulate 15-day log returns assuming that daily log returns are t-distributed with parameters (0.0002,0.012,4). The number of simulations is 25,000.
set.seed(4886)
library(rugarch)
niter = 25000
N = 15
muTrue = 0.0002
sigmaTrue = 0.012
nuTrue = 4
## Create vector of niter * T daily returns
DailyReturns = rdist(niter*N, distribution="std", mu=muTrue, sigma=sigmaTrue, shape=nuTrue)
## Reshape vector to a niter by T matrix
DailyReturns = matrix(DailyReturns,nrow=niter)
R = sort(rowSums(DailyReturns)) ## order statistics of 15-day log returns
(a) Fit a t-distribution to the 25,000 15-day log returns by maximum likelihood. The MLE of , hat, should be larger than 4. Why?
(b) What is the estimate of ?
(c) Make a qq plot of the 15-day log returns using hat in the theoretical distribution. How well does a t-distribution fit the 15-day returns?
(Include code)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started