For parameter estimation using Kalman filter technique I have obtained the negative Log-likelihood of mutivariate gaussian. My problem is how to obtain the gradient and hessian from this log-likelihood by newton finite difference method for updating the parameters e.g H*deltatheta = G, where H is hessian and G is gradient of log-likelihood corresponding to the parameters.I am using Matlab. If possible please give some example in matlab code.
In addition to the EM algorithm already mentioned in other answer, a quasi-Newton algorithm can be used to numerically optimize your likelihood function. The BFGS algorithm for unconstrained optimization and the L-BFGS-B algorithm for bound constrained optimization are widely used to this end.
As proposed by @Arthur B., the EM algorithm is another alternative that you could use. It has some theoretical advantages: e.g., the likelihood always increase at each step of the algorithm and the derivation of the algorithm leads to closed-form expressions for the updating equations. It is also relatively robust to poorly chosen starting values. Some disadvantages are observed in practice, nonetheless. In the context of structural time series models, it converges slowly, especially as the algorithm approaches to the local optimum. The same may happen in other contexts but I can tell it by experience only in the context of structural time series models. This is already noticed in this paper, which is the basis of the reference given by Arthur:
Shumway, R.H. and Stoffer, D.S. (1982). An approach to time series smoothing and forecasting using the EM algorithm. Journal of Time Series Analysis, 3, 253-264.
In fact, the authors of this paper suggest using the EM algorithm for the first iterations of procedure and switch to another optimization algorithm after some iterations. Good candidates for these other algorithms are the BFGS or the L-BFGS-B algorithms mentioned above.
The paper mentioned by Arthur is a recent and interesting reference but I think that the issue of convergence (in terms of number of iterations required until convergence rather than computational time) remains still as a practical drawback. But I didn't read the paper thoroughly and didn't try the proposed implementation. It is worth a try to get a hands-on feel for the performance.
You may be interested in this paper:
Koopman, S. J. and Shephard, N. (1992). "Exact score for time series models in state space form". Biometrika (1992) 79 (4) pp.823-826. http://doi.org/10.1093/biomet/79.4.823.
Link to paper from author's website.
In this work, the authors describe a method to compute the gradient of the likelihood function for Gaussian state space models.
You should use the EM algorithm to fit the Kalman filter, rather than gradient descent. Check this paper for ideas on implementation details.