Kaufman Adaptive Moving Average  Trading Strategy (Setup & Filter)
I. Trading Strategy
Developer: Perry Kaufman (Kaufman Adaptive Moving Average – KAMA). Source: Kaufman, P. J. (1995). Smarter Trading. Improving Performance in Changing Markets. New York: McGrawHill, Inc. Concept: Trading strategy based on an adaptive noise filter. Research Goal: Performance verification of the setup and filter. Specification: Table 1. Results: Figure 12. Trade Setup: Long Trades: The Adaptive Moving Average (AMA) turns up. Short Trades: The Adaptive Moving Average turns down. Note: The AMA trendline appears to stop when markets have no direction. When markets trend, the AMA trendline catches up. Trade Entry: Long Trades: A buy at the close is placed after a bullish setup. Short Trades: A sell at the close is placed after a bearish setup. Trade Exit: Table 1. Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 32 years since 1980. Testing Platform: MATLAB®.
II. Sensitivity Test
All 3D charts are followed by 2D contour charts for Profit Factor, Sharpe Ratio, Ulcer Performance Index, CAGR, Maximum Drawdown, Percent Profitable Trades, and Avg. Win / Avg. Loss Ratio. The final picture shows sensitivity of Equity Curve.
Tested Variables: ER_Length & Filter_Index (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY 
SPECIFICATION  PARAMETERS 
Auxiliary Variables:  AMA(ER_Length) is the Adaptive Moving Average over a period of ER_Length. ER_Length is a lookback period of the Efficiency Ratio (ER). ER[i] = abs(Direction[i] / Volatility[i]), where “abs” is the absolute value, Direction[i] = Close[i] − Close[i − ER_Length], Volatility[i] = ∑(abs(DeltaClose[i]), ER_Length), where “∑” is the sum over a period of ER_Length, DeltaClose[i] = Close[i] − Close[i − 1]. FastMA_Length is a period of the fast moving average. SlowMA_Length is a period of the slow moving average. AMA[i] = AMA[i − 1] + c[i]*(Close[i] − AMA[i − 1]), where c[i] = (ER[i]*(Fast − Slow) + Slow)^2, Fast = 2/(FastMA_Length + 1), Slow = 2/(SlowMA_Length + 1). Index: i ~ Current Bar. 
ER_Length = [2, 100], Step = 2; FastMA_Length = 2; SlowMA_Length = 30; 
Setup:  Long Trades: If AMA[i] > AMA[i − 1] & AMA[i − 1] < AMA[i − 2] then MinAMA = AMA[i − 1]; (Adaptive Moving Average turns up with a pivot at MinAMA). Short Trades: AMA[i] < AMA[i − 1] & AMA[i − 1] > AMA[i − 2] then MaxAMA = AMA[i − 1]; (Adaptive Moving Average turns down with a pivot at MaxAMA). Index: i ~ Current Bar. 

Filter:  Filter[i] = Filter_Index * Std_Dev(AMA[i] − AMA[i − 1], N), where Std_Dev is the standard deviation of series over N periods. N = 20 (default value). Index: i ~ Current Bar. 
Filter_Index = [0.0, 1.0], Step = 0.02; N = 20; 
Entry:  Long Trades: A buy at the close is placed when AMA[i] > AMA[i − 1] & (AMA[i] − MinAMA) > Filter[i]. Short Trades: A sell at the close is placed when AMA[i] < AMA[i − 1] & (MaxAMA − AMA[i]) > Filter[i]. Index: i ~ Current Bar. 

Exit:  Stop Loss Exit: ATR(ATR_Length) is the Average True Range over a period of ATR_Length. ATR_Stop is a multiple of ATR(ATR_Length). Long Trades: A sell stop is placed at [Entry − ATR(ATR_Length) * ATR_Stop]. Short Trades: A buy stop is placed at [Entry + ATR(ATR_Length) * ATR_Stop].  ATR_Length = 20; ATR_Stop = 6; 
Sensitivity Test:  ER_Length = [2, 100], Step = 2 Filter_Index = [0.0, 1.0], Step = 0.02 

Position Sizing:  Initial_Capital = $1,000,000 Fixed_Fractional = 1% Portfolio = 42 US Futures ATR_Stop = 6 (ATR ~ Average True Range) ATR_Length = 20 

Data:  42 futures markets; 32 years (1980/01/01−2011/12/31) 
Table 1  Specification: Trading Strategy.
III. Sensitivity Test with Commission & Slippage
Tested Variables: ER_Length & Filter_Index (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
IV. Rating: Kaufman Adaptive Moving Average  Trading Strategy
A/B/C/D
Related Entries: Kaufman Adaptive Moving Average (Setup)  Combined Donchian Channels (Entry & Exit)
Related Topics: (Public) Trading Strategies
Proprietary Strategies:
ALPHA_{20}^{TM} Trading System
Robust ShortTerm Patterns^{TM}
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 UNDEROROVER 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.
RISK DISCLOSURE: U.S. GOVERNMENT REQUIRED DISCLAIMER  CFTC RULE 4.41
Codes: matlab/kaufman/ama/