Friday, 22 February 2019

Kalman Filter in Finance Application


Ever wondered of how rocket trajectory was tracked?  Or how your GPS navigation works?   One of the key algorithms in modern navigation, guidance and control technologies is the Kalman Filter!  Kalman Filter is an algorithm that uses a series of measurements observed over time, containing statistical noise and other inaccuracies, and produces estimates of unknown variables that tend to be more accurate than those based on a single measurement alone, by estimating a joint probability distribution over the variables for each timeframe. The filter is named after Rudolf E. Kálmán, one of the primary developers of its theory (Read more here).

Kalman Filter is also popular in time series analysis, especially in noise filtering application.  One could use the Kalman Filter to track the trend of stock market index, instead of using conventional moving average indicator (MA), which is subjected to period determination (MA of 8 days, 14 days or etc.).  The following chart shows the KLCI daily closing price and the Kalman Filter.  The blue curve is the daily KLCI closing price from Jan – Dec 2018 while the orange curve is the Kalman Filter.  The Kalman Filter is computed in conjunction with Maximum Likelihood Estimation (MLE) algorithm.  This helps to estimate the “true” price level of the underlying index instead of relying on human selection in MA application.

Kalman Filter could be implemented using MatLab, Python, R or Excel (with solver add-on).


 
The video below shows some basic illustration of Kalman Filter.

No comments:

Post a Comment