Hi all,
My goal is to use Libbi for state space modeling, and running filtering for non-linear non-gaussian models, but in order to get going, I decided to implement a simple model and see if it performs well.
So I am using a simple random-walk like Kalman filter, i.e.
model KalmanFilter {
param q, r;
noise eta;
state x;
obs y;
sub parameter {
q <- 0.001;
r <- 0.001;
}
sub initial {
x ~ gaussian(0, 0.001);
}
sub transition {
eta ~ gaussian();
x <- x + q * eta;
}
sub observation {
y ~ gaussian(x, r);
}
}
```
libbi filter \
--model-file KalmanFilter.bi \
--obs-file data/
sp500.nc \
--filter bootstrap \
--start-time 0 \
--end-time 100 \
--nparticles 43210 \
--output-file
filtered.nc```
So my concern is that the results I get are different from theoretical results [see attached] (which I calculate using a Kalman filter from filterpy python library), and libbi seems to be filtering more aggressively than the theoretical results, is this a kind of behavior I should expect?
Question 2: I tried using a Metropolis-Hastings Resampler, but it doesn't seem possible. Is it possible to use a resampler for the particles? What block should I provide to achieve this other than `--resampler` option to the script?
Cheers,
Arsen