# What f() for unscented kalman filter for stock trading?

I am trying to estimate to "next" price of a stock, based on a group of 5 other correlated stocks.

I believe this is a 6 state unscented Kalman problem. However, I do not know how to describe f(). I am measuring the "price" of the stock at end of day. i.e. I get one price per stock per day, and I have a set of 6 stocks.

Here f() is the deterministic part of the state update equation in the unscented Kalman filter :

x_k+1 = f(x_k) + w_k


which is implemented here.

I wish to estimate tomorrow's EOD price for stock A, based on an UKF that considers stocks B-F as well. But I don't not need to estimate stocks B-F.

What might f() look like?

• Isn't this the million dollar question (pun intended)? As you noted, your f() would represent the deterministic state transition from one time step to the next. Stated differently, given the stock prices at the end of day k, how will those prices change on day k+1? I would assert that there's unlikely to be any deterministic component; if there was, then you could use that knowledge to make risk-free profit; the stochastic component is zero-mean, so its effect on your trades should average to zero over time (barring the usual concerns of a really bad trade that bankrupts you). – Jason R Nov 30 '15 at 16:50
• You are quite right of course. However, if I use f=@(x)x(); - then I get a result. My question is if anyone has something better. – ManInMoon Nov 30 '15 at 17:23
• It's possible that someone does, but if they did, they would be best served keeping it to themselves. This is why it's hard to find a lot of open-source information on automated trading algorithms: if everyone knows them, they are unlikely to be profitable in an efficient market. Hence, that information is typically kept proprietary. – Jason R Nov 30 '15 at 19:26
• Related info: quant.stackexchange.com/questions/4701/… – user14819 Dec 1 '15 at 4:53