Kalman Filter as a Confirmation Indicator

Our Indicator Choice is…

The Kalman Filter is our next confirmation indicator we’ll discuss.  This indicator has similar qualities as the McGinley Dynamic Indicator, whereby it is considered “adaptive” – meaning that the math behind the indicator adjusts to the volatility of the market.  There are massive amounts of work associated with this indicator which are quite impressive.  If you’d like to read a recent (and very comprehensive) paper on the “Kalman Filter Approach”, click HERE.

Do the Two-Step

What’s interesting about this indicator is that it works in a two-step process.  The first step is called extrapolation, or prediction.  Market data is sometimes called “noisy”, meaning that it doesn’t always move in a smooth, predictable way.  The first step takes this data and predicts what will happen.  The second step of the process is the update, or correction part.  This means the current price is compared to the past prediction and the new value becomes the current position of the line on your chart.

Follow That…Thing!

Another way to visualize what the Kalman Filter does is estimate the trajectory of a moving object…whether it be a car, plane, spaceship…or a moving average!

In essence, this indicator takes market activity into account to show a smoother, more responsive, moving average line.  This doesn’t mean that lag is removed altogether, it means that this indicator’s reaction to the market is faster by applying the two-step method.

Original Thought

The original concept and math was developed by Rudolf Kálmán in 1960.  Its use began in the aerospace industry; helping solve navigation and guidance problems calculated by old IBM 704 computers.  It’s use in the trading industry began in the 1990s.

Advantages

* Easy to see signals

* Better representation of market dynamics due to adaptive nature.

* Reduced lag as market conditions change

* Smooths out market noise

* Simple, Yet Elegant

Below is a screenshot of what the indicator looks like on the daily time frame.  Note that we’ve changed the color of the candles to white to remove any emotional bias and that only the indicator is prominent.

How We Use It

The signal occurs on the opening of the period following the change of color from orange to turquoise, or turquoise to orange.  Let’s review the highlighted marks on the picture below to understand what they mean.

Signals

Long:  The Signal Line turns from orange to turquoise.

Short: The Signal Line turns from turquoise to orange.

Settings

There are four settings, of which three were used for testing.  Some versions have slightly different default values, so don’t let that throw you.

Mode:  The type of moving average used for calculations:  Simple, Exponential, Weighted, Double Exponential, Triple Exponential, Lease square Moving Average, etc.  Settings range from 0-6.  The default setting is 6.

K:  Also known as the Kalman Factor.  The range starts at 0.1 and extends as high as you want it to go.  The smaller the number, the longer (bigger) the curve.  The bigger the number, the more closely the curve follows price.  The default setting is 1.0.

Sharpness:  This is for calculating error minimization.  It functions similarly as the Kalman Factor.  The smaller the number, the less “sharp” the curve and the larger the number, the quicker it reacts to price change.  The default setting is 1.0

draw_begin:  The number of periods in history the indicator begins to draw.  The default setting is 500.

Testing…Testing…Testing

Remember, comprehensive analysis is strongly suggested, and we advocate backwards and forward testing indicators or systems prior to trading actual funds. We propose conducting your tests on the following five pairs.

EUR/USD
AUD/NZD
EUR/GBP
AUD/CAD
CHF/JPY

If it doesn’t work on these five pairs, chances are it won’t work on other pairs. This is not an absolute, but we’ve found this rule is reliable in most cases.

Timeframes and Results

In our initial test, we’ll run the Kalman Filter indicator on the testing pairs using the default settings across the daily and 4-hour timeframes on the MT4 strategy tester. We use the fast method of testing the indicator to get a general idea; however, you may also run the tick-by-tick data set for a more precise result (which takes considerably more time).

As No Nonsense Traders – and therefore Swing Traders, we will not examine shorter time frames in these studies. We will also run an additional test, using different values for the settings, to analyze which one may work better and examine the following results:

Total trades
Win/Loss ratio
ROI (return on investment)

There are other metrics included in the strategy tester report, which can be compared, but these three metrics provide the necessary gauge to make quick decisions as to the usefulness of a particular indicator and its settings.

Next, for comparison, we’ll explore the following;

Daily – 1 year
4-hour – 3 months

The reason exceptionally long (or short) testing periods are not included is due to changing market conditions, which might return irrelevant information. A balance of statistically significant data is necessary for accurate results.

And the Outcome…

Below are the spreadsheets listing the results from our tests.

How’d We Do?

We did pretty well.  In fact, we had numbers on the EUR and the SPX500 that have been the best in a while, so that’s something to cheer about.  We also had very high numbers for XAU and BTC, so that’s a good thing.  The coolest thing is that these weren’t even the best numbers.  I’d definitely spend a little chart time showing this indicator some love and attention.  It just may become your all-star…

Resources

We’ve made the Kalman Filter Indicator available for download on our site from the indicator library.  We will keep adding better indicators with each study for your use, at no charge.  When you’re ready to get it, click HERE.

Our only goal is to make you a better trader.

*Our published testing results are based on money management strategies employed by the NNFX system and depend on varying external factors, which may be different between individuals and their specific broker conditions.  No guarantee, trading recommendations, or other market suggestions are implied.  Your results and subsequent trading activities are solely your own responsibility.

BTW – Any information communicated by Stonehill Forex Limited is solely for educational purposes. The information contained within the courses and on the website neither constitutes investment advice nor a general recommendation on investments.  It is not intended to be and should not be interpreted as investment advice or a general recommendation on investment. Any person who places trades, orders or makes other types of trades and investments etc. is responsible for their own investment decisions and does so at their own risk. It is recommended that any person taking investment decisions consults with an independent financial advisor. Stonehill Forex Limited training courses and blogs are for educational purposes only, not a financial advisory service, and does not give financial advice or make general recommendations on investment.