# Time series forecasting using particle filter

I have searched high and low for a practical example of using a particle filter to assist with short term price forecasting using the local trend of a time series.

Could someone please share how a particle filter could be applied to time series using MATLAB.

I greatly appreciate any help on this.

• I am pretty good with Kalman and MatLab. I am not (yet) as good as I would like in "time-series", whatever that is. Can you give me some sample data? What can you tell me about the underlying system? Are you looking to minimize the errors in your parameter estimates? What is the goal? – EngrStudent May 26 '13 at 13:26
• Some data can be found here. finance.yahoo.com/q/hp?s=%5EGSPC+Historical+Prices – Dave May 31 '13 at 5:12
• Would you be able to show a simple example of how the unscented filter or particle (non linear) could be used to smooth the price series. – Dave May 31 '13 at 5:13
• The RTS smooth using a Kalman filter is "textbook". Its major strengths are the simplicity of the formulation and the computation speed. There are much higher performance smoothers using MatLab, but they take more work. Here is a good text on the subject: amzn.com/0470173661 . Page 574 lists the Kalman filter based smoothers. RTS is the initial one. – EngrStudent May 31 '13 at 11:55
• If the concern is for equities, particle filters are used in estimating stochastic volatility in Gibbs Samplers. – John May 31 '13 at 18:56

If you can provide the state update relationship then it is pretty straightforward to implement the Kalman filter. The "particle" or "unscented" are about handling the state estimate uncertainty. Given an initial state estimate $\hat x_{n}(+)$ at time $t(n)$ what is the function that produces the prediction $\hat x_{n+1}(-)$ for time $t(n+1)$? (using notation from pg number 190 on discrete-extended Kalman filters). What is "f"?