Estimation of MRR (1997) model with GMM

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
onem
Posts: 25
Joined: Wed Nov 03, 2010 10:17 am

Estimation of MRR (1997) model with GMM

Unread post by onem »

I am trying to replicate the results of T. Clifton Green (2004), Journal of Finance, Vol 59, No 3.
Economic news and the impact of trading on bond prices. I am trying to estimate equation 2 in his paper.
Green's model is based on Madhavan, Richardson, and Roomans (1997) paper (Review of Financial Studies 10, 1035-1064.

Can you please tell me what I am doing wrong? Standard errors and t statistics for Rv coefficient is not produced. I need to estimate the model with GMM. MRR argues that it would be better to estimate with GMM. I can post these papers if you want me to. Thank you, Onem

Here is my program and results:

Code: Select all

*A=1 if transaction is buyer initiated and A=-1 if trade is seller initiated.
*L1A is last A.
*TrPrice is transaction price and L1TrPrice is last transaction price.

set Ret = 100*log(TrPrice/L1TrPrice)
set Ret = 1000*Ret
*
*
nonlin KV TV RV
*
frml MRR Ret = (KV+TV)*A-(KV+RV*TV)*L1A
*
*
linreg Ret
# A L1A
*
compute KV=%beta(1)*0.5
compute TV=%beta(1)*0.5
compute RV=0.5
*
instruments constant Ret{2 to 5} A{2 to 5}
*
nlls(PMETHOD=simplex,PITERS=10,METHOD=GAUSS,inst,optimal,trace,frml=MRR) Ret

Linear Regression - Estimation by Least Squares
Dependent Variable RET
Usable Observations                    1778679
Degrees of Freedom                     1778677
Centered R^2                         0.1720066
R-Bar^2                              0.1720061
Uncentered R^2                       0.1720085
Mean of Dependent Variable        0.0055888717
Std Error of Dependent Variable   3.7038836737
Standard Error of Estimate        3.3703181945
Sum of Squared Residuals          20204071.608
Log Likelihood                   -4684942.8910
Durbin-Watson Statistic                 2.1939

    Variable                         Coeff      Std Error      T-Stat      Signif
*************************************************************************************
1.  A                              1.510307256  0.002566376    588.49795  0.00000000
2.  L1A                           -0.647940378  0.002566376   -252.47285  0.00000000


Simplex Optimization, Trial 0. Function Calls: 4
Old Function = 3935.609187      New Function = 3772.618781
New Coefficients:
      0.755154       0.679638       0.500000

Simplex Optimization, Trial 1. Function Calls: 6
Old Function = 3772.618781      New Function = 3593.108769
New Coefficients:
      0.679638       0.679638       0.600000

...

Simplex Optimization, Trial 58. Function Calls: 115
Old Function = 2456.168287      New Function = 2446.621522
New Coefficients:
      0.672546      -0.663959       0.600750

Simplex Optimization, Trial 60. Function Calls: 118
Old Function = 2446.621522      New Function = 2444.200720
New Coefficients:
      0.641206      -0.712687       0.596366

Simplex Optimization, Trial 62. Function Calls: 122
Old Function = 2444.200720      New Function = 2442.996142
New Coefficients:
      0.652400      -0.695724       0.588318

Non-Linear Optimization, Iteration 0. Function Calls 125.
 Cosine of Angle between Direction and Gradient  0.2649041. Alpha used was 0.000000
 Adjusted squared norm of gradient 1.9375
 Diagnostic measure (0=perfect) 0.0000
 Subiterations 1. Distance scale  1.000000000
Old Function = 2442.996142      New Function = 2441.259445
New Coefficients:
      0.642880      -0.727518       0.588318

Non-Linear Optimization, Iteration 1. Function Calls 127.
 Cosine of Angle between Direction and Gradient  0.5671303. Alpha used was 0.000000
 Adjusted squared norm of gradient 1.907987
 Diagnostic measure (0=perfect) 0.7000
 Subiterations 1. Distance scale  1.000000000
Old Function = 44.845186        New Function = 42.987933
New Coefficients:
      0.655094      -0.523148       0.588318

Non-Linear Optimization, Iteration 2. Function Calls 129.
 Cosine of Angle between Direction and Gradient  0.2359073. Alpha used was 0.000000
 Adjusted squared norm of gradient 0.0001497426
 Diagnostic measure (0=perfect) 0.4200
 Subiterations 1. Distance scale  1.000000000
Old Function = 44.087863        New Function = 44.087707
New Coefficients:
      0.654841      -0.521565       0.588318

Non-Linear Optimization, Iteration 3. Function Calls 131.
 Cosine of Angle between Direction and Gradient  0.2336698. Alpha used was 0.000000
 Adjusted squared norm of gradient 5.243121e-009
 Diagnostic measure (0=perfect) 0.2520
 Subiterations 1. Distance scale  1.000000000
Old Function = 44.094143        New Function = 44.094143
New Coefficients:
      0.654839      -0.521556       0.588318

GMM-Continuously Updated Weight Matrix - Estimation by Gauss-Newton
Convergence in     3 Iterations. Final criterion was  0.0000091 <=  0.0000100
Dependent Variable RET
Usable Observations                   1778674
Degrees of Freedom                    1778671
Mean of Dependent Variable       0.0055756956
Std Error of Dependent Variable  3.7038749710
Standard Error of Estimate       3.6333416051
Sum of Squared Residuals         23480540.413
J-Specification(7)                    44.0941
Significance Level of J             0.0000002
Durbin-Watson Statistic                2.1814

    Variable                        Coeff      Std Error      T-Stat      Signif
************************************************************************************
1.  KV                            0.654839007  0.033694981     19.43432  0.00000000
2.  TV                           -0.521556067  0.153608657     -3.39536  0.00068539
3.  RV                            0.588317639  0.000000000      0.00000  0.00000000
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Estimation of MRR (1997) model with GMM

Unread post by TomDoan »

What's identifying the three coefficients? You have three constants "determining" two coefficients (on the A and the L1A). There are going to be an infinite number of ways to get the same fit. (As RATS will estimate that, the 3rd coefficient is just stuck at a value and the other two adjust).
onem
Posts: 25
Joined: Wed Nov 03, 2010 10:17 am

Re: Estimation of MRR (1997) model with GMM

Unread post by onem »

Tom,

Thank you for your reply. I thought the instruments will identify the coefficients. Can you please explain little bit more what I am missing in my program?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Estimation of MRR (1997) model with GMM

Unread post by TomDoan »

The three coefficients are KV, TV and RV. A and L1A are time-varying:

(KV+TV)*A-(KV+RV*TV)*L1A

The three parameters only actually create two values (KV+TV and KV+RV*TV). If you take any non-zero RV, you can come up with a KV, TV combination that hits any pair of values. Either there's something missing in the model, or one of those three is supposed to be pegged to a value. (If you fix any one, you can estimate the other two).
onem
Posts: 25
Joined: Wed Nov 03, 2010 10:17 am

Re: Estimation of MRR (1997) model with GMM

Unread post by onem »

I understand now. Thank you for your explanation. However, Green and MRR estimate these coefficients somehow with GMM. Any one of the coefficients is not pegged. The model is correct as far as know. Do you want me to email you the papers?

They specify moment conditions. I haven't seen any sample RATS program about how to incorporate the moment conditions.

Regards,

Onem
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Estimation of MRR (1997) model with GMM

Unread post by TomDoan »

Do they have a condition on the square? The CKLS paper does a bunch of GMM's with moment conditions.
onem
Posts: 25
Joined: Wed Nov 03, 2010 10:17 am

Re: Estimation of MRR (1997) model with GMM

Unread post by onem »

Thank you for the link. MRR has five moment conditions and one of the moment conditions is E[A*L1A - A*A*RV]=0.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Estimation of MRR (1997) model with GMM

Unread post by TomDoan »

As you wrote that, you're only using one basic moment condition.
onem
Posts: 25
Joined: Wed Nov 03, 2010 10:17 am

Re: Estimation of MRR (1997) model with GMM

Unread post by onem »

Hi Tom,

Why is it that CKLS paper results have many zero coefficients and standard errors? Are the coefficients in that example not identified either?

Thank you,

Onem
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Estimation of MRR (1997) model with GMM

Unread post by TomDoan »

That's intentional in that case. They're fitting a large number of models which are restrictions on the full model:

nonlin(parmset=baseparms) alpha beta sigmasq gamma
nonlin(parmset=merton) beta=0.0 gamma=0.0
nonlin(parmset=vasicek) gamma=0.0
nonlin(parmset=cir_sr) gamma=0.5
nonlin(parmset=dothan) alpha=0.0 beta=0.0 gamma=1.0
nonlin(parmset=gbm) alpha=0.0 gamma=1.0
nonlin(parmset=brennan) gamma=1.0
nonlin(parmset=cir_vr) alpha=0.0 beta=0.0 gamma=1.5
nonlin(parmset=cev) alpha=0.0

So, for instance, the merton model will have beta and gamma pegged at zero, estimating only alpha and sigmasq.
onem
Posts: 25
Joined: Wed Nov 03, 2010 10:17 am

Re: Estimation of MRR (1997) model with GMM

Unread post by onem »

Thank you, Tom!
onem
Posts: 25
Joined: Wed Nov 03, 2010 10:17 am

Re: Estimation of MRR (1997) model with GMM

Unread post by onem »

Hi Tom,

CKLS paper has four parameters and four moment conditions (equation 4, page 1214) but in the RATS program they use only two conditions:

nonlin(parmset=baseparms) alpha beta sigmasq gamma
*
frml eps = dr{-1}-(beta*r+alpha)/12.0
frml variance = eps(t)^2-(sigmasq/12.0)*r^(2*gamma)
*
* Just identified model with all coefficients. Save the weight matrix
* for use with the restricted models.
*
instruments constant r
nlsystem(instruments,parmset=baseparms,zudep) / eps variance

Shouldn't we have the number of orthogonality conditions equal to the number of parameters to be estimated so that the model is just identified?

The model has one explanatory variable and two instrumental variables. I find that the results are very sensitive to the number and type of instrumental variables used. Is there a more robust way of estimation?

Regards,

Onem
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Estimation of MRR (1997) model with GMM

Unread post by TomDoan »

No. With two instruments and two moment equations, there are four orthogonality conditions.

Just-identified models (such as this one without any restrictions) will come up with the same parameters no matter how you weight them, but you'll get different results (and the results will depend upon the weight matrices) if you add instruments or if you add restrictions to make it overidentified.

As to whether there's an alternative which is more robust to choice of instruments, that's something you should probably address to the authors---that behavior will be very specific to a particular model.
onem
Posts: 25
Joined: Wed Nov 03, 2010 10:17 am

Re: Estimation of MRR (1997) model with GMM

Unread post by onem »

Dear Tom,

Thank you very much for your replies. I really appreciate it. To avoid different results when different instruments are chosen, what happens if I do not use instrumental variables and instead use four moment conditions? The model is still just identified. I tried it and got results but it does not say in the output that it is a GMM estimation. What is the downside of this?

All the best,

Onem
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Estimation of MRR (1997) model with GMM

Unread post by TomDoan »

I think you're misunderstanding what I was saying. If the model is just identified for a particular set of instruments the point estimates don't depend upon the weight matrices. If it's just identified with a different set of instruments, you'll get different estimates (which again won't depend upon the weight matrices). If the model is overidentifed, then estimates will depend both upon the set of instruments and upon the choice of weight matrices. This is simply the nature of this type of estimation.
Post Reply