The General Method of Moments ( GMM ) using MATLAB : The practical guide based on the CKLS interest rate model

The General Method of Moments (GMM) is an estimation technique which can be used for variety of financial models. We use the CKLS class of interest rate models to demonstrate how GMM works. We discuss the practical implementation in MATLAB. We pay attention to exactly-identified versus overidentified estimation, minimization of objective function and hypothesis testing of the model. We then illustrate problem areas in implementation, specifically the importance of the variance-covariance matrix estimator of moment functions. Our technical note is supplemented with the MATLAB code of discussed topics. 1 Short-Term Interest Rate Stochastic Differential Equation The dynamics of a short-term interest rate can be nested within the following stochastic differential equation (SDE): drt = (α + βr)dt + σrdZt, (1) where α, β, σ, γ are model parameters, rt is the short-term interest rate and Zt is the standard Brownian motion. CKLS [1] defines the parameter vector θ = (α, β, σ2, γ). The SDE (1) defines a broad class of interest rate processes which include many well-known one-factor interest rate models. These models can be obtained from (1) by placing appropriate restrictions on the parameters (see Table 1). CKLS estimated nine different specifications of the interest rate process. In this paper, we implement three of them. The implemented models are summarized in Table 1. Adding further specifications is a routine task. Name SDE Restrictions CKLS drt = (α + βrt)dt + σr γ t dZt (unrestricted) CIR drt = (α + βrt)dt + σ √ rtdZt γ = 12 Vasicek drt = (α + βrt)dt + σdZt γ = 0 Table 1: Implemented short-term interest rate processes. CIR and Vasicek are probably the most commonly used models among the models analyzed in the CKLS paper. 2 GMM Estimation of the Short-Term Interest Rate SDE To estimate the parameters of the model, CKLS relied on the General Method of Moments (GMM). We present basic ideas of this estimation technique in this section. Details can be found in [2]. Supported by IG410067 and EEA/Norwegian FMP – Student mobility 2.1 Moment Conditions To estimate parameters of a SDE using the GMM we have to discretize the SDE. CKLS applied Euler discretization scheme on (1): rt+1 − rt = α + βrt + εt+1, (2) εt+1 ≡ σr t N(0, 1), (3) where N(0, 1) is a random shock with zero mean and unit variance. It does not have to be necessarily drawn from the standard Gaussian distribution, although Euler discretization assumes that. From (3) we can immediately observe that E [εt+1] = 0, (4) D[εt+1] = E[εt+1] = σ 2r t . (5) Employing the characteristics (4) and (5) and using the notion that the error term εt+1 is uncorrelated with the explanatory variable rt (orthogonality condition), CKLS derived a set of four moment functions: ft(θ) = [ εt+1 εt+1 − σ2r 2γ t ] ⊗ [ 1 rt ] =  εt+1 εt+1rt εt+1 − σ2r 2γ t (εt+1 − σ2r 2γ t )rt  . (6) The moment functions are constructed so that E[ft(θ)] = 0. (7) Equations (7) are called moment conditions of moments E[ft(θ)] in the GMM terminology. The basic idea of GMM is to pick model parameters that “fit” these moment conditions in our data set. We could easily come up with additional moment conditions. For example, we restrict that εt is not autocorrelated, i.e. E[εt+1εt] = 0.