HD EDUCATION 3 1 3 0 Q u i z 3 >J ;I!_� >) : f nanc e,
il.f--R.li!i�l'.A�Le o�. Ma�Le o � -7'!: VAR in the sample and out of
sample Granger test "!a;;f..il.f-: Le okifi;fJ.�fl?Ma:
tl-tt;;f..il.f-Yaho o
m •
Background: us_fx and Japan_fx are data of foreign exchange: rate: for United states and Japan. We are now estimating AR2 for
both us_fx and J apan_fx and V AR(2) modd for both of them.
AR(2) models
VAR(2) modd
Pkase refer to the result from Rand answer the following questions:
(1)
for in sample granger tt:st, who is the Granger cause of the other? Or
are they Granger cause of both?Jp and US fx rate are Granger cause of
each others.
(2) For out of sample Granger test, who is the Granger cause of the other? Or are they Granger cause of both?
USfx rate: is the Out of sample Granger cause of JP fx ratt:
However, JP fx rate is not the Out of sample Granger cause of US fx rate:.
R(2) usfx
·
R(2) japanfxVAR(2) results iV AR(2) Japan result HD EDUCATION call:
lm(formula us_fx - usfx_ll + usfx_l2, data dt[l:1000, ]) Residuals: Min
lQ Median 3Q Max -1. 241e-OS -6.850e-07 -3.750e-07 1. 970e-07
3.214e-05coefficients: Estimate Std. Error t value Pr(>ltl)
(Intercept) 6.0lSe-07 8.351e-08 7.203 l.16e-12 **" usfx_ll usfx_l2
3.143e-Ol 2.998e-02 10.482 < 2e-16 **" 3.254e-Ol 2.998e-02 10. 854
< 2e-16 *** signif. codes: O '***' 0.001 '**' 0.01 '*' 0.05 0.1 ' ' 1
cal 1: lo(formula = japan_fx - japanfx_ll + japanfx_l2, data =
dt[l:1000, ]) Residuals: Min lQ Median 3Q Max -8.828e-06 -3.396e-07
-1.853e-07 8.950e-08 2.354e-05coefficients: Estimate Std. Error t value
Pr(>ltl) (Intercept) 2.749e-07 4.625e-08 5.944 3.84e-09 japanfx_ll
3.635e-01 2.978e-02 12.206 < 2e-16 japanfx_l2 3.429e-Ol 2.978e-02 11.
516 < 2e-16 signif. codes: o '***' 0.001 '**' 0.01 '*' o.os 0.1 l ' 1
call: lm(formula = us_fx - japanfx_ll + japanfx_l2 + usfx_ll + usfx_l2,
data = dt[l:1000, ]) Residuals: Min lQ Medi an 3Q Max -9.644e-06
-6.381e-07 -3.269e-07 1.963e-07 3.lSOe-05coefficients: Estimate Std.
Error t value Pr(>ltl) 5.814 8.24e-09 ***5.825 7.69e-09 ......6.683
3. 89e-11 ......5. 340 l.15e-07 ......(Intercept) 4.667e-07 8.028e-08
japanfx_ll 3.117e-Ol 5.350e-02 japanfx_ 12 3.570e-Ol 5.34le-02 usfx_ll
1.693e-Ol 3.171e-02 usfx_l 2 1. 769e-Ol 3.176e-02 5. 570 3.28e-08
......signif. codes: 0 '***' 0.001 '**' 0.01 • *' 0.05 0.1 ' ' 1
HD EDUCATION
call:
lm(formula = japan_fx ~ japanfx_ll + japanfx_l2 + usfx_ll + usfx_l2,
data= dt[l:1000, ])
Residuals:
Min lQ Medi an 3Q Max
-6.861e-06 -3.0SSe-07 -1.446e-07 8.650e-08 2.324e-05
coefficients:
(Intercept)
japanfx_ll
japanfx_l2
usfx_ll
usfx_l2
Estimate
1. 563e-07
2.635e-0l
2.517e-0l
1.14 Se-01
6.347e-02
Std. Error
4.777e-08
3 .184e-02
3.179e-02
1. 887e-02
1.890e-02
t value Pr(>ltl)
3.273 0.001102 **
8.275 4.lOe-16 ***
7.919 6.36e-15 ***
6.068 1.84e-09 ***
3.358 0.000813 ***
signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 0.1 l I 1
IA�VOA(AR2, VAR2) for usfx
Analysis of variance Table
Model 1: us_fx ~ japanfx_ll + japanfx_l2 + usfx_ 11 + usfx_l2
Model 2: us_fx ~ usfx_ll + usfx_l2
Res.of RSS Df sum of sq F Pr(>F)
1
2
993 3.8338e-09
995 4.2655e-09 -2 -4.3167e-10 55.904 -< 2.2e-16 ***
signif. codes: O '***' 0.001 '**' 0.01 '*' 0.05 0.1 ' ' 1
IA�OVA(AR2,V AR2) for japanfx
> anova(var2_japanfx,ar2_japanfx)
Analysis of variance Table
Model 1:
Model 2:
japan_fx ~ japanfx_ll + japanfx_l2 + usfx_ll + usfx_l2
japan_fx ~ japanfx_ll + japanfx_l2
RSS of sum of sq F Pr(>F)
1. 5157e-09
Res.of
1 1472
2 1474 1.6115e-09 -2 -9. 5823e-11 46. 531-< 2.2e-16 ***
signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 0.1 1 I 1
RMS FE of out of sample: forecasts
rmsfe_ar2japan
rmsfe_ar2us
rmsfe_var2japan
rmsfe_var2us
6.0591459055537e-07
1.02395347000373e-06
5.75636453854063e-07
1.02773130447782e-06 � .::.J!_: decide the lag of VAR model
What is the lag p for the following V AR(p) model?
A. P=O
Yt = 0.3 + 0.Syt-1 + 0.7Yt-2 + 0.3yt-3 + 0.2Xt-1
Xt = 0.1 + 0.2Yt-1
HD EDUCATION
B. P=l
C. P=2D. P=3
�-=-"!:
Use iterated method (skeleton extrapolation) to calculate two steps
ahead SET AR model forecasts WI e have a SET AR model as follow: Yt =
0.3 + 0.1 * l(Yt-1 ::;; 0.2) + 0.Syt-1 * l(Yt-1 ::;; 0.2) -
0.3Yt-1ICYt-1 > 0.2) • W/hat is the Threshold paramet-er value of
this model?• IF we know the initial Yt = 0. l. W/hat is the 2 st-ep
ahead forecast using a skeleton extrapolation?• W/hy this is a
Sc:lf-exciting Th res hold model?'.AR 4 Iii : •• : 2021s2 3130 �� �dee
exam Leo _ -ft _.___. It could be that the autoregressive dynamics of y
is regime dependent. That is, the dynamics of y may change depending on
lagged value of z. \XTith that in mind, suppose you estimated the
following second order threshold autoregressive modc:l Yt = (a+ f31Yt-1 +
f32Yt-2)l(zt-1 ::;; 0) + (0 + 01Yt-1 + 02Yt-2)l(zt-1 > 0) + Et where
Et ~ iid(O, c,2), and where I( · ) is a Heaviside indicator function
that takes on one if the condition within the parentheses is satisfied,
and zero otherwise. Suppose this result-ed in the following summary of
the regression outputs:
estimation window
parameters 1991..M1-2018.M1.2 1991.M2-2019.M01
a. 0.04 0.03
fh 0.18 0.16
fh 0.36 0.40 0
61
Bi
cr
-0.02
0.24
0.16
0.52
-0.01
0.26
0.12
0.53Question:
Based on provided information, for both estimation windows, calculate
and report the one-st-ep-ahead point forecasts of y
HD EDUCATION
How about 2 stt:ps ahead forecasts? '.AR ,ll fl 2: *•: 202ts2 3130
,!,}-1f" practice enm Leo -ft Consider annual time series of wheat
production (metric tonnes per hectare), denott:d by Yt. Suppose you
estimatt:d the following nonlinear t-rend model:
Yt =a+ /31 t + /32 (t - r)I(t - r) + Et
t
= 1,2,3 ... T I( · ) is a Heaviside indicator function that takes on
one if the condition within the parentheses is satisfied, and zero
otherwise. Suppose T=99, and i:=50, and the parameter estimates for ex,
�1, and �2 are 1.2, 0.08 and -0.05, respectively. Calculate and report
the point forecast and interval forecast of Yr+t ·