Sunday, September 27, 2009

The Effects of Adding Filters in Designing a Robust Trading System - MACD

Here, I would just like to test the usefulness of adding filters in a trading system.  As usual, before designing any trading system, we'll have to at least make sure that the underlying strategies make sense to us.  In this example, I would like to test the profitability of using a very famous momentum-based oscillator called MACD and backtest the system on FKLI index futures from 1996-2009.  After that I would try to add a SMA filter and see if it would improve the performance of the trading system.

The MACD is a relatively short-term momentum indicator and the positive or negative divergence is easy to program in excel and therefore can be easily tested.  The reason I want to test this is because from a daily chart observation, it looks like a very profitable strategy going Long when the MACD line crossover above the signal line and going Short when the MACD line crossover below the signal line.  For the test, I'll go Long on next-day market open when we have a positive divergence (MACD line crossover above the signal line) and turn Short on next-day market open when there is a negative divergence (MACD line crossover below the signal line).  It is a Stop-and-Reverse system.  I will be using the default setting of MACD(12,26,9) and a daily closed of FKLI from Jan 1996 until August 2009(continuous front-month data) trading basic 1 contract.  If you want to know more detail about MACD, you can read Gerald Appel's (the inventor of MACD) book title "Technical Analysis - Power Tools for Active Investors".

And here is the trading system's performance summary report before adding any filters.




This is another case of observational bias in trading (a lot of traders fall into this category).  Things that look good on a few occurances (minutes, hours, days, weeks or months of observation) when put under statistical long-term test yield a different result, and quite often a disappointment!  To be fair, the system actually is profitable before adding in the cost of trading and slippage + rolls.  Again, that is why a lot of system sellers are unrealistics in giving you the backtested trading performance summary without adding the actual cost and skid of trading!  Be very careful when you read those system performance summary.

To add salt to the wound, we have to remember that very often the performance of a good and robust trading system will degrade overtime!  So we can't fool ourselves that it will perform better in the future. 

In the next post, I will add in a SMA as a filter and see if we can improve the system's profitability.  Until then...

Disclaimer: Taken from CFTC RULE 4.41 – HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER OR OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.

AND


WHATEVER YOU READ HERE SHOULD BE USED AS LEARNING AIDS ONLY AND SHOULD NOT BE CONSTRUED AS INVESTMENT ADVICE. IF YOU DECIDE TO INVEST REAL MONEY, ALL TRADING DECISIONS ARE YOUR OWN RESPONSIBILITY.

 

No comments:

Post a Comment