# Questions tagged [kalman]

The [Kalman filter][1], 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. [1]: http://en.wikipedia.org/wiki/Kalman_filter

44 questions
Filter by
Sorted by
Tagged with
63 views

### How do you represent a more liquid predictor when using a kalman filter for illiquid products?

Suppose you have two products: Product A, which doesn't tick very often, and so the price graph can be quite jumpy. Product B, which ticks frequently, and is very related to product A, but not ...
44 views

• 121
107 views

### Odd Result from Computing Correlation Matrix from Kalman Filter Posteriori Covariance Estimate

I am using a Kalman Filter to estimate the return dynamics of a forwards curve on a particular commodity. My state space is the initial forwards values, and an initial guess of the drift functions for ...
1 vote
100 views

### Kalman Filtering theory and application in Finance models under asymmetric or incomplete information

Why do we need Kalman Filtering theory in dynamic models in finance when we consider an environment of asymmetric or incomplete information? I understand that this has to do with the update of the ...
• 193
1 vote
199 views

### Style analysis and Kalman Filter

I am trying to implement a code that uses Kalman filter to improve the performance of traditional style analysis. I have come across a paper called "Return based style analysis with time varying ...
357 views

### Estimating Heston with Unscented Kalman Filter

I am trying to estimate aHeston model using an Unscented Kalman filter. In particular, I am using the following Euler-Murayama discretisation: ...
1 vote
81 views

• 11
1 vote
407 views

### Calibration of G2++ two factor interest rate model using Kalman filtering

I'm trying to use the Kalman filter to calibrate a G2++ interest rate model in R. I'm reading "Implementing interest rate models: A practical guide" by Park F.C. (2004) where he provides details on ...
1 vote
48 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. ...
• 173
293 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, ...
• 51
1 vote
154 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 ...
• 207
238 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-...
• 31
1 vote
70 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 ...
• 11
2k 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 ...
• 361
1 vote
274 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, ...
503 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 ...
• 441
968 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 ...
• 41
1 vote
275 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....
• 247
390 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-...
• 191
1k 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 ...
• 439
459 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 ...
168 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$ ...
• 879
223 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 ...
• 879
2k 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. ...
615 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 ...
386 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 ...
• 21
10k 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 ...
• 81
1 vote
309 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 ...
• 151
268 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 ...
• 879
2k 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 ...
• 703
1k 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 ...
• 121
304 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}$, ...
• 2,133
727 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}$. ...
• 2,133
22k 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 ...
• 2,231
3k views

### Counterintuitive time varying Beta with Kalman filter

If you're used to play with R, you'll enjoy the following reproducible code: ...
• 2,133
4k views

### Parameter estimation of Ornstein–Uhlenbeck and CIR processes

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 ...
• 2,133