Maximum Likelihood using a Kalman filter for two factor model

I'm trying to implement a Kalman Filter for the parameter estimation of a linear gaussian two factor model in Matlab. (Schwartz Smith model for commodity prices) In other words: I try to compute the log-likelihood of the parameters.

My model:

$X_t = A X_{t-1} + \epsilon_X$ , with X beeing two-dimensional.

$Y_t = \begin{pmatrix} 1 \\ 1 \end{pmatrix}^T X_t + \epsilon_Y$ , with Y beeing one-dimensional.

$A$ is time invariant and only depends on the parameters $\theta$, which I would like to determine.

My question:

Whats the variance of $\epsilon_Y$ ? I know, that it normally represents the noise of the measurement process, but I don't know what would be the equivalent in an economic context?

I managed to implement the filter and the results for experimenting with the variance are (mean = 0):

• For high variance: High log-likelihood in unreasonable areas far away from the real values.
• For very (!) small variance: Reasonable results close to real values, but extremly small log-likelihoods around $-10^{12}$. I fear, that this will cause numerical issues in the upcoming maximum likelihood estimation. (I plan to use Metropolis Hastings)

Any help would be appreciated! Thanks!

-
Have you considered using R rather than Matlab? In R, there is already an implementation of the Schwartz-Smith model, including parameter estimation: cran.r-project.org/web/packages/schwartz97 – pteetor Nov 29 '13 at 16:57

Usually $var(e_x), var(e_y)$ variances are calibrated by maximum likelihood from data similar as you want to calibrate your parameters $\theta$.

Ratio $var(e_x)/var(e_y)$ tells you what are changes in your time-series

• $var(e_x)/var(e_y)$ is small: changes in time-series of observations are just noise and underlying state doesn't change much;
• $var(e_x)/var(e_y)$ is large: changes are due to change of state and observations data represent states almost exactly, without noise.

What you describe is reasonable:

• "For high variance: High log-likelihood in unreasonable areas far away from the real values" - if noise is high it is likely to have observations in a wide band around realized observations. In that case if you filter with KF it will smooth your data hardly to recover true states.
• "For very (!) small variance: Reasonable results close to real values, but extremly small log-likelihoods around" - if noise variance is small, then your observations are unlikely to deviate anywhere from expected and this means you assume that your realized observations are almost exactly reflect your states so if you filter with KF it will pass via all you observations without any smoothing.
-
Thanks a lot. Do you have any resources for reading about how to do the calibration of the variances? – Djeramon Nov 29 '13 at 9:03