R&D Blog
Gap Pattern – Type A | Trading Strategy (Filter & Exit)
I. Trading Strategy
Concept: Short-term momentum patterns with a trend filter. Source: Dahlquist, J. R., Bauer, R. J. (2012). Technical Analysis of Gaps. New Jersey: Pearson Education, Inc. Research Goal: Performance verification of the Gap Pattern. Specification: Table 1. Results: Figure 1-2. Trade Setup: Long Price Gap: Low[i] > High[i − 1]); Index: i ~ Current Bar. Short Price Gap: High[i] < Low[i − 1]; Index: i ~ Current Bar. Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 35 years since 1980. Testing Platform: MATLAB®.
II. Sensitivity Test
All 3-D charts are followed by 2-D 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: Filter_Look_Back & Time_Index (Definitions: Table 1):
Figure 1 | Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY | SPECIFICATION | PARAMETERS |
Auxiliary Variables: | N/A. | |
Setup: | Long Gap Pattern: Low[i] > High[i − 1]). Index: i ~ Current Bar. Short Gap Pattern: High[i] < Low[i − 1]. Index: i ~ Current Bar. | |
Filter: | UpperChannel(Filter_Look_Back) is the highest high over a period of Filter_Look_Back. LowerChannel(Filter_Look_Back) is the lowest low over a period of Filter_Look_Back. Long Trend Filter: If High[i] > UpperChannel[i − 1] then the trend is “long” (only long trades are accepted). Short Trend Filter: If Low[i] < LowerChannel[i − 1] then the trend is “short” (only short trades are accepted). Index: i ~ Current Bar. | Filter_Look_Back = [2, 100], Step = 2; |
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: | Time Exit: nth day at the close, n = Time_Index. Pattern Exit: Long Trades: A sell stop is placed one tick below the price gap. Short Trades: A buy stop is placed one tick above the price gap. 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]. | Time_Index = [1, 50], Step = 1; ATR_Length = 20; ATR_Stop = 6; |
Sensitivity Test: | Filter_Look_Back = [2, 100], Step = 2 Time_Index = [1, 50], 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; 35 years (1980/01/01−2015/07/31) |
Table 1 | Specification: Trading Strategy.
III. Sensitivity Test with Commission & Slippage
Tested Variables: Filter_Look_Back & Time_Index (Definitions: Table 1):
Figure 2 | Portfolio Performance (Inputs: Table 1; Commission & Slippage: $50 Round Turn).
IV. Rating: Gap Pattern – Type A | Trading Strategy
A/B/C/D
V. Summary
(i) The trend filter defined by the variable “Filter_Look_Back” improves performance of the Gap Pattern (Figure 1-2); (ii) The longer holding period defined by the variable “Time_Index” is preferred (Figure 1-2); (iii) The pattern can be further improved and become a part of a multi-pattern strategy.
Related Entries: 3-Bar Momentum Pattern (Filter & Exit) | ORBP with Price Channel Filter (Filter & Exit) | Hikkake Pattern (Filter & Exit)
Related Topics: (Public) Trading Strategies
CFTC RULE 4.41: HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.
RISK DISCLOSURE: U.S. GOVERNMENT REQUIRED DISCLAIMER | CFTC RULE 4.41
Codes: matlab/dahlquist/gaps