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: 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
]]>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: Performance verification of the simple trading strategy that buys pullbacks in a bull market. 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_Threshold & Exit_Look_Back (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_Threshold; Default Value: RSI_Threshold = 5; Filter Rule: RSI[i] < RSI_Threshold; Index: i ~ Current Bar. 
RSI_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:  Trend Exit: MA(Close, Exit_Look_Back) is a simple moving average of the close price over a period of Exit_Look_Back; Default Value: Exit_Look_Back = 5. Long Exit: A sell at the open is placed if Close[i − 1] > MA[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 Stop: A sell stop is placed at [Entry − ATR(ATR_Length) * ATR_Stop]. 
Exit_Look_Back = [5, 30], Step = 1;; ATR_Length = 20; ATR_Stop = 6; 
Sensitivity Test:  RSI_Threshold = [2, 30], Step = 1 Exit_Look_Back = [5, 30], 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_Threshold & Exit_Look_Back (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_Threshold = 5; Exit_Look_Back = 5 (Base Case).
Case #2: RSI_Threshold = 5; Exit_Look_Back = 10.
Case #3: RSI_Threshold = 10; Exit_Look_Back = 10.
Case #4: RSI_Threshold = 15; Exit_Look_Back = 10.
Fixed Fractional Sizing  Case #1  Case #2  Case #3  Case #4 
Net Profit ($)  119,305  215,290  472,423  410,503 
Sharpe Ratio  0.28  0.38  0.56  0.44 
Ulcer Performance Index (UPI)  0.30  0.50  0.93  0.67 
Profit Factor  1.40  1.59  1.71  1.47 
CAGR (%)  0.34  0.59  1.17  1.04 
Max. Drawdown (%)  (4.64)  (4.86)  (3.96)  (4.24) 
Percent Profitable Trades (%)  69.82  73.17  75.50  74.89 
Avg. Win / Avg. Loss Ratio  0.61  0.58  0.55  0.49 
Table 2  Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $50 Round Turn.
Connors, L., Alvarez, C. (2009). Short Term Trading Strategies That Work. Jersey City, NJ: Trading Markets:
Most traders use the 14period RSI. But our studies have shown that statistically, there is no edge using the 14period RSI. However, when you shorten the time frame of the RSI (meaning you go much lower than the 14period) you start seeing some very impressive results. Our research shows that more robust and consistent results are obtained by using a 2period RSI and we have built many trading methods that incorporate the 2period RSI […] The lower the RSI, the greater the performance. The average returns of stocks with a 2period RSI reading below 2 were greater than those stocks with a 2period RSI reading below 5, etc.
A/B/C/D
(i) The trading strategy based on the 2Bar Relative Strength Index underperforms alternative momentum models; (ii) The preferred parameters are: 5 ≤ RSI_Threshold ≤ 13; 8 ≤ Exit_Look_Back ≤ 13 (Figure 12).
Related Entries: Relative Strength Index (RSI) Model (New Exits)  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/rsi1
]]>Developer: John Bollinger. Concept: Trading strategy based on volatility breakouts. Source: Bolliger, J. (2002). Bollinger on Bollinger Bands. New York: McGrawHill. Research Goal: Performance verification of the volatility squeeze pattern. Specification: Table 1. Results: Figure 12. Trade Filter: When volatility falls to historically low levels, the volatility squeeze pattern is identified (Definitions: Table 1). Trade Setup: Long Trades: Close[i − 1] > Upper_Band[i − 1]. Short Trades: Close[i − 1] < Lower_Band[i − 1]. Index: i ~ Current Bar. Trade Entry: Long Trades: A buy at open is placed after a bullish Setup. Short Trades: A sell at open 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: 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: Squeeze_Look_Back & Squeeze_Memory (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY  SPECIFICATION  PARAMETERS 
Auxiliary Variables:  MA(Close, MA_Length) is a simple moving average of the close price over a period of MA_Length. Std(MA_Length) is a standard deviation over a period of MA_Length. St_Dev is a number of standard deviations to include in the price envelope. Upper_Band[i] = MA[i] + St_Dev * Std[i] Lower_Band[i] = MA[i] − St_Dev * Std[i] BandWidth[i] = (Upper_Band[i] − Lower_Band[i]) / MA[i] Index: i ~ Current Bar. 
MA_Length = 80; St_Dev = 2.0; 
Setup:  Long Trades: Close[i − 1] > Upper_Band[i − 1]. Short Trades: Close[i − 1] < Lower_Band[i − 1]. Index: i ~ Current Bar. 

Filter:  New trades are accepted only during the volatility squeeze pattern. The pattern starts when BandWidth[Today] = min(BandWidth over a look back period defined by the variable Squeeze_Look_Back). The pattern ends after a fixed period from the start defined by the variable Squeeze_Memory.  Squeeze_Look_Back = [0, 1000], Step = 25; Squeeze_Memory= [25, 1000], Step = 25; 
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] < MA[i − 1]. Short Trades: A buy at the open is placed if Close[i − 1] > MA[i − 1]. 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:  Squeeze_Look_Back = [0, 1000], Step = 25 bars Squeeze_Memory = [25, 1000], Step = 25 bars 

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/02/29) 
Table 1  Specification: Trading Strategy.
Tested Variables: Squeeze_Look_Back & Squeeze_Memory (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
A/B/C/D
The volatility squeeze filter does not improve the simple trendfollowing model based on Bollinger Bands. This can be observed in Figure 12: When Squeeze_Look_Back = 0 and Squeeze_Memory = 1000, all trades are accepted without any filtering.
Related Entries: Bollinger Bands – Momentum Model (Setup)
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/bollinger/volatilitysqueeze/
]]>Developer: John Bollinger (Bollinger Bands®). Concept: Trendfollowing trading strategy based on Bollinger Bands. Research Goal: Performance verification of the 3phase model (long/short/neutral). Specification: Table 1. Results: Figure 12. Trade Setup: Long Trades: Close[i − 1] > Upper_Band[i − 1]. Short Trades: Close[i − 1] < 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. Trade Exit: Table 1. 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: MA_Length & St_Dev (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY  SPECIFICATION  PARAMETERS 
Auxiliary Variables:  MA(Close, MA_Length) is a simple moving average of the close price over a period of MA_Length. Std(MA_Length) is a standard deviation over a period of MA_Length. St_Dev is a number of standard deviations to include in the envelope. Upper_Band[i] = MA[i] + St_Dev * Std[i] Lower_Band[i] = MA[i] − St_Dev * Std[i] Index: i ~ Current Bar. 
MA_Length = [10, 200], Step = 5; St_Dev = [0.0, 3.0], Step = 0.1; 
Setup:  Long Trades: Close[i − 1] > Upper_Band[i − 1] Short Trades: Close[i − 1] < 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] < MA[i − 1]. Short Trades: A buy at the open is placed if Close[i − 1] > MA[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:  MA_Length = [10, 200], Step = 5 St_Dev = [0.0, 3.0], Step = 0.1 

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/02/29) 
Table 1  Specification: Trading Strategy.
Tested Variables: MA_Length & St_Dev (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
A/B/C/D
(i) The default Bollinger Bands setup (MA_Length = 20) is not optimal and the lower frequency of trading is preferred (i.e. MA_Length > 60; Figure 12); (ii) The volatility envelope improves performance (i.e. St_Dev > 0; Figure 2); (iii) The strategy recovered from the recent drawdown.
Related Entries: Combined Donchian Channels (Entry & Exit)  Bollinger Bands %b (Setup)  Bollinger Bands %b (Setup & Filter)  Dow Theory – Trend (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/bollinger/trendfollowing/
]]>Developer: Toby Crabel (Setup: NR7 Pattern); Laurence A. Connors, Linda B. Raschke (Entry: Price Breakout with NR7). Source: (i) Crabel, T. (1990). Day Trading with Short Term Price Patterns and Opening Range Breakout. Greenville: Traders Press, Inc; (ii) Laurence A. Connors, Linda B. Raschke (1995). Street Smarts  High Probability Short Term Trading Strategies. M. Gordon Publishing Group, Inc. Concept: Volatility cycles. Research Goal: To study different price entry thresholds (i.e. “Channel_Length” var. defined in the Table 1). Specification: Table 1. Results: Figure 12. Trade Setup: The current daily range is narrower than the previous six days’ daily ranges compared individually. Trade Entry: Long Trades: A buy stop is placed one tick above the UpperChannel[Yesterday]. Short Trades: A sell stop is placed one tick below the LowerChannel[Yesterday]. Trade Exit: Table 1. 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: Channel_Length & NR_Length (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY  SPECIFICATION  PARAMETERS 
Auxiliary Variables:  UpperChannel(Channel_Length) is the highest high over a period of Channel_Length. LowerChannel(Channel_Length) is the lowest low over a period of Channel_Length.  Channel_Length = [1, 30], Step = 1; 
Setup:  The current daily range is narrower than the previous six days’ daily ranges compared individually (NR_Length = 6; Default Value). 
NR_Length = [1, 20], Step = 1; 
Filter:  N/A  
Entry:  Long Trades: The next day after the setup, a buy stop is placed one tick above the UpperChannel[Yesterday]. Short Trades: The next day after the setup, a sell stop is placed one tick below the LowerChannel[Yesterday]. Note: The first stop that is traded is the position. The other stop is the protective stop. If both stops are triggered during the same day, we account only for one entry and one exit (no reversals) and assume the trade was a loser. 

Exit:  Time Exit: N^{th} day at the close. 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]. 
N = 10; ATR_Length = 20; ATR_Stop = 6; 
Sensitivity Test:  Channel_Length = [1, 30], Step = 1 NR_Length = [1, 20], Step = 1 

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/01/31) 
Table 1  Specification: Trading Strategy.
Tested Variables: Channel_Length & NR_Length (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $50 Round Turn).
A/B/C/D
(i) The NR7 pattern performs better when NR_Length ≥ 6 (Figure 12); (ii) Once the cost of trading is applied (Figure 2), the pattern is not currently tradeable without some additional rules; (iii) The NR7 pattern with price breakout performs better when Channel_Length ≥ 10 (Figure 2).
Related Entries: Price Breakout with NR7 Pattern (Setup & Exit)  NR7 Pattern (Setup & 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/crabel/nr7pricebreakout/
]]>Developer: Toby Crabel (Setup: NR7 Pattern); Laurence A. Connors, Linda B. Raschke (Entry: Price Breakout with NR7). Source: (i) Crabel, T. (1990). Day Trading with Short Term Price Patterns and Opening Range Breakout. Greenville: Traders Press, Inc; (ii) Laurence A. Connors, Linda B. Raschke (1995). Street Smarts  High Probability Short Term Trading Strategies. M. Gordon Publishing Group, Inc. Concept: Volatility cycles. Research Goal: To benchmark the original NR7 pattern against the same pattern having a different entry method (ORB vs Price Breakout). Specification: Table 1. Results: Figure 12. Trade Setup: The current daily range is narrower than the previous six days’ daily ranges compared individually. Trade Entry: Long Trades: A buy stop is placed one tick above the UpperChannel[Yesterday]. Short Trades: A sell stop is placed one tick below the LowerChannel[Yesterday]. Trade Exit: Table 1. 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: N & NR_Length (Definitions: Table 1):
Figure 1  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY  SPECIFICATION  PARAMETERS 
Auxiliary Variables:  UpperChannel(Channel_Length) is the highest high over a period of Channel_Length. LowerChannel(Channel_Length) is the lowest low over a period of Channel_Length.  Channel_Length = 1; 
Setup:  The current daily range is narrower than the previous six days’ daily ranges compared individually (NR_Length = 6; Default Value). 
NR_Length = [1, 20], Step = 1; 
Filter:  N/A  
Entry:  Long Trades: The next day after the setup, a buy stop is placed one tick above the UpperChannel[Yesterday]. Short Trades: The next day after the setup, a sell stop is placed one tick below the LowerChannel[Yesterday]. Note: The first stop that is traded is the position. The other stop is the protective stop. If both stops are triggered during the same day, we account only for one entry and one exit (no reversals) and assume the trade was a loser. 

Exit:  Time Exit: N^{th} day at the close. 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]. 
N = [1, 40], Step = 1; ATR_Length = 20; ATR_Stop = 6; 
Sensitivity Test:  NR_Length = [1, 20], Step = 1 N = [1, 40], Step = 1 

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/01/31) 
Table 1  Specification: Trading Strategy.
Tested Variables: N & NR_Length (Definitions: Table 1):
Figure 2  Portfolio Performance (Inputs: Table 1; Commission & Slippage: $50 Round Turn).
A/B/C/D
(i) The NR7 pattern performs better when NR_Length ≥ 6 (Figure 12); (ii) The longer holding period defined by the variable “N” is preferred (Figure 2); (iii) Once the cost of trading is applied (Figure 2), the pattern is not currently tradeable without some additional rules; (iv) The NR7 pattern with the price breakout has a similar performance as the NR7 pattern with the Opening Range Breakout (ORB).
Related Entries: Price Breakout with NR7 Pattern (Setup & Entry)  NR7 Pattern (Setup & Exit)  2 Bar Narrow Range Pattern (Exits)  Narrow Range NDay Pattern (Setup)
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/crabel/nr7pricebreakout/
]]>