程序代写 Nonlinear Econometrics for Finance Lecture 3

Nonlinear Econometrics for Finance Lecture 3

Nonlinear Econometrics for Finance Lecture 3 1 / 34

Copyright By PowCoder代写 加微信 powcoder

Plan of today’s class
1 Describe the GMM estimator
2 Show that
3 Show that
Next class…
1 Show how
2 Show how
correlated
3 Show how
GMM is consistent estimator
GMM is asymptotically normal estimator
to compute asymptotic variance and standard errors to correct the asymptotic variance when data are
to do testing
The GMM estimator

Nonlinear Econometrics for Finance Lecture 3 2 / 34

The GMM estimator
Population moments
Our theory tells us that this equation is satisfied
E􏰜m (θ)(1+Ri )−1􏰝=0 forallassetsi=1,…,N (1)
So if we stack all the equations in a vector we get an N × 1 vector
E 􏰗mt+1(θ)(1 + R1 t+1
E 􏰗mt+1(θ)(1 + R2
) − 1􏰘 0 ) − 1􏰘 0
 . E􏰗mt+1(θ)(1+RN )−1􏰘
 = . (2)  .
These are called the population moments or theoretical moments
Nonlinear Econometrics for Finance Lecture 3 3 / 34

The GMM estimator
Sample moments
We define the pricing error for asset i at time t as g(Xi ,θ)=m (θ)(1+Ri )−1
t+1 t+1 t+1
and then compute the sample means of those for each asset to get
1􏰋 Tt=1t+1 t+1
1 T−1 1 T−1
􏰋g(Xi ,θ)= 􏰋􏰗m (θ)(1+Ri )−1􏰘
T t+1 T t+1 t+1 t=1 t=1
So the N × 1 vector of sample moments is defined as 1 􏰖T−1 􏰗mt+1(θ)(1+R1
)−1􏰘 )−1􏰘
g(Xt+1, θ) = .  . 
1 􏰖T−1 􏰗mt+1(θ)(1 + RN ) − 1􏰘 T t=1 t+1
Nonlinear Econometrics for Finance Lecture 3
T t=1 t+1 T−1 1 􏰖T−1􏰗m (θ)(1+R2

The GMM estimator
The GMM estimator is based on the fact that if the model works, then we should have
1 􏰖T−1 􏰗mt+1(θ)(1+R1 )−1􏰘 0 T t=1 t+1
1 􏰖T−1 􏰗mt+1(θ)(1+R2 )−1􏰘 0 Tt=1 t+1 
 .  ≈ .  
1 􏰖T−1 􏰗mt+1(θ)(1 + RN ) − 1􏰘 T t=1 t+1
Or in compact notation
gT (θ) ≈ 0
So the parameters θ solve the system of equations above.
Nonlinear Econometrics for Finance Lecture 3

The GMM estimator
The GMM estimation procedure is based on the idea that if gT (θ) ≈ 0
then we have g (θ)⊤g
(θ) = 􏰋 i=1
So minimizing the expression in (9), is the same as to solve the system
of equations in (8)
(θ)(1 + Ri
Nonlinear Econometrics for Finance Lecture 3 6 / 34

The GMM estimator
The Generalized Method of Moments uses a weighted version of the quadratic function in (9), we instead minimize
QT(θ) = gT(θ)⊤ WT gT(θ). 􏰐 􏰏􏰎 􏰑 􏰐 􏰏􏰎 􏰑􏰐􏰏􏰎􏰑􏰐􏰏􏰎􏰑
1×1 1×N N×N N×1 where WT is a N × N matrix of weights.
The parameter estimate is
θT =argminQT(θ) θ

Nonlinear Econometrics for Finance Lecture 3

The GMM estimator
GMM with two assets in C-CAPM
The model:
) − 1􏰈 ) − 1
(θ)(1 + R1 t+1
(θ)(1 + R2 t+1
􏰒g1(X g2(X
, θ)􏰓 , θ)
= E(g(X , θ)) = 0, t+1
where N is the number of assets (1 moment condition per asset). Empirically:
T−1􏰇 1 􏰈 T−1􏰒 􏰓 T−1
1 􏰋 mt+1(θ)(1+Rt+1)−1 = 1 􏰋 g1(Xt+1,θ) = 1 􏰋 g(X ,θ)=g (θ)≈0.
T t=1 mt+1(θ)(1+Rt+1)−1 Estimation criterion:
T t=1 g (Xt+1,θ)
T t=1 􏰐 􏰏􏰎 􏰑 2×1
􏰀 1 􏰖T−1 1
1 􏰖T−1 2 
t=1 g (Xt+1,θ)
t=1 g (Xt+1,θ) θT = argmin T t=1 g (Xt+1,θ) T t=1 g (Xt+1,θ) WT 1 􏰖T−1 2
= argming (θ)⊤ W g (θ) = argminQ (θ). T TT T
θ 􏰐 􏰏􏰎 􏰑􏰐􏰏􏰎􏰑􏰐 􏰏􏰎 􏰑 θ 􏰐 􏰏􏰎 􏰑 1×2 2×2 2×1 1×1
Nonlinear Econometrics for Finance Lecture 3 8 / 34

The GMM estimator
GMM with two assets in C-CAPM
Re-writing the estimation criterion:
θT = argmin θ
t=1 g (Xt+1,θ)
g (Xt+1,θ) T
argminw1 
g (Xt+1,θ)
g (Xt+1,θ) g (Xt+1,θ). T t=1
1 􏰖T−1 T t=1
w3 T t=1 g (Xt+1,θ)
T t=1 g (Xt+1,θ) T
􏰃 􏰄 􏰇1􏰖T−11 􏰈
t=1 g (Xt+1,θ) θT = argmin T t=1 g (Xt+1,θ) T t=1 g (Xt+1,θ) WT 1 􏰖T−1 2
􏰀 1 􏰖T−1 1 1 􏰖T−1 2 T
θ 􏰐􏰏􏰎􏰑 T t=1 g (Xt+1,θ)
2×2 If WT = I2, then we minimize the sum of the squared pricing errors.
T t=1 g (Xt+1,θ) 1 􏰖T−1 2
T t=1 g (Xt+1,θ)
If WT is a generic symmetric matrix, then we minimize a “weighted” sum of the squared pricing errors.
2 
= argmin 1 1 􏰋 g1(Xt+1,θ) +1 1 􏰋 g2(Xt+1,θ) .
 T−1 θ T t=1 T t=1
  T−1 2
g (Xt+1,θ) +w2 
 T−1 1􏰋1 1􏰋2
􏰄􏰒 􏰓􏰇1􏰖T−1 1 􏰈
􏰓􏰇1􏰖T−1 1 􏰈
w 1 􏰖T−1 2
3 2 T t=1g(Xt+1,θ)
g (Xt+1,θ) +

Nonlinear Econometrics for Finance Lecture 3

Notation and dimensions
In the next few slides
N = number of moments (assets)
d = number of parameters
T = number of observations
The GMM estimator
θ0 = true parameter value (parameter in the population) 􏰀
θT = estimated parameter
Nonlinear Econometrics for Finance Lecture 3 10 / 34

The GMM estimator
How do you find the parameter estimate?
Take partial derivatives with respect to each parameter and equate to
∂QT(θ) 0 ∂Q (θ) ∂θ1
T  .  . ∂θ = . =.
 􏰐 􏰏􏰎 􏰑 ∂QT(θ)
d×1 This is a system of d equations with d unknowns.
Solution is our estimate θT

Nonlinear Econometrics for Finance Lecture 3

The GMM estimator
Some important ingredients
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 (θ)   
T−1  T−1 ∂θ 􏰋 􏰋
∂QT (θ) ∂θ
 ∂QT (θ) 1 ∂g(Xt+1,θ) 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 (θ) · · · ∂2QT (θ)   ∂θ1∂θ1 ∂θ1∂θ2 ∂θ1∂θd  ∂2QT(θ) ∂2QT(θ) ··· ··· 
1222  ··· ··· ··· ···
∂θm∂θj T t=1 ∂θm
 T−1 2 ⊤ +2 1􏰋∂g(Xt+1,θ)
T t=1 ∂θj  T−1 
∂θ ∂θ ∂θ ∂θ
 · · · · · ·
· · · ∂2QT (θ)  ∂θd∂θd
W 1 􏰋 ∂g(Xt+1,θ)
∂ QT(θ) =2 1 􏰋 ∂g(Xt+1,θ)
1􏰋g(X ,θ).  Tt+1

T t=1 ∂θm∂θj T t=1
Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
Consistency and Asymptotic Normality of GMM estimators
Nonlinear Econometrics for Finance Lecture 3 13 / 34

Asymptotic analysis for GMM
Consistency of estimates
Assume N moment conditions and d parameters with N ≥ d. Assume there is no dependence in the data
Note: this is restrictive and can be relaxed.
We assume that the weight matrix converges in probability
WT →p W. We will get back to this later.
Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
Consistency of GMM estimates
By Taylor’s expansion (first order), around the true value θ0:
∂ Q ( θ􏰀 ) ∂ Q ( θ ) ∂ 2 Q ( θ ) 􏰃 􏰄
T T − T 0 = T 0 θT−θ0 .
d×d matrix
d×1 vector 􏰀
to θ, and θT is the minimizer. It follows that
Note: ∂QT (θT ) ≈ 0. Indeed, we are minimizing Q (θ) with respect ∂θ T
􏰄 􏰒∂2QT (θ0)􏰓−1 ∂QT (θ0)
􏰐 􏰏􏰎 􏰑􏰐 􏰏􏰎 􏰑
∂θ∂θ⊤ ∂θ (b) (a)

Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
Consistency of GMM estimates
We now have this relationship
􏰄 􏰒∂2QT (θ0)􏰓−1 ∂QT (θ0)
􏰐 􏰏􏰎 􏰑􏰐 􏰏􏰎 􏰑
∂θ∂θ⊤ ∂θ (b) (a)
To prove consistency, we want/need to prove that as T → ∞
􏰃θ −θ􏰄→p 0 or θ →p θ
We will do that in steps:
1 We show what happens to terms (a) and (b) as T → ∞
2 We use Slutsky theorem to show what happens to their product
Nonlinear Econometrics for Finance Lecture 3 16 / 34

Asymptotic analysis for GMM
Consistency of GMM estimates: term (a)
Let’s now move to term (a) Notice that
BytheWLLN,asT →∞.
􏰒∂gT (θ0)􏰓⊤
∂θ⊤ WT gT (θ0),
gT (θ0) = 􏰋 g(Xt+1, θ0) → E(g(Xt+1, θ0),
Because, E(g(Xt+1, θ0) = 0, we have
1 T−1 p gT (θ0) = 􏰋 g(Xt+1, θ0) → 0
Nonlinear Econometrics for Finance Lecture 3 17 / 34

Asymptotic analysis for GMM
Consistency of GMM estimates: term (a)
By the WLLN sample means of derivatives will converge to the corresponding expectation
1 T−1 ∂g(Xt+1,θ0)
p 􏰒∂g(Xt+1,θ0)􏰓
therefore ∂gT(θ0)
1 T−1 ∂g(Xt+1,θ0) T ∂θ⊤
N×d 􏰐 􏰏􏰎 􏰑 N×d
∂θ⊤ 􏰐􏰏􏰎􏰑 􏰐 􏰏􏰎 􏰑N×d
p 􏰒∂g(Xt+1,θ0)􏰓 =􏰋 −→E =Γ0
N×d where we have called Γ0 the matrix of expected values.
Therefore we have that (recall that WT →p W by assumption) ∂ Q T ( θ 0 ) →p 0
Nonlinear Econometrics for Finance Lecture 3 18 / 34

Asymptotic analysis for GMM
Consistency of GMM esitmates: term (a)
Therefore we have that (recall that WT →p W by assumption) ∂QT (θ0) 􏰒∂gT (θ0)􏰓⊤
∂θ = 2 ∂θ⊤ WTgT(θ0) (12) 0
0 →p 2Γ⊤0W0= .

Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
Consistency of GMM estimates: term (b)
Let’s consider term (b), the matrix of second derivatives ∂2QT (θ0).
∂θ∂θ⊤ Each entry for m, j = 1, …, d. of the matrix has expression
􏰅∂2QT (θ0)􏰆 ∂θ∂θ⊤
 1 􏰋 ∂g(Xt+1, θ0) 1 􏰋 ∂g(Xt+1, θ0)
T ∂θm  T ∂θj
 t=1  􏰐􏰏􏰎􏰑 t=1 N×N
􏰐 􏰏􏰎 􏰑 􏰐 􏰏􏰎 􏰑
N×1 N×1 􏰐 􏰏􏰎 􏰑
1×N after transposing
∂θ ∂θ  WT T g(Xt+1,θ0) m j  􏰐􏰏􏰎􏰑 t=1
T−1 T−1 1 􏰋∂2g(Xt+1,θ0) 1 􏰋
􏰐 􏰏􏰎 􏰑 􏰐 􏰏􏰎 􏰑

1×N after transposing
Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
Consistency of GMM estimates: term (b)
STEP 1: Consider the second term in red in the previous slide. By the weak law of large numbers, the very last term
g(Xt+1,θ0)−→0 􏰐 􏰏􏰎 􏰑
􏰋 g(Xt+1, θ0) −→ E(g(Xt+1, θ0) = 0
Using the Slutsky theorem, the product
1 􏰋 ∂2g(Xt+1,θ0)
WT T 􏰐􏰏􏰎􏰑 t=1
Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
Consistency of GMM estimates: term (b)
STEP 2: The first term of 􏰚∂2QT (θ0)􏰛 in blue is an average of ∂θ∂θ′ mj
derivatives of the moments.
By the WLLN it will converge to the corresponding expectation
1 T−1 ∂g(Xt+1,θ0)
p 􏰒∂g(Xt+1,θ0)􏰓
therefore ∂gT(θ0)
1 T−1 ∂g(Xt+1,θ0)
=􏰋 −→E =Γ0
N×d 􏰐 􏰏􏰎 􏰑
p 􏰒∂g(Xt+1,θ0)􏰓
􏰐 􏰏􏰎 􏰑N×d N×d
where we have called Γ0 the matrix of expected values.
Nonlinear Econometrics for Finance Lecture 3 22 / 34

Asymptotic analysis for GMM
Consistency of GMM esimates: term (b)
STEP 3: So now we put things together, use Slutsky theorem and we get that
∂2QT (θ0) ∂θ∂θ⊤
p 􏰅∂g(Xt+1, θ0)􏰆⊤ 􏰅∂g(Xt+1, θ0)􏰆
∂θ⊤ WE ∂θ⊤ = 2Γ0WΓ0.

Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
Consistency of GMM estimates: all pieces together
Summarizing, we have shown that
( a ) ∂ Q T ( θ 0 ) →p ∂θ
(b) ∂2QT(θ0) →p ∂θ∂θ′
and therefore we have that
􏰒∂2QT (θ0)􏰓−1 ∂QT (θ0) ∂θ∂θ⊤ ∂θ
0 , 2Γ⊤WΓ.
θT−θ0 =− or equivalently
θT −θ0 −→0 or θT −→θ0.
Therefore, θT is a consistent estimator of θ.
Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
Asymptotic Normality
Let’s get back to our original equation:
􏰃 􏰄 􏰒∂2QT (θ0)􏰓−1 ∂QT (θ0)
Remember that for asymptotic normality we need some normalization √
Multiplying by T on both sides
􏰃 􏰄 􏰒∂2QT (θ0)􏰓−1√
T θT−θ0 =− T ∂θ∂θ⊤
∂QT (θ0) ∂θ
We already know what is the asymptotic behavior of term (b)
∂2QT(θ0) →p 2Γ⊤WΓ ∂θ∂θ′ 0 0
Nonlinear Econometrics for Finance Lecture 3 25 / 34

Asymptotic analysis for GMM
Asymptotics for term (a)
∂QT (θ0) √ 􏰒∂gT (θ0)􏰓⊤
T ∂θ = T2 ∂θ⊤ WTgT(θ0)
1 T−1 ∂g(Xt+1,θ0) 1 T−1
 WT √ 􏰋g(Xt+1,θ0) ∂θ⊤  􏰐􏰏􏰎􏰑 T t=1
􏰐 􏰏􏰎 􏰑 􏰐 􏰏􏰎 􏰑
d×N after transposing
The first term converges in probability to Γ0 by WLLN
1 T−1 ∂g(Xt+1,θ0) T t=1 ∂θ⊤

􏰒∂g(Xt+1,θ0)􏰓 ∂θ⊤
= Γ0 Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
Asymptotics for term (a)
By assumption WT →p W
We can then apply the central limit theorem to the second term
t=1 →d N (0, Φ0 ),
g(Xt+1, θ0) − E(g(Xt+1, θ0) 􏰈
= T T g(Xt+1,θ0)
where Φ0 is the variance-covariance matrix of a zero-mean vector 􏰃 ⊤􏰄
Φ0 = E g(Xt+1, θ0)g(Xt+1, θ0)
if the data has no dependence structure.
Nonlinear Econometrics for Finance Lecture 3 27 / 34

Asymptotic analysis for GMM
Using Slutsky’s theorem
 T−1  T−1 √ ∂QT(θ0) 1􏰋∂g(Xt+1,θ0) 1 􏰋
 WT √ g(Xt+1,θ0)
∂θ T ∂θ 􏰐􏰏􏰎􏰑T
 t=1  p t=1
􏰐 􏰏􏰎 􏰑→W􏰐 􏰏􏰎 􏰑
→p Γ0 →d N(0,Φ0) 􏰐 􏰏􏰎 􏰑
→p Γ ⊤0 N(0,4Γ⊤0 WΦ0WΓ0),

Nonlinear Econometrics for Finance Lecture 3 28 / 34

Asymptotic analysis for GMM
Putting pieces together
At this point we can put everything together and obtain:
􏰒∂2QT(θ0)􏰓−1√ ∂QT(θ0)
∂θ∂θ⊤ → N 0, Γ0WΓ0
Γ0WΦ0WΓ0 Γ0WΓ0
􏰒∂g(Xt+1,θ0)􏰓 Γ0=E ∂θ⊤ ,
􏰃⊤􏰄 Φ0 = E g(Xt+1, θ0)g(Xt+1, θ0) .

Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
The GMM estimates are consistent
The GMM estimates are asymptotically normal
The vector estimate θT converges to θ0 at speed
The precision of the estimates can be quantified by evaluating the
asymptotic variance-covariance matrix.
Nonlinear Econometrics for Finance Lecture 3 30 / 34

Asymptotic analysis for GMM
Summary of “consistency”
∂QT (θ0) ∂θ∂θ⊤ ∂θ
 −1 ∂2QT (θ0)
→p 0 􏰒∂gT (θ0)􏰓⊤
p ⊤ WTgT(θ0)→2Γ0 W0
(a)=2 􏰒∂gT(θ0)􏰓⊤
(b)→p 2Γ⊤0 WΓ0
(a)→p 2Γ⊤0 W0
∂θ⊤ (b) ≈ 2 ⊤
􏰒∂gT(θ0)􏰓 p ⊤
⊤ →2Γ0WΓ0 􏰒∂g(Xt+1,θ0)􏰓

Γ0 = E ∂θ⊤ .
Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
Summary of “asymptotic normality”
 −1 ∂2QT(θ0)
􏰐 􏰏􏰎 􏰑 􏰐 􏰏􏰎 􏰑
(b)→p 2Γ⊤0 WΓ0 (c)→d 2Γ⊤0 WN(0,Φ0)
N(0,(2Γ⊤0 WΓ0)−14Γ⊤0 WΦ0WΓ0(2Γ⊤0 WΓ0)−1) N(0,(Γ⊤0 WΓ0)−1Γ⊤0 WΦ0WΓ0(Γ⊤0 WΓ0)−1)
􏰒∂gT (θ0)􏰓⊤ (c)=2 ∂θ⊤ WT
√ d ⊤ TgT(θ0)→2Γ0 WN(0,Φ0)
􏰒∂gT(θ0)􏰓⊤ (b) ≈ 2 ⊤
􏰒∂gT(θ0)􏰓 p ⊤
⊤ →2Γ0WΓ0 􏰒∂g(Xt+1,θ0)􏰓 􏰃 ⊤􏰄
Γ0 = E ∂θ⊤ and Φ0 = E g(Xt+1, θ0)g(Xt+1, θ0) . Nonlinear Econometrics for Finance Lecture 3

Asymptotic analysis for GMM
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 test.
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.
Nonlinear Econometrics for Finance Lecture 3 33 / 34

Asymptotic analysis for GMM
Let’s see GMM estimation in practice with Matlab
Nonlinear Econometrics for Finance Lecture 3 34 / 34

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