代写代考 Nonlinear Econometrics for Finance Lecture 4

Nonlinear Econometrics for Finance Lecture 4
. Econometrics for Finance Lecture 4 1 / 35

Last class: some important ingredients

Copyright By PowCoder代写 加微信 powcoder

Recall the criterion function:
QT(θ) = gT(θ)⊤ WT gT(θ). 􏱦 􏱥􏱤 􏱧 􏱦 􏱥􏱤 􏱧􏱦􏱥􏱤􏱧􏱦􏱥􏱤􏱧
1×1 1×N N×N N×1
Thus, for m = 1, …, d, the first derivative of the criterion function is:
∂QT (θ) ∂θ
 ∂QT (θ) 1 ∂g(Xt+1,θ) 1
 ⊤  ∂QT (θ)   
T−1  T−1 ∂θ 􏰍 􏰍
= ··· where =2
g(X ,θ) Tt+1
∂QT (θ) ∂θd
 􏱦􏱥􏱤􏱧 Tt=1 􏱧 N×N􏱦
and, for m, j = 1, …, d, the second derivative of the criterion function is:
∂2QT (θ) ⊤
 ∂2QT (θ)  ∂θ1∂θ1 ∂2QT (θ)
∂2QT (θ) ∂θ1∂θ2 ∂2QT (θ)
∂2QT (θ)  ∂θ1∂θd  ··· 
∂ QT(θ) =2 1 􏰍 ∂g(Xt+1,θ)
1222  ∂θ∂θ ··· ··· ··· ···
 · · · · · ·
∂θm∂θj T t=1 ∂θm T t=1 ∂θj
T−1 ⊤T−1  +2 1􏰍∂g(Xt+1,θ) W 1􏰍g(X ,θ).
 Tt+1 T t=1 ∂θm∂θj T t=1
· · · ∂2QT (θ)  ∂θd∂θd
W 1 􏰍 ∂g(Xt+1,θ)
. Econometrics for Finance Lecture 4

Last class: review of “consistency”
∂2QT (θ0) ∂θ∂θ⊤ ∂θ
􏱦 􏱥􏱤 􏱧 􏱦 􏱥􏱤 􏱧
→p 2Γ⊤0 WΓ0 →p 2Γ⊤0 W0 􏰬∂g(Xt+1,θ0)􏰭
∂QT (θ0) p
Γ0 = E ∂θ⊤ . 􏱦 􏱥􏱤 􏱧
. Econometrics for Finance Lecture 4

Last class: review of “asymptotic normality”
􏱦 􏱥􏱤 􏱧 􏱦 􏱥􏱤 􏱧
→p 2Γ⊤0 WΓ0 →d N(0,4Γ⊤0 WΦ0WΓ0)
→d N(0,(2Γ⊤0 WΓ0)−14Γ⊤0 WΦ0WΓ0(2Γ⊤0 WΓ0)−1) →d N(0,(Γ⊤0 WΓ0)−1Γ⊤0 WΦ0WΓ0(Γ⊤0 WΓ0)−1)
􏰬∂g(Xt+1,θ0)􏰭 􏰪 ⊤􏰫 ∂θ⊤ and Φ0 = E g(Xt+1, θ0)g(Xt+1, θ0) .
􏰑 ∂θ∂θ⊤ ∂θ
√ 􏰪 􏰫 TθT−θ0 =−
√ ∂QT(θ0) T
. Econometrics for Finance Lecture 4

Last class: asymptotic variance of the GMM estimator
V(θT ) = 1 (Γ⊤0 W Γ0)−1Γ⊤0 W Φ0W Γ0(Γ⊤0 W Γ0)−1 T
1 The asymptotic variance of θT is what will allow us to compute standard errors and do inference.
2 Notice its “sandwich” form. We will return to it. (Intuitive, right? A well-defined variance-covariance matrix has to be symmetric.)
3 Notice that we are dividing by T . (Intuitive, right? The variance 􏰑
of θT has to go to zero for the estimator to be consistent for θ0.) 4 We will see that in two cases the asymptotic variance simplifies.
. Econometrics for Finance Lecture 4 5 / 35

Important issues in GMM
Important issues in GMM
. Econometrics for Finance Lecture 4 6 / 35

Important issues in GMM
Two cases: N = d and N > d
1 The (exactly-identified) case N = d. The number of moment conditions N is the same as the number of parameters to estimate d. (We will see that the choice of WT is asymptotically irrelevant.)
2 The (over-identified) case N > d. (We will see that the choice of WT is important. We will choose WT optimally.)
. Econometrics for Finance Lecture 4 7 / 35

Important issues in GMM
First: the case N = d
If the number of moment conditions N is the same as the number
of parameters d ⇒ Exact identification of the model.
In such case, Γ0 becomes a (nonsingular) square matrix. So,
Γ0 WΓ0 Γ0 WΦ0WΓ0
􏰪 ⊤ 􏰫−1 Γ0 WΓ0
−1 −1􏰪 ⊤􏰫−1 ⊤
= Γ0 W Γ0 Γ0 WΦ0WΓ0 (Γ0)
= Γ−1Φ 􏰪Γ⊤􏰫−1 000
􏰪⊤ −1 􏰫−1 =Γ0Φ0Γ0 .
−1 −1􏰪 ⊤􏰫−1 W Γ0
Implication: when N = d, it does not really matter asymptotically what weight matrix we are using.
The weight matrix is not affecting the asymptotic variance of the
GMM estimator.
. Econometrics for Finance Lecture 4 8 / 35

Important issues in GMM
The case N = d: summary
If N = d, then √􏰪􏰫
d 􏰳 􏰬 ⊤ −1 􏰭−1􏰂
→ N 0, Γ0 Φ0 Γ0
d 􏰳 􏰳 􏰬 ∂g(Xt+1, θ0) 􏰭⊤ 􏰪 􏰪 ⊤􏰫􏰫−1
∂θ⊤ E g(Xt+1,θ0)g(Xt+1,θ0)
􏰬 ∂g(Xt+1, θ0) 􏰭􏰂−1􏰂 E ∂θ⊤ ,
1􏰪⊤ −1 􏰫−1
. Econometrics for Finance Lecture 4 9 / 35

Important issues in GMM
Second: the case N > d
If the number of moment conditions is not the same as the number of parameters, then the optimal weight matrix matters (even asymptotically).
Important results: if W = Φ−1, then the asymptotic variance of the 0
GMM estimator is …
1􏰪⊤ −1 􏰫−1
1 … equal to T Γ0 Φ0 Γ0 (i.e., precisely the value that we
would obtain when N = d)
2 … the smallest variance possible.
We will prove (1) and, then, (2).
. Econometrics for Finance Lecture 4 10 / 35

Important issues in GMM
Second: the case N > d
If W = Φ−1, then the asymptotic variance of the GMM estimator is 0
1􏰪⊤ −1 􏰫−1 equal to T Γ0 Φ0 Γ0
Proof. Write
V(θ ) = 1 􏰪Γ⊤WΓ 􏰫−1 􏰪Γ⊤WΦ WΓ 􏰫􏰪Γ⊤WΓ 􏰫−1
T 0000000 T
= 1 􏰪Γ⊤ Φ−1Γ 􏰫−1 􏰪Γ⊤ Φ−1Φ Φ−1Γ 􏰫 􏰪Γ⊤ Φ−1Γ 􏰫−1 T000 00000 000
1􏰪⊤ −1 􏰫−1 = T Γ0Φ0 Γ0 .
. Econometrics for Finance Lecture 4 11 / 35

Important issues in GMM
Second: the case N > d
If the asymptotic variance of the GMM estimator is equal to
1􏰪⊤ −1 􏰫−1 T Γ0 Φ0 Γ0
, then it is the smallest possible.
Proof. We will compare it to the general form of the GMM variance (which would result from the use of any W ), i.e.,
1􏰪 ⊤ 􏰫−1􏰪 ⊤ 􏰫􏰪 ⊤ 􏰫−1 T Γ0 WΓ0 Γ0 WΦ0WΓ0 Γ0 WΓ0
Ignoring T1 , we will then show that
􏰪Γ⊤ W Γ 􏰫−1 􏰪Γ⊤ W Φ W Γ 􏰫 􏰪Γ⊤ W Γ 􏰫−1 − 􏰪Γ⊤ Φ−1Γ 􏰫−1 ≥ 0.
0000000000
. Econometrics for Finance Lecture 4 12 / 35

Important issues in GMM
Second: the case N > d
Once more, we wish to show:
􏰪 ⊤ 􏰫−1􏰪 ⊤ 􏰫􏰪 ⊤ 􏰫−1 􏰪 ⊤ −1 􏰫−1 Γ0WΓ0 Γ0WΦ0WΓ0 Γ0WΓ0 − Γ0Φ0 Γ0
Note that F−1 −G−1 ≥ 0 if G−F ≥ 0. Hence, we want to show that ⊤ −1 􏰪⊤ 􏰫􏰪⊤ 􏰫−1􏰪⊤ 􏰫
We can write
Γ0Φ0 Γ0− Γ0WΓ0 Γ0WΦ0WΓ0 Γ0WΓ0 ≥0.
⊤ −1/2􏰮 􏰪 1/2 􏰫􏰪 ⊤ 􏰫−1􏰪 ⊤ 1/2􏰫􏰯 −1/2 ⊤ Γ0Φ0 IN− Φ0 WΓ0 Γ0WΦ0WΓ0 Γ0WΦ0 Φ0 Γ0=HPH ,
where H = Γ⊤ Φ−1/2 and P is idempotent and symmetric (i.e., a projection) 00
. Econometrics for Finance Lecture 4 13 / 35

Important issues in GMM
Second: the case N > d
Now, notice that
HPH⊤ = HPPH⊤ = HPP⊤H⊤ = (HP)(HP)⊤,
where the first equal sign derives from the idempotency of P and the second from the symmetry of P.
This quantity is necessarily positive semidefinite (≥ 0 in the language of matrices) since
Nonlinear Econometrics for Finance Lecture 4
z⊤(HP)(HP)⊤z ⊤

Important issues in GMM
The case N > d (with an optimal W ): summary
−1 􏰪􏰪 If N > d and W = Φ0 = E
g(Xt+1,θ0)g(Xt+1,θ0)
d 􏰳 􏰬 ⊤ −1 􏰭−1􏰂
→ N 0, Γ0 Φ0 Γ0
d 􏰳 􏰳 􏰬 ∂g(Xt+1, θ0) 􏰭⊤ 􏰪
􏰬 ∂g(Xt+1, θ0) 􏰭􏰂−1􏰂 E ∂θ⊤ ,
⊤􏰫􏰫−1 ∂θ⊤ E g(Xt+1,θ0)g(Xt+1,θ0)
1􏰪⊤ −1 􏰫−1
. Econometrics for Finance Lecture 4 15 / 35

Important issues in GMM
Implementation
Estimation
If N = d, choosing the optimal weight matrix is not important, asymptotically. (It may still be a good idea to use it, but asymptotically any weight matrix would yield the same result.)
If N > d, we should employ the optimal weight matrix for estimation.
1 This matrix depends on θ0.
2 Idea: Estimate θ0 by using a first-stage estimate θ􏰑1 (computed T
with the identity matrix as the weight matrix).
3 Usethefirst-stageestimateθ􏰑1 tocomputeanestimateofthe
optimal weight matrix.
4 Second stage: Find θ􏰑2 using the estimated optimal weight matrix.
. Econometrics for Finance Lecture 4 16 / 35

Important issues in GMM
Implementation
The two-step procedure in detail
First stage: Estimate θ􏰑1 by T
arg min 􏰕gT (θ)⊤IN gT (θ)􏰖 , θ
where IN is an N × N identity matrix.
Then, estimate WT = Φ􏰑−1 using 0
T t=1 Second stage: Estimate θ􏰑2 by
WT = 1 􏰍 􏰪g(Xt+1, θT1 )g(Xt+1, θT1 )⊤ 􏰫
arg min 􏰕gT (θ)⊤WT gT (θ)􏰖 . θ
. Econometrics for Finance Lecture 4

Important issues in GMM
In both cases (N = d and N > d with an optimal weight matrix), the asymptotic variance is
and we estimate it with
V(θ ) = 1 􏰪Γ⊤Φ−1Γ 􏰫−1
1􏰪⊤ −1 􏰫−1
􏰑􏰑 T􏰑􏰑0􏰑 V(θT ) = Γ0 Φ Γ0
1 T−1 ∂g(Xt+1,θT) 1 T−1
Γ0 = 􏰍 􏰑 and Φ0 = 􏰍g(Xt+1,θT)g(Xt+1,θT)⊤. 􏰑T ∂θ⊤ 􏰑T 􏰑 􏰑
. Econometrics for Finance Lecture 4 18 / 35

HAC estimation
Dependence in the observations: HAC estimation
. Econometrics for Finance Lecture 4 19 / 35

HAC estimation
HAC estimation
In deriving the asymptotic variance of θT we used the fact that the observations X are uncorrelated.
This is clearly restrictive in finance.
In the C-CAPM case, for example, Xt+1 includes consumption
levels at time t + 1 ⇒ correlated with consumption levels at time t.
. Econometrics for Finance Lecture 4 20 / 35

HAC estimation
HAC estimation
With uncorrelated observations, we wrote 􏰪⊤􏰫
Φ0 = E g(Xt+1, θ0)g(Xt+1, θ0) . With correlated observations, we will write
(forward and backward) into account.
It is also completely analogous to variance estimation in the presence of correlated errors in the regression case.
􏰍􏰪⊤􏰫 E g(Xt+1, θ0)g(Xt+1+j , θ0) .
This is intuitive. The summation over j takes the correlation
. Econometrics for Finance Lecture 4 21 / 35

HAC estimation
HAC estimation
To estimate Φ0 we use the (truncated, to k terms) sample equivalent k 􏰬k−|j|􏰭 1 T−j ⊤
ΦT = 􏰍 􏰍 􏰪g(Xt+1,θT )g(Xt+1+j,θT ) 􏰫 (1)
The estimator is a weighted sum of auto-covariances computed using
Bartlett-type weights.
We will see that these weights derive naturally from the problem.
The usual requirements for consistency of Φ􏰑T for Φ0 are k → 0 and k2 → ∞. TT
We use the first-stage estimates θ(1) to compute the HAC optimal weight T
matrix and implement the second-stage estimation. We then use the
second-stage estimates θ(2) to compute the HAC optimal weight matrix to T
evaluate the asymptotic variance of the GMM estimator.
. Econometrics for Finance Lecture 4 22 / 35

HAC estimation
Understanding HAC
Assume at is a stationary time series and E(at) = 0.
t1􏰳2􏰂 t=1 􏰍
V√=E at 2 2t=1
2E(a1 + a2 + a1a2 + a2a1)
1 􏰡2E(a2t ) + (E(atat+1) + E(atat−1))􏰢 . 2
. Econometrics for Finance Lecture 4

HAC estimation
Understanding HAC
Now, consider
t1􏰳3􏰂 t=1 􏰍
V√=E at 3 3t=1
= 3E((a1+a2+a3)(a1+a2+a3))
= 3E(a1 +a2 +a3 +a1a2 +a1a3 +a2a1
+ a2a3 + a3a1 + a3a2)
= 13(3E(a2t ) + 2 (E(atat+1) + E(atat−1)) + E(atat+2) + E(atat−2)).
. Econometrics for Finance Lecture 4

HAC estimation
Understanding HAC
The general version (for any k) is k
􏰉a t1 t=1 
V  √  = kk
[(kE(at ) + (k − 1) (E(atat+1) + E(atat−1))
(k − 2)(E(atat+2) + E(atat−2) + .. + E(a1ak) + E(aka1)] 􏰍k k−|j|
k E(atat+j).
. Econometrics for Finance Lecture 4 25 / 35

Understanding HAC
1 We found:
2 When at = g(Xt+1, θ0), then
g(X ,θ0)  t+1 
HAC estimation
  􏰍k k−|j| t=1 
 k  j=−k k
E(atat+j). (2)
3 Notice that this is consistent with the way in which our estimator was written:
t=1 V √  =  k 
E(g(Xt+1,θ0)g(Xt+1+j,θ0) ). (3)
k􏰬 􏰭T−j􏰬 􏰭 􏰑􏰑􏰑
ΦT = 􏰍 k−|j| 1 􏰍 g(Xt+1,θT)g(Xt+1+j,θT)⊤ . (4) j=−k k T t=1
4 Naturally, as k → ∞, we have
  􏰍k k−|j| t=1 
k→∞ E(atat+j) →
 k  j=−k k
E(atat+j), (5)
which is the asymptotic expression of the variance (but infinite sums cannot be estimated and so we use Eq. (4)).
. Econometrics for Finance Lecture 4 26 / 35

Over-identifying restrictions
Testing for over-identifying restrictions
. Econometrics for Finance Lecture 4 27 / 35

Over-identifying restrictions
Hansen’s test
Once you have estimates, you can of course do inference on them. In the C-CAPM model, for example, is β = 0.95? Or, is γ = 3?
You can also evaluate whether the pricing errors are close to zero. Problem: are the moment conditions close to zero?
. Econometrics for Finance Lecture 4 28 / 35

Over-identifying restrictions
Hansen’s test
Implementation: The test statistic is
TQT (θT ) = TgT (θT )⊤Φ−1gT (θT ) Yd χ2N−d,
a Chi-Squared random variable with N − d degrees of freedom.
Non-mandatory proof
. Econometrics for Finance Lecture 4 29 / 35

Let us see GMM estimation in practice using Matlab …
. Econometrics for Finance Lecture 4 30 / 35

Hansen’s test: proof
We start with a Taylor’s expansion, stopped at the first order, around θ0:
1 T−1 1 T−1
􏰍 g(Xt+1, θT ) = 􏰍 g(Xt+1, θ0)
􏰳1 T−1 ∂g(Xt+1,θ0)􏰂􏰪 􏰫
and so we have
T t=1 ∂θ⊤ T−1 T−1
1􏰍a1􏰍√􏰪􏰫 √ g(Xt+1,θT)= √ g(Xt+1,θ0)+Γ0 T θT −θ0 ,
T􏰑T􏰑 t=1 t=1
where“=a”signifies“asymptoticallyequivalentto…”.
. Econometrics for Finance Lecture 4 31 / 35

Now, recall from our proof of asymptotic normality for GMM, that
T θT −θ0 =−(Γ0Φ Γ0) Γ0Φ √
g(Xt+1,θ0). 􏱦 􏱥􏱤 􏱧
􏰫 a ⊤ −1 −1 ⊤ −1 1 􏰍
Then, substituting in the main Taylor’s expansion,
T−1 T−1 1􏰍a1􏰍
g(Xt+1, θT ) = √ T􏰑T
g(Xt+1, θ0)
− Γ0(Γ⊤0 Φ−1Γ0)−1Γ⊤0 Φ−1 √ 􏰍 g(Xt+1, θ0)
1 T−1 0 0Tt=1
=a 􏰪IN − Γ0(Γ⊤0 Φ−1Γ0)−1Γ⊤0 Φ−1􏰫 ΨT . 00
. Econometrics for Finance Lecture 4 32 / 35

Now, consider the following
−1/2 1 T−1
Φ √ 􏰍g(Xt+1,θT) 􏰑T T 􏰑
a −1/21T−1
􏰑 = Φ √ 􏰍 g(Xt+1, θT )
=a Φ−1/2 􏰪IN − Γ0(Γ⊤0 Φ−1Γ0)−1Γ⊤0 Φ−1􏰫 ΨT
=a 􏰪IN − Φ−1/2Γ0(Γ⊤0 Φ−1Γ0)−1Γ⊤0 Φ−1/2􏰫 Φ−1/2ΨT 0000
=a PΦ−1/2ΨT, 0
where P is symmetric and idempotent.
. Econometrics for Finance Lecture 4 33 / 35

This, in turn, implies
=a Ψ⊤Φ−1/2P⊤PΦ−1/2Ψ T00T
=a Ψ⊤ Φ−1/2P Φ−1/2Ψ . T00T
Consider, now, the trace of P:
tr(IN − Φ−1/2Γ0(Γ⊤0 Φ−1Γ0)−1Γ⊤0 Φ−1/2)
= tr(IN ) − tr(Φ−1/2Γ0(Γ⊤0 Φ−1Γ0)−1Γ⊤0 Φ−1/2) 000
= N − tr((Γ⊤Φ−1Γ )−1(Γ⊤Φ−1Γ )) 000 000
= N−tr(Id)=N−d.
. Econometrics for Finance Lecture 4 34 / 35

Using Jordan’s decomposition:
= Ψ⊤T Φ−1/2P Φ−1/2ΨT 00
= Ψ⊤ Φ−1/2QΛQ⊤ Φ−1/2Ψ , T00T
􏱦 􏱥􏱤 􏱧􏱦 􏱥􏱤 􏱧
where Λ is a matrix of ones and zeros with N − d ones. Finally,
N−d TQT(θT)=􏰍zi2Yd χ2N−d i=1
since the zis are independent standard normal random variables. (Chapter 0 contains a discussion of the properties used above.)
Back to test
T QT (θT )
. Econometrics for Finance Lecture 4 35 / 35

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com