The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [kalman]

The [Kalman filter], also known as linear quadratic estimation (LQE), is an algorithm that uses a series of measurements observed over time, containing noise (random variations) and other inaccuracies, and produces estimates of unknown variables that tend to be more precise than those based on a single measurement alone. : http://en.wikipedia.org/wiki/Kalman_filter

31 questions
Filter by
Sorted by
Tagged with
22 views

Likelihood increases on increasing variance of measurement error in kalman filter

I tried to fit a local trend model to daily data of a currency. I used the "dlm" package and tried to estimate the parameters V (measurement noise) and W (the process noise) via maximum likelihood. ...
20 views

How can I estimate a dynamic GARCH model using a Kalman filter methodology in R or MATLAB?

Does anyone know of any R or MATLAB packages for estimating GARCH models using Kalman filtering or any other state-space methodology? I would like to estimate a GARCH so that not only the variance, ...
59 views

How is Kalman Filter used to estimate Term structure Models

I am implementing "The Term Structure of Variance Swap Rates and Optimal Variance Swap Investments" . This paper is using kalman filter to estimate the state and the mean variance and a parameters on ...
120 views

Kalman Filter for Multiple Regression?

I'm using Kalman Filter to calculate a rolling spread between two asset price series as commonly described by Chan and many others. I would like to extend this regression to the price of three assets, ...
79 views

Kalman filter state/measurement noise

In a linear Kalman filter, we assume that the state and measurement noise are white noise N(0,Q) and N(0,R) respectively. Is it common practice to test these hypothesis? And what are the most common ...
101 views

How can I estimate the time-varying θ term in the Hull-White one factor model?

I am trying to simulate the prices of bond indexes (e.g. Barclays Aggregate, IBOXX sovereign, IBOXX corporates) using Monte Carlo assuming that they follow the SDE given by the Hull-White model (one-...
49 views

Is my coding for my kalman filter off when testing this specific set of pairs?

My kalman filter seems to be off for this specific set of pairs I'm looking at. As you can see, in the kalman filtered linear regression, there seems to be an outlying blue line nowhere near the data ...
634 views

Does Chan use the wrong state transition model in his Kalman filter code?

In his book, Algorithmic Trading: Winning Strategies and Their Rationale, Ernie Chan shows how to use a Kalman filter to improve the returns of a cointegrated portfolio. Recall that the state equation ...
157 views

Have I used correct state space formulation of Bivariate Trending OU process for Kalman Filter estimation?

Introduction I'm trying to estimate the parameters of an Ornstein Uhlenbeck process for a risky asset using the Kalman Filter but have doubts about the state space formulation that I am using. Also, ...
313 views

kalman filter for a multifactor model in R

I am trying to set up a time varying factor model for the purpose of return decomposition via kalman filter. Following this example and slightly modifying it so as to accommodate for more than one ...
438 views

Mean and standard deviation of price series with Kalman

I like to calculate the mean and standard deviation of a price series, using the Kalman filter. I am somehow stuck with the deviation, or have some problem in understanding, which my research could ...
194 views

Example Scalar Model Extended Kalman Filter

I have a simple question. I think not a question is, is a request. This month I have been studying how to understand and implement the Kalman filter algorithm for simple models such as the local level....
276 views

kalman filter update equation

Assume that futures price $F(t,T)$ follows the Ito process as described by the following stochastic process ln F(t,T)=lnF(0,T)+(Z_1(t)e^{-k(T-t)}+Z_2(t))-(1/4k)[(1-e^{-2kT})(h_1^2+h_2^2))+4h_1h_0(1-...
913 views

Does Kalman filter always improve over linear regression?

If I have a simple linear regression that has statistical signification but I would like to improve the overall prediction results. Will a Kalman filter be always an improvement or as least achieve ...
344 views

How to find optimal noise covariance matrices Q & R

I am trying to use the discrete Kalman filter for forecasting and I wonder what is commonly considered as the optimal way of determining the measurement noise covariance constants (Q and R) for a ...
133 views

Correct form for State Space Equation for Kalman Filter for DNS

In this paper: http://www.ssc.upenn.edu/~fdiebold/papers/paper55/DRAfinal.pdf in eqns 3,5 the state eqn has the mean removed. $(z_t-\mu)=A(z_{t-1}-\mu) + \epsilon_t$ $y_t=C z_t + \delta_t$ ...
191 views

Identifiability of a state space model (Dynamic Linear Model)

Take a general linear Gaussian state space model (SSM)(aka Dynamic Linear Model DLM): $X_{t+1}=FX_t + V_t$ $Y=HX_t+W_t$ $V_t \sim N(0,Q)$ $W_t \sim N(0,R)$ I am interested in the ...
1k views

Moving window forecasting in Python

I am looking to create some code that will out-of-sample forecast the HAR-RV model. The model itself is formulated as the following, and the betas are estimated through HAC-OLS or Newey-West. ...
398 views

Kalman filtering

Is it possible to the extract the latent factor f from the following equations using kalman smoothing? f is the unobserved state value while z is observed series. From the literature i could read ...
265 views

Time-Varying Copulas (GAUSS)

Could anyone suggest me how to begin with Time-varying Copulas or Stochastic Copulas? I'm looking for the GAUSS code, however it seems there are only MATLAB code available over the internet. I'm ...
8k views

robust open source Kalman filter library in C++

I would like to know if anyone has experience with a good open source kalman filter implementation in C++ that I could use. I require an implementation that supports computation of likelihood similar ...
242 views

Variable Selection with Kalman Filter

I'm trying to estimate factor loadings on portfolios over time for portfolios that are traded pretty frequently. I have a sense that several portfolios are loading on the Fama-French HML factor ...
229 views

Simulating state space model with AR(1) dynamics

I asked a question similar to this previously: https://dsp.stackexchange.com/questions/16341/simulating-a-state-space-model However I think I have a better handle on it now and want to re-ask it: I ...
1k views

mean reversion with Kalman Filter - Spread calculation

Ernest Chan in its book "Algorithmic Trading" shows how to use the Kalman Filter for mean reversion pair trading. I have seen that he uses the measurement prediction error for calculating the spread ...
925 views

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 ...
278 views

Good criteria to sort state-space $\beta_{t}$ according to Kalman filter output

Let's assume the usual state-space linear model without constant term for simplicity: $y_{t}=\beta_{t} X_{t}+\epsilon_{t}$ If we apply Gaussian Kalman filter to estimate $\beta_{t}$ we get $P_{t}$, ...
646 views

Time-varying correlation via state-space representation and Kalman filter

Let a linear time-varying mode like this one: $y_{t}=\alpha_{t}+\beta_{t}x_{t}+\epsilon_{t}$. You can also suppress the constant term to simplify this example: $y_{t}=\beta_{t}x_{t}+\epsilon_{t}$. ...
15k views

How to tune Kalman filter's parameter?

I plan to use Kalman filter to estimate saving account amount. However, I'm a bit lost at how to tune the filter's parameters. Taking as the example from the Wikipedia page, basically there are ...
2k views

Counterintuitive time varying Beta with Kalman filter

If you're used to play with R, you'll enjoy the following reproducible code: ...
I would like to estimate Ornstein–Uhlenbeck process' parameters via Kalman filter. My process is the following one: $\text{d}x_{t}=\alpha(\theta-x_{t})\text{d}t+\sigma\text{d}W_{t}$ I'm interested ...