Developer: Larry Williams (“All in one: Price, volume and open interest”); R. D. Donchian (Breakout Channels). Concept: Trading strategy based on price breakouts confirmed by POIV (Price, Open Interest, and Volume) filters. Research Question: Can combined filters improve price breakouts? Specification: Table 1. Results: Figure 12. Trade Setup: Long Entry Setup: High[i] > EntryUpPriceChannel[i − 1]. Short Entry Setup: Low[i] < EntryDnPriceChannel[i − 1]. Index: i ~ Current Bar. Trade Filter: POIV Filter (Table 1). Trade Entry: Long Trade Entry: A buy at the open is placed after Long Entry Setup and Long Entry Filter. Short Trade Entry: A sell at the open is placed after Short Entry Setup and Short Entry Filter. Trade Exit: Table 1. Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 37 years since 1980. Testing Platform: MATLAB®.
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: Entry_Look_Back & Exit_Index (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY 
SPECIFICATION  PARAMETERS 
Auxiliary Variables:  Price Channels: EntryUpPriceChannel(Entry_Look_Back) is the highest high over a period of Entry_Look_Back. EntryDnPriceChannel(Entry_Look_Back) is the lowest low over a period of Entry_Look_Back. ExitUpPriceChannel(Exit_Look_Back) is the highest high over a period of Exit_Look_Back. ExitDnPriceChannel(Exit_Look_Back) is the lowest low over a period of Exit_Look_Back. OnBalance Volume (OBV): If Close[i] > Close[i − 1] then OBV[i] = OBV[i − 1] + Volume[i]; If Close[i] < Close[i − 1] then OBV[i] = OBV[i − 1] − Volume[i]; If Close[i] = Close[i − 1] then OBV[i] = OBV[i − 1]; OnBalance Open Interest (OBOI): TrueHigh[i] = max(High[i], Close[i − 1]); TrueLow[i] = min(Low[i], Close[i − 1]); Ratio[i] = (Close[i] − Close[i − 1]) / (TrueHigh[i] − TrueLow[i]); OBOI[i] = OBOI[i − 1] + OpenInterest [i] * Ratio[i]; Price/Open Interest/Volume (POIV): POIV[i] = OBV[i] + OBOI[i]; Index: i ~ Current Bar. POIV Channels: EntryUpPOIVChannel(Entry_Look_Back) is the highest POIV over a period of Entry_Look_Back. EntryDnPOIVChannel(Entry_Look_Back) is the lowest POIV over a period of Entry_Look_Back. ExitUpPOIVChannel(Exit_Look_Back) is the highest POIV over a period of Exit_Look_Back. ExitDnPOIVChannel(Exit_Look_Back) is the lowest POIV over a period of Exit_Look_Back. 
Entry_Look_Back = [5, 200], Step = 5 (bars); Exit_Index= [5, 100], Step = 5 (% of Entry_Look_Back); Exit_Look_Back = Entry_Look_Back * Exit_Index ÷ 100; 
Setup:  Long Entry Setup: If High[i] > EntryUpPriceChannel[i − 1]; Short Entry Setup: If Low[i] < EntryDnPriceChannel[i − 1]; Long Exit Setup: If Low[i] < ExitDnPriceChannel[i − 1]; Short Exit Setup: If High[i] > ExitUpPriceChannel[i − 1]; Index: i ~ Current Bar. 

Filter:  Long Entry Filter: If POIV[i] > EntryUpPOIVChannel[i − 1]; Short Entry Filter: If POIV[i] < EntryDnPOIVChannel[i − 1]; Long Exit Filter: If POIV[i] < ExitDnPOIVChannel[i − 1]; Short Exit Filter: If POIV[i] > ExitUpPOIVChannel[i − 1]; Index: i ~ Current Bar. 

Entry:  Long Trades: A buy at the open is placed after Long Entry Setup (i.e. Long Price Breakout) and Long Entry Filter (i.e. Long POIV Breakout). Short Trades: A sell at the open is placed after Short Entry Setup (i.e. Short Price Breakout) and Short Entry Filter (i.e. Short POIV Breakout). 

Exit:  Channel Exit: Long Trades: A sell at the open is placed after Long Exit Setup and Long Exit Filter. Short Trades: A sell at the open is placed after Short Exit Setup and Short Exit Filter. 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]. Stop Loss Exit is used to normalize risk via position sizing. 
ATR_Length = 20; ATR_Stop = 6; 
Sensitivity Test:  Entry_Look_Back = [5, 200], Step = 5 (bars) Exit_Index = [5, 100], Step = 5 (% of Entry_Look_Back) Exit_Look_Back = Entry_Look_Back * Exit_Index ÷ 100 

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; 37 years (1980/01/01−2017/07/31) 
Table 1  Specification of Trading Strategy.
Tested Variables: Entry_Look_Back & Exit_Index (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
We benchmark the base case strategy (i.e. POIV filters turned off; Table 2) against the same strategy using POIV filters (i.e. POIV filters turned on; Table 3):
Case #1a: Entry_Look_Back = 200 (bars); Exit_Index = 50 (%); POIV Filters: Off.
Case #2a: Entry_Look_Back = 150 (bars); Exit_Index = 50 (%); POIV Filters: Off.
Case #3a: Entry_Look_Back = 100 (bars); Exit_Index = 50 (%); POIV Filters: Off.
Case #4a: Entry_Look_Back = 50 (bars); Exit_Index = 50 (%); POIV Filters: Off.
POIV Filers: Off 
Case #1a  Case #2a  Case #3a  Case #4a 
Net Profit ($)  440,110,888  152,729,764  177,143,846  19,227,786 
Sharpe Ratio  0.95  0.78  0.78  0.49 
Ulcer Performance Index (UPI)  1.22  0.83  0.93  0.34 
Profit Factor  1.45  1.25  1.22  1.05 
CAGR (%)  17.77  14.40  14.79  8.33 
Max. Drawdown (%)  (46.35)  (53.84)  (44.92)  (57.34) 
Percent Profitable Trades (%)  42.80  40.98  40.59  37.35 
Avg. Win / Avg. Loss Ratio  1.93  1.80  1.79  1.76 
Table 2  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
Case #1b: Entry_Look_Back = 200 (bars); Exit_Index = 50 (%); POIV Filters: On.
Case #2b: Entry_Look_Back = 150 (bars); Exit_Index = 50 (%); POIV Filters: On.
Case #3b: Entry_Look_Back = 100 (bars); Exit_Index = 50 (%); POIV Filters: On.
Case #4b: Entry_Look_Back = 50 (bars); Exit_Index = 50 (%); POIV Filters: On.
POIV Filters: On 
Case #1b  Case #2b  Case #3b  Case #4b 
Net Profit ($)  381,486,161  329,089,430  492,907,902  75,105,971 
Sharpe Ratio  0.97  0.91  0.93  0.68 
Ulcer Performance Index (UPI)  1.29  1.19  1.38  0.64 
Profit Factor  1.48  1.38  1.34  1.11 
CAGR (%)  17.32  16.76  17.95  12.22 
Max. Drawdown (%)  (44.81)  (45.54)  (40.23)  (50.53) 
Percent Profitable Trades (%)  40.16  39.46  41.21  39.32 
Avg. Win / Avg. Loss Ratio  2.20  2.12  1.91  1.72 
Table 3  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
A/B/C/D
(a) The POIV (Price, Open Interest, and Volume) filters improve risk adjusted returns for shorter look backs; (b) The POIV filters do not add value for longer look backs (Table 2 vs. Table 3).
L. Williams, All in one: Price, volume and open interest (2007):
ISSUES WITH VOLUME
[…] there are real problems when we use volume. Problems for stock traders arise when a huge block of stock is swapped from fund to fund; this is not real buying and selling pressure. An even greater problem crept in with the advent of arbitrage programs, whose trades do not necessarily represent supply and demand but minute price differences that are being bought and sold in huge chunks to lock in gains.
Futures traders have different problems with volume in that the largest players, commercial firms that have a business reason for trading the derivative, are usually hedging positions. So, they are not taking on speculative positions that represent buying and selling pressures. These hedges also may become spread buying/selling in the same item or spreads between, say, silver and gold, corn and wheat, or live cattle and feeders.
Related Entries: Volume Filters: Part 1 (Entry & Exit)  Volume Filters: Part 2 (Entry & Exit)  Donchian’s 20 Guides To Trading Commodities
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/VolOI/3/channels
]]>Developer: Joseph Granville (OnBalance Volume); R. D. Donchian (Breakout Channels). Concept: Trading strategy based on price breakouts confirmed by OBV (OnBalance Volume) filters. Research Question: Can volume filters improve price breakouts? Specification: Table 1. Results: Figure 12. Trade Setup: Long Entry Setup: High[i] > EntryUpPriceChannel[i − 1]. Short Entry Setup: Low[i] < EntryDnPriceChannel[i − 1]. Index: i ~ Current Bar. Trade Filter: Volume Filter (Table 1). Trade Entry: Long Trade Entry: A buy at the open is placed after Long Entry Setup and Long Entry Filter. Short Trade Entry: A sell at the open is placed after Short Entry Setup and Short Entry Filter. Trade Exit: Table 1. Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 37 years since 1980. Testing Platform: MATLAB®.
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: Entry_Look_Back & Exit_Index (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY 
SPECIFICATION  PARAMETERS 
Auxiliary Variables:  Price Channels: EntryUpPriceChannel(Entry_Look_Back) is the highest high over a period of Entry_Look_Back. EntryDnPriceChannel(Entry_Look_Back) is the lowest low over a period of Entry_Look_Back. ExitUpPriceChannel(Exit_Look_Back) is the highest high over a period of Exit_Look_Back. ExitDnPriceChannel(Exit_Look_Back) is the lowest low over a period of Exit_Look_Back. OnBalance Volume (OBV): If Close[i] > Close[i − 1] then OBV[i] = OBV[i − 1] + Volume[i]; If Close[i] < Close[i − 1] then OBV[i] = OBV[i − 1] − Volume[i]; If Close[i] = Close[i − 1] then OBV[i] = OBV[i − 1]; Index: i ~ Current Bar. Volume Channels: EntryUpOBVChannel(Entry_Look_Back) is the highest OBV over a period of Entry_Look_Back. EntryDnOBVChannel(Entry_Look_Back) is the lowest OBV over a period of Entry_Look_Back. ExitUpOBVChannel(Exit_Look_Back) is the highest OBV over a period of Exit_Look_Back. ExitDnOBVChannel(Exit_Look_Back) is the lowest OBV over a period of Exit_Look_Back. 
Entry_Look_Back = [5, 200], Step = 5 (bars); Exit_Index= [5, 100], Step = 5 (% of Entry_Look_Back); Exit_Look_Back = Entry_Look_Back * Exit_Index ÷ 100; 
Setup:  Long Entry Setup: If High[i] > EntryUpPriceChannel[i − 1]; Short Entry Setup: If Low[i] < EntryDnPriceChannel[i − 1]; Long Exit Setup: If Low[i] < ExitDnPriceChannel[i − 1]; Short Exit Setup: If High[i] > ExitUpPriceChannel[i − 1]; Index: i ~ Current Bar. 

Filter:  Long Entry Filter: If OBV[i] > EntryUpOBVChannel[i − 1]; Short Entry Filter: If OBV[i] < EntryDnOBVChannel[i − 1]; Long Exit Filter: If OBV[i] < ExitDnOBVChannel[i − 1]; Short Exit Filter: If OBV[i] > ExitUpOBVChannel[i − 1]; Index: i ~ Current Bar. 

Entry:  Long Trades: A buy at the open is placed after Long Entry Setup (i.e. Long Price Breakout) and Long Entry Filter (i.e. Long OBV Breakout). Short Trades: A sell at the open is placed after Short Entry Setup (i.e. Short Price Breakout) and Short Entry Filter (i.e. Short OBV Breakout). 

Exit:  Channel Exit: Long Trades: A sell at the open is placed after Long Exit Setup and Long Exit Filter. Short Trades: A sell at the open is placed after Short Exit Setup and Short Exit Filter. 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]. Stop Loss Exit is used to normalize risk via position sizing. 
ATR_Length = 20; ATR_Stop = 6; 
Sensitivity Test:  Entry_Look_Back = [5, 200], Step = 5 (bars) Exit_Index = [5, 100], Step = 5 (% of Entry_Look_Back) Exit_Look_Back = Entry_Look_Back * Exit_Index ÷ 100 

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; 37 years (1980/01/01−2017/07/31) 
Table 1  Specification of Trading Strategy.
Tested Variables: Entry_Look_Back & Exit_Index (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
We benchmark the base case strategy (i.e. OBV filters turned off; Table 2) against the same strategy using volume filters (i.e. OBV filters turned on; Table 3):
Case #1a: Entry_Look_Back = 200 (bars); Exit_Index = 50 (%); OBV Filters: Off.
Case #2a: Entry_Look_Back = 150 (bars); Exit_Index = 50 (%); OBV Filters: Off.
Case #3a: Entry_Look_Back = 100 (bars); Exit_Index = 50 (%); OBV Filters: Off.
Case #4a: Entry_Look_Back = 50 (bars); Exit_Index = 50 (%); OBV Filters: Off.
OBV Filers: Off 
Case #1a  Case #2a  Case #3a  Case #4a 
Net Profit ($)  440,110,888  152,729,764  177,143,846  19,227,786 
Sharpe Ratio  0.95  0.78  0.78  0.49 
Ulcer Performance Index (UPI)  1.22  0.83  0.93  0.34 
Profit Factor  1.45  1.25  1.22  1.05 
CAGR (%)  17.77  14.40  14.79  8.33 
Max. Drawdown (%)  (46.35)  (53.84)  (44.92)  (57.34) 
Percent Profitable Trades (%)  42.80  40.98  40.59  37.35 
Avg. Win / Avg. Loss Ratio  1.93  1.80  1.79  1.76 
Table 2  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
Case #1b: Entry_Look_Back = 200 (bars); Exit_Index = 50 (%); OBV Filters: On.
Case #2b: Entry_Look_Back = 150 (bars); Exit_Index = 50 (%); OBV Filters: On.
Case #3b: Entry_Look_Back = 100 (bars); Exit_Index = 50 (%); OBV Filters: On.
Case #4b: Entry_Look_Back = 50 (bars); Exit_Index = 50 (%); OBV Filters: On.
OBV Filters: On 
Case #1b  Case #2b  Case #3b  Case #4b 
Net Profit ($)  191,322,557  144,027,221  235,971,666  54,128,730 
Sharpe Ratio  0.86  0.81  0.85  0.64 
Ulcer Performance Index (UPI)  1.09  1.02  1.04  0.69 
Profit Factor  1.42  1.30  1.25  1.12 
CAGR (%)  15.18  14.23  15.66  11.26 
Max. Drawdown (%)  (43.89)  (43.89)  (42.60)  (42.64) 
Percent Profitable Trades (%)  38.47  38.99  40.81  39.30 
Avg. Win / Avg. Loss Ratio  2.27  2.03  1.81  1.73 
Table 3  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
A/B/C/D
(a) The volume filters improve risk adjusted returns for shorter look backs; (b) The volume filters do not add value for longer look backs (Table 2 vs. Table 3).
Related Entries: Volume Filters: Part 1 (Entry & Exit)  Volume Filters: Part 3 (Entry & Exit)  Donchian’s 20 Guides To Trading Commodities
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/VolOI/2/channels
]]>Developer: R. D. Edwards, J. Magee (Volume Filters); R. D. Donchian (Breakout Channels). Concept: Trading strategy based on price breakouts confirmed by volume filters (i.e. volume breakouts). Research Question: Can volume filters improve price breakouts? Specification: Table 1. Results: Figure 12. Trade Setup: Long Entry Setup: High[i] > EntryUpPriceChannel[i − 1]. Short Entry Setup: Low[i] < EntryDnPriceChannel[i − 1]. Index: i ~ Current Bar. Trade Filter: Volume Filter (Table 1). Trade Entry: Long Trade Entry: A buy at the open is placed after Long Entry Setup and Long Entry Filter. Short Trade Entry: A sell at the open is placed after Short Entry Setup and Short Entry Filter. Trade Exit: Table 1. Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 37 years since 1980. Testing Platform: MATLAB®.
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: Entry_Look_Back & Exit_Index (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY 
SPECIFICATION  PARAMETERS 
Auxiliary Variables:  Price Channels: EntryUpPriceChannel(Entry_Look_Back) is the highest high over a period of Entry_Look_Back. EntryDnPriceChannel(Entry_Look_Back) is the lowest low over a period of Entry_Look_Back. ExitUpPriceChannel(Exit_Look_Back) is the highest high over a period of Exit_Look_Back. ExitDnPriceChannel(Exit_Look_Back) is the lowest low over a period of Exit_Look_Back. Volume Data: If Close[i] > Open[i] then UpVolume[i] = Volume[i]; If Close[i] < Open[i] then DnVolume[i] = − Volume[i]; Index: i ~ Current Bar. Volume Channels: EntryUpVolumeChannel(Entry_Look_Back) is the highest Up_Volume over a period of Entry_Look_Back. EntryDnVolumeChannel(Entry_Look_Back) is the lowest Dn_Volume over a period of Entry_Look_Back. ExitUpVolumeChannel(Exit_Look_Back) is the highest Up_Volume over a period of Exit_Look_Back. ExitDnVolumeChannel(Exit_Look_Back) is the lowest Dn_Volume over a period of Exit_Look_Back. 
Entry_Look_Back = [5, 200], Step = 5 (bars); Exit_Index= [5, 100], Step = 5 (% of Entry_Look_Back); Exit_Look_Back = Entry_Look_Back * Exit_Index ÷ 100; 
Setup:  Long Entry Setup: If High[i] > EntryUpPriceChannel[i − 1]; Short Entry Setup: If Low[i] < EntryDnPriceChannel[i − 1]; Long Exit Setup: If Low[i] < ExitDnPriceChannel[i − 1]; Short Exit Setup: If High[i] > ExitUpPriceChannel[i − 1]; Index: i ~ Current Bar. 

Filter:  Long Entry Filter: If UpVolume[i] > EntryUpVolumeChannel[i − 1]; Short Entry Filter: If DnVolume[i] < EntryDnVolumeChannel[i − 1]; Long Exit Filter: If DnVolume[i] < ExitDnVolumeChannel[i − 1]; Short Exit Filter: If UpVolume[i] > ExitUpVolumeChannel[i − 1]; Index: i ~ Current Bar. 

Entry:  Long Trades: A buy at the open is placed after Long Entry Setup (i.e. Long Price Breakout) and Long Entry Filter (i.e. Long Volume Breakout). Short Trades: A sell at the open is placed after Short Entry Setup (i.e. Short Price Breakout) and Short Entry Filter (i.e. Short Volume Breakout). 

Exit:  Channel Exit: Long Trades: A sell at the open is placed after Long Exit Setup and Long Exit Filter. Short Trades: A sell at the open is placed after Short Exit Setup and Short Exit Filter. 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]. Stop Loss Exit is used to normalize risk via position sizing. 
ATR_Length = 20; ATR_Stop = 6; 
Sensitivity Test:  Entry_Look_Back = [5, 200], Step = 5 (bars) Exit_Index = [5, 100], Step = 5 (% of Entry_Look_Back) Exit_Look_Back = Entry_Look_Back * Exit_Index ÷ 100 

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; 37 years (1980/01/01−2017/07/31) 
Table 1  Specification of Trading Strategy.
Tested Variables: Entry_Look_Back & Exit_Index (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
We benchmark the base case strategy (i.e. volume filters turned off; Table 2) against the same strategy using volume filters (Table 3):
Case #1a: Entry_Look_Back = 200 (bars); Exit_Index = 50 (%); Volume Filters: Off.
Case #2a: Entry_Look_Back = 150 (bars); Exit_Index = 50 (%); Volume Filters: Off.
Case #3a: Entry_Look_Back = 100 (bars); Exit_Index = 50 (%); Volume Filters: Off.
Case #4a: Entry_Look_Back = 50 (bars); Exit_Index = 50 (%); Volume Filters: Off.
Volume Filters: Off 
Case #1a  Case #2a  Case #3a  Case #4a 
Net Profit ($)  440,110,888  152,729,764  177,143,846  19,227,786 
Sharpe Ratio  0.95  0.78  0.78  0.49 
Ulcer Performance Index (UPI)  1.22  0.83  0.93  0.34 
Profit Factor  1.45  1.25  1.22  1.05 
CAGR (%)  17.77  14.40  14.79  8.33 
Max. Drawdown (%)  (46.35)  (53.84)  (44.92)  (57.34) 
Percent Profitable Trades (%)  42.80  40.98  40.59  37.35 
Avg. Win / Avg. Loss Ratio  1.93  1.80  1.79  1.76 
Table 2  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
Case #1b: Entry_Look_Back = 200 (bars); Exit_Index = 50 (%); Volume Filters: On.
Case #2b: Entry_Look_Back = 150 (bars); Exit_Index = 50 (%); Volume Filters: On.
Case #3b: Entry_Look_Back = 100 (bars); Exit_Index = 50 (%); Volume Filters: On.
Case #4b: Entry_Look_Back = 50 (bars); Exit_Index = 50 (%); Volume Filters: On.
Volume Filters: On 
Case #1b  Case #2b  Case #3b  Case #4b 
Net Profit ($)  80,967,854  61,341,956  32,474,234  9,159,761 
Sharpe Ratio  0.81  0.74  0.63  0.43 
Ulcer Performance Index (UPI)  0.78  0.86  0.75  0.32 
Profit Factor  1.47  1.26  1.24  1.07 
CAGR (%)  12.65  11.69  9.79  6.36 
Max. Drawdown (%)  (47.05)  (44.61)  (36.15)  (48.98) 
Percent Profitable Trades (%)  39.28  38.78  39.37  38.80 
Avg. Win / Avg. Loss Ratio  2.27  1.99  1.91  1.68 
Table 3  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
A/B/C/D
The volume filters do not improve performance of simple price breakouts (Table 2 vs. Table 3).
Related Entries: Volume Filters: Part 2 (Entry & Exit)  Volume Filters: Part 3 (Entry & Exit)  Donchian’s 20 Guides To Trading Commodities
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/VolOI/1/channels
]]>Developer: John Ehlers. Source: Ehlers, J., FRAMA: Fractal Adaptive Moving Average. Concept: Trend following trading strategy based on adaptive price filters. Research Goal: To verify performance of the Fractal Adaptive Moving Average (FRAMA). Specification: Table 1. Results: Figure 12. Trade Setup: Long Trades: Close[i − 1] > Entry_Upper_Band[i − 1]. Short Trades: Close[i − 1] < Entry_Lower_Band[i − 1]. Index: i ~ Current Bar. Trade Entry: Long Trades: A buy at the open is placed after a bullish Setup. Short Trades: A sell at the open is placed after a bearish Setup. Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 36 years since 1980. Testing Platform: MATLAB®.
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: FRAMA_Length, ATR_Band (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY  SPECIFICATION  PARAMETERS 
Auxiliary Variables:  FRAMA(Price, FRAMA_Length) is the Fractal Adaptive Moving Average over a period of FRAMA_Length, where Price = (High + Low)/2. ATR(FRAMA_Length) is the Average True Range over a period of FRAMA_Length. ATR_Band is a number of ATRs to include in the envelope: Entry_Upper_Band[i] = FRAMA[i] + (ATR_Band * ATR[i]) Entry_Lower_Band[i] = FRAMA[i] − (ATR_Band * ATR[i]) Exit_Upper_Band[i] = FRAMA[i] + (0.5 * ATR_Band * ATR[i]) Exit_Lower_Band[i] = FRAMA[i] − (0.5 * ATR_Band * ATR[i]) Index: i ~ Current Bar. FRAMA Definition: Ehlers, J., FRAMA. 
FRAMA_Length = [10, 196], Step = 6; ATR_Band = [0.0, 6.0], Step = 0.2; 
Setup:  Long Trades: Close[i − 1] > Entry_Upper_Band[i − 1] Short Trades: Close[i − 1] < Entry_Lower_Band[i − 1] Index: i ~ Current Bar. 

Filter:  N/A  
Entry:  Long Trades: A buy at the open is placed after a bullish Setup. Short Trades: A sell at the open is placed after a bearish Setup. 

Exit:  Trend Exit: Long Trades: A sell at the open is placed if Close[i − 1] < Exit_Lower_Band[i − 1]. Short Trades: A buy at the open is placed if Close[i − 1] > Exit_Upper_Band[i − 1]. Index: i ~ Current Bar. 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:  FRAMA_Length = [10, 196], Step = 6 ATR_Band = [0.0, 6.0], Step = 0.2 

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; 36 years (1980/01/01−2016/06/30) 
Table 1  Specification: Trading Strategy.
Tested Variables: FRAMA_Length, ATR_Band (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
We benchmark the base case strategy against alternatives:
Case #1: ATR_Length = 60; ATR_Band = 3.
Case #2: ATR_Length = 80; ATR_Band = 3 (Base Case).
Case #3: ATR_Length = 100; ATR_Band = 3.
Case #4: ATR_Length = 120; ATR_Band = 3.
Fixed Fractional Sizing  Case #1  Case #2  Case #3  Case #4 
Net Profit ($)  61,547,224  77,609,025  120,731,962  122,322,363 
Sharpe Ratio  0.71  0.74  0.80  0.81 
Ulcer Performance Index (UPI)  0.80  0.80  1.02  1.08 
Profit Factor  1.15  1.17  1.16  1.24 
CAGR (%)  12.00  12.70  14.06  14.13 
Max. Drawdown (%)  (39.25)  (53.55)  (42.74)  (41.72) 
Percent Profitable Trades (%)  41.03  40.59  41.30  40.64 
Avg. Win / Avg. Loss Ratio  1.65  1.71  1.65  1.82 
Table 2  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
A/B/C/D
(i) The trading strategy based on the Fractal Adaptive Moving Average does not perform significantly better than alternative strategies; (ii) The Fractal Adaptive Moving Average is based on an approximation of the fractal dimension which is very inaccurate.
Related Entries: Zero Lag Moving Average Filter (Entry & Exit)  Simple Moving Average Filter (Entry & Exit)  Hull Moving Average Filter (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/ehlers/FRAMA
]]>Developer: John Ehlers and Ric Way. Source: Ehlers, J., Way, R. (2010). Zero Lag (well, almost). Concept: Trend following trading strategy based on moving average filters. Research Goal: To verify performance of the Zero Lag Moving Average (ZLMA). Specification: Table 1. Results: Figure 12. Trade Filter: Long Trades: Zero Lag Moving Average (ZLMA) crosses over Exponential Moving Average (EMA). Short Trades: Zero Lag Moving Average (ZLMA) crosses under Exponential Moving Average (EMA). Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 36 years since 1980. Testing Platform: MATLAB®.
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: Gain_Limit, Threshold (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY  SPECIFICATION  PARAMETERS 
Auxiliary Variables:  Exponential Moving Average (EMA): Alpha = 2 / (Look_Back + 1); EMA[i] = Alpha × Close[i] + (1 − Alpha) × EMA[i − 1]; Index: i ~ Current Bar. Zero Lag Moving Average (ZLMA): Alpha = 2 / (Look_Back + 1); ZLMA[i] = Alpha × (EMA[i] + Gain × (Close[i] − ZLMA[i − 1])) + (1 − Alpha) × ZLMA[i − 1]; Index: i ~ Current Bar. Variable Gain (from the ZLMA formula): If the variable Gain is zero, the ZLMA becomes just an EMA. If the Gain is sufficiently large, the ZLMA tracks the price for all practical purposes (i.e. minimum lag and minimum smoothing). Therefore, we seek a value of Gain that is a satisfactory compromise. To get the least amount of error (Error = Close[i] − ZLMA[i]), a loop searches for the best value of Gain by varying the Gain variable from the lower Gain_Limit to the upper Gain_Limit. The default value for the variable Gain_Limit is 5. 
Look_Back = 200; Gain_Limit = [1, 10], Step = 0.25; 
Setup:  N/A.  
Filter:  Long Signal: ZLMA[i] crosses over EMA[i], and 100*Least_Error / ATR[i] > Threshold Index: i ~ Current Bar. Short Signal: ZLMA[i] crosses under EMA[i], and 100*Least_Error / ATR[i] > Threshold Index: i ~ Current Bar. Note: Error = Close[i] − ZLMA[i]. The Least_Error is an error for the best value of Gain found via a loop which runs barbybar from the lower Gain_Limit to the upper Gain_Limit. In the original paper, the Least_Error is not normalized by the ATR (Average True Range) but by a closing price. This is not adequate for tests on continuous futures contracts and therefore the original formula was adjusted. Mode: The 2phase reversal system (long/short). 
Threshold = [0, 200], Step = 5; 
Entry:  Long Trades: A buy at the open is placed after a Long Signal. Short Trades: A sell at the open is placed after a Short Signal. 

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:  Gain_Limit = [1, 10], Step = 0.25 Threshold = [0, 200], Step = 5 

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; 36 years (1980/01/01−2016/06/30) 
Table 1  Specification: Trading Strategy.
Tested Variables: Gain_Limit, Threshold (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
We benchmark the base case strategy against alternatives:
Case #1: Gain_Limit = 1; Threshold = 100.
Case #2: Gain_Limit = 3; Threshold = 100.
Case #3: Gain_Limit = 5; Threshold = 100 (Base Case).
Case #4: Gain_Limit = 7; Threshold = 100.
Fixed Fractional Sizing  Case #1  Case #2  Case #3  Case #4 
Net Profit ($)  255,002,050  450,898,827  415,980,346  339,371,870 
Sharpe Ratio  0.86  0.93  0.90  0.86 
Ulcer Performance Index (UPI)  0.99  1.14  0.96  0.90 
Profit Factor  1.49  1.44  1.32  1.29 
CAGR (%)  16.58  18.43  18.16  17.50 
Max. Drawdown (%)  (49.53)  (50.77)  (57.40)  (58.46) 
Percent Profitable Trades (%)  33.43  32.60  30.67  30.37 
Avg. Win / Avg. Loss Ratio  2.97  2.97  2.99  2.96 
Table 2  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
A/B/C/D
The trading strategy based on the Zero Lag Moving Average does not perform significantly better than the strategy based on the Hull Moving Average or some other alternatives.
Related Entries: Zero Lag Moving Average Filter (Entry & Exit)  Simple Moving Average Filter (Entry & Exit)  Hull Moving Average Filter (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/ehlers/zeroLag
]]>Developer: John Ehlers and Ric Way. Source: Ehlers, J., Way, R. (2010). Zero Lag (well, almost). Concept: Trend following trading strategy based on moving average filters. Research Goal: To verify performance of the Zero Lag Moving Average (ZLMA). Specification: Table 1. Results: Figure 12. Trade Filter: Long Trades: Zero Lag Moving Average (ZLMA) crosses over Exponential Moving Average (EMA). Short Trades: Zero Lag Moving Average (ZLMA) crosses under Exponential Moving Average (EMA). Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 36 years since 1980. Testing Platform: MATLAB®.
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: Look_Back, Threshold (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY  SPECIFICATION  PARAMETERS 
Auxiliary Variables:  Exponential Moving Average (EMA): Alpha = 2 / (Look_Back + 1); EMA[i] = Alpha × Close[i] + (1 − Alpha) × EMA[i − 1]; Index: i ~ Current Bar. Zero Lag Moving Average (ZLMA): Alpha = 2 / (Look_Back + 1); ZLMA[i] = Alpha × (EMA[i] + Gain × (Close[i] − ZLMA[i − 1])) + (1 − Alpha) × ZLMA[i − 1]; Index: i ~ Current Bar. Variable Gain (from the ZLMA formula): If the variable Gain is zero, the ZLMA becomes just an EMA. If the Gain is sufficiently large, the ZLMA tracks the price for all practical purposes (i.e. minimum lag and minimum smoothing). Therefore, we seek a value of Gain that is a satisfactory compromise. To get the least amount of error (Error = Close[i] − ZLMA[i]), a loop searches for the best value of Gain by varying the Gain variable from the lower Gain_Limit to the upper Gain_Limit. The default value for the variable Gain_Limit is 5 (this value is further researched in the next blog entry). 
Look_Back = [60, 1000], Step = 20; Gain_Limit = 5; 
Setup:  N/A.  
Filter:  Long Signal: ZLMA[i] crosses over EMA[i], and 100*Least_Error / ATR[i] > Threshold Index: i ~ Current Bar. Short Signal: ZLMA[i] crosses under EMA[i], and 100*Least_Error / ATR[i] > Threshold Index: i ~ Current Bar. Note: Error = Close[i] − ZLMA[i]. The Least_Error is an error for the best value of Gain found via a loop which runs barbybar from the lower Gain_Limit to the upper Gain_Limit. In the original paper, the Least_Error is not normalized by the ATR (Average True Range) but by a closing price. This is not adequate for tests on continuous futures contracts and therefore the original formula was adjusted. Mode: The 2phase reversal system (long/short). 
Threshold = [0, 200], Step = 5; 
Entry:  Long Trades: A buy at the open is placed after a Long Signal. Short Trades: A sell at the open is placed after a Short Signal. 

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:  Look_Back = [60, 1000], Step = 20 Threshold = [0, 200], Step = 5 

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; 36 years (1980/01/01−2016/06/30) 
Table 1  Specification: Trading Strategy.
Tested Variables: Look_Back, Threshold (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
We benchmark the base case strategy against alternatives:
Case #1: Look_Back = 250; Threshold = 100 (Base Case).
Case #2: Look_Back = 500; Threshold = 100.
Case #3: Look_Back = 750; Threshold = 100.
Case #4: Look_Back = 1000; Threshold = 100.
Fixed Fractional Sizing  Case #1  Case #2  Case #3  Case #4 
Net Profit ($)  299,855,388  68,584,149  22,802,153  6,734,038 
Sharpe Ratio  0.88  0.76  0.63  0.44 
Ulcer Performance Index (UPI)  0.98  0.67  0.52  0.28 
Profit Factor  1.45  1.74  1.67  1.55 
CAGR (%)  17.20  12.89  9.76  6.38 
Max. Drawdown (%)  (53.29)  (48.65)  (51.01)  (55.59) 
Percent Profitable Trades (%)  31.13  32.82  30.68  27.98 
Avg. Win / Avg. Loss Ratio  3.20  3.56  3.77  3.99 
Table 2  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
Ehlers, J., Way, R. (2010). Zero Lag (well, almost):
All smoothing filters and moving averages have lag. It’s a law. The lag is necessary because the smoothing is done using past data. Therefore, the averaging includes the effects of the data several bars ago. In this article we show you how to remove a selected amount of lag from an Exponential Moving Average (EMA). Removing all the lag is not necessarily a good thing because with no lag the indicator would just track out the price you are filtering. That is, the amount of lag removed is a tradeoff with the amount of smoothing you are willing to forgo.
A/B/C/D
The trading strategy based on the Zero Lag Moving Average does not perform significantly better than the strategy based on the Hull Moving Average or some other alternatives.
Related Entries: Zero Lag Moving Average Filter (Entry & Filter)  Simple Moving Average Filter (Entry & Exit)  Hull Moving Average Filter (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/ehlers/zeroLag
]]>
Source: Kaufman, P. J. (2013). Trading Systems and Methods. New Jersey: John Wiley & Sons, Inc. Concept: Trend following trading strategy based on Simple Moving Average (SMA) filters. Research Goal: To benchmark the Simple Moving Average (SMA) against the Hull Moving Average (HMA). Specification: Table 1. Results: Figure 12. Trade Filter: Long Trades: Fast_SMA[i − 1] > Slow_SMA[i − 1]. Short Trades: Fast_SMA[i − 1] < Slow_SMA[i − 1]. Index: i ~ Current Bar. Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 36 years since 1980. Testing Platform: MATLAB®.
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: Slow_SMA_Length, Fast_SMA_Index (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY  SPECIFICATION  PARAMETERS 
Auxiliary Variables:  Slow_SMA(Close, Slow_SMA_Length) is a “slow” simple moving average of the close price over a period of Slow_SMA_Length. Fast_SMA(Close, Fast_SMA_Length) is a “fast” simple moving average of the close price over a period of Fast_SMA_Length. Fast_SMA_Length = Fast_SMA_Index × Slow_SMA_Length. 
Slow_SMA_Length = [60, 1000], Step = 20; Fast_SMA_Index = [0.2, 0.98], Step = 0.02; 
Setup:  N/A  
Filter:  Long Signal: Fast_SMA[i − 1] > Slow_SMA[i − 1]. Index: i ~ Current Bar. Short Signal: Fast_SMA[i − 1] < Slow_SMA[i − 1]. Index: i ~ Current Bar. Mode: The 2phase reversal system (long/short). 

Entry:  Long Trades: A buy at the open is placed after a Long Signal. Short Trades: A sell at the open is placed after a Short Signal. 

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:  Slow_SMA_Length = [60, 1000], Step = 20 Fast_SMA_Index = [0.2, 0.98], 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; 36 years (1980/01/01−2016/06/30) 
Table 1  Specification: Trading Strategy.
Tested Variables: Slow_SMA_Length, Fast_SMA_Index (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
We benchmark the base case strategy against alternatives:
Case #1: Slow_SMA_Length = 250; Fast_SMA_Index = 0.25 (Base Case).
Case #2: Slow_SMA_Length = 500; Fast_SMA_Index = 0.25.
Case #3: Slow_SMA_Length = 750; Fast_SMA_Index = 0.25.
Case #4: Slow_SMA_Length = 1000; Fast_SMA_Index = 0.25.
Fixed Fractional Sizing  Case #1  Case #2  Case #3  Case #4 
Net Profit ($)  390,523,449  47,150,145  4,289,092  905,055 
Sharpe Ratio  0.93  0.67  0.35  0.20 
Ulcer Performance Index (UPI)  1.16  0.52  0.17  0.06 
Profit Factor  1.40  1.53  1.21  1.15 
CAGR (%)  18.06  11.71  5.01  1.97 
Max. Drawdown (%)  (46.80)  (60.63)  (68.79)  (63.37) 
Percent Profitable Trades (%)  36.67  36.19  30.85  28.21 
Avg. Win / Avg. Loss Ratio  2.43  2.70  2.70  2.92 
Table 2  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
A/B/C/D
(i) The Simple Moving Average (SMA) is less robust than the Hull Moving Average (HMA); (ii) Based on the above sensitivity tests, preferred SMA parameters are: 100 ≤ Slow_SMA_Length ≤ 600; 0.2 ≤ Fast_SMA_Index ≤ 0.5 (Figure 12).
Related Entries: Hull Moving Average Filter (Entry & Exit)  Zero Lag Moving Average Filter (Entry & Exit)  Bollinger Bands – Momentum Model (Setup)  Price Momentum Model (Benchmark)
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/sma
]]>Developer: Alan Hull. Source: Kaufman, P. J. (2013). Trading Systems and Methods. New Jersey: John Wiley & Sons, Inc. Concept: Trend following trading strategy based on low lag moving averages. Research Goal: To verify performance of the Hull Moving Average (HMA). Specification: Table 1. Results: Figure 12. Trade Filter: Long Trades: Two Hull Moving Averages turn upwards. Short Trades: Two Hull Moving Averages turn downwards. Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 36 years since 1980. Testing Platform: MATLAB®.
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: Slow_HMA_Length, Fast_HMA_Index (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY  SPECIFICATION  PARAMETERS 
Auxiliary Variables:  Hull Moving Average Formula: (A) The First Weighted Moving Average (WMA1): WMA1[i] = (Close[i − N + 1] + 2 × Close[i − N + 2] + 3 × Close[i − N + 3] + … + N × Close[i]) / (N × (N + 1) × 0.5) where: N = Hull Moving Average look back; Index: i ~ Current Bar. (B) The Second Weighted Moving Average (WMA2): WMA2[i] = (Close[i − M + 1] + 2 × Close[i − M + 2] + 3 × Close[i − M + 3] + … + M × Close[i]) / (M × (M + 1) × 0.5) where: M = round(N/2); Index: i ~ Current Bar. (C) The Hull Moving Average (HMA): Delta[i] = 2 × WMA2[i] − WMA1[i]; HMA[i] = (Delta[i − K + 1] + 2 × Delta[i − K + 2] + 3 × Delta[i − K + 3] + … + K × Delta[i])/(K × (K + 1) × 0.5) where: K = round(SquareRoot(N)); Index: i ~ Current Bar. 

Setup:  Variables: (i) Slow_HMA_Length; (ii) Fast_HMA_Length = Fast_HMA_Index × Slow_HMA_Length. Slow Trend: Slow_HMA(Close, Slow_HMA_Length) is the Slow Hull Moving Average of the close price over a period of Slow_HMA_Length. When the Slow_HMA turns upwards, the slow trend is bullish: i.e. Slow_HMA[i] > Slow_HMA[i − 1]; Index: i ~ Current Bar. When the Slow_HMA turns downwards, the slow trend is bearish: i.e. Slow_HMA[i] < Slow_HMA[i − 1]; Index: i ~ Current Bar. Fast Trend: Fast_HMA(Close, Fast_HMA_Length) is the Fast Hull Moving Average of the close price over a period of Fast_HMA_Length. When the Fast_HMA turns upwards, the fast trend is bullish: i.e. Fast_HMA[i] > Fast_HMA[i − 1]; Index: i ~ Current Bar. When the Fast_HMA turns downwards, the fast trend is bearish: i.e. Fast_HMA[i] < Fast_HMA[i − 1]; Index: i ~ Current Bar. 
Slow_HMA_Length = [60, 1000], Step = 20; Fast_HMA_Index = [0.2, 1.0], Step = 0.02; 
Filter:  Long Signal: Slow Trend & Fast Trend (Defined in the Setup) are in a bullish mode. Short Signal: Slow Trend & Fast Trend (Defined in the Setup) are in a bearish mode. 

Entry:  Long Trades: A buy at the open is placed after a Long Signal (i.e. Slow Trend & Fast Trend are in a bullish mode). Short Trades: A sell at the open is placed after a Short Signal (i.e. Slow Trend & Fast Trend are in a bearish mode). 

Exit:  Hull Moving Average Exit: Long Trades: A sell at the open is placed when Slow Trend or Fast Trend (Defined in the Setup) is no longer bullish. Short Trades: A buy at the open is placed when Slow Trend or Fast Trend (Defined in the Setup) is no longer bearish. 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:  Slow_HMA_Length = [60, 1000], Step = 20 Fast_HMA_Index = [0.2, 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; 36 years (1980/01/01−2016/06/30) 
Table 1  Specification: Trading Strategy.
Tested Variables: Slow_HMA_Length, Fast_HMA_Index (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
We benchmark the base case strategy against alternatives:
Case #1: Slow_HMA_Length = 250; Fast_HMA_Index = 1 (Base Case).
Case #2: Slow_HMA_Length = 500; Fast_HMA_Index = 1.
Case #3: Slow_HMA_Length = 750; Fast_HMA_Index = 1.
Case #4: Slow_HMA_Length = 1000; Fast_HMA_Index = 1.
Fixed Fractional Sizing  Case #1  Case #2  Case #3  Case #4 
Net Profit ($)  48,750,686  129,227,063  359,229,430  154,497,672 
Sharpe Ratio  0.60  0.75  0.93  0.86 
Ulcer Performance Index (UPI)  0.53  0.75  1.18  0.96 
Profit Factor  1.10  1.20  1.45  1.55 
CAGR (%)  11.50  14.97  18.94  16.55 
Max. Drawdown (%)  (58.03)  (57.98)  (49.90)  (50.03) 
Percent Profitable Trades (%)  30.80  29.35  30.51  30.99 
Avg. Win / Avg. Loss Ratio  2.48  2.90  3.31  3.45 
Table 2  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
A/B/C/D
(i) The Hull Moving Average is perceived as an improved moving average with reduced lag (Figure 3); (ii) The slower frequency of trading is preferred, i.e. Slow_HMA_Length > 500 (Figure 12); (iii) The second moving average, the Fast Hull Moving Average, is an unnecessary complication and can be eliminated (Figure 12). When Fast_HMA_Index = 1, both moving averages have the same length.
Figure 3  Hull Moving Average (HMA) vs. Simple Moving Average (SMA) vs. Exponential Moving Average (EMA); Look Back: 100 Bars.
Related Entries: Zero Lag Moving Average Filter (Entry & Exit)  Simple Moving Average Filter (Entry & Exit)  Bollinger Bands – Momentum Model (Setup)  Price Momentum Model (Benchmark)
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/hull/hma
]]>Developer: Larry Connors (The 2Period RSI Trading Strategy), Welles Wilder (The RSI Momentum Oscillator). Source: (i) Connors, L., Alvarez, C. (2009). Short Term Trading Strategies That Work. Jersey City, NJ: Trading Markets; (ii) Wilder, J. W. (1978). New Concepts in Technical Trading Systems. Greensboro: Trend Research. Concept: The long equity trading system based on the 2Period RSI (Relative Strength Index). Research Goal: To benchmark the RSI exit strategy against the trend exit strategy based on moving averages. Specification: Table 1. Results: Figure 12. Trade Filter: The 2Period RSI closes below RSI_Threshold (Default Value: RSI_Threshold = 5). Portfolio: Five equity futures markets (DJ, MD, NK, NQ, SP). Data: 36 years since 1980. Testing Platform: MATLAB®.
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: RSI_Entry_Threshold & RSI_Exit_Threshold (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY  SPECIFICATION  PARAMETERS 
Auxiliary Variables:  The 2Period Relative Strength Index (RSI): The Relative Strength Index (RSI) is a momentum oscillator that compares the magnitude of recent gains to recent losses to determine overbought and oversold conditions. RSI(Close, RSI_Look_Back) is the Relative Strength Index of the close price over a period of RSI_Look_Back; Default Value: RSI_Look_Back = 2. Formula: We use an exponential smoothing. Up[i] = max(Close[i] − Close[i − 1], 0); Down[i] = max(Close[i − 1] − Close[i], 0); AvgUp[i] = (AvgUp[i − 1] * (RSI_Look_Back − 1) + Up[i]) / RSI_Look_Back; AvgDown[i] = (AvgDown[i − 1] * (RSI_Look_Back − 1) + Down[i]) / RSI_Look_Back; RS[i] = AvgUp[i] / AvgDown[i]; RSI[i] = 100 − 100/(1 + RS[i]); Index: i ~ Current Bar. Note: The first “AvgUp” (i.e. AvgUp[1] ) is calculated as a simple average of “Up” values over a period of RSI_Look_Back. The first “AvgDown” (i.e. AvgDown[1]) is calculated as a simple average of “Down” values over a period of RSI_Look_Back. 
RSI_Look_Back = 2; 
Setup:  Long Setup: MA(Close, Setup_Look_Back) is a simple moving average of the close price over a period of Setup_Look_Back; Default Value: Setup_Look_Back = 200; Setup Rule: Close[i] > MA[i]; Index: i ~ Current Bar. 
Setup_Look_Back = 200; 
Filter:  Long Filter: The RSI closes below RSI_Entry_Threshold; Default Value: RSI_Entry_Threshold = 5; Filter Rule: RSI[i] < RSI_Entry_Threshold; Index: i ~ Current Bar. 
RSI_Entry_Threshold = [2, 30], Step = 1; 
Entry:  Long Entry: A buy at the open is placed after a bullish Setup/Filter. Note: In the original model, a buy at the close is placed on the same bar as a bullish Setup/Filter. 

Exit:  RSI Exit: Long Exit: A sell at the open is placed if RSI[i − 1] > RSI_Exit_Threshold; Default Value: RSI_Exit_Threshold = 95; Index: i ~ Current Bar. 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 Stop: A sell stop is placed at [Entry − ATR(ATR_Length) * ATR_Stop]. 
RSI_Exit_Threshold = [70, 98], Step = 1; ATR_Length = 20; ATR_Stop = 6; 
Sensitivity Test:  RSI_Entry_Threshold = [2, 30], Step = 1 RSI_Exit_Threshold = [70, 98], Step = 1 

Position Sizing:  Initial_Capital = $1,000,000 Fixed_Fractional = 1% Portfolio = 5 Equity Futures (DJ, MD, NK, NQ, SP) ATR_Stop = 6 (ATR ~ Average True Range) ATR_Length = 20 

Data:  Five equity futures markets (DJ, MD, NK, NQ, SP); 36 years (1980/01/01−2016/04/30) 
Table 1  Specification: Trading Strategy.
Tested Variables: RSI_Entry_Threshold & RSI_Exit_Threshold (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $50 Round Turn).
We benchmark the base case strategy (default parameters) against alternatives:
Case #1: RSI_Entry_Threshold = 5; RSI_Exit_Threshold = 95 (Base Case).
Case #2: RSI_Entry_Threshold = 5; RSI_Exit_Threshold = 75.
Case #3: RSI_Entry_Threshold = 10; RSI_Exit_Threshold = 75.
Case #4: RSI_Entry_Threshold = 15; RSI_Exit_Threshold = 75.
Fixed Fractional Sizing  Case #1  Case #2  Case #3  Case #4 
Net Profit ($)  171,875  237,163  491,935  405,423 
Sharpe Ratio  0.21  0.43  0.57  0.42 
Ulcer Performance Index (UPI)  0.20  0.57  0.98  0.69 
Profit Factor  1.30  1.70  1.71  1.44 
CAGR (%)  0.48  0.65  1.21  1.03 
Max. Drawdown (%)  (6.84)  (5.12)  (5.31)  (6.52) 
Percent Profitable Trades (%)  69.35  74.37  73.97  71.10 
Avg. Win / Avg. Loss Ratio  0.58  0.59  0.60  0.58 
Table 2  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $50 Round Turn.
A/B/C/D
The RSI exit strategy (Table 1) is not significantly better or worse than the base case strategy (i.e. the exit strategy based on moving averages).
Related Entries: Relative Strength Index (RSI) Model (Filter)  Long Equity Trading System (Filter & Exit)  3Bar Momentum Pattern (Filter & Exit)  Hikkake Pattern (Filter & 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/connors/rsi2
]]>