You are on page 1of 4
Testing The Engulfing Bullish Pattern Identifying chart patterns is often subjective.Is there a way to objectively backtest chart patterns? It can be a challenge but here's one way to doit. by Pawel Kosinski necessary componentofbacktesting trading strate- pies isto have well-defined entries and exits. For Tapanese candlesticks like the engulfing bullish pattern, exits aren't really specified—traders de- fine them in different ways, As an example, you could look for a resistance well above a potential entry price or sell the position ifa bearish price action occurs. This is what makes backtesting a challenge. On the other hand, traders would still like to backtest pat terns suchas the engulfing bullish pattern to find out how well, the pattern works, In this article I will show you a relatively easy strategy to analyze this pattern BACKTESTING CRITERIA For my backtesting I used the following criteria (ee also Figure 1) + OnDay0 (enclose), the engulfing bullish pattern cceurs. This day is shown as B in Figure 1 ber 2018+ Teta Ants of STOCKS & COMMODITIES * Price has decreased recently and this is detected by demanding that both the five-day SMA and the 10-day ‘SMA are falling on Day 0 and on Days 1 and 2. This ‘way, you make sure the pattern occurs in a downtrend, + The general trend is, however, up, which I defined as the 100-day SMA above the 400-day SMA. + The entire stock market (represented by the S&P 500 index) is also bullish: The 100-day SMA of the index is above the 400-day SMA. + On Day 0, high volume was detected—higher than the average of the past 14 days. + Tirade stocks from the Russell 3000 inex. The advan- tage of this is you don't necessarily focus on blue chips or just good stocks. I also select stacks in which price is in the $20-$90 per share range and volume on Day iis higher than 100,000 shares. I search for a local maximum in price that occurred some days before the engulfing bullish pattern, Acbitrarily, I state that this is the day where the high exceeds the surrounding three days, In Figure 1, this is indicated by A. Nua, i8 the umber of days when this happened (five days in the example shown in Figure 1) and P,. is the high of this day In addition Tassumed that N,, cannot exceed 30 days, ENTRY & EXIT For the entry, I use three possible sce- 1. Buy the stock on the next day's open, that is,on days. 2. Buy the stock on the open of day+2 if the close of day+1 is above the high of Day0 (thatis,the engulfing parternhas ‘been confirmed), 3. Buy the stock on the open of day+2 if the close of day+1 is above the high of Day 0 (butnotif the high of day+1 was higher than the high of Day 0). In Figure 1 you see an example of sce- nario 2, Regarding the exits, [will sell the stocksif Profit target 138 @ 77,77 4 B ar’ ii Go Lo 138 @ 72,72 price reaches P,.,.1place a stop-loss $2 be- ow the high of Day0.Laterl will investigate Another case since this requirement may be somewhat artificial and many practitioners ‘may disagree with me. Thisstrategy isnot perfect. Realistically,youshould consider some other aspects, such as current price testing a support (or evenaconfluence of supports) orthere may anotherresistance Delon Pigs and 4 on. Thescfine, hi a higher number of trades than what you can expect in real life unless someone wishes to use fully automated trading and blindly follow: the signals as in backtesting For each trade you buy a number of shares so the total ‘price doesn't exceed $10,000. Alternatively (not done in this research) you could test a strategy in which the total risk is lower than some arbitrary valne. jeseascls will scl it RESULTS: Iwilluse selected statistical results that are usedin NinjaTrader software: () the total net profit in USD; (i) profit factor; (ii) ‘maxiowm drawdown; (iv) aumber of trades; (v) percent of profitable trades; (vi) average trade in percent; (vi) winvToss ratio; (vii) mamber of days a stock is held. I discussed these parameters alsoin my September 2018 STOCKS & CoMMODI- TIES article, “Double Bottoms Revisited.” ‘The backtesting results are shown in Figure 2. Tcompare the three aforementioned scenarios. Note that scenario 2 results in the best performance. Actually, scenario 3 has a slightly lower (that is, better) maximum drawdown but the other parameters are rather worse. ‘Therefore, in the following section, I will pay attention to Modification of scenario 2 First, make sure the take-profit level is high enough above a potential entry price, so the rewardiiskratio would be decent. We will doit by dividing potential gain defined by the price Pag) by a potential loss ($2 below the high of Day 0, as men- FIGURE 1: A SUCCESSFUL TRADE, Youbuy stock one dy fer theengulrg ulin pati occured (town as 8). Thre sa lcal mairum afew days before (shown a A). Tis eel maxinum occured ‘Hp, 8878 999 and ts high hs day wllbe cad P, Tho profi target vei equlb eT ET mT ot net rf simist7_| $6507 12209) Protec 132 1.58 129 Maxum arendoan —|—362% Prd 201% {Muenber oft 2186 28 re Poftblatades | 48706 wm sre average ade] 087% 150% 75% Waves 158 i 12 [Number of days ha 16 ‘ 8 FIGURE 2: BACKTESTING RESULTS 01/10/2000-12/31/2017. Scenario 2 ‘uperorms, which means you sou wal or cantmaton atthe enguting bulls pater cocured. siondpeevicnay Laat this rowardfiskratioto [radi pe om beat leat 10, oti i The results of this [Maximum drawdown 316% ‘modification are dis- [Munberottrades EA Piyed in Figo 2. Tac eaters —| Sua ‘ins rato is clearly EB a igher, aa expected. (Wueetyamcrag—-— Unfortunately, the per~ IGOR S: MCREASWa THE POTENTIAL ‘REWARD /ISK RATIO. Hor, he patria reardiskralshighor an 1.0, Theresuts “aracomparedtoseenaro anayzeainFgue 2 (second coum). K wil be sight higher centage of profitable trades has decreased accordingly. In my Sep- tember2018S&Carticle, —(aimost 25%) The maximum dawdom isa TusedtheKellycriterion _btworseferthesecondcaseandithe number tw help me to decide in "ades has reduced such cases: K=P-(1-PyR here P is the percent of profitable trades and R is the aver- age win/loss ratio, So, for my benchmark, the ease shown in Figure 2 in the secondcolumn, Kwillbecome 24.5% Forthe second case Fi Decemher 201 + Tecnica Anabirof STOCKS & COMMODITIES 15, er ee Em Total ot sia Notatret ot CC) Total sett Preto 12 Prttckr 12 195. Prot 182 axarun awiown—| 4.00% Mexinun rancoun | — 3.29% 220% Naini cewdenn—| 2.77% Number vases 2200 Nanberfvades 2 o Number ol aces ma Proteins] | — $5.02 Probie tades(@] | tare | e008 Pratl tedes a] | ave | Average trade [%) 0.66% [Average trade [%) 027% 187% Average trade [%) 1 Wins 108 Wavess 1 13h Wines 128 Nunber oad 2 Number fay 8 z Nair oda Tad 6 FIGURE 4: EARLY EXIT. You et the wade ‘25 Sn a5 pice touches th hgh of Day 0 us he height ofthe ere Day O bar. You hol the stock for fener dys. The resuts ‘are decent, ure 3), K will be slightly higher (almost 26%). The maximum. drawdown isa bit worse for the second case and the number of trades has reduced so it depends on what you prefer: Modification of scenario 1 Nest, I will return to seenario 1, where I enter on the first day after the pattern occurred. In other words I don't wait for any confirmation as studied in the first column from the table in Figure 2. This time I want to leave the trade auvch eatliee. I deine a rather artificial take profit level that is the high of Day 0 plus the length of the entire candle of Day 0 (hati, high + Ghigl- lon) uf Dey 0). The scsulls van be soon in Figuie 4.1 observed, perhaps as expected, there was a higher percentage of profitable trades but lower gain from each trade, as well as lower wingloss ratio. An advantage of this strategy is that the number of days in a trade is less. This gives you am op- portunity to use your capital for something else since your capital isn't tied up. In addition, I would do another modification, inspized by the May 2018 S&C article by Ken Calhoun, “Moving Average Hammer Pivots,” who, in the article, suggests combining. a Japanese candlestick with some major moving average. In the article, Calhoun uses the hammer candlestick and 200-day SMA. Although I am studying the engulfing bullish pattern (ota hammer), the idea is similar I wanted to modify scenario I with a case where the lows of Day 0 or Day 1 are below the 200-day SMA, but the eloses are above it (in my computer program, I allow a few cents deviation to inerease the number of trades). This mimics the touching of this major moving average. “The backtesting results for scenarios 1 and 2 are shown in The backtesting confirms the engulfing bullish pattern is useful and can be applied ‘successfully in trading. 16 + Dacre 2018 * Techical Anas of STOCKS & COMMODITIES FIGURE 5: WHAT IF THE ENGULFING BULLISH PATTER ‘TOUCHES THE 200-DAY SMA? The routs are deoent but ‘he numberof rade ies. FIGURE 6: MODIFYING THE STOP-LOSS. Herayuitodice aso spo, thls ‘os the postion manual stock closes 8030 below the ow of ay 0. The $2 hard Sopossis ezine Figure 5. It turns out that the results seem to be quite good— note the high profit factor (especially for scenario 2) and low ‘maximum drawdowa, On the otherhand,the number of trades is rather low—only 50 trades for scenario 2 (Compared to 428 trades where the pattern didu't touch the 200-day SMA. ‘Therefore, the statistical results may be questionable as there ‘may be too few trades to draw conclusions. Finally, this set-up ‘may seldom occur in real trading ‘MOVING THE STOP-Loss So far I've shown results for scenarios where the stop-Toss level was dofined by the ugh uf Day Osun $2. Peay, thin wasn’t the best choice so Tl add some ‘modifications —keep this stop-loss level as itwas but also decide to leave the trade if a daily close is $0.10 below the low of Day 0. If this happens, just assume the engulfing bullish pattern isn't valid and itis better to “es- cape" before you lose more. In other words, don't wait for the “hard” stop-loss Figure 6 shows the results ofthis modification. Notice the percentage of the profitable trades is lower, that is, we lose some profitable trades. That the stock closed below the pat- tem itn't“the end of the world” according tothe backtesting results. On the other hand, the win/loss ratio, as expected. i larger for the case when I used the “soft” stop-loss. Another upside is the reduetion in maximum drawdown and sumber cof days in the trade. AND THE VERDICT ... ‘The backtesting confirms the engulfing bullish pattern is use- ful and can be applied successfully in trading. The pattern ‘occurs often so you should have no problem spotting it. It also Teads to quick profits and can be improved if combined with other common strategies such as using trendlines and pice action, Pawel Kosinski, PhD, MEng, is a professor in process technology at University of Bergen in Norway. His research Continued on page 21 Hispreferred vehicle is the so-called*Road Trip Trade,” which I wrote about in my February 2017 S&C article, “A Road Trip With Options Supertraders” + Trade short weekly condors with care or avoid together, ATM rapid decay is also a reason to not do a common and popular trade, Mark Sebastian says, “Tt is also a reason nor to be short weekly condors. While the Fikelihood of being hit is low, the need of the trader to stay in the trade too close to or through expiration makes the risk/reward very suspect.” *+ Consider butterflies that are closer to expiration versus farther. Mark Sebastian says: “Butterflios may perform better closer to expiration instead of further ‘out. This could explain the success of weekly burterfes ‘beyond that ofthe simple pin (meaning cx shoct strike middle). Thebuttrfy holderislongthe cheap option that has a slow demise and shorttwo options that are quickly losing their value when at the-money.It is taking advantage of theta convergence.” + Take profits when targets are hit. Ifa short option, Jong-theta trader achieves a profit, especially early ina position, he should consider taking instead of holding out for more. That “more” may turn out to be “less.” ‘especially if volatility moves against him. This is the ‘eternal ebb and flow of the market. Bulls can make money, boars oan malso money, but you know what they say about pigs. + And, finally, lower your expectations vis-i-vis that highly optimisticrisk curve.Ttis picture, andapicture, ‘by definition, static. Itshows yourpositionat one instant in time—this instant (see the sidebar “The Calendar Spread: An Options Trader Staple” and sidebar Figure 1 for an explanation and example of a calendar spread risk curve). In another second, minute, hour, or day, it ‘can and does change, and may or may not conform to rules (such as ATMs decay faster or OTMs decay faster and so on). As changes occur in market sentiment and in supply & demand, and as the changes are expressed KOSINSKI/ENGULFING BULLISH PATTERN Continued from page 16 Interests Involve mathematical modeling of various physical ‘Phenomena, and he uses this experience for researching the ‘financial markets. He was the principal founder of the site Tookintotrade.com, which offersbacktesting of various strate- ‘gies. He may be reached at pawel Kosinski@uib.no. Buddha have been a reat options trader? Maybe yes, maybe xno, but Iam thinking as we close this two-part article series that his equanimity in the face of so much change would have been unparalleled. I’s an essential asset that you surely need alot of when trading options. Why? Because all the variables and other things described here and last month in part 1 are always affecting your options—they keep changing, moment bby moment, all the time, right up to and through expiration ‘This means that what your risk curve told you earlier you'd bbe getting may not be the case at all. John A. Sarkett has written for Stocks & CoMMoDITIES since 1995. He is also the author of Option Wizards: Real Life Suwvess Stunies Pron The Ti ket Mentors, volumes found on Amazon.com and at htp:i/ ception-wizard.com. FURTHER READING Sarkett, John A. (2017). “A Road Tri FURTHER READING Calhoun, Ken (2018). "Moving Average Hammer Pivots.” Kosinski, Pawel [2018]. “Double Bottoms Revisited,” Tech- NinjaTrader 480eFaitorial Resource Index in the options greeks themselves, especially vega, your risk curve will change. Sometimes it will change rather dramatically; sometimes forbetter often for worse. There are always zeasons for the change in the curve, whether ‘oF not they can be easily discerned. \G) Apart to CHANGE Buddha said something like, “Changs isthe stufflifeis made out of” So,t00, with options. (Change in profit potential ix ax mach m part of the game as bid & ask, implied volatility, nd yes, theta itself Hewasforsomethe ultimate gura,bot would ial Mathets, und Mas With Options Super- traders,” Technical Analysis of STOCKS & COMMODITIES, ‘Volume 35: February. (2018}. “The Options Risk Curve, Part 1)" Techni cal Analysis of STOCKS & COMMODITIES, Volume 36: November. qn) Technical Analysis of STOCKS & COMMODITIES, Volume 36: May. nical Analysis of STOCKS & COMMODITIES, Volume 36: September, eqnm=mm=)> Deoeber201 + Technical Ana of STOCKS & COMMODITIES + 21

You might also like