CAPITULO V: LA DINÁMICA UNIVERSITARIA EN LAS REFORMAS Y LOS IMPACTOS
3 INGRESO Y SELECTIVIDAD
In this section, the EKF as applied to the credit models explained. We follow closely the notation of Harvey (1989) and Duffee (1999). The theory and use of Kalman filters in economics is further explained in Harvey (1989), Hamilton (1994), and Durbin & Koopman (2001).
The Kalman filter is a recursive procedure for inferring the optimal estimator,a(t), of the true latent state-process, α(t), when the measurement equation is functionally linear with respect to the state variable. For a linear Gaussian model, the Kalman filter is directly equivalent solving the likelihood function (refer [p.126]Harvey (1989)). Where the measurement equation is functionally non-linear, as is the case with structural credit models, linearisation of the prediction equation provides only approximately optimal estimates, as the errors are no longer multivariate Gaussian, and the EKF produces an approximate quasi-likelihood function. Duan & Simonato (1999) demonstrates that the quasi-likelihood properties remain reasonably reliable for non-linear Kalman filters in small samples.
Leta(t−1) be the optimal estimator of α(t−1) given all observations up to and includingy(t−1), then the optimal prediction ofα(t)is
a(t|t−1) =T(t)a(t−1) +c¯(t), (3.13) and the variance, or mean square error (MSE), of the state prediction error is
P(t|t−1) =T¯(t)P(t−1)T¯(t)′+R(t)Q(t)R(t)′. (3.14) Moving through time from first to last observations, once a new vector of observed spreads,y(t), becomes available the prediction, a(t|t−1), is updated to give the best inference of the unobserved state value using all information up to, and including, time- t. The updating equation for the state vector is
a(t) =a(t|t−1) +P(t|t−1)G(t)′F−1(t) y(t)−G(t)−d(t)
, (3.15)
where,
F(t) =G(t)P(t|t−1)G(t)′+H(t). (3.16) The EKF is distinguished from a linear filter by the linearisation of the measurement equation using a Taylor series expression around the conditional mean of the state vector, a(t|t−1). The vectorGis ann(t)by one vector comprising
G(t) = ∂g(α(t);ψ1) ∂α(t) ∂g(α(t);ψ2) ∂α(t) · · ∂g(α(t);ψn(t)) ∂α(t) α(t)=a(t|t−1) (3.17)
whereg(α(t);ψi)is the predicted credit spread from the credit model for the i-th bond at time-t conditional on the model parameters. The partial derivatives are evaluated
numerically at the prior period prediction of the state value. The MSE of the updated state variable is then
P(t) =P(t|t−1)−P(t|t−1)G(t)′F(t)−1(t)G(t)P(t|t−1). (3.18) The step-ahead prediction errors, or innovations, are
v(t) =y(t)−G(t)−d(t). (3.19) The EKF is defined as the system of prediction and updating equations as shown above. Given starting values, for the initial state vector, a(0), and variance of the state vec- tor, P(0), the EKF predictive and updating equations are applied on each trade date to compute the time-series of step-ahead prediction errors and their variances. From a sin- gle pass through the EKF, the log-likelihood, conditional on the hyperparameter set is calculated by lnL(ψh) =−Nτ 2 ln 2π− 1 2 τ
∑
t=1+d (ln|F(t)|+v(t)′F−1(t)v(t)) (3.20) where the total number of non-missing observations is given byN=∑τt=1+dn(t) given that the size,n(t), of the observation vector varies with each trade date anddrepresents a diffuse prior and is equal to one where used.The log-likelihood function is conditional on the hyperparameters. The optimal set of hyperparameters, ˆψh, is found by numeric search performed to maximise the log- likelihood function shown in equation (3.20). The optimisation is achieved by an initial search using the simplex search method, followed by the well known Broyden-Fletcher- Goldfarb-Shanno (BFGS) gradient descent search method that we apply using numeric gradients. All code is implemented in OX software calling the MaxBFGS routine.5 The simplex method has the advantage of not requiring gradients and reduces the risk of locating a local minimum early in the search process. Transformations are made to the hyperparameters to enforce economic restrictions on the range of permissible values. Table 3.9, Panels A and B summarise the model parameter restrictions.
Asymptotic standard errors on the hyperparameters are estimated numerically via inversion of the Hessian matrix of the log-likelihood function. The EKF provides only approximate standard errors because of the non-linearity of the measurement equation and hence error terms.
A pass through of the data for each firm, at the optimal hyperparameter set, gen- erates a time series of state estimates, a(ˆt), termed the filtered estimates. It is the best estimate of the state vector given all information up to time-t. However, an improved
5OX is a C based matrix language designed for econometric use. Further details are available at
inference of the state vector can be made with the additional information available after time-t. Following Duffee (1999), a process termed smoothing is applied to the filtered estimate to give a better inference of the true underlying state process. The smooth- ing method applied uses the full data set and is termed a fixed-interval smoother and is further described in Harvey (1989, p.154), and Hamilton (1994, Section 13.6).
Recall that the transition equation is autoregressive, the process of smoothing works backwards from the final prediction of the state vector,a(T), and its MSE,P(T). Let a(t|T) denote the smoothed estimate of the state vector and P(t|T) its MSE, then the smoothed estimates are given by
a(t|T) =a(t) +P∗(t)(a(t+1|T)−T(t+1)a(t)−c¯(t+1)), (3.21) and
P(t|T) =P(t) +P∗(t)(P(t+1|T)−P(t+1|t))P∗′(t), (3.22) where
P∗(t) =P(t)T′(t+1)P−1(t+1|t), (3.23) with the initial valuesa(T|T) =a(T), andP(T|T) =P(T).