Query regarding constrained Kalman Filtering

Discussion of State Space and Dynamic Stochastic General Equilibrium Models
debasish
Posts: 2
Joined: Mon Jul 24, 2017 6:28 am

Query regarding constrained Kalman Filtering

Unread post by debasish »

Dear Tom,
Hope you are doing well in this trying time!!
I have been trying to apply Kalman filtering on the two series given by "DV" and " IV" in the attached file named "Constrained Filtering" in the sheet named "Data', via a code as given in sheet "Codes." The state vectors as derived have been provided in the sheet named"State Vectors."
For my next step, I wish to constrain the values of obtained intercept and state vectors to be greater than 0.
I am unable to find a way to work it through.
I will be grateful for your support.

Thanks and Regards,
Debasish
Attachments
Constrained Filtering.xlsx
(75.59 KiB) Downloaded 811 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Query regarding constrained Kalman Filtering

Unread post by TomDoan »

Inequality constrained Kalman filtering is extremely complicated technically, the complexity of which is often ignored in practice. The difficulty is that while it's possible to compute a point solution to an inequality constrained quadratic program (which is what you get out of a Kalman filter), the resulting constrained distribution is no longer Gaussian, and, if the constraint really binds hard, often not even close. Consider, for instance, a situation where the unconstrained KF gives you a state estimate of -1 with a standard deviation of 2 with a >=0 constraint. The conditional distribution is a truncated Normal, and isn't even a half a Normal distribution---it looks more exponential than Normal. The highest (conditional) probability is achieved at a state estimate of 0; the conditional mean, however, is 1.28. The KF is supposed to give you the mean and variance of an (approximately) Gaussian distribution which is then applied to the next step. Once you impose a binding constraint, you likely don't have the mean, and you definitely don't have a Gaussian distribution for the next step.

There are no simple solutions---the State Space/DSGE e-course goes over six possibilities, not all of which will work in a given situation.
debasish
Posts: 2
Joined: Mon Jul 24, 2017 6:28 am

Re: Query regarding constrained Kalman Filtering

Unread post by debasish »

Dear Tom,
Thanks for sharing the link. It is taking my brain out to understand this, extremely complicated.

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

Re: Query regarding constrained Kalman Filtering

Unread post by TomDoan »

Note that Kalman filtering and Kalman smoothing are quite different when it comes to this. Kalman smoothing actually is quite a bit simpler to handle with inequality constraints because it can be interpreted as a system wide quadratic programming problem.
Post Reply