首页 > > 详细

解析R、Python编程讲解、Numerical Experiment编程辅导

#1. Numerical Experiment
In this exercise, we shall apply the two-step regression method to estimate an error correction
model and test the consistency of the method numerically with R.
(a) Generate two sequence of 5000 i.i.d. standard Gaussian random variables (mean = 0,
variance = 1) and they form. two white noise series "t and t.
(b) Generate a random walk
xt = xt 1 +"t;
and an AR(1) process
ut = 0:75ut 1 + t:
Let
yt = ut +xt:
(c) Show that yt has the following error correction representation:
yt = 1ectt 1 + xt + t = 1ectt 1 +wt;
with = 0:25 and wt is a white noise.
(d) For each N 2f50;100;500;1000;2000;3000;4000g, implement the two-step regression
on the sequence of (xt;yt) for t2f101;102;:::;100 +Ng to obtain an estimate ^ . Show
that ^ is approaching as N increases.
#2. Numerical Experiment
In this exercise, you will see that ARCH model can generate distributions with heavier tails
than Gaussian. Consider an ARCH(1) process as following:
yt = "t
2t = 1 + "2t 1;"tj t 1 N(0; 2t ); = 0:5
(a) What is the unconditional variance u of yt (i.e. u = Var(yt))?
(b) Estimate the kurtosis of yt by simulation. That is, simulate a sequence of yt for t =
1;2;:::;1000 and compute its sample kurtosis. You can start with 21 = u.
(c) Let zt be a Gaussian white noise with variance equal to the unconditional variance of yt.
What is the kurtosis of zt? Is it smaller or bigger than that of yt?
(d) Do you think the kurtosis of yt should be increasing or decreasing if we increase
slightly? Validate your answer via simulation.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!