Stocks Commodities.pdf

  • Uploaded by: Fernando Lopez
  • 0
  • 0
  • March 2021
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Stocks Commodities.pdf as PDF for free.

More details

  • Words: 37,916
  • Pages: 64
Loading documents preview...
THE TRADERS’ MAGAZINE SINCE 1982 www.traders.com

THE POWER OF GROWTH STOCKS

Use this power calculation to measure the strength of a growth stock

8

THE SWING RULE

Project price targets using this little-known pattern 14

TRUNCATED INDICATORS

Improve how well cycle indicators reflect price

20

USING SCALING LAWS For FX trading models: extending the concept

INTERVIEW Jay Kaeppel

24 30

CHASING VOLATILITY Beware the fear of missing out JULY 2020

38

JULY 2020

Take Control of Your Trading with the

Professional Traders’ Starter Kit ™ Stocks & Commodities magazine Digital Edition Article Code

only

5

$

per month! *

Working Money

Digital Archive

Optimized Trading Traders.com Advantage The Foremost Collection For Traders

This massive collection packages the best tools for trading and investing in any market! 1. Technical Analysis of Stocks & Commodities, the Traders’ Magazine™. The premier magazine for technical analysis. You’ll get five years — 65 issues — including our annual Bonus Issues with our Readers’ Choice Awards. 2. S&C Digital Edition. Recent complete issues available in their entirety as PDFs for you to either download or read directly in your browser. No more waiting for the mail to deliver your magazine! You will still receive the printed magazine unless you opt for a digital-only subscription. 3. Complete Digital Archive. The complete archives as PDFs — more than 17,000 pages — from Technical Analysis of Stocks & Commodities from 1982 through the present. The articles can be read in your browser or download to your computer (or any device with Internet access and the ability to read a PDF)!

4. Traders.com Advantage, premium website content delivering real-world technical analysis to you! You’ll get five years of charts, indicators, and “how-to” advice for specific markets, currencies, stocks, and commodities; near-term opportunities; price movement; new techniques. Posted in real-time with an archive of thousands of articles. 5. Working Money, the Investors’ Magazine online. You’ll get five years of market observations; explanations of charts, markets, and market sectors; money management; and interviews with money people that will help you trade and invest wisely. 6. Article Code. Download or copy & paste code presented in past issues of Stocks & Commodities — no need to type it out manually. 7 . Optimized Trading. The optimized indicator values can be used as starting points when trying to decide what values to input into your charting software. Search for a certain symbol or company or build your own portfolio.

ALSO RECEIVE A FREE✝ BOOK WITH YOUR PTSK ORDER! Charting The Stock Market: The Wyckoff Method, edited by Jack K. Hutson, is yours free✝ with your order for the Professional Traders’ Starter Kit. ✝

Shipping and handling charges apply for foreign orders.

Email: [email protected] • Phone: 206-938-0570

www.Traders.com *Based on the 5-year subscription rate of $299.99. Shipping extra for foreign addresses.

facebook.com/STOCKSandCOMMODITIES

@STOCKSandCOMM

The Professional’s Gateway To The World’s Markets Starting at

0

$

Commissions on US listed 1 stocks and ETFs

Start Investing Today!

ibkr.com/progateway Interactive Brokers Rated #1 Best Online Broker 2020 by Barron’s* Member - NYSE, FINRA, SIPC – *Interactive Brokers rated #1, Best Online Broker according to Barron’s Best Online Brokers Survey of 2020: February 21, 2020. For more information see, ibkr.com/info - Barron’s is a registered trademark of Dow Jones & Co. Inc. [1] IBKR Lite provides commission-free trades in US exchange-listed stocks and ETFs routed to select market makers. IBKR may charge non-commission related fees. For more information, see ibkr.com/liteinfo

07-IB20-1334CH1286

CONTENTS The Traders’ MagazineTM EDITORIAL

[email protected] Editor in Chief Jack K. Hutson Production Manager Karen E. Wasserman Art Director Christine Morrison Graphic Designer Wayne Shaw Webmaster Han J. Kim Contributing Editors John Ehlers, Anthony W. Warren, PhD. Contributing Writers Thomas Bulkowski, Martin Pring, Barbara Star, Markos Katsanos, Leslie N. Masonson, Karl Montevirgen

OFFICE OF THE PUBLISHER

Publisher Jack K. Hutson Industrial Engineer Jason K. Hutson Project Engineer Sean M. Moore

ADVERTISING SALES

4757 California Ave. S.W. Seattle, WA 98116-4499 206 938-0570 Fax 206 938-1307 [email protected] National Sales Manager Edward W. Schramm [email protected]

CIRCULATION

Subscription & Order Service 1 800 832-4642 1 206 938-0570 Fax 1 206 938-1307 [email protected] Subscription Manager Sean M. Moore

WEBSITE

http://www.traders.com

Staff members may be emailed using first initial plus last name plus @traders.com

Author­i­za­tion to pho­to­copy items for inter­nal or per­sonal use, or the inter­nal or per­sonal use of spe­cific cli­ents, is granted by Tech­ni­cal Anal­y­sis, Inc. for users reg­is­tered with the Cop­y­right Clear­ance Cen­ter (CCC) Transactional Reporting Serv­ice, pro­vided that the base fee of $1.00 per copy, plus 50¢ per page is paid directly to CCC, 222 Rosewood Drive, Danvers, MA 01923. Online: http://www.copyright.com. For those organ­iz­ a­tions that have been granted a photocopy license by CCC, a sep­a­rate sys­tem of pay­ment has been arranged. The fee code for users of the Transactional Reporting Serv­ice is: 0738-3355/2020 $1.00 + 0.50. Sub­scrip­tions: USA: one year (13 issues) $89.99; Magazines shipped outside the US require additional postage as follows: Canada, US$15 per year; Europe, US$25.50 per year; all other countries US$39 per year. Sin­gle copies of most past issues from the cur­rent year are avail­a­ble pre­paid at $8 per copy. Prior years are avail­a­ble in book format (without ads) or digitally from www.traders. com. USA funds only. Washington state res­i­dents add sales tax for their locale. VISA, MasterCard, AmEx, and Discover accepted. Subscription orders: 1 800 832-4642 or 1 206 938-0570. Technical Analysis of Stocks & Commodities™, The Traders’ Magazine™, is prepared from information believed to be reliable but not guaranteed by us with­out further verification, and does not purport to be complete. Opinions expressed are subject to revision without notification. We are not offer­ing to buy or sell securities or commodities discussed. Technical Anal­ysis Inc., one or more of its officers, and authors may have a position in the securities discussed herein. The names of products and services presented in this magazine are used only in an editorial fashion, and to the benefit of the trademark owner, with no intention of infringing on trademark rights.

JULY 2020, VOLUME 38 NUMBER 8 columnist, where he shares his know-how of option trading with readers. He has also contributed many articles to this magazine since 1999. Kaeppel is the author of four books on trading, and he also offers regular market commentary on his website, JayOnTheMarkets.com. S&C Contributing Writer Leslie Masonson wanted to know more.

FEATURE ARTICLE 8 The Power Of Growth Stocks

by Andreas A. Aigner, PhD, & Walter Schrabmair How can you measure the strength of a growth stock? Can this be quantified? Here’s a way to help measure it using concepts from digital signal processing.

14 The Swing Rule

by Thomas Bulkowski Here’s a technique that looks for a particular pattern of price swings to project a price target as the exit.

36 Dual-Candle Breakouts

by Ken Calhoun Simply buying into an uptrend in isolation often leads to false breakouts. Instead, you may find more success if you scan for dualcandle breakout patterns. Here’s how to find them.

18 Futures For You

by Carley Garner Here’s how the futures market really works.

20 Truncated Indicators

37 Algo Q&A

by Kevin J. Davey Got a question about system or algo trading?

TIPS

by John F. Ehlers Here’s a straightforward technique for improving how accurately a cycle indicator reflects price— including the handling of extreme price events such as the market experienced recently. Coding is provided to help you implement the technique.

24 Using Scaling Laws For FX Trading Models: A Two-Dimensional Extension

by Richard Poster, PhD Last time, we looked at how scaling laws can be used to predict the behavior of forex (FX) data. In this follow-up article, we look at how scaling laws can be extended into two dimensions: volatility and price change thresholds. This approach can offer an even more accurate prediction of expected returns. Find out how.

INTERVIEW 30 A Conversation With Jay Kaeppel

by Leslie N. Masonson Jay Kaeppel has over 30 years of varied experience in options, equity, and futures trading as a research analyst, trader, and portfolio manager. For the past five years he has been a vice president and director of research at Alpha Investment Management. But S&C readers may know him best as our monthly Explore Your Options This article is the basis for TIPS Traders’ Tips this month.

38 The Chase Of Volatility

by Robert van Eyden, PhD The fear of missing out (FOMO) can create a psychological challenge for traders. Here are some steps you can take to help prevent emotions from entering into your trading decisions and wreaking havoc on your trading plan.

40 Utility ETFs: Power Up With Dividend Payers?

by Leslie N. Masonson Interested in investing in the defensive sector of utilities? After all, utilities can often offer both capital appreciation and dividends. Here’s a close look at some of the available ETFs you can buy to invest in power and energy.

46 Explore Your Options

by Jay Kaeppel Got a question about options?

60 Trading Perspectives

by Rob Friesen Some perspectives on the equities world.

DEPARTMENTS

6 48 57 57 58 59 59

Letters To S&C Traders’ Tips Advertisers’ Index Editorial Resource Index Futures Liquidity Classified Advertising Traders’ Resource

n Cover: Inga Poslitur n Cover concept: Christine Morrison

Copyright © 2020 Technical Analysis, Inc. All rights reserved. Information in this publication must not be stored or reproduced in any form without written permission from the publisher. Technical Analysis of Stocks & Commodities™ (ISSN 0738-3355) is published monthly with a Bonus Issue in March for $89.99 per year by Technical Analysis, Inc., 4757 California Ave. S.W., Seattle, WA 98116-4499. Periodicals postage paid at Seattle, WA and at additional mailing offices. Postmaster: Send address changes to Technical Analysis of Stocks & Commodities™ 4757 California Ave. S.W., Seattle, WA 98116-4499 U.S.A.

Printed in the U.S.A.

4 • July 2020 • Technical Analysis of Stocks & Commodities

Schwab’s Futures Research Center Get daily proprietary and third-party intel all in one place. Free.

1.50

$

per contract for futures and futures options trades

Trade up to Schwab, the better place for traders.

CHAT

CALL

VISIT

To learn more about our trading services, visit your local branch, call us, or go to schwab.com/tradefutures

The standard $1.50 price does not include customary National Futures Association (NFA) and exchange fees. Additional fees may apply at some foreign exchanges. NFA and exchange fees may increase or decrease depending on the rates set by NFA or by the various futures exchanges, as applicable. Additional market data fees may apply at some futures exchanges. Futures trading offered and positions held through Charles Schwab Futures, Inc., a separate but affiliated company of Charles Schwab & Co., Inc. Both are subsidiaries of The Charles Schwab Corporation. Futures trading involves substantial risk and is not suitable for all investors. Please read “Risk Disclosure Statement for Futures and Options.” ©2020 Charles Schwab & Co., Inc. All rights reserved. Member SIPC. (0918-8HEU)

The editors of S&C invite readers to submit their opinions and information on subjects relating to technical analysis and this magazine. This column is our means of communication with our readers. Is there something you would like to know more (or less) about? Tell us about it. Without a source of new ideas and subjects coming from our readers, this magazine would not exist. Email your correspondence to [email protected] or address your correspondence to: Editor, Stocks & Commodities, 4757 California Ave. SW, Seattle, WA 98116-4499. All letters become the property of Technical Analysis, Inc. Letter-writers must include their full name and address for verification. Letters may be edited for length or clarity. The opinions expressed in this column do not necessarily represent those of the magazine.—Editor

Author John Ehlers replies: You are correct that the Spearman correlation devolves into a Pearson correlation when one of the inputs is linear. There is a popular equation used for ranking for the Spearman correlation, but it carries the constraint that there can be no tied ranks. In sampled market data, we cannot guarantee there are no ties in ranking—in fact, it is likely that there are.

Nonetheless, for the sheer fun of it, I coded the popular Spearman ranking correlation equation as an indicator using a bubble sort to do the price ranking. The code listing provides the EasyLanguage for this indicator. The chart in Figure 1 shows the comparison of the original Pearson correlation and the shorthand Spearman ranking indicator, using a 20-bar correlation period in both cases. Obviously, the Pearson correlation produces a smoother indicator on an apples-toapples basis. An alternative interpretation could be that the Spearman ranking indicator is more responsive to nonlinear price moves. Both approaches have a finite impulse response, and so the group delay of both is approximately half the correlation period. Code listing: Spearman Rank Indicator { Spearman Rank Indicator (C) 2013-2020 John F. Ehlers } Inputs: Length(20); Vars: count(0),

For count = 1 to Length Begin PriceArray[count] = Close[count - 1]; Rank[count] = count; End; For K = 1 to Length Begin count = Length + 1 - K; For J = 1 to Length - count Begin If PriceArray[J + 1] < PriceArray[J] Then Begin TempPrice = PriceArray[J]; TempRank = Rank[J]; PriceArray[J] = PriceArray[J + 1]; Rank[J] = Rank[J + 1]; PriceArray[J + 1] = TempPrice; Rank[J + 1] = TempRank; End; End; End; Sum = 0; For count = 1 to Length Begin Sum = Sum + (count Rank[count])*(count - Rank[count]); End; Signal = 2*(.5 - (1 - 6*Sum / (Length*(Length*Length - 1)))); Plot1(Signal); Plot2(0);

Just to mention it, the Kendall correlation is another type of ranking correlation but it has no particular advantage as a technical indicator. Editor’s note: Subscribers can find this code in the article code section of our website, Traders.com.

TRADESTATION

CORRELATION AS A TREND INDICATOR Editor, John Ehlers’ May 2 0 2 0 a r t icle, “Correlation As A Trend Indicator,” was straightforward and easy to follow. However, when I went to look up more details about the Spearman correlation formula, I found that when one of the variables is linear, like in this case, it is really the Pearson correlation, and this is the formula used for the code given in the article. The Spearman correlation formula is different. It measures monotonic relationships. It uses rank order of raw variable values to come up with its results rather than actual raw variable values, like the closes. I would appreciate it if John Ehlers could expand and contrast between the two methods, how significant the difference in results might be for the same set of raw data, and which would be better for our use. It obviously is easier to use raw data directly than to have to rank it first. But I’m wondering if the ranked data might give a smoother indicator? Would the indicator lag be the same? Don Kraska

J(0), K(0), TempPrice(0), TempRank(0), Sum(0), Signal(0); Arrays: PriceArray[50](0), Rank[50](0);

FIGURE 1: COMPARISON OF PEARSON CORRELATION AND SPEARMAN RANKING INDICATORS

6 • July 2020 • Technical Analysis of Stocks & Commodities

THE 1ST AND 2ND CROSS Editor, I have a quick question regarding Perry Kaufman’s wonderful article titled “The 1st and 2nd Cross” (March 2020 S&C). In the article, Mr. Kaufman describes an oscillator value based on the difference of the fast and slow moving averages. In the section of his article titled “Using stochastic bands,” he writes that “We can create multiple crosses by applying a slow-K stochastic to the momentum value osc.” My question is, what is the formula used to apply a stochastic to that calculated osc value? I don’t quite understand how to calculate that, since osc is not a series value. If more information is needed for my question, please let me know. Thanks a lot—love the magazine and look forward to reading it each month. Paul Johnson Author Perry Kaufman replies: Here are the formulas: Osc = fastMA - slowMA Stoch(t) = (osc(t) - lowest(osc,n))/ (highest(osc,n) - lowest(osc,n)) SlowK = average(stoch,3)

where t is today, n are bars back, and slowK is the 3-day average of stoch. I will also provide this formula in the form of the following EasyLanguage code: // TSM 2nd cross // Copyright 2020, P.J. Kaufman. All rights reserved. // This strategy tries to profit from the second pullback after a new trend inputs: fastperiod(10), slowperiod(40), oscperiod(5), momlow(10),momhigh(90), buytarget(50), selltarget(50),usefu tures(false), printPL(true); vars: firstcross(false), secondcross(false), fasttrend(0),slowtrend(0), trend(0), osc(0), mom(0), osctrend(0), size(0), stockinvestment(10000), futuresinvestment(25000), investment(0), adate(" "), totalPL(0), todayPL(0), longPL(0), shortPL(0),psignal(0); if currentbar = 1 then begin if usefutures then investment = futuresin-

vestment else investment = stockinvestment; end; if usefutures then size = investment/(avgtr uerange(20)*bigpointvalue); else size = investment/close; fasttrend = average(close,fastperiod); slowtrend = average(close,slowperiod); osc = fasttrend - slowtrend; mom = TSM_Stochastic_ SlowK(osc,osc,osc,oscperiod); // trend changes, reset both crosses if fasttrend crosses above slowtrend then begin firstcross = true; secondcross = false; trend = 1; end else if fasttrend crosses below slowtrend then begin firstcross = true; secondcross = false; trend = -1; end; // when first cross goes back above 50 change to second cross if firstcross = true then begin if trend > 0 and mom[1] < 50 and mom >= 50 then begin firstcross = false; secondcross = true; end else if trend < 0 and mom[1] > 50 and mom <= 50 then begin firstcross = false; secondcross = true; end; end; // test signals on second cross if secondcross then begin if trend > 0 and mom < momlow then begin buy size shares next bar on open; secondcross = false; end else if trend < 0 and mom > momhigh then begin sell short size shares next bar on open; secondcross = false; end; end; // exit if trend changes if marketposition > 0 and trend < 0 then begin sell ("LTRrev") all shares next bar on open; firstcross = true; end else if marketposition < 0 and trend > 0 then begin buy to cover ("STRrev") all shares next bar on open; firstcross = true; end; // exit if mom target reached if marketposition > 0 and trend > 0 and mom > buytarget then begin sell ("LPT") all shares next bar on open; July 2020

end else if marketposition < 0 and trend < 0 and mom < selltarget then begin buy to cover ("SPT") all shares next bar on open; end; totalpl = netprofit + openpositionprofit; todayPL = totalPL - totalPL[1]; if psignal > 0 then longPL = longPL + todayPL else if psignal < 0 then shortPL = shortPL + todayPL; psignal = marketposition; // print PL if printPL then begin adate = ELdatetostring(date); if currentbar = 1 then begin print (file("c:\tradestation\2nd_Cross_PL.c sv"),"Date,size,marketposition,openPL,lon gPL,shortPL,netPL"); print (file("c:\tradestation\2nd_Cross_Detail.csv"),"Date,Open,High,Low,Close,Fas tMA,SlowMA,", "Osc,Mom,Trend,1stCross,2ndCross,siz e,marketposition,openPL,longPL,shortP L,netPL"); end; print (file("c:\tradestation\2nd_Cross_ PL.csv"),adate, ",", currentcontracts:5:0, ",", marketposition:4:0, ",", openpositionprofit:8:0, ",", longPL:8:0, ",", shortPL:8:0, ",", totalPL:8:0); print (file("c:\tradestation\2nd_Cross_Detail.csv"),adate,",", open:8:4, ",", high:8:4, ",", low:8:4, ",", close:8:4, ",", fasttrend:8:4, ",", slowtrend:8:4, ",", osc:8:4, ",", mom:8:4, ",", trend:5:0, ",", firstcross, ",", secondcross, ",", currentcontracts:5:0, ",", arketposition:4:0, ",", openpositionprofit:8:0, ",", longPL:8:0, ",", shortPL:8:0, ",", totalPL:8:0); end;

Editor’s note: Subscribers can find this code in the article code section of our website, Traders.com. ON-BALANCE VOLUME MODIFIED (OBVM) Editor, I’ve been trading my own f unds for the past seven years, mostly using technical analysis. I just wanted to thank Vitali Apirine for his article in the April 2020 issue on OBVM. I have implemented OBVM in my trading system and I really like the signals it is providing. I have been looking for Continued on page 56 • Technical Analysis of Stocks & Commodities • 7

8 • July 2020 • Technical Analysis of Stocks & Commodities

VALUE INVESTING

In The Footsteps Of Benjamin Graham

The Power Of Growth Stocks How can you measure the strength of a growth stock? and E is the earnings forecast. Multiplying out acCan this be quantified? Here’s a way to help measure cording to equation 1, you get a forecast for the price. it using concepts from digital signal processing. Looking at this equation another way, it states that a stock with zero growth has a P/E of 8.5 and the price hen we think of growth stocks, we think of is equal to 8.5 times earnings. This lower bound of stocks that consistently trend in price and 8.5 is what Graham deduced from the market; we that outperform the market average. They will not further investigate this here. usually pay no or next to no dividend, as We can produce a five-year forecast of price by takthey save up earnings to expand their business ventures ing the five-year growth forecast (G) averaged over all through development or aggressively buying out other analysts covering the stock and the five-year earnings businesses to consolidate or vertically integrate. By forecast (E) by linearly interpolating between last year, investing in this type of stock, you expect to profit current year, and next year earnings expectations. from above-average market returns through price Calculating this across a set of ~2,253 US stocks, we appreciation only. obtain price forecasts and can therefore calculate the Benjamin Graham’s 1962 book Security Analysis annualized % returns for all stocks, which we will contains a chapter titled “Newer Methods For Valuing subsequently just refer to as “growth.” Growth Stocks” that offered a method to forecast the annualized growth in stock price based on its earn- Power ings and growth expectations. This gives us a good Growth stocks trend more than non-growth stocks. starting point to categorize growth stocks, but how If the stock price is constant, there is no trend and no do you verify the growth using the stock price alone? growth. If the trend is a straight line, we would expect Can we prove that Graham’s formula corresponds to the trend to measure a constant. In physics, there is a high-growth stocks? concept called power, which in digital signal processIn this article, we will derive such a measure. We ing is applied to discrete signals. There, the power for will present Graham’s formula, derive a formula to periodic signals is defined as the average energy over measure the growth/trend, and finally, we will show a period and is given by this formula: some results of how to improve upon Graham’s forN–1 1 2 mula using a new indicator, which we call the power Equation 2 Power N = ⎢P ⎥ N n=0 n of a stock. The absolute value of the signal P is taken but since Growth our signal is not complex we could just drop it here. Graham suggests that the “intrinsic value” of a stock We won’t discuss here what the energy of a stock repis calculated by: resents, if it’s of finite or infinite length or aperiodic, but this is certainly an interesting topic on its own. P Equation 1 We want to apply this estimate of power over a range (8.5 + 2 × G) × E = ×E E of N observations. It makes sense to look at changes Here, G is the growth forecast in percentage points to an initial price Pj-N+1 (N-1 days ago) and normalize

W

INGA POSLITUR

Σ

by Andreas A. Aigner, PhD, & Walter Schrabmair July 2020

• Technical Analysis of Stocks & Commodities • 9

FIGURE 1: LINEAR SIGNAL. This shows a stem plot of a linear signal and its decomposition into signal and noise.

FIGURE 2: SINUSOIDAL SIGNAL. This shows a stem plot of a sinusoidal signal and its decomposition into signal and noise.

the signal by it. We therefore define a moving window of power (Power j) at each step in time j:

Power jN =

1 N

Σ

N–1 n=0

2

Pj–n Pj–N+1

Equation 3

where Pj-0 is the last value of each moving window. Next, we split the stock price into two components, signal and noise:

Price = Signal + Noise

Equation 4

and define the signal to be the N-day moving average:

Signal = MA(P , N) = MA N

Equation 5

and define the noise to be the difference between the price and signal:

Noise = P – MA(P , N)

Equation 6

Hence, we can calculate the power of the signal:

PowerOfSignal Nj =

1 N

Σ

N–1 n=0

MA j–n Pj–N+1 N

2



signal processing, and their decom3: SIGNAL & NOISE POWER RATIO, LINEAR position into signal FIGURE SIGNAL. This shows the signal and noise power ratio for and noise. Figure 3 linearly increasing signals of slope 5, 10, and 20. shows the result of the power calculation for the case of linearly increasing functions with various slopes (5,10,20) plus some random noise of amplitude 0.1%. Figure 5 shows sinusoidal functions with increasing amplitude (5,10,20) plus some random noise of amplitude 0.1%. We have scaled power by a threshold, which could be based off the intraday volatility, for example; its use will become apparent later. Here, it is simply taken to be 0.1% of the signal, that is, the random noise. We also take the square root since we want to arrive at a scale similar to the stock price again. You see the power ratio approaching a limit for the linear signal and oscillating for the sinusoidal signal. You also notice that in all cases, the higher the amplitude or slope of the signal, the higher the power measured is. In Figure 4 and Figure 6 you see charts of the power ratios and actual values of signal versus noise. For the linear signal, you see a linearly increasing signal because it is just the moving average and you see the noise is constant. On the right of Figure 4 you see both the signal and noise power ratio

Equation 7

and the power of noise: PowerOfNoise Nj =

1 N

Σ

N–1 n=0

Pj–n – MA j–n Pj–N+1 N

2

Equation 8

We’ll look at two examples: a linear signal and a sinusoidal signal. Figures 1 and 2 show stem plots, as is usual in digital 10 • July 2020 • Technical Analysis of Stocks & Commodities

FIGURE 4: SIGNAL VS. NOISE, LINEAR SIGNAL. Here’s an example plot of signal versus noise and the power ratios for a linear signal.

Winner Winner...

MetaStock D/C • Winner • Trading Software $500 - $1000 Bollinger Band System • Winner • Plug-ins Metastock R/T •1st Runner Up • Software over $1,000 XENITH • Finalist • Real-Time Market Data Dr. Elders Trading Room • Finalist • Plug-ins Bollinger Band Toolkit • Honorable Mention • Plug-ins

Get a FREE trial of MetaStock with Market Data!* Visit MetaStock.com/TASC. *restrictions apply. See metastock.com/tasc for details.

FIGURE 6: SIGNAL VS. NOISE, SINUSOIDAL SIGNAL. This is an example plot of signal versus noise and the power ratios for a sinusoidal signal. Sharpe Ratio versus Signal & Noise Power Ratio

6.00

MA(50)

5.00

y = 1.5471x–2.6322 R2 = 0.305

4.00

MA(20)

y = 0.63x - 1.3631 R2 = 0.0846 y = 0.3095x - 2.2079 R2 = 0.1317

MA(100)

Sharpe Ratio

3.00

MA(50)

2.00

MA(20)

1.00 MA(100)

-

y = 0.0456x - 0.4057 R2 = 0.0034

(1.00) (2.00) (3.00)

0 5 10 15 20 25

Power Ratio

Signal 20MA Signal 50MA Signal 100MA

FIGURE 5: SIGNAL & NOISE POWER RATIO, SINUSOIDAL SIGNAL. This shows a signal and noise power ratio for a sinusoidal signal of amplitude 5, 10, and 20.

Noise 20MA Noise 50MA Noise 100MA

Linear (Signal 20MA) Linear (Signal 50MA Linear (Signal 100MA)

Linear (Noise 20MA) Linear (Noise 50MA) Linear (Noise 100MA)

FIGURE 7: SHARPE RATIO AND POWER RATIOS. Here is a plot of the Sharpe ratio versus power ratios for the 20-day, 50-day, and 100-day moving average power windows. Signal power ratios are colored in grayscale and noise power ratios are colored in shades of brown, ranging from lightest (20) to darkest (100).

are decreasing along a gentle slope (from top right to bottom left) as time passes. Also note that with a decreasing slope of the linear signal, the signal & noise power ratio itself is also decreasing. Figure 6 is a similar plot for the sinusoidal signal; on the left you see signal and noise are tracing an ellipsoidal curve in space, as you would expect. On the right you see the noise power ratio staying fairly constant and the signal power ratio oscillating in a range horizontally.

Results

We can apply J. Welles Wilder’s trend-following system (known as his Volatility System) to the set of ~2,253 US stocks over 100 trading days and evaluate the performance of them with respect to the growth forecasts using Graham’s formula in equation 1.

Higher power ratios lead to drastically improved returns for all ranges of power calculations. 12 • July 2020 • Technical Analysis of Stocks & Commodities

We calculate the power ratios dividing by a threshold power, which is defined by Wilder’s ATR (average true range), which in turn is normalized by the last significant close (SIC), similar to what we have done with the stock price in equation 3. For a generic trend-following strategy to work best, you would select liquid names with high volume, preferably big cap and larger stocks (market cap >= 300 bn USD), which is what we do here also. In addition, we also only look at stocks where Graham’s formula (equation 1) forecasts a positive five-year growth (>0). In order to evaluate the performance of this strategy, we calculate the P&L and Sharpe ratio across all results using three varying windows for the power calculation (20, 50, and 100). They are plotted in Figure 7 depicting both the Sharpe ratio versus the signal as well as the noise power ratio. Plotting the linear regressions on top, there are several things to note. All the linear regressions have a positive slope and the 50-day moving average has the steepest slope of them all. Furthermore, the slopes of the noise power ratios are steeper than the signal power ratios. The data turns positive around 2.5 for the noise power ratio and around 7.5 for the signal power ratio. Furthermore, we have Sharpe ratios that are largely in excess of 1 and knowing that a buy-and-hold of the S&P 500 has a Sharpe ratio of around 0.5, this outperformance is quite impressive.

before the big-, mid-, and small caps do. This lets us believe that this power indicator is not only useful in measuring and comparing “growth stocks,” but that it can also give us insight into overall market breadth and provides us a measure of the strength of a trend overall.

Conclusion

FIGURE 8: POWER RATIO, MARKET-CAP WEIGHTED. This shows the market-cap weighted power ratio for the 20-, 50-, and 100-day moving average and the S&P 500.

In this article, we have shown that Benjamin Graham’s growth estimate for stocks can be improved by calculating the power of a stock. Similar to the power of a signal in DSP, it represents the amount of displacement per unit time. Calculating a normalized average energy over a period, we have split the stock price into a signal and noise part. We have compared the power calculation over a number of various ranges and signals, and have applied the results to a generic trend-following algorithm such as Wilder’s Volatility System from 1978. We conclude that higher power ratios lead to drastically improved returns for all ranges of power calculations and note that Sharpe ratios in excess of 1.0 can be achieved, which strongly outperform a buy-and-hold strategy. We have also suggested a useful application as an overall market power indicator when market cap weighting all power signals across all names as a whole or by market cap group.

Andreas A. Aigner has a PhD in mathematics from Monash University, Melbourne, Australia. He spent a number of years in research for various UK universities and worked almost 10 years for Morgan Stanley in Controlling, Trading & Pricing for the Exotic Derivatives desk in Hong Kong. He is now engaged full time in research and is building a signaling auFIGURE 9: POWER RATIOS, PER MARKET CAP GROUP. This shows market-cap weighted power tomaton (tradeflags.de) together with his longtime ratios grouped by mega cap, big cap, mid cap, small cap, and S&P 500. friend and associate Walter Schrabmair. Since we have obtained a measure of power for stocks, it Walter Schrabmair works at the Medical University of Graz seems obvious to average the power across all stocks at each and the Technical University of Graz in various research roles time step, and chart the time series of signal and noise of all and as a general computer whiz. stocks with time. Since we want to compare like for like, it is Their contact emails are [email protected] and walter@ necessary to weight each stock power ratio by its market cap. tradeflags.at. Figure 8 shows the signal and noise power ratio for 20-day, 50-day, and 100-day together with the S&P 500 as a reference. Further reading Notice how the total power ratio for signal and noise is largest Graham, Benjamin, and David Dodd, et al. [1962]. Security for the 100-day and smallest for the 20-day. Analysis: Principles And Technique (4th ed.), McGraw-Hill. What is also interesting is to look at the power ratios of groups First edition published in 1934. of market caps, such as mega caps (>300bn$), big caps (10bn$ Prandoni, P. and M. Vetterli [2008]. Signal Processing For < M <= 300bn$), mid caps (2bn$ < M <= 10bn$), and small Communications, Communication And Information Scicaps (300m$ < M <= 2bn$). Again, we normalize by market ences, Lausanne, EPFL Press. cap, but with regard to each market cap group instead of total, Wilder, J. Welles [1978]. New Concepts In Technical Trading and chart them in Figure 9. Noticeable is that mega caps have Systems, Trend Research. the highest power and that the power ratios diverge at rallies Aigner, Andreas, and Walter Schrabmair [2020]. “Power Asand converge at selloffs. But you can also notice individual sisted Trend Following,” ResearchGate. collapses of one group over another, such as, for instance, the period around December 2019, where the mega cap power falls July 2020

• Technical Analysis of Stocks & Commodities • 13

It Does Mean A Thing

The Swing Rule

If

by Thomas Bulkowski

you haven’t heard of the “swing rule,” you’re not alone. I found the technique described in the 1988 book Stan Weinstein’s Secrets For Profiting In Bull And Bear Markets. I’ll describe what the swing rule is, test how it works, see how performance has changed over the decades, and optimize the rule. The clearest way to describe the rule is by example. Figure 1 shows a chart of how the rule should work. My computer found this example, and it’s included in the test results I’ll describe later. The swing from A to B should approximate the rise from A to C. If we plug in the numbers, the high at A is at 233.47, the low at B is 142.00, and C peaks at 327.85. Compute the height by subtracting the price of B from A. Add that result to the high at A and we get the computed target of 324.94. Peak C exceeds that by just a few points before the stock rounds over and heads lower over worries about Chinese production delays

14 • July 2020 • Technical Analysis of Stocks & Commodities

because of the COVID-19 virus. In this example, the swing rule works perfectly, alerting traders to a major downturn. If you’re a short-term swing trader, read on because I’ll explain how well the swing rule works for shorter-term trades (smaller swings).

What to look for

In his book, Weinstein gives guidance on what to look for. He warns the technique “doesn’t appear often.” Begin by finding a peak “before an important decline sets in and subtract the next low price from it.” By next low price he means the low at valley B (refer to Figure 1). How deep should the drop be? He doesn’t say but provides three examples. The first stock shows a drop of 37%, the second measures 42%, and the last stock sees price plummet by 65%. In other words, we should look for a major decline. The drop from A to B in Figure 1 measures 39%. After we find an important high-low swing, subtract the low from the high, and add the result to the high to get the swing rule price target. That is, C=A-B+A. How often does the swing rule work? He writes, “While every swing-rule projection won’t turn out to be as perfect as these [his three examples], the overwhelming majority will be

SHUTTERSTOCKPROFESSIONAL/SHUTTERSTOCK

Here’s a technique that looks for a particular pattern of price swings to project a price target as the exit.

TRADING TECHNIQUES

C

A

More examples

I’ll discuss two more examples, beginning with Figure 2. The high at A is 193.47, the low at B is 132.60, for a drop of 60.87 (or 31%). Adding the AB swing to A gives a target of 254.34, which I show as the horizontal red line. The minor high to the left of C is just under the target and the minor high after C sees price rise above the line. The stock hits an air pocket and drops almost 11%, to 232. What happens next? The stock recovers and makes a new high, soaring well above the target. In this example, the swing rule worked, and allowed a trader to exit before an 11% decline. However, the stock quickly recovered and soared 36%. The notion of selling a portion of the trade at the swing rule target may have worked well for a trader holding onto the rest. Figure 3 shows another example my computer program found. The high at A is 28.97, the low at B is 23.05, for a drop of 5.92 or 20%. That swing would place the target at 34.89. The stock climbs to 34.70 at C, just short of the target. You will notice that my computer didn’t use peak D in the computation (in the swing down to B). Will the swing

TOM BULKOWSKI

surprisingly on target.” That doesn’t tell me what I want to know, so we’ll have to find the answer ourselves. It’s also possible that overwhelming majority applied in the 1980s, but no longer does. We’ll see. For trading using the swing rule, he suggests selling a portion of your position at the swing rule target and letting a stop order cash out of the rest.

B FIGURE 1: THE SWING RULE. Point C is found using the formula C=A-B+A.

Swing Rule Target

C

A

B FIGURE 2: EXAMPLE OF SWING RULE APPLIED. This stock turns at the target, drops 11%, but recovers to make a new high.

D Target

C

A

B FIGURE 3: ANOTHER EXAMPLE OF SWING RULE APPLIED. This stock falls just shy of the target at C, using the AB swing for the projection, not peak DB. July 2020

• Technical Analysis of Stocks & Commodities • 15

A handy ratio is that price drops twice as fast as it rises.

rule work for this stock using point D in the calculation? It turned out that fears of Covid-19 dropped the stock down to 12, meaning the D to B swing projection to a predicted target of 52.11 did not work.

Methodology

I located 21,120 swing rule candidates in 1,320 stocks using daily price data from January 1990 to February 2020. Not all stocks covered the entire range. The database includes stocks that no longer trade. I removed the two bear markets in the 2000s to concentrate on bull markets only. To find a suitable swing, I set the minimum AB drop to be 5%, which is well short of the 37% to 65% Weinstein used in his examples, but I like the data to set the rules. To find point A, the first peak, I looked for the highest peak within a window 21 days wide. That is, point A is the highest high from 10 days before to 10 days after the peak. That technique worked well, but it still allows situations like Figure 3 to be included (meaning the computer uses point A and not point D). To find point B, the bottom of the swing, I looked for the stock to return to the high price at A (within a year) and then found the lowest low between those two highs. Weinstein’s examples showed a peak to valley transit time of less than a year, so a year seemed like a reasonable maximum for the AB drop. The median time for the drop was 3 weeks (average is 40 days), so a one-year limit seems more than adequate. If the height from peak A to the lowest low was at least 5% (or whatever minimum I chose), then I applied the swing rule. After that, it was just a matter of finding a peak closest Window Size Results -1% to +1% 26%, direct hit -1% to +5% 57%, close -1% to +10% 76%, far away FIGURE 4: THE RESULTS. This shows how often price peaks within a percentage of the calculated swing rule target.

Decade Samples Success Rate 1990s 13,171 55% 2000s 3,525 60% 2010s 3,841 62% 1990–2020 20,537 57% FIGURE 5: PERFORMANCE OVER TIME. Here you see the performance of the swing rule over the decades.

Range Stopped Out Failures Success 5%–10% 3,114 47% 53% 10%–20% 3,799 45% 55% 20%–30% 1,357 39% 61% 30%–40% 475 32% 68% 40%–50% 176 26% 74% 50%–100% 70 17% 83% 0%–100% 9,001 43% 57% FIGURE 6: SWINGS SORTED BY SIZE. Here you see the performance of the swing rule for varying-sized dips.

16 • July 2020 • Technical Analysis of Stocks & Commodities

to the target. I accepted near misses, that is, I allowed a peak 1% below the target to qualify as a hit. Any peak at or above the target was also a hit. I didn’t set a time limit for the stock to reach the target. Because the AB drop can be large, you can expect a significant time for recovery. A handy ratio is that price drops twice as fast as it rises. I found that by experimentation and I comment on it in my Encyclopedia Of Chart Patterns book. Figure 1, for example, sees price drop for about 3 months from A to B. Thus, it’ll take 6 months to return to the price of A and another 6 months to rise to C. Indeed, the stock reaches C in about a year (measured from B). I set a stop-loss target of a penny below the lowest low. After returning to the price of the first peak (A), if the stock then dropped to a penny below B, I concluded that the swing rule didn’t work.

And the winner is

Figure 4 shows the first batch of results. I found that a massive 43% of the stocks in a bull market will be stopped out on their way to reaching the calculated swing rule target. That is, the stock makes a large drop from A to B and recovers to A. To be stopped out, the stock then has to drop to a penny below B during its attempt to reach C. When the swing rule works, does price continue rising, or does it peak? Recall that I found the peak closest to the calculated target (from 1% below to unlimited above the target). As Figures 1 to 3 show, the stock reaches the target at a peak and then drops, at least for a time. I set various window sizes to see how many stocks peaked within a window of the calculated target. I fixed the bottom of the window at 1% below the calculated price target (for near misses). Setting the top limit to 1% above the target, which I consider to be a direct hit, showed that 26% of the stocks peaked within that +/- 1% window. Raising the top end of the window, we find 57% of the stocks peaked within a -1% to 5% window. A window of -1% to +10% means that 76% of the stocks found a peak close to the calculated target. The remainder saw price blow past the target before peaking.

Performance over time

Let’s check how the swing rule worked over decades. Did it work better in the past than it does today? Unfortunately, my data does not extend back to the 1980s to check how well my computer model matches Weinstein’s results. The table in Figure 5 shows what I found. A failure means the stock hit the stop-loss before reaching the target (that is, the stock returned to the price of A and then dropped below B before reaching C). I excluded any swing (from A to C) if it spanned two decades. The 1990s had the most samples and shows the lowest success rate, 55%. More recent decades show higher success rates, but fewer samples. The overall success rate for the three decades is 57%. Also recall that I removed all bear market swings, which affected the 2000s sample count.

Before you think that Weinstein was incorrect in his assessment that the swing rule worked the overwhelming majority of the time, Figure 5 shows dips of 5% and higher, not the massive 30+% swings his examples suggest. So let’s look at the size of the dip and the success rate next.

C A B

Optimization: Sort

the dip Figure 6 shows what I found when I sorted the size of the dip, in 10 percentage point ranges. I don’t know what size Weinstein used. I assume his FIGURE 7: SMALL-SIZE SWINGS. The swing rule works about half the time for small retraces. dips were as large as the ones he showed in his book (over 30%). They may not be. For short-term (small swings) swing traders, the swing rule works just over half the time (53%). For example, Figure I found that 74% of the 7 shows the swing rule for a dip that measures 6% from the stocks showed success high at A to the low at B. The high at A is 42.86 and the low at B is 40.12, giving a target of 45.60. The peak at C reaches when using the swing rule. a high of 45.58 or just two cents short of the target. I call that a direct hit, but the stock continues higher and takes out the target in any case two weeks later. Figure 6 shows tests pulled from a pool of 21,120 samples. A to B. In other words, it takes about twice as long to recover The swing rule saw price drop a penny below B 3,114 times from the dip (the move from the low at B to return to the price or 47% of the 6,608 samples that qualified. That means the of A) and twice as long to reach the target (the rise from A to rule worked the other 53% of the time. I didn’t check if the C) as it does for price to drop from A to B. stock continued to make a higher high or if it changed trend The swing rule works at least half the time and it works from up to down. better for larger dips than smaller ones. Because this test was Read the remainder of the table the same way. Notice that done using a computer algorithm, adding your trading skills as the size of the dip (10% to 20%, 20% to 30%, and so on) to the mix might improve the swing rule results. gets larger, the success rate increases. Also notice that the last For traders, the swing rule might be a valuable tool to help two rows have a wider range. The 50% to 100% row, which put money into your trading account. is a huge drop, has only 424 samples. That may explain why the success rate is so high. STOCKS & COMMODITIES Contributing Writer Thomas The last row shows the number of failures for all sized dips: Bulkowski is a private investor and trader with almost 40 43%, leaving 57% as winners. years of market experience and considered by some to be a Using the range provided by Weinstein’s three charts in leading expert on chart patterns. He is a best-selling author his book, I plugged a 37% to 65% range into my spreadsheet of several books including Encyclopedia Of Chart Patterns, and found that 74% of the stocks showed success when using Second Edition. His website and blog, www.thepatternsite. com, have more than 700 articles of free information dedithe swing rule. cated to price pattern research. That’s a wrap Weinstein’s swing rule measures the peak-to-valley dip and Further reading adds the difference to the peak to get a target. Traders can Weinstein, Stan [1988]. Stan Weinstein’s Secrets for Profiting use the target as a method of determining when price might In Bull And Bear Markets, McGraw Hill. peak. The stock may not make a lasting turn at the peak and Bulkowski, Thomas [2005]. Encyclopedia Of Chart Patterns, it can take a long time to not only recover from the dip but Second Edition, John Wiley & Sons. also to reach the target. ‡Tom Bulkowski A check of the time for a stock to rise from the bottom of ‡See Editorial Resource Index the dip to the target took 4.1 times as long as the drop from July 2020

• Technical Analysis of Stocks & Commodities • 17

FUTURES FOR YOU INSIDE THE FUTURES WORLD Want to find out how the futures markets really work? Carley Garner is the senior strategist for DeCarley Trading, a division of Zaner, where she also works as a broker. She has written four books on futures and options trading, with the latest being a new edition of her book A Trader’s First Book On Commodities (third edition, October 2017) as well as Higher Probability Commodity Trading (July 2016). Garner also authors widely distributed e-newsletters; for a free subscription, visit www.DeCarleyTrading.com. To submit a question, email her at info@ carleygarnertrading.com or via www.DeCarleyTrading.com. Selected questions will appear in a future issue of S&C. A STRATEGY FOR VOLATILE FUTURES: prospects of unlimited profits and are THE OPTION BUTTERFLY willing to accept the scenario in which How can retail traders get into markets they are too right regarding direction and with high volatility and margin require- lose money. Additionally, when trading ments? spreads, profits and losses occur at a In the aftermath of the May crude oil slower pace, which causes frustration futures contract blow-up in April 2020 if the underlying futures market makes which temporarily drove prices into a hard and fast move in the desired dinegative territory to the tune of $40.00 rection. Nevertheless, beggars can’t be per barrel, retail traders were left with choosers; those looking to play in the few “options” for oil speculation. Dur- oil market in mid-2020 without risking ing this time, the margin requirements their shirts or their marriage could have needed to buy or sell futures contracts found solace in the butterfly strategy. nearly tripled but, adding an additional Let’s take a look at an example. layer of deterrence, most commodity A trader who believes oil would be brokerages mitigated their risk by forbid- near $35.00 at the August option expirading clients from trading the front-month tion, or at least above $30.00 and below contract and requiring additional margin $40.00, could construct a call butterfly to initiate positions in the back months. spread by purchasing an August crude Further, weeks of excessive volatility left oil $30.00 call, selling two of the $35.00 the options markets grossly overpriced, calls and then buying the $40.00 call. In shifting the odds of success for option essence, this trader need not pinpoint the buyers toward impossible. In such an precise price of crude at expiration, he environment, there is a better way to gain exposure with higher probabilities of profit and low and limited risk. Does this sound too good to be true? It isn’t. Option butterflies fit the bill. An option butterfly is a limited-risk trade intended to profit if the underlying futures price settles within a predefined range. Of course, there are always opportunity costs that come with low-risk ventures; in the case of an option butterfly, traders are giving up the FIGURE 1: EXAMPLE CALL BUTTERFLY SPREAD 18 • July 2020 • Technical Analysis of Stocks & Commodities

Carley Garner

merely needs to be right within a $10.00 margin of error. The cost of the spread would be roughly 60 cents or $600 because each penny is worth $10 to an oil trader. The cost can be figured by adding the premium paid for the two long options, then subtracting the premium collected for the two short calls. There is little, to no, margin required for an option butterfly if the strike prices of the wings are equidistant. The premium paid for the spread, $600 in this example, is the maximum risk to the trader. If at expiration the price of oil was below $30.00, the spread would expire worthless, leaving the trader with a full $600 loss plus any transaction costs paid. If the trader was too right in the direction and the price of oil was above $40.00 at expiration, all of the options Continued on page 23

ND

E TT A O ET

STREAMING LIVE

E FR

VIRTUAL EVENTS

JUNE 10-12, 2020

PROFIT FROM VOLATILITY! LOG ON FOR REAL-TIME ANALYSIS, STRATEGIES & ADVICE FROM 60+ INVESTING & TRADING EXPERTS.

ALEXANDER ELDER KEITH FITZ-GERALD The New Trading for a Living

Fitz-Gerald Research Analytics

The American Economy in a Post-Coronavirus World

DENNIS GARTMAN The Gartman Letter, L.C.

Outlook 2020: Post-Pandemic Pop

RICK RULE

Sprott US Holdings, Inc.

Lock & Load on the Best Dividend & Growth Stocks

JEFFREY SAUT Capital Wealth Planning

TOM McCLELLAN The McClellan Market Report

Profiting in Bear Markets with Inverse ETFs

LARRY PESAVENTO Trading Tutor

Trading Options During the Coronavirus Market Crash

3 ADDITIONAL ONLINE OPPORTUNITIES: CANADIAN VIRTUAL EVENT

ACCREDITED INVESTOR EVENT

WEEKLY WEBINAR SERIES

July 8-9, 2020

July 23-24, 2020

Thursdays

featuring market analysis, timely portfolio advice and picks, and trading strategies from top Canadian experts.

featuring in-depth presentations for accredited investors about opportunities for private deals, placements, and pre-IPO opportunities.

with world-class investing and trading experts featuring strategies for stocks, commodities, options, futures, forex, and more!

REGISTER FREE!

>> Visit Online.MoneyShow.com or call 800-970-4355 Mention Priority Code: 050131

Sponsors

Media Partners

Powered by

A Simple Mathematical Technique To Improve Cycle Indicators

Truncated Indicators

T

by John F. Ehlers

he performance of some, but not all, indicators can be greatly enhanced by truncation. By “truncation,” I am referring to limiting the data range automatically in ways that allow the indicator to more accurately reflect price. But which indicators can be enhanced by it, and why? In this article, I’ll tell you the type of indicator that can benefit from this mathematical technique, and I’ll show you a way to perform the truncation. Through

20 • July 2020 • Technical Analysis of Stocks & Commodities

an example, I’ll show you the difference it makes, and I’ll codify it for you so you can see the details of the process and also implement it yourself.

Why truncation?

If you toss a rock into a lake, ripples will form. The rock may disturb the body of water only for a minute in the grand scheme of things, but the ripples echo outward until they fade (or are “attenuated”)—and the impact of the rock fades. But in the meantime, the trail left by the ripples is noticeable, and the impact of the disturbance will distort the water. An indicator takes form by the data series on which it is based. A short disturbance in the data, like the rock in the water, can have an outsized impact on indicator output in the time series, which is not always desirable. This is one situation where indicator truncation can be helpful, as I’ll describe. Another situation where indicator truncation is helpful has to do with the data window used for the calculation of an

A N N TO N I A R T/ S H U T T ER S TO C K COLLAGE: CHRISTINE MORRISON

An ideal cycle indicator is one that will help you locate and track cycles in price data to better anticipate price. Here is a straightforward technique for improving how accurately a cycle indicator reflects price—including the handling of extreme price events such as the market experienced recently. Coding is provided to help you implement the technique.

DIGITAL FILTERS

indicator, and at what point in the data the calculations start. A data series that begins, for example, at a price extreme—or that just misses one—affects the output.

Digital filters: Finite vs. infinite

When it comes to digital filters, there are two fundamentally different types: finite impulse response and infinite impulse response. Finite impulse response (FIR) Finite impulse response or FIR uses a fixed window of data and is used to calculate a point of the filter output. That window slides across the data, and the output points are connected to provide the indicator. A simple moving average (SMA) is an example of such a filter. The RSI (relative strength index) and the stochastic oscillator are examples of indicators that use this principle. FIR filters and indicators can only be degraded by truncation. Infinite impulse response (IIR) IIR stands for infinite impulse response, where the computation of the filter or indicator depends on a previous calculation of that filter. The exponential moving average (EMA), and thus the MACD, as well as other indicators, are IIR types. Of course, the computation of an IIR filter does not extend to infinity. The filter computation can only start at the beginning of the data being used. Therein lies the problem. The answer you get from an IIR filter will be different depending on your data length. If the data stream is sufficiently long, the answer may be the same for all practical purposes, but it will be different nonetheless. So initialization is one problem that is resolved by truncating the indicators. The memory of IIR indicators can also impact performance, because a major data disturbance can cause the transient response of the indicator to ring like a bell, using that data disturbance in its output long after the event has occurred. This is particularly important because market data is nonstationary, that is, the data has time variable probability statistics. IIR filters are handy for a trader because you do not have to accept the group delay of an FIR filter, which is typically about half the length of the filter itself. I will first describe several ways to perform truncation, and then I will discuss its performance impact.

Performing truncation

An exponential moving average (EMA) is one filter that depends on previous calculated values. In EasyLanguage notation, an EMA is: Output = a*Input + (1-a)*Output[1]; where Output[1] means the filter output one bar ago and where a is the EMA constant (less than 1). Of course, the output one bar ago requires its previous output

Initialization is one problem that is resolved by truncating the indicators. two bars ago, and so on. Thus, the required history goes back to infinity. The EMA equation can be rewritten as: (Output – (1-a)*Output[1]) = a*Input If I change the notation at let Z-1 signify one bar of delay, the equation is rewritten as: Output*(1 – (1-a)*Z-1) = a*Input The ratio of output to input is the transfer response of the filter, and so the transfer response of the filter, H, can be written as: H = a / (1 – (1-a)*Z-1) Just to simplify notation, let (1-a) = c. The equation then becomes: H = a / (1 – c*Z-1) The denominator of the transfer response carries the requirement for a calculation into the infinite past. However, if we create an infinite series by dividing the dominator into the numerator by long division, the equation becomes: H = a*(1 + c*Z-1 + c2*Z-2+ c3*Z-3 + c4*Z-4 + c5*Z-5 + . . . . ...) Truncation of this equation is easy, because we can just stop using the higher-power terms at any power we choose. Since (1-a) is a number less than unity, we can estimate the desired length of the truncation by computing when the coefficients no longer have an impact on the transfer response. The EasyLanguage code fragment to compute a truncated EMA of a fixed length as a summation of terms is: Output = 0; For count = 0 to Length Begin Output = Output + Power(c, count)*Input[count]; End; Output = a*Output;

One of the beauties of computers is that we can just bruteforce grind through calculations without resorting to mathematical sleight-of-hand tricks. This gives us more flexibility in easily truncating higher-order filters. However, it requires a slightly greater understanding of computer coding. In the July 2020

• Technical Analysis of Stocks & Commodities • 21

TRADESTATION

In the sidebar “EasyLanguage Code For Standard And Truncated Bandpass Filters,” I give the EasyLanguage code to compute a standard bandpass filter in terms of its center period and percentage bandwidth. The standard computation as an IIR filter uses the computed values of the bandpass filter both one bar ago and two bars ago. In the truncated version, I use the array Trunc. I first have to FIGURE 1: TRUNCATED VS. STANDARD IIR FILTER. Both the truncated (in blue) and standard (in red) bandpass stack the array on every bar. filters are shown in the bottom pane of this 2019 daily SPY chart. As you can see in this example, the truncated bandpass Then, in the next code block, filter is a better indicator of price action. I crunch the current value for the array. I then convert the example above, the terms input and output are variables. “Under current value of the filter to a variable so I can plot it just the covers” of EasyLanguage, all variables are indexed to the like the standard computation. current bar. Therefore, counting backwards from the current bar is a snap. However, number-crunching backwards requires An SPY example multiple indexing, and therefore variables are not useful. InIn Figure 1, I show the standard and truncated stead, we need to use arrays and do our own indexing. With bandpass filters applied to daily bars of SPY for output as an array, the code fragment to brute-force crunch roughly the calendar year 2019. In both cases, a truncated EMA is: the center period of the filter is 20 bars and have 10 percent of the center period bandwidth. The Output[Length + 1] = Input[Length]; //initialization standard bandpass filter is in red and the trunFor count = Length DownTo 1 Begin cated bandpass filter is in blue. The truncated Output[count] = a*Input[count] + (1-a)*Output[count + 1]; bandpass filter only uses 10 bars of data in its computation at End; EMA = Output[1]; //converts array to a variable every bar across the chart. The big price dip in December 2018 certainly bangs the A bandpass filter is one I am fond of using because it enables standard bandpass filter and causes it to ring out like a bell for me to winnow out the tradable cycles in the market data. The at least five months. On the other hand, the truncated bandpass bandpass filter is an IIR type, and I use the brute-force method filter has a dampened response to that major event. It further of truncating this more complex filter. accurately describes the price action by staying above zero EASYLANGUAGE CODE FOR STANDARD AND TRUNCATED BANDPASS FILTERS { }

BandPass Filter and Truncated Bandpass Filter (C) 2005-2020 John F. Ehlers

Inputs: Period(20), Bandwidth(.1), Length(10); //must be less than 98 due to array size Vars: L1(0), G1(0), S1(0), count(0), BP(0), BPT(0); Arrays: Trunc[100](0); //Standard Bandpass L1 = Cosine(360 / Period); G1 = Cosine(Bandwidth*360 / Period); S1 = 1 / G1 - SquareRoot( 1 / (G1*G1) - 1);

22 • July 2020 • Technical Analysis of Stocks & Commodities

BP = .5*(1 - S1)*(Close - Close[2]) + L1*(1 + S1)*BP[1] - S1*BP[2]; If CurrentBar <= 3 Then BP = 0; //Stack the Trunc Array For count = 100 DownTo 2 Begin Trunc[count] = Trunc[count - 1]; End; //Truncated Bandpass Trunc[Length + 2] = 0; Trunc[Length + 1] = 0; For count = Length DownTo 1 Begin Trunc[count] = .5*(1 - S1)*(Close[count - 1] - Close[count + 1]) + L1*(1 + S1)*Trunc[count + 1] - S1*Trunc[count + 2]; End; BPT = Trunc[1]; //convert to a variable Plot1(BP); Plot4(0); Plot2(BPT);

during the uptrend into early May. During this time, the cyclic price action is also accurately portrayed. For example, the price swing peak in the third week of March 2020 is accurately reflected in the peak of the truncated bandpass filter, whereas the standard bandpass filter is dead wrong at a cyclic valley at this time. Similarly, the truncated filter is above zero during the fourth quarter uptrend. The cyclic swings during August and September are also accurately reflected in the truncated indicator. In fact, you can track the cyclic swings across the entire chart and see at a glance how they correlate with the price movements.

A better indicator of price action

The price swing peak in the third week of March is accurately reflected in the peak of the truncated bandpass filter, whereas the standard bandpass filter is dead wrong at a cyclic valley at this time.

In summary, truncating IIR filters solves two problems associated with IIR filters. First, initialization errors are eliminated. Second, dampened transient responses of the truncated filters provide a more reliable indication of the current price action.

See our Traders’ Tips section beginning on page 48 for commentary and implementation of John Ehlers’ technique in various technical analysis programs. Accompanying program code can be found in the Traders’ Tips area at Traders.com.

John Ehlers, a Contributing Editor to Stocks & Commodities, is a pioneer in the use of cycles and DSP (digital signal processing) technical analysis. He is president of MESA Software and holds a comprehensive workshop in California in the fall each year. He can be reached through his website at MESAsoftware.com.

Ehlers, John F. [2013]. Cycle Analytics For Traders, John Wiley & Sons. [2016]. “The Super Passband Indicator,” Technical Analysis of Stocks & Commodities, Volume 34: July.

Further reading

‡TradeStation

‡See Editorial Resource Index

The code given in this article is available in the Article Code section of our website, Traders.com.

FUTURES FOR YOU GARNER/FUTURES

Continued from page 18

contained in the spread would be deep in-the-money with all of the profits and losses washing each other out. In short, it might as well have expired worthless because it is worth nothing to the trader. Yet, if the price of oil is at $35.00 at expiration, the trader would profit $4.40 or $4,400 before considering transaction costs. This was figured by taking the difference between the long and short strike prices, $5.00, and subtracting the premium paid for the spread and multiplying by $1,000 because each dollar is worth $1,000 to a trader (($5.00 - 0.60) * $1,000). Because the trader paid 60 cents for the spread, he doesn’t begin making money at expiration until the price of crude oil

is above the strike price of the first long call enough to recoup the premium paid. Thus, the breakeven point is $30.60; above this price, the trader is making money intrinsically on the long call with the gains maxing out at the strike price of the short calls ($35.00). Above $35.00, the trader is giving profits back until running out of money 60 cents before the strike price of the second long option, which leaves the second breakeven point at $39.40. At any point between $30.60 and $39.40, the trade pays off something to the trader. For instance, if the price of oil was at $33.00, the trader would make $2,400 because the first long call would be in-the-money by $3.00 but the trader paid 60 cents to enter, leaving him with $2.40 in profits multiplied by $1,000. I think we can all agree a risk of $600 with a reasonable chance at making July 2020

Weeks of excessive volatility left the options markets grossly overpriced, shifting the odds of success for option buyers toward impossible. $4,400 without a margin requirement is an attractive venture. However, we must also recognize that without a crystal ball, even a nearly $10.00 profit range might not be enough in a wildly volatile market such as crude oil. Nevertheless, in mid2020, butterflies were the only option for shell-shocked retail traders.

• Technical Analysis of Stocks & Commodities • 23

viewed at different scales. Scale can mean the altitude that a coastline is observed or the time interval (such as 5 minutes, 1 hour, or 1 day) selected for viewing a financial time series. This property is called selfsimilarity. If you look at a branch of a tree, it will have many smaller branches and each branch will also look like a tree, but at a smaller scale. Significantly, physical laws are independent of scale so that the behavior of fractal systems is scale-independent. Scaling laws that represent the fractal structure of FX rate data can be used to predict the expectation value of FX parameters such as the average return of an up/down trend or the duration of a trend. This information is key to the development of financial trading models.

What’s ahead

Using Scaling Laws For FX Trading Models: A Two-Dimensional Extension

Previously, we looked at how scaling laws can be used to predict the behavior of forex (FX) data. In this follow-up article, we look at how scaling laws can be extended into two dimensions: volatility and price change thresholds. Now, using two-dimensional scaling laws, an even more accurate prediction of expected returns can be made. Find out how.

T

by Richard Poster, PhD he jagged coastline of Norway, an old oak tree, and the EURUSD time series have at least one thing in common—they all have fractal geometries. This means they have the same form or structure when

24 • July 2020 • Technical Analysis of Stocks & Commodities

A quick recap: One-dimensional model

First scaling law: Volatility vs. time interval In 1990, the first scaling law for foreign exchange (FX) rate data was found. (For more on this, see the article listed in “Further reading” at end, “Statistical Study Of Foreign Exchange Rates, Empirical Evidence Of A Price Change Scaling Law, And Intraday Analysis.”) For this scaling law, a relationship exists between the mean absolute change of

WATCH SPIRAL: MIKHAIL LEONOVFX LETTERS: MATTZ90/ SHUTTERSTOCK/COLLAGE: NIKKI MOR

Building More Predictable Models

In my February 2020 article in this magazine, “Using Scaling Laws For The Development Of FX Trading Models,” I described how scaling laws can be used to develop trading models based on the fractal properties of financial data. In the following sections, I will give a brief recap of the development of scaling laws for FX data. A more detailed description can be found in my February 2020 article, which is listed at the end of this article. I will describe four scaling law equations and introduce volatility as a key measure of scale for two of these scaling laws. Then I will show how extending the scaling concept into two dimensions allows the four scaling law equations to collapse into two equations. Finally, I will describe trading algorithms based on twodimensional scaling laws and show the resultant trading model performance.

FOREX

logarithmic returns, sampled at time intervals Δt, and the size of the time interval. The time interval Δt can be the chart bar times, such as 5-minute, 15-minute, one-hour, four-hour, and so on. In the following equation, the mean absolute change of logarithmic returns is 〈ΔX〉 and the sample time interval is Δt:

( Δt )

〈|ΔX|〉 = C

D

where D is the drift exponent and D approximately equals 0.5. ΔX is a measure of volatility for the time interval Δt and C is a constant for the currency pair. This scaling law does not have much practical use, but it spurred further research into scaling laws for financial data.

FIGURE 1: NUMBER OF DIRECTIONAL CHANGES SCALING WITH THRESHOLD. The average number of segments is accurately described by scaling with threshold, which provides the measurement scale for the zigzag pattern.

Second scaling law: Number of directional changes vs. threshold In 1997, a second scaling law was found that relates the number of directional changes (NDC) in a zigzag pattern to the threshold for declaring a directional change. (For more on this, see the article listed in “Further reading” at end, “From The Bird’s Eye To The Microscope: A Survey Of New Stylized Facts Of The Intra-Daily Foreign Exchange Markets.”) A change of direction (up/down) in the zigzag pattern is declared when the price changes by a threshold value compared to the highest or lowest price in the zigzag segment. The threshold, represented by Λ in equation 1, is a price change and is specified in pips. The threshold Λ defines the amount of price movement required to declare a new up or down segment in the zigzag pattern. The number of directional changes (NDC) depends on the sample size S and the threshold Λ. The scaling law for the average number of directional changes (〈NDC〉) over a sample size of S bars and a threshold Λ is:

( )

〈NDC(Λ)〉 = Λ R

D



Eq. 1

where the exponent D and R are constants for the currency pair. The scaling law equation can be rewritten in the log-log form as:

(

)

log 〈NDC〉 = D log(Λ) + B

Eq. 2

where D is the slope and B is the constant intercept for the fitted straight line. The one-hour EURUSD data from 2004 to 2019 has been used for all data analysis. Figure 1 shows that the log 〈NDC〉 versus log threshold data is well described by the scaling law in equation 2. Third scaling law: Average return vs. threshold Additional scaling laws were reported in 2010 (see the article listed in “Further reading” at end, “Patterns In High-Frequency FX Data: Discovery Of 12 Empirical Scaling Laws”), including a relationship between the average size of the return R of

zigzag segments and the threshold Λ. Equation 3 describes the scaling law for the average return per segment , over the duration of the sample, and the threshold Λ. The threshold Λ and average return are both price changes and are represented in pips.

(C )

〈R(Λ)〉 = Λ

M



Eq. 3

The exponent M and C are constants for the currency pair. Equation 3 can be rewritten in the log-log form as:

( )



log 〈R〉 = M log(Λ) + B

Eq. 4

where M is the slope and B is the constant intercept for the fitted straight line. If you look at Figure 4 in my February 2020 article, you will see that equation 4 accurately describes the average return as a function of threshold.

Recap: Scaling in volatility

First volatility scaling law Volatility has a key role in the behavior of both the NDC and the average return. In this analysis, volatility (V) is defined as the average absolute value of the change in closing price (P) from bar to bar.

〈| ΔP |〉 = 1

N

|P – P N Σ i

i=1

i–1

|

V = 〈| ΔP |〉 Volatility is specified in pips. The 〈NDC〉 follows a scaling law with volatility as shown in equation 5.

〈NDC(V)〉 = V

M

(G )



Eq. 5

where V is the volatility and the exponent M and G are constants for the currency pair. July 2020

• Technical Analysis of Stocks & Commodities • 25

given a specific threshold selection and sample size S bars. Figures 1 and 2 show that the 〈NDC〉 scales in both volatility and directional change threshold. Second volatility scaling law In my previous article, I also showed that the average return 〈R〉 scales with volatility V. However, the linearity for average return versus volatility was weaker than the other scaling laws. The scaling law for average return is: E 〈R(V)〉 = V

(F )

FIGURE 2: NUMBER OF DIRECTIONAL CHANGES SCALING WITH VOLATILITY. The number of directional changes scales with volatility, given a choice of threshold.

Eq. 7

Summary of recap

We now have four independent scaling law equations (equations 1, 3, 5, 7) which relate average return and average NDC to threshold and volatility. In the following sections, I show how these four equations can be collapsed into two equations, each with three free parameters.

Extending scaling laws: Number of directional changes

FIGURE 3: NUMBER OF DIRECTIONAL CHANGES SCALING WITH VOLATILITY. The fitted lines from equation 9 are shown with the data.

Two-dimensional scaling for number of directional changes Figures 1 and 2 show that the 〈NDC〉 independently scales with volatility (given a threshold region) and threshold (given a volatility region). But, is there one equation that describes how 〈NDC〉 scales with both volatility and threshold simultaneously? The simplest relationship between 〈NDC〉 and volatility and threshold would be: D

V G

M

(R) ( )

〈NDC(Λ,V) 〉 = Λ



Eq. 8

This equation presumes that the 〈NDC〉 has the same log-log slope value (D) as a function of threshold (Figure 2) for all volatility regions and also that 〈NDC〉 has the same log-log slope value FIGURE 4: NUMBER OF DIRECTIONAL CHANGES SCALING WITH THRESHOLD. The fitted lines (M) as a function of volatility (Figure 1) for all from equation 9 are shown with the data. threshold regions. Equation 8 represents a twodimensional scaling law. Equation 5 can be rewritten in the log-log form as: Equation 8 can be rewritten in the log-log form as:

(

)

log 〈NDC〉 = M log(V) + H Eq.6 where M is the slope and H is the constant intercept for the fitted straight line. Figure 2 shows log 〈NDC〉 versus log volatility data for a specific threshold range of 35–40 pips. This scaling law equation enables the prediction of the average segment length L (〈L〉 = S/〈NDC〉) directly from measured volatility, 26 • July 2020 • Technical Analysis of Stocks & Commodities

(

)

log 〈NDC(Λ,V)〉 = D log(Λ) + M log(V) + T

Eq. 9

where D and M are the two slopes on the log-log plot and T is an intercept constant. Let’s see how well equation 9 describes the data. A chi square minimization program was used to find the three free parameters (D, M and T) in equation 9. Figure 3 shows the log〈NDC〉 versus log volatility for

four threshold regions while Figure 4 shows the log〈NDC〉 versus log threshold for four volatility regions. In these figures, the fitted lines from equation 9 are shown along with the data. From Figures 3 and 4, we see that the assumption of common slopes is actually correct! With just three parameters (two slopes and an intercept), the value of 〈NDC〉 and therefore the average value of the segment length (〈L〉=S/〈NDC〉) can be predicted from the measured volatility and specified threshold. Figure 5 shows that the predicted average NDC from equation 9 closely matches the measured average NDC for monthly values from 2004 through 2019.

FIGURE 5: PREDICTED AND MEASURED VALUES AT EACH MONTH END

Extending scaling laws: Average return

Two-dimensional scaling for average return The average return R can be evaluated in the same way as the average NDC in equation 8. The equation for the two-dimensional scaling law is: M

V F

E

(C ) ( )

〈R(Λ,V)〉 = Λ



Eq. 10

Equation 10 assumes that the exponents M and E are constant for all volatility and threshold regions. Equation 10 can be rewritten in the log-log form as:

(

)

FIGURE 6: LOG RETURN VERSUS LOG VOLATILITY. The fitted lines from equation 11 are shown with the data.

log 〈R(Λ,V)〉 = M log(Λ) + E log(V) + Z

Eq. 11

where M and E are the two slopes on the log-log plot and Z is the intercept constant. A chi square minimization program was used to find the three free parameters (M, E and Z) in equation 11. Figures 6 and 7 show the log return versus log volatility and log threshold, respectively, along with the fitted lines from equation 11. Using just three parameters, equation 11 accurately predicts the average return as a function of volatility and threshold.

FIGURE 7: LOG RETURN VERSUS LOG THRESHOLD. The fitted lines from equation 11 are shown with the data.

Trading strategies

I developed two example trading strategies using a twodimensional scaling model. These strategies were implemented with expert advisors in the MetaQuotes Language 4 (MQL4) and run on the MetaTrader 4 platform using actual historical tick level data. (Subscribers to this magazine will find these expert advisors at this magazine’s website, Traders.com, in the “Article code” section of this issue.) Both strategies use equation 11 to calculate the threshold Λ based on a specified average return 〈R〉 and the measured volatility V. From the computed threshold and measured

Scaling laws provide excellent tools for developing trading models because they enable prediction of key pattern characteristics. July 2020

• Technical Analysis of Stocks & Commodities • 27

FIGURE 8: TEST PERFORMANCE OF REVERSAL STRATEGY. The profit performance shows a steady gain over the test period 2010–2019.

Strategy

# Trades

$ Profit

Profit/Loss

Profit/Trade

% Loss

Trend

1006

13,233

1.72

13.1

12.0

Reverse

924

12,812

1.92

13.9

10.4

FIGURE 9: TEST PERFORMANCE, EURUSD MINI LOT. This table shows the performance of the two strategies for the period January 2010 through December 2019 for a mini lot of EURUSD.

volatility, equation 9 is used to calculate the average segment length in the zigzag pattern. The trading strategies and expert advisor software are similar to those presented in my February 2020 article. However, determination of the zigzag threshold and average segment length now uses two-dimensional scaling law equations. First trading strategy: Trend strategy The first strategy is the trend strategy. An up or down zigzag segment is declared when the closing price change exceeds the threshold. At the earliest possible point in time, a buy for an up segment or a sell for a down segment can be executed. Other information about segment average values and length of the current segment are used for the trading decision. Second trading strategy: Reversal strategy The second strategy is the reversal strategy. In this case, when the length and price change of the current (incomplete) segment exceeds the average values for these parameters, a reverse trade is executed. The average value of price change and segment length are predicted by the scaling laws for average NDC and average return per segment (with segment

Scaling laws that represent the fractal structure of FX rate data can be used to predict the expectation value of FX parameters such as the average return of an up/down trend or the duration of a trend.

average length 〈L〉 = S/〈NDC〉). Results for both strategies are shown in the next section.

Model performance

I ran the trend and reversal strategies on the MetaTrader 4 Strategy Tester platform using historical tick data. This provides very precise performance testing for expert advisor testing in currency trading. The performance for the reversal strategy on one hour (H1) EURUSD data from 1/2010 to 12/2019 is shown in Figure 8. An excellent profit/loss ratio of 1.92 is achieved along with a steady profit gain over the period of test. A similar performance curve is seen for the trend strategy. For a lot size of 0.10 (mini lot) EURUSD, the table in Figure 9 shows the performance of the two strategies for the period January 2010 through December 2019.

Last thoughts

Scaling laws provide excellent tools for developing trading models because they enable prediction of key pattern characteristics. With newly observed and existing scaling laws extended into two dimensions, the effects of volatility can be readily incorporated into a trading model and improve the model’s overall performance. Since volatility changes over time, the model will optimize trading performance by using scaling laws to vary key model parameters, such as the zigzag threshold. Richard Poster has been designing and implementing FX trading models for 10 years along with private FX trading. He has a PhD in physics and has used the many techniques and methodologies from his experience in elementary particle physics research and later developing electronic warfare systems. He is interested in applying neural networks, fuzzy logic, fractal analysis, and quantum mechanics to FX trading models. He may be reached at [email protected]. The MetaTrader 4 expert advisors discussed in this article are available in the Article Code section of our website, Traders.com. Continued on page 45

28 • July 2020 • Technical Analysis of Stocks & Commodities

The trading platform you’d build (if you built trading platforms). Customize your view of the market so you can focus on what’s important to you with thinkorswim®. Create your own indicators with thinkScript®, visualize the market with custom charting, and use personal predictions to forecast the values of stocks you care about with the Company Profile tool. And, this award-winning investing experience is now commission-free.* See what customization can do for your trades at tdameritrade.com/thinkorswim

*Applies to U.S. exchange-listed stocks, ETFs, and options. A $0.65 per contract fee applies for options trades. Company Profile forecasts are hypothetical, based on user-defined assumptions, and not guaranteed. All investing involves risks, including loss of principal. TD Ameritrade, Inc., member FINRA/SIPC. © 2019 TD Ameritrade.

INTERVIEW

Portfolio Manager, Author, Researcher, and Options Expert

A Conversation With Jay Kaeppel

You first became interested in the stock market in 1981. What has changed in the markets since then? Everything moves faster because of technology. But trends are still trends, ranges are still ranges, breakouts are still breakouts, and human nature is still human nature. Which reminds me of one of my favorite sayings: “Human nature is a detriment to trading and investment success and should be avoided as much as humanly possible.” Then you are a believer in an objective, rule-based approach to trading rather than flying by the seat of your pants, right? Yes. Fear and greed are part of that pesky human nature and no one is impervious to it. An objective plan allows an individual to take the emotion out. While there are individuals who have the ability to trade successfully by the seat of their pants, my frank advice to

most people is “assume you are not one of them.” When did you first encounter technical analysis and how did you build your knowledge base? During my first job out of college I went to the library at lunch and read everything I could get my hands on. My primary influences were many and I learned different things from different people, such as: • Norman Fosback: quantitative analysis of various indicators plus seasonality • Marty Zweig: the importance of price trends, interest rates and the Fed • Yale Hirsch and Peter Eliades: the value of seasonal and cyclical trends • Martin Pring and Gerald Appel: a variety of technical tools • More recent influencers: Larry

30 • July 2020 • Technical Analysis of Stocks & Commodities

The main thing is finding an “edge” and exploiting it repeatedly. Connors, Linda Bradford Raschke, and Tom McClellan All of their old books are still relevant. In my opinion, Linda’s recent book, Trading Sardines, is required reading for anyone considering trading as a full-time career. I would also mention the Trading Wizards books by Jack Schwager. There are two things to pick up from those books: 1) there are lots of trading methods that work well. There is no one best way. The trick is finding what works well for you, and 2) the overwhelming importance of risk control and minimizing losses. They all touch on that as a primary key to their success. In your mind, is there a difference between investing and trading? Yes, I think of them as separate endeavors. Investing is “putting money to

HONZA KREJ/SHUTTERSTOCK

Jay Kaeppel has over 30 years of varied experience in options, equity, and futures trading as a research analyst, trader and portfolio manager. Professionally, he began his career as head trader at Essex Trading Co. managing futures accounts for eight years, and as a programmer, he co-developed Option Pro trading software, which was the winner of our Readers’ Choice Award for six consecutive years in this magazine in the category of Options Trading Systems. He then became a trading strategist and trading instructor for Optionetics, writing a weekly column for nine years called “Kaeppel’s Corner.” For the past five years he has been a vice president and director of research at Alpha Investment Management, Inc. In addition, he offers regular market commentary on his website JayOnTheMarkets.com. He is a prolific writer, as evidenced by his authoring four books on trading: Seasonal Stock Market Trends (Wiley), The Four Biggest Mistakes In Option Trading (Wiley), The Four Biggest Mistakes In Futures Trading (Wiley), and The Option Trader’s Guide To Probability, Volatility, And Timing (Wiley). Kaeppel currently writes the monthly Explore Your Options column for this magazine, as well as contributing many articles on a variety of subjects since 1999. Kaeppel can be reached at [email protected]. Stocks & Commodities Contributing Writer and ETF columnist Leslie N. Masonson interviewed Kaeppel via email in early March 2020.

work,” hopefully in some sort of objective manner to grow one’s capital over time. Trading is about making money here and now. Two completely different approaches in my mind. What would be your most important advice for traders? 1. Remember this phrase, “It’s not how much you make when everything goes right that matters, it’s how much you keep when everything goes wrong.” Bad things happen to every trader, period. Job one is to be able to come back and be a trader again tomorrow, that is, never, ever put yourself in a position to “lose the farm.” A lot of traders who fail never take the time to learn proper position sizing. 2. In a nutshell, trading success or failure is determined by the following calculation: “# of winners divided by # of losers” times “average winning trade divided by average losing trade.” That’s the entire game in one number. A high value equals success, a low value equals failure. So focus your efforts on maximizing this number. 3. The day that you experience absolutely no emotion as you are stopped out of a properly managed losing trade is the day you gain the potential to become wildly successful in the markets. 4. Everyone knows Murphy’s Law, which says, “Whatever can go wrong will go wrong.” Traders need to live by what I call Murphy’s Corollary, which says, “Murphy hates you. Plan accordingly.” What about for longer-term investors? Two things. One, there is no such thing as “one best strategy.” If you can combine, say, three non-correlated strategies you can generate a nice smooth upward-sloping equity curve over time. I call it “LLUR” for lower left to upper right. That’s the goal. The more one’s equity curve slopes up to the right, the more likely they are to stick with their approach.

The second thing is that buying and holding a stock The best thing about option index fund with 100% of trading is that there are so your capital is a mistake—in my opinion. I call it a “driftmany choices. The worst ing with the tide” strategy. If thing about option trading the sky is clear and the seas is that there are soooooo are calm, then it’s smooth many choices! sailing. But storms are inevitable for both the weather and the stock market. And the longer the sailing has the terrific bull market in the past been smooth, the more people forget decade, it is interesting to note that about the storms. from August 2000 through JanuThe peaks in the Shiller P/E ratio in ary 2020 (19 years and 5 months), 1929, 1937, 1965, and 2007 were followed the average annual compounded by declines of -89%, -49%, -40%, and return for the Vanguard S&P 500 -54% for the Dow and the 2000 peak was index fund (ticker VFINX) was just followed by an -83% decline for the Nas+5.75%. Not exactly a stellar rate daq 100. Prior to the 2020 selloff people of return for almost 20 years of a had forgotten all about this. But why ride “ride ’em out” approach. declines like that to the bottom? So what would you suggest as an alAny other dangers of buy & hold in ternative approach? your mind? Well, it’s more food for thought than a Yes. The stock market can go sideways formal suggestion, but consider this: for very long periods of time. Some people resolve themselves to believe • 30% invested buy & hold: While that “timing is impossible” and that I don’t advocate 100% because they have to simply ride out the bear the market does go up in the long markets to get their long-term returns. run, it makes sense to always have But ironically, buy & hold success is also something in there. actually a function of timing as well, • 30% invested using trend-folthat is, during which years were you in lowing: Occasional whipsaws are the market? If you’re fortunate you are inevitable but the important point in during the good years. But consider is that you don’t ride those -30% a little history: to -80% declines all the way to the bottom. The psychological • From 1927 to 1949 the stock market benefit cannot be described, only went sideways for 22 years. Imagfelt. And you actually have some ine someone saying this in 1949: cash available to invest when things “Hey Honey, remember that money turn around. we put to work in the stock market • 30% invested using tactical back in 1927? Great news! We’re strategies: This can be a single back to breakeven!” I can only strategy or a variety of technical, speak for myself, but I would prefer seasonal, or even fundamentalnot to have that conversation. based strategies. Once again, the • From 1965 to 1982, the stock point is that these types of stratemarket went sideways. While this gies are typically intended to: a) is technically a 0% return over 17 outperform buy & hold over time, years, it was actually worse than and b) do something besides just that. Because of high inflation dur“sit there and take it” when things ing this period, purchasing power go severely south. Also, it is useful declined a fairly shocking -75%. to combine strategies that—using • From 2000 to 2012 the stock highly technical terms here—when market went sideways. Despite one “zigs” the other “zags,” which July 2020

• Technical Analysis of Stocks & Commodities • 31

that you do? If so, how do you determine the stop There is no such thing as levels to exit? As with everything else, “one best strategy.” If you there are different philosocan combine, say, three phies. For example, I like non-correlated strategies, Larry Connors’ work a you can generate a nice lot. I have all of his books. Straightforward, rule-based, smooth upward-sloping and the numbers look good. equity curve over time. Yet most of the strategies in his books advocate for not using a stop-loss—and the smooths out the volatility of the numbers associated with those strategies equity curve. back him up. But my mindset is that if • 10% invested using whatever ap- I am going to risk a certain percent of proach you want. A lot of investors capital, I have to have some way of domake the mistake of being afraid ing that, and a stop-loss—for better or to ever trust their gut and others worse—automatically cuts a loss. Just make the mistake of risking too a different mindset. The best way I’ve much of their capital on their in- heard it put is this: “The purpose of a stincts. Think of a stock you wish stop-loss order is not to maximize profityou had bought, or conversely, ability. The purpose of a stop-loss order that you bought way too much of. is to save your sorry assets.” Like I said, different people have difWell, if you only risk 1% to 5% of your entire portfolio and the stock ferent philosophies and that’s okay. The tanks, is that really the end of the main thing to remember is that successful world? Go ahead and trust your traders: a) control risk ruthlessly, and b) gut. Take your shot. Just don’t bet have short memories when it comes to the ranch. If you’re good at it you losing trades. They don’t drag them formight just make yourself rich. And ward and allow them to influence future if you are not, you will figure that trading decisions. By the way, it’s much easier said than done. out in time too. Obviously, splitting things up as I have just described (Figure 1) can get a little involved. But it gives you the potential to make money in any kind of market, and stands to insulate you from a lot of potential pain by avoiding riding the market to the bottom, or just holding on while the market goes sideways for many years. One of the ways to limit losses is to use stop orders on trades. Is that something %

What type of stops have you found most useful (e.g., standard stops, stop limits, trailing stops, and ATR-based stops), and how do you determine where to place them? For purposes of limiting an initial loss a standard stop order typically serves that purpose most efficiently. If you decided you are going to risk x% on a trade and you are down x%, cut bait, move on. Period. No remorse. For a trailing stop— where you are locking in a profit—one

Approach

30% Buy & Hold

Purpose Always have some market exposure

30% Trend-Following

Automatically reduce risk in a prolonged bear market

30% Tactical Strategies

Diverse opportunities; smoother equity curve; cut risk in a bear market

10% Your Choice

Trust your gut, be your own hero!

FIGURE 1: ONE APPROACH TO STRATEGY DIVERSIFICATION. Investors can invest a percentage of their portfolio in four different approaches to gain the benefit of multiple opportunities, instead of just following one approach with 100% of their money.

32 • July 2020 • Technical Analysis of Stocks & Commodities

can be a little more creative (ATR-based, x-day low, etc.) What are the keys to trading and investment success? The main thing is finding an “edge” and exploiting it repeatedly. A chart pattern, an indicator setup, a seasonal trend. Maybe add in some trend-following to make sure you are typically “going with the flow.” Something you are comfortable with, something you believe will continue to work. Then add in some reasonable position sizing and some inviolable risk controls and have at it. From your research, what patterns have you found that repeat over time in the markets? Well obviously, I am a big fan of seasonality. There are a few reasons why. First, as I said, one key to success is “finding an edge.” The vast majority of people in the market look at technical and fundamental information. Very few look at seasonality. So I feel that you are more likely to find a unique edge if you look where others are not. Also, there are a lot of unique anomalies related to seasonality. Now I will say that committing capital based solely on the date on the calendar does require a leap of faith. But that is not always the only way to use seasonality. For example, one can look at a particular seasonal trend that is bullish—say, soybeans typically rise during February into May—and then add in some trend-following and ask “is price action actually bullish?” If some asset is in an actual price uptrend during a typically bullish time of month or year or whatever, that can be a pretty simple yet pretty powerful combination. Since you are a believer in seasonality, is it safe to assume you are an advocate of “sell in May and go away”? Yes, but not necessarily in the way most people think. The key as I mentioned is finding an edge and exploiting it repeatedly. There is an abundance of research regarding the fact that the stock market tends to perform pretty well November through April/May, especially if you follow that approach over a five-year

period. Certainly, a lot of volatility can happen along the way, but since 1949, buying and holding the Dow November 1 through May 31 every year for five years has showed a gain 64 out of 66 five-year rolling periods. That’s 97% accuracy. That’s a pretty consistent trend to hang your hat on. In the November 2019 issue of this magazine, you wrote an article titled “Stock Market Seasonality: A Global Phenomenon” based on the “sell in May and go away” approach, using data from seventeen single-country ETFs. What conclusions did you reach, and were you surprised by the outcome? Well, doing the research was a real eye opener. Most every study I had ever seen or done looked at the Dow and/ or the S&P. But the reality is that the “power zone”—as I like to call it—is a global phenomenon. Virtually every single international stock index and every individual single-country stock index tested showed a strong net gain if held every year November through April and—with one minor exception—they all showed significant losses over time during the other months of the year. Did you uncover any other surprises in researching this phenomenon? I’ll give you three: 1. If you look at rolling five-year returns across a variety of indexes—growth, value, large- cap, low volatility, momentum, etc.—most show a five-year cumulative power zone gain 100% of the time, or close to it. There is no guarantee that this will last forever, but if you are looking for an “edge,” this seems like a good place to look. 2. The top-performing index during the power zone (Figure 2) historically over time has been the S&P Midcap 400 index. Now the reality is also that it can underperform for several years at a time as well. However, since 1981, it has gained almost three times as much as the S&P 500 index during November through May. That’s what we quantitative types refer to as, ahem, “sta-

tistically significant.” My theory is that this is because that’s where the bulk of growth occurs over time—that is, the midcap space is essentially comprised of formerly small-cap stocks on their way to becoming large-cap stocks—that is, the growers. 3. For whatever reason, the power zone in the US extends from November 1 through May 31, while the international power zone is November through April plus the month of July. If you had held the MSCI EAFE Index during those power zone months starting in November 1970, you would have gained +12,461% versus a loss of -46% if you had held during all other months, which I refer to as the “dead zone” (Figure 3). Call it data mining if you’d like, but the consistency is tough to beat. And what about the rest of the year, or as you call it, the dead zone? Do you suggest avoiding the stock market altogether? The reality is that on a year-to-year basis, the S&P and Dow do advance about 60% of the time between the end of May

FIGURE 2: MSCI EAFE DURING POWER ZONE MONTHS OF NOVEMBER THROUGH APRIL PLUS JULY. Clearly, this equity curve illustrates the longterm value of this approach, rising over 12,000% since October 1970.

FIGURE 3: MSCI EAFE DURING ALL OTHER MONTHS. As expected, the other months were much more volatile, but ending 50% lower, which is really an amazing contrast to Figure 3’s results. July 2020

and end of October, so it is not technically correct to call it a “bearish” period. But two thoughts to keep in mind: First, from 1949 through 2019, the cumulative price gain for the Dow during June through October was just +34%. Secondly, consider an alternative investment. If we look at total returns for the S&P 500 index and three- to sevenyear treasuries only during June through October since 1981, we find bonds earned 289% versus 107% for the S&P 500 stock index. Just as significantly, bonds had a maximum drawdown of -2.5% versus -40.8% for the S&P. If you are focused on consistency and low volatility, those numbers are pretty compelling. What are some examples of seasonal trends that most investors may not be familiar with? The bond market is extremely cyclical. Stock-correlated bond vehicles such as ticker CWB (convertibles) and HYG (high-yield) typically perform best December through April. Longterm treasuries (ticker TLT) have been best between May and August, and intermediate-term treasuries (ticker IEI) are favored September through November. Using Vanguard funds VWEHX, VUSTX, and VFITX in this manner, since all three funds were available in 1991, has outperformed buying-andholding the three funds by over 3-to-1. Almost no one is aware of this. Are there any other seasonal/cyclical factors at work in the bond market? You bet. For years, long-term treasuries have made all their money during the 10th, 11th and 12th trading days of the month and during the last five trading days of the month. All other days combined have almost always shown consistent losses over time. Do you think this trend will continue to hold if interest rates rise? That’s an important question. Interest rates tend to move in roughly 30-year waves. We have now been in a downtrend for almost 40 years, so conventional wisdom argues that rates are due to rise. But now that I see negative interest rates in many countries around the globe, I am

• Technical Analysis of Stocks & Commodities • 33

FSHOX as a proxy): November through May up 30 times in 33 years and total return 1986 through 2019 equals +8,584%. Meanwhile, cumulative return for May through October equals -63%. A pretty stark difference, to put it mildly.

to point out that the best thing about option trading is also the worst thing about option trading.

Energy (using FSESX as a proxy): Held June through November every year since 1986 has lost -95%! Seriously, what is the point of bucking those kinds of odds?

In your opinion, what are the keys to success in option trading? The first thing is to determine what your objective is, both overall and on a trade-by-trade basis. The primary categories are: a) speculating on price direction, b) generating income, and c) hedging. What are you trying to achieve by taking this trade? The second thing is to learn which strategies can best serve your purpose. The last thing is to learn how to put the odds as much in your favor as possible on a trade-by-trade basis.

The vast majority of people in the market look at technical and fundamental information. Very few look at seasonality. not so sure that it won’t happen here. If it does, long-term treasuries may still have a long way to go on the upside. At the same time, I read a study somewhere that calculated that if the long bond yield rose from 2.8% to 6.2%, long-term treasuries would lose -65% in principal. Now, one can argue that that type of rise in rates is unlikely anytime soon, but the point is, is anyone out there worried about that, or even aware of the level of potential risk? Is there a way to avoid that kind of outcome? One really simple way is to keep an eye on the 10-year and 30-year yields (tickers TNX and TYX) versus their respective 120-month—yes month—exponential moving averages. If rates are below their long-term averages—as they have been for most of the last 40 years—its okay to hold bonds. But if the 10- and 30-year yields establish an uptrend—that is, above their long-term average, it is imperative that investors avoid long-term bonds or they will never know what hit them until it’s too late. Any other insights regarding seasonality? How much space do you have? Seriously though, yes, there are a lot. The thing to remember is that like anything else, seasonality is not for everyone. Some people just cannot wrap their heads around the idea that certain things tend to move at certain times. And that’s fine. If someone is not comfortable with a certain idea, they should not attempt to use it because it violates the “use a method you are comfortable with” rule. That being said, here are some quick mentions: Housing and construction (using

What about within a given month? Let’s talk trading days of the month. Here is a crazy set of numbers. Let’s consider what would have happened if you held the S&P 500 stock index during every day of the month except during the period from the 10th-to-last trading day of the month through the 5th-tolast trading day of the month. In other words, every month, you get out of the market for those six days and then get back in. A lot of people will think about that idea and their first reaction is, “well, that sounds like a pain in the rear.” And from a logistical real-world trading point of view, it really actually is. But consider this. From the end of 1949 through the end of 2019, the cumulative price gain for this approach was +130,588% versus +19,268% for buy and hold. To put it another way, by holding the S&P 500 only during the period from the 10th-to-last trading day of the month through the 5th-to-last trading day of the month, for the past 70 years, you would have lost -86%! This is an example of “finding an edge” using seasonality. And realistically, is the whole world going to read this and adopt this strategy and negate this edge? Not likely. You write the monthly column on options for this magazine (“Explore Your Options”), so let’s turn our attention there. Do you see option trading as different from other kinds of trading? Absolutely. With stocks, futures, or ETFs you are either long, short, or flat. With options you can achieve any kind of exposure you want. Which leads me

34 • July 2020 • Technical Analysis of Stocks & Commodities

How’s that? The best thing about option trading is that there are so many choices. The worst thing about option trading is that there are soooooo many choices!

Can you give us an example of what you mean? Sure. If you think price is going up, buying a call option is the most straightforward approach. But from there, you then have the decisions of which expiration month to trade and which strike price to buy. Are there any rules of thumb? There are lots of rules of thumb, but there are no definitive “correct” answers. As I alluded to, that’s what makes option trading trickier than other types of trading. For example, if you think a stock is going up, you can buy the shares and hold them for however long you’d like. If you are going to trade an option, it’s different. If you absolutely believe the stock is going to pop 3% in the next five days, then you would likely make a different trade than if you just expect it to work its way over the course of several months. If you have a specific outlook, you can take a more or less aggressive trade. Which goes back to my earlier point: It’s great to have the flexibility— but it can also complicate things a bit if you are not entirely focused. Probably the most useful rule of thumb is that the best way to make money in the

long run is to avoid trying to make all the money in the world in the short run. When you hear or read an article by a market commentator, financial advisor, or brokerage firm indicating that market timing can’t be done successfully, how do you respond to that and what is your take on the validity of market timing? I ignore them. If that is their opinion, what do I care? I do what I do, they do what they do, the world keeps turning and the markets keep fluctuating. You have written four books. Is there another book in your future? And if so, what would be its focus? I would love to. It would probably be along the lines of my last book Seasonal Stock Market Trends since I have a lot of material on the topic. I would also love to combine seasonal trends with trend following and other overbought/ oversold indicators to use as a basis for trading rather than just seasonal trends on an esoteric basis. You also write a blog called JayOnTheMarkets.com. What do you write about there? Whatever comes to mind pretty much. Sometimes it’s options, sometimes it seasonals or commodities, or economic indicators, trading setups—whatever. I refer to it as “the ramblings of a marketaddled mind.” I don’t make recommendations or offer trading advice, it is just “here is what I see,” or at least, “what I think I see.” It’s fun for me because I can just put the ideas out there and the reader can agree, disagree, use it, ignore it, whatever. But I have been doing it for six years now so there is a lot of material there in the archives. Any changes in the future you see forthcoming? I am not too good with “predictions,” but I am pretty good at identifying cycles and relationships, and there are a few that I believe will change again in the years ahead. In no particular order: • US stocks and international stocks have a long history of back and

forth in terms of relative performance. US stocks outperformed in the 1970s, the 90s, and in the most recent decade. Internationals led during the 1980s and the 2000s. I am keeping a close eye on the SPX/ EAFE ratio. When it turns down in a meaningful way, chances are it will signal a long-term shift in favor

FIGURE 4: US STOCK INDEX PERFORMANCE RELATIVE TO INTERNATIONAL STOCK INDEX PERFORMANCE 1971–2019. Look for a change in direction to signal a buying opportunity for international stocks.

FIGURE 5: COPPOCK GUIDE SIGNALS FOR THE S&P 500, 1971–2020. This indicator overall had accurate calls, but be sure to use other confirming indicators as well. Buy

Sell

Held

% +(-)

9/30/1970

9/30/1971

12 months

+16.8%

1/31/1975

1/31/1976

12 months

+31.0%

4/28/1978

4/30/1979

12 months

+5.1%

8/31/1982

8/31/1983

12 months

+37.6%

12/31/1984

12/31/1985

12 months

+26.3%

9/30/1988

9/30/1989

12 months

+28.4%

2/28/1991

2/28/1992

12 months

+12.4%

1/31/1995

1/31/1996

12 months

+35.2%

1/31/2002

4/30/2002

1 month

(-4.7%)

5/31/2002

7/31/2002

2 months

(-14.6%)

8/30/2002

9/30/2002

1 month

(-11.0%)

3/31/2003

3/31/2004

12 months

+32.8%

5/29/2009

5/31/2010

12 months

+18.5%

5/31/2016

5/31/2017

12 months

+15.0%

FIGURE 6: COPPOCK GUIDE BUY SIGNALS. Buy on signal date, and sell 12 months later or if the indicator turns back down sooner. Note the negative performance confined to 2002. July 2020

of internationals (Figure 4). • Second, unbeknown to most investors, the midcap space is where the bulk of growth takes place. From 1981 through 2019, the S&P 400 gained +13,225%, the S&P 500 gained +6,468% and the Russell 2000 gained +4,155%. In recent years the large caps have outperformed. I expect the midcap space to re-exert itself in the years ahead relative to the other indexes. • Lastly, commodities are the dogs of the investment world, and have been for some time. This is unlikely to last forever. The ratio of the Goldman Sachs Commodity Index to the S&P 500 had been trending steadily lower since the peak in 2008. Now the bottom has pretty much dropped out. This won’t last forever. At the same time, no one knows “how low is low,” so as a trend-follower at heart, I haven’t really acted on this idea so far. The good news for investors is that when the trend starts to turn in favor of commodities, they can now gain exposure to commodities through ETFs rather than having to get into the futures market. In the November 2001 issue of Stocks & Commodities, you wrote an article on a monthly Fidelity Select funds trading system you called the “pure momentum system.” Have you run these models for the 2000 to 2010 timeframe (for example, double bear market period) to see if the strategy works as well as during bear market years compared to the blistering bull market of the late 1980s and 1990s? Interestingly, the good news is that it vastly outperformed the S&P 500 index during 2000 through 2009; +125% versus -9%. The bad news is that in the past 10 years it underperformed pretty substantially: +193% versus +257%. Overall, since November 2001, the median 12-month gain was 14.9% for the strategy versus +12.8% for the S&P 500. So still a viable long-term strategy. To tie some things together, in my mind, a Continued on page 62

• Technical Analysis of Stocks & Commodities • 35

TRADING ON MOMENTUM

Taking The Highway Onramp

Dual-Candle Breakouts

W

by Ken Calhoun

hen it comes to correctly entering uptrending charts, your goal should always be to find the strongest price action breakouts. One of the easiest patterns to look for is one in which uptrending candles are getting taller in size, indicating increasing buying strength. When daily trading ranges expand during an uptrend it indicates a technical breakout that you can capitalize on. This month’s column will explain how to visually scan for this pattern and trade it.

Sequence of taller

Step-by-step action plan

Here’s how you can start using this strategy: Step 1: Visually scan for charts in which a sequence of two candles in an uptrend is seen, in which the second candle has a height of at least twice the previous candle height. Step 2: Enter your position on the day following this dual-candle breakout pattern once price is above the high of the second candle. Step 3: Use an initial stop-loss at the low of the candle pattern.

Insights: Why this

technique works Think of price action breakouts like driving onto a freeway—you want to accelerate your speed when driving; in trading, you want to enter your trades as price is going higher relatively quickly. This momentum-based trading approach is designed to help us enter our positions during strong price action, relatively

early in the breakout move. This is similar to using technical indicators such as the average true range (ATR) as it increases in value, revealing an acceleration to the upside in price action.

Trade management tips

When entering your first breakout in a sequence, it is usually a good idea to use a very small share size. When setting your stop-loss, the price that proves this pattern wrong would be an obvious loss of support under both candles. In addition to identifying your first entry, you can also use this dual candle pattern later in the lifecycle of your swing trades to scale in and buy more shares. This pattern is relatively easy to spot visually and is a core pattern I use in my own swing trades. Ken Calhoun moderates a popular live trading room for active traders. He is the founder of TradeMastery.com, an interactive webinar site for active traders, and is a UCLA alumnus.

candles Simply buying into an uptrend in isolation often leads to false breakouts, much to every trader’s frustration. Instead, you may find more success by looking for dual-candle breakout patterns, in which the height of the second of two candles is taller than the first candle in an uptrend, as seen in Figure 1, Moderna Inc. (MRNA). Note that this pattern needs to occur at a new one-month high to be valid; you do not use this for entries when the candle pattern is observed inside the previous trading ranges or near lows. Also, the volume of the second candle needs to be higher than the volume of the first candle, as illustrated in Figure 1. You enter on the day following this dual-candle breakout pattern. FIGURE 1: DUAL-CANDLE BREAKOUT IN PROGRESS (MRNA). As price action breaks to new highs, this candle pattern shows how strong the breakout can subsequently move.

36 • July 2020 • Technical Analysis of Stocks & Commodities

eSIGNAL

Simply buying into an uptrend in isolation often leads to false breakouts. Instead, you may find more success if you scan for dual-candle breakout patterns. Here’s how to find them.

Algo Q&A ALGORITHMIC TRADING Have a question about system or algo trading? Kevin J. Davey has over 25 years of system trading experience. Davey is a full-time trader, and he also teaches and consults via his Strategy Factory online workshop (http://kjtradingsystems.com). He is the author of several bestselling trading books, including Building Winning Algorithmic Trading Systems and Introduction To Algo Trading. Send your questions or topic suggestions to Kevin Davey at [email protected]. Selected questions will appear in a future issue of S&C. Kevin J. Davey

DATA BACKUP AND MANAGEMENT I just tried to open my trading platform today, and all my indicators and strategies are gone. HELP! There is nothing worse than opening your trading platform on Sunday night before the market open and seeing… nothing. All the custom charts you created…gone. All the strategies, indicators and studies you created…gone. It is a sickening feeling, and if you think it can’t happen to you, sooner or later you are in for a rude awakening. When this happens—and it likely will at some point, regardless of the platform you use—what can you do? I follow a data backup and management plan, which encompasses not only corruption issues, but also general fault points with my whole setup. Let’s walk through some of the important pieces of a trading backup plan. Local PC or virtual private server? Most retail traders use their home PC or smartphone to control their trades. I personally use a home PC for most automated trading, although I’ll switch to a virtual private server (VPS) if I am traveling for an extended time. I have a cloud-based backup service for all my personal data (I use Backblaze). I also use my trading platform’s backup feature on a weekly basis, so I have an archive

ready to restore any corrupted data. I also manually export my workspaces, strategies, and studies to a USB stick, and keep that offsite. Finally, I clone my hard drive every few weeks. That leaves me with four unique locations where my trading data is stored. In case of corruption, I will still be inconvenienced, but not permanently dead in the water. Additionally, I have a backup PC that can quickly be brought online in case the primary PC crashes. I also can use the VPS for this purpose. Having multiple ways to access your trading platform is a wise idea. Internet connection Having multiple ways to access the internet is a key part of a backup plan. Many traders have internet service from two different providers, and there are routers that will seamlessly switch providers should one go down. I personally use my cell phone hotspot as an emergency backup. I also have a few trusted places where I can take my laptop to connect via wi-fi. Again, having redundancy in your setup is key. Power connection Everyone trading from home should have a battery backup that supplies emergency power not only to their PC,

but also to their internet router. Having a partial or whole house generator is also a good idea. Broker connection What happens if there is a major shutdown of the internet or the connection to your brokerage, and you cannot access your brokerage? I keep phone numbers for my brokerage’s trade desk close by, in case I am unable to access my brokerage online. So worst case, I can always call them and exit trades. My rule of thumb with all my backup plans is to be up and running within 15 to 30 minutes, regardless of the root cause. If I find myself “in the dark” for longer than this, I know I have to improve my backup plan. Occasionally, I simulate a failure, just to keep my recovery skills sharp, and to ensure I’ve covered all possibilities. Obviously, details will vary from trader to trader, but having a backup plan for every key piece of your trading setup is really important. The best practice is to have this plan written down and easily accessible. The last thing you need during stressful events is panic and rash decision-making. Having a good backup plan will eventually save you a lot of time and aggravation.

YOUR ONLINE RESOURCE FOR TECHNICAL ANALYSIS Join us on Facebook at www.facebook.com/STOCKSandCOMMODITIES Follow us on Twitter @STOCKSandCOMM July 2020

• Technical Analysis of Stocks & Commodities • 37

Staying The Course

The Chase Of Volatility

B

by Robert van Eyden, PhD

ehavioral finance has grown over the past twenty years—and the conclusion is that investors rarely behave rationally. Extending the principles of behavioral finance into the trading realm can be useful, especially when it relates to trading psychology and the behavior of traders. According to the late John Bogle, founder of The Vanguard Group, “The two greatest enemies of the equity fund investor are expenses and emotions.” This is the case for traders as well. It is well documented that risk and trade management are far more critical components for trading success than is trade identification, especially if trade identification occurs outside

38 • July 2020 • Technical Analysis of Stocks & Commodities

the trader’s framework, and especially if trade entries are the result of FOMO. History suggests that Dan Herman first identified the syndrome of the “fear of missing out” in 1996 and described it in an academic paper published in 2000. However, Patrick McGinnis famously coined the term “FOMO” in 2004.

FOMO

FOMO is embedded in human nature. But it has shown up as an increasing tendency over the last few years with the proliferation of constant information, constant updates, and social media. Traders can easily become seduced into wanting to participate in market movements, even if it doesn’t fit into their normal trading plan or risk-to-reward management framework. The desire is brought about by a fear of missing out on the movement—especially in volatile markets. In reality, during periods of market volatility, the best course of action may very well be to take no action, although this feels counterintuitive.

MARIO BREDA/SHUTTERSTOCK

The fear of missing out (FOMO) can create a psychological challenge for traders. Here are some steps you can take to help prevent emotions from entering into your trading decisions and wreaking havoc on your trading plan.

TRADING PSYCHOLOGY

FOMO can also influence the formation of long-term trading goals and can influence a trader’s perception of what a valid entry signal is. FOMO could result in the placing of an emotional trade, which could go against the trader’s trading plan or go against what the trader normally considers a valid entry signal. Possible reasons for taking a FOMO trade could be a result of: • Fear, uncertainty, and doubt (FUD) • Overconfidence

• The herding behavior bias • Trading the long bar

FUD

FIGURE 1: LONG BARS ON THE DJIA (DAILY). The chart shows the long bars in red. The blue line depicts the

Markets are driven by two powerful preceding 5 or 10 bars before the long bar. If a trading signal is generated on the long bar, a good trading plan would discard the signal, since this scenario can lead to a higher-risk/lower-reward trade. emotions: greed and fear. Traders can succumb to these emotions at times of heightened volatility or uncertainty, and that can have a pro- over a series of trades. found and potentially undesirable effect on trading outcomes. Traders can negate the overconfidence siren song by planPicture the Greek literary character Ulysses, who heads home ning the trade and trading the plan, with confidence. after the fall of Troy. He sails past the island of the sirens (think of the ocean as market volatility), and these danger- The herding behavior bias ous creatures (think of them as FUD) lure sailors with their A trader’s preexisting belief influences the way he experiences enchanting voices to shipwreck on the rocky coast of their a trade. A trader should always take care that he is not merely island (think of that as a poor trading outcome). reacting to a market happening! In that scenario, a rational solution could have been to simply Prevailing market conditions may influence a trader’s emobypass the island. In the tale, Ulysses had his crew stop up tions; for example, going against the trend or missing out on their ears with beeswax to block out the siren calls, and had a trend. Herd behavior/mentality can amplify during market himself bound to the mast. In doing so, he was taking steps upswings and downturns, which could result in entering into to constrain his future behavior. He knew that he was human, a trade-based emotion rather than within a trading plan or fallible, and was likely to succumb to temptation. framework. A possible explanation for this behavior is that Likewise, in trading, there are times when a trader’s best there are two systems of reasoning, intuitive and deliberaintentions will be insufficient to overcome the force of tive. For most decisions, the two are very carefully aligned. short-term desires. Unfortunately, in such cases, emotional When it comes to trading decisions, however, they become trades can be made, usually to the determent of the trader’s very misaligned. The trader’s objective should be to achieve equity curve. a positive, upward-sloping equity curve over a reasonable time, and yet this can be discarded when a trader’s emotional Overconfidence self takes over. Overconfidence in a trader can occur as a result of: • Attributing past successes to the trader’s own skills and Trading the long bar The long bar is essentially an entry bar that is two times the attributing past failures to bad luck length of the average length of the preceding 5 or 10 bars • Focusing on output (that is, price) instead of on the (Figure 1). The reason why traders should not trade the long process (that is, the trading plan). Position sizing and bar? At that stage, the market has “burned up” a lot of its capital at risk are generally underemphasized, which volatility. This implies two things for the trader: can lead to unsound bets being placed with catastrophic First, it will take a while to build up enough volatility to consequences. move substantially again. Second, it has used up enough Successful traders know that each trade executed is random volatility to not move back much. from the previous and the next. A past winner is not indicaBy virtue, a long bar entry necessitates a proportionally tive of a future winner, and that the equity curve is a random larger stop. Given that price action has “burned up” a lot of distribution of wins and losses. The only thing that matters is that the average winner is greater than the average loser Continued on page 45 July 2020

• Technical Analysis of Stocks & Commodities • 39

Investing In Our Infrastructure

Utility ETFs: Power Up With Dividend Payers?

U

by Leslie N. Masonson

tility companies are the backbone of the power industry in the United States. And some of these companies have had a rough going with natural disasters, man-made conflagrations, and competing technologies. Nevertheless, this industry is an essential component of our well-being and the nation’s future growth. Solar power and other initiatives have put pressure on utilities to become more efficient and reduce their operating costs. Less expensive natural gas has caused nuclear power plants financial strains, resulting in closings, such as the April 30, 2020 Indian Point Unit 2 reactor in New York closing down operations that were operational since 1974, since its generating capacity had diminished to only 65%.

40 • July 2020 • Technical Analysis of Stocks & Commodities

Utilities have a long history of dividend payments and are sought after by investors as a portfolio component when the economic and stock market conditions soften, but they most likely would not perform as well as fixed-income vehicles. Most of the companies have very stable earnings and management with bright futures if they harness their brainpower to plan ahead. However, investors need to realize that even utilities are not shielded from price declines in bear markets.

Review of seven utility ETFs

This article provides comparative data on the seven largest domestic utility ETFs based on assets under management (AUM). Utilities are one of the most homogenous company groups and the ETF offerings in the category clearly show this to be the case, especially with regard to their very similar portfolio holdings. All the data provided in the tables were obtained by XTF. com. Figure 1 provides the ticker symbols and names of the ETFs covered. In addition to these ETFs, there are others in the utility space that were not included because they had a low XTF.com rating, a small amount of AUM or very low daily trading volume or a combination of all three criteria. These include PSCU, JXI, and JHMU. In addition, for the more

PHOTO BY ALEKSANDAR PASARIC

Investing in our infrastructure power is critical to our daily lives. Without adequate energy, our country would grind to a halt. Conservative investors may want to invest a portion of their funds in this defensive sector for capital appreciation and dividends. Since 2007, they have provided an annualized return of 8.52% compared to 8.81% for the S&P 500 with less volatility and drawdown.

WHY TRADE ETFS?

aggressive investors, there are three Metric ranking was 89% (100% is ETF Name Ticker Symbol leveraged ETFs not evaluated here: the highest). All these measurements Utilities Select Sector SPDR Fund XLU UPW and SDO from ProShares, and are proprietary measures of XTF. Vanguard Utilities ETF VPU UTSL from Direxion. Information com and are explained in detail on iShares U.S. Utilities ETF IDU about these ETFs can be found on their website. Fidelity MSCI Utilities Index ETF FUTY their sponsors’ websites. XLU’s annualized one-year return First Turst Utilities AlphaDEX Fund FXU The common characteristics of the of 4.9% and its similar three-year Invesco 500 Equal Weigh Utilities ETF RYU ETFs reviewed here are that they are return of 7.82% were the highest of all open-end investment companies, the group. Incoming fund flows over Invesco DWA Utilities Momentum ETF PUI listed on NYSE Arca (except for PUI, FIGURE 1: UTILITY ETFS. The five largest ETFs in the the past year were an amazing $3.37 which lists on the Nasdaq), equity only, utility category are shown with their tickers. Note that Invesco billion, clearly at least ten times larger mostly large-cap or broad multi-cap, sponsors two of them. than its nearest competitor, Vanguard style of core or blend, cap-weighted Utilities ETF. About 78% of its capi(except for FXU, which is weighted based on various funda- talization was large-cap with 22% mid-cap. Electric utilities mentals, and RYU, which is equally weighted), and passively accounted for 60% of its industry exposure with multi-utilities managed (except for FXU and RYU, which use an enhanced coming in second at 32%. This ETF is the only one of the strategy that will be explained shortly). The standard deviation group to offer both options and futures. over three years for all these ETFs was right around 23% with only FXU at 22%. Figure 2 provides the comparative data I’ll Vanguard Utilities ETF (VPU) discuss here in more detail. This Vanguard ETF came into existence on January 30, 2004, five years after XLU, and has been able to capture $3 billion Utilities Select Sector SPDR Fund (XLU) in AUM, which far exceeds that of IDU with a 3.5-year lead This ETF, issued by SSGA Funds Management, Inc., was the in June 2000. No doubt the Vanguard reputation and lowest first one in this category with a December 16, 1998 inception expense ratio of 0.10% played a big role in its asset growth. date. Therefore, it has the longest track record of almost 22 Its annual dividend yield of 3.06% is third best of the group. years, and has garnered a huge $12 billion in AUM. Based Companies in its portfolio include similar ones to XLU, but on its early entry and huge presence, it is the behemoth of also include those that are power producers and distributors, the group by far. This ETF is one of eleven Sector SPDRs as well as nuclear and nonnuclear facilities. Its average daily and comprises the utility companies in the S&P 500 Index. trading volume of 265,000 is fourth best of the group. They include companies such as electric and gas utilities, The portfolio holds 67 positions, the largest of the group. multi-utilities, independent power producers, and energy The top five holdings account for 37.5% of the assets: NEE, D, traders. XLU has a 99.9% correlation with FUTY and VPU, DUK, SO, and AEP. This ETF’s XTF rating is a solid 9.8 out and 99.8% with IDU and 99.7% with RYU. These four ETFs of 10, and its Structural Integrity rank of 97% is the highest are basically clones, as the all have similar if not exact top- of the group. Lastly, its Investment Metric was 81%, placing five holdings. it at a tie for second lowest of the category. Its expense ratio of 0.13% is in the lowest third of its VPU’s annualized one-year return is a disappointing 2.86%, competitors, and its annual dividend yield is Category XLU VPU IDU FUTY FXU RYU PUI the highest at 3.31%. XTF Rating 9.9 9.8 9.3 9.7 8.8 9.6 7.7 The average daily tradInvestment Metric Rank 89% 81% 81% 82% 87% 88% 64% ing volume of nearly 20 Structural Integrity Rank 95% 97% 85% 95% 74% 87% 71% million shares dwarfed Market Cap $12B $3B $889M $805M $792M $312M $82M its competitors, whose Expense Ratio 0.13% 0.10% 0.43% 0.08% 0.63% 0.40% 0.60% numbers ranged between 32,000 to 314,000. The Annual Dividend Yield 3.31% 3.06% 3% 3.22% 2.65% 2.87% 2.5% portfolio holds 28 posiAvg. Daily Volume 19,959,195 265,880 93,079 266,035 314,615 32,187 72,207 tions with the top five Avg. # of Components 28 67 48 65 35 28 35 accounting for 28.5% of Inception Date 12/16/1998 01/30/2004 06/20/2000 10/21/2013 05/08/2007 11/07/2006 10/26/2005 the assets: NEE, D, DUK, Annualized Period Return 1 Year 4.9% 2.86% 2.48% 2.79% -2.31% 1.25% -0.65% SO, and AEP. This ETF’s Annualized Period Return 3 Years 7.82% 7.55% 7% 7.49% 1.91% 6.62% 6.14% XTF rating is 9.9 out of Net Asset Flows - 1 Year $3.37B $364.66M $157.91M $217.78M $-27.56M $-2.50M $-136.75M 10 (10 is the highest), and Net Asset Flows - 3 Years $4.14B $1.17B $87.16M $511.40M $-515.57M $122.33M $-68.63M its Structural Integrity rank is a very high 95% Standard Deviation 3 Years 23.33% 23.34% 22.94% 23.14% 21.62% 23.33% 23.5% (100% is the highest). FIGURE 2: COMPARISON OF UTILITY ETFS. Critical comparative data is shown for each ETF. They are arrayed in AUM magLastly, its Investment nitude from left to right. July 2020

• Technical Analysis of Stocks & Commodities • 41

Utilities have a long history of dividend payments and are sought after by investors as a portfolio component when the economic and stock market conditions soften. but it was second best, and its three-year return of 7.55% was also second best. Incoming fund flows over the past year were a solid $364 million, and $1.17 billion over three years, the second best. About 69% of its capitalization was large-cap, 21% mid-cap, and 10% small-cap. Electric utilities accounted for 56% of its industry exposure with multi-utilities coming in second at 30%., and natural gas utilities at 5%. This ETF offers just options, no futures. VPU has a 99.9% correlation to FUTY, XLU, and IDU with 99.6% to RYU. iShares U.S. Utilities ETF (IDU) Black Rock Inc. is this fund’s issuer with an inception date of June 20, 2000, the second oldest of the category. Its AUM of $889 million is third best, but well under the top two by a wide margin. With a start date two decades ago, its asset size would probably have been much larger if Vanguard had not entered the arena four years later. IDU is reconstituted quarterly and currently holds 48 positions. Its annual expense ratio of 0.43% is at least three times higher than its top two rivals, and is the third highest of the group. Its annual dividend yield of 3.00% placed it dead center of the competitors. The average daily trading volume of 93,000 shares is dwarfed by its competitors and places it fifth out of seven. The portfolio holds 48 positions with the top five accounting for 38.6% of the assets: NEE, D, DUK, SO, AEP. This ETF’s XTF rating of 9.3 is very good, and its Structural Integrity rank of 85% ranks it third lowest. Lastly, its Investment Metric ranking was 81%, equal to VPU, but in the lower third of the group. IDU’s annualized one-year return is a measly 2.48%, and its three-year return of 7% were both right in the middle of the group. Incoming fund flows over the past year were a solid $157 million, and $87 million over three years, fifth best. About 71% of its capitalization was large-cap, 22% mid-cap, and 7% small-cap. Electric utilities accounted for 57% of its industry exposure with multi-utilities coming in second at 30%, and natural gas utilities at 5%. This ETF offers options, but not futures. Fidelity MSCI Utilities Index (FUTY) Fidelity Management & Research is this fund’s issuer with an inception date of October 21, 2013, the latest large firm to 42 • July 2020 • Technical Analysis of Stocks & Commodities

enter the category. Its AUM of $805 million is fourth best, but a very good performance considering the late entry to the ETF arena in general, especially compared to Vanguard, which beat them to the punch over nine years earlier. The quality and recognition by investors of the “Fidelity” brand name definitely played an important role in rapid asset generation, impressive yearly inflows and better-than-average trading volume in the category. Its annual dividend yield of 3.22% placed it second in the rankings. The average daily trading volume of 266,000 shares is second highest of its competitors. The larger-than -average utility portfolio holds 65 positions with the top five accounting for 37.5% of the assets: NEE, D, DUK, SO, AEP. This ETF’s XTF rating of 9.7 is very good and third highest, and its Structural Integrity rank of 95% ranks in the top two. Lastly, its Investment Metric ranking was 82%, placing it in the middle of the group. IDU’s annualized one-year return is a minimal 2.79% and its three-year return of 7.49% were both right in the middle of the group. Incoming fund flows over the past year were a solid $218 million, and $511 million over three years, third best. About 69% of its capitalization was large-cap, 21% mid-cap, and 9% small-cap. Electric utilities accounted for 56% of its industry exposure with multi-utilities coming in second at 30%, and natural gas utilities at 5%. This ETF offers neither options nor futures. First Trust Utilities AlphaDEX Fund (FXU) First Trust Advisors LP is this fund’s sponsor with an inception date of May 8, 2007. Its AUM of $792 million places it fifth. This ETF uses an enhanced index approach, which uses the AlpaDEX stock selection methodology to pick stocks from the Russell 1000 Index. The stocks are ranked using their performance ranking over 3-, 6-, and 12-months, their sales to price and one-year sales growth, and finally, based on value factors including book value to price and cash flow to price. The stocks receiving the highest scores are selected for inclusion in the portfolio. Based on this highly fine-tuned multistep investment process, one would assume that this firm had found a methodology that would work well, and at least keep up with the performance of the more traditional cap-weighted competition. Unfortunately, that is not the case, as it actually had the worst one-year annualized performance of -2.31%, and the worst three-year performance of 1.91%. Moreover, for this poor performance, First Trust charges a 0.63% annual expense ratio, the highest of its competitors. Also, its annual dividend yield of 2.65% is next to the lowest. Interestingly, its average daily trading volume of 315,000 shares is second best, eclipsing that of VPU and FUTY by about 50,000 shares a day. The portfolio holds 35 positions with the top five accounting for 22.8% of the assets: NRG, VST, UGI, NFG, and CNP. None of these positions matches that of its competitors, which is not surprising based upon their selection filters. This ETF’s XTF rating is 8.8 and its Structural Integrity rank of 74% ranks it next to last. Lastly,

its Investment Metric ranking of 87% was very close to the top two in the group. Instead of receiving incoming fund flows, FXU has experienced outflows of $515 million over three years and $28 million over the past year, the worst three-year record of all. About 39% of its capitalization was large-cap, 39% mid-cap, and 19% small-cap. This allocation was much different than its competitors, especially the high percentage of small-caps. That probably accounts for some of its weak performance, as the small-caps have been market laggards. Electric utilities accounted for 43% of its industry exposure with multi-utilities coming in second at 23%, alternative and renewable energy at 11%, and natural gas utilities at 5%. This ETF offers options, but not futures. Invesco S&P 500 Equal Weight Utilities ETF (RYU) Equal-weight ETFs are common and RYU is the only one in this grouping from Invesco Capital Management LLC. This ETF’s goal is to replicate the performance of the S&P 500 Equal Weight Telecommunications Services and Utilities Index. Since its inception date of November 7, 2006, it has been able to gather AUM of $312 million, second from the bottom of the group, but a decent showing. Its annual expense ratio of 0.40% is in the mid-range. Its annual dividend yield of 2.87% places it just below the middle of the pack. The average daily trading volume of 32,000 shares is dwarfed by its competitors and places it in last place. The portfolio holds 28 positions matching XLU as the smallest portfolio size. The top five holdings account for 19.5% of the assets: NRG, AES, CNP, SRE and DTE. This ETF’s XTF rating of 9.6 is very good, and its Structural Integrity rank of 87% is mid-range. Lastly, its Investment Metric ranking of 88% is second best. IDU’s annualized one-year return is lower than average at 1.25%, with its three-year return of 6.62% about one percentage point below its competitors. On the negative side are the outflows over the past year of -$2.5 million, but on the

positive side, the three-year flows were $122.3 million. About 56% of its capitalization was large-cap, and 44% mid-cap. Electric utilities accounted for 47% of its industry exposure with multi-utilities coming in second at 36%, and alternative and renewable energy at 6%. This ETF offers neither options nor futures. Invesco DWA Utilities Momentum ETF (PUI) Invesco is also the sponsor of its second ETF in this category with an inception date of October 26, 2005—about one year earlier than RYU was brought to market. Its low AUM of $82 million brings it in at dead last. Being available for 14.5 years, its asset base is not impressive. This ETF uses the Dorsey Wright selection approach, which uses point & figure charting, as well as relative strength analysis and ranking to determine the strongest performers to place in the portfolio. This ETF is rebalanced and reconstituted quarterly. Its annual expense ratio of 0.60% is the second highest. The annual dividend yield of 2.50% is the lowest offered in the category. The average daily trading volume of 72,000 shares is second lowest, which makes both Invesco ETFs the least transacted in the group. The portfolio holds 35 positions with the top five accounting for 21.2% of the assets: NEE, WEC, XEL, SO, and ETR. This ETF’s low XTF rating of 7.7 coupled with its low Structural Integrity rank of 71% result in the weakest performance of all. Moreover, its Investment Metric ranking of 64% was at the bottom of the rankings. Overall, the XTF scores are way below average for the utility category. With all its high-powered momentum and ranking criteria, its one-year negative return of -0.65% was very disappointing. Moreover, its three-year return of 6.14% placed it next to last. Another big letdown was the negative $137 million in cash outflows over the past year, and $69 million outflows over three years, the worst one-year and second-worst three-year performance. About 37% of its capitalization was large-cap, 35% mid-cap, and 24% small-cap. The small-cap underperformance also was disappointing. Electric utilities accounted

FIGURE 3: ETF PRICE PERFORMANCE SINCE MAY 10, 2007. This chart excludes FUTY since it only debuted in October 2013. Vanguard Utilities had the highest return, but the S&P 500 index surpassed it by 39 percentage points. July 2020

• Technical Analysis of Stocks & Commodities • 43

Investors should realize that even utilities are not shielded from price declines in bear markets.

for 40% of its industry exposure with multi-utilities coming in second at 25%, and natural gas and water utilities at 5% each. This ETF offers neither options nor futures.

Comparison of price performance

Performance-wise, you’d expect the long-term numbers to be quite similar for ETFs with highly correlated assets. That is exactly the case, as illustrated in Figure 3. The top performer was VPU with 118% total return for the 13-year period, followed closely by RYU at 116%, then XLU and IDU at 112%. Trailing the pack were PUI at 105% and FXU at 92%. Interestingly, these latter two ETFs had custom weightings, as explained earlier, but had the worst performance. Not a good showing. One popular time-tested strategy is “sell in May and go away,” also known as the best six months strategy, which invests from November 1 through April 30 and remains in cash for the other six months. Using XLU as the investment vehicle, as representative of the utility space, and comparing it to the SPY resulted in a return of -10.9% for XLU for the period November 1, 2019 through April 30, 2020 compared to -4.2% for the SPY. So the SPY held up better, as growth stocks beat defensive issues like utilities. Of course, this is only the most recent result of this strategy and a backtest going back at least 50 years is necessary to obtain more reliable results, assuming there is sufficient data available. Looking at performance another way, we can compare the performance of the Select SPDRs over the 2011 through 2019 period. If we ranked each of the 10 S&P sectors from best to worst performer in each calendar year, we would find that XLU was the top performer in 2011 and 2014 and second best in 2018. On the other hand, it was the bottom performer in 2009, 2012, and 2013. In 2015 and 2017 it was third from the bottom, and in 2010 it was next to last. So overall, utilities have not been a very good performer compared to the benchmark S&P 500.

Conclusion

Based on a review of the data presented on seven utility ETFs, the clear winner is XLU with the most AUM, highest dividend yield, best overall price performance numbers for one and three years, second-lowest annual expense ratio, largest daily trading volume approaching 20 million shares, highest cash inflows, options and futures trading, and last but not least, the highest ratings in three proprietary xtf.com categories. 44 • July 2020 • Technical Analysis of Stocks & Commodities

Although Blackrock’s IDU came out only 1.5 years later than XLU, it has not been able to come close to matching its rival’s outstanding overall performance in the data attributes just delineated. Vanguard’s VPU has overpowered IDU starting 3 and one-half years later in all the attributes as well. Although Fidelity was a late entrant into the ETF world overall, it has been able to amass a decent AUM since its inception in late 2013. Invesco Capital Management has placed two ETFs in this category. RYU is an equally-weighted portfolio that came to market on November 7, 2006, and PUI is a momentum-based ETF that was introduced about one year earlier. Why Invesco decided to offer two ETFs in this heavily populated category with the big behemoths grabbing most of the AUM born earlier is hard to understand in retrospect. And to top it off, the poor relative performance and asset outflows make matters even worse. One concerning negative common characteristic of FXU, RYU, and PUI is their cash outflows for the past one and three years. This is not a good sign going forward, as their competition is picking up hundreds of millions of dollars in this category. With the recent coronavirus pandemic, investors are concerned about the possible reduction of power usage by commercial and industrial firms, which could result in reduced forward earnings for utility companies. Moreover, individuals who are not working and those on unemployment will be late payers or non-payers, which is another revenue concern. Utilities may have to request rate increases in the future to make up for the shortfalls in the near term, but regulars may not be sympathetic. So, with possible delinquencies building as time moves forward, investors need to take this revenue shortfall into account that could not only negatively impact the stock prices, but also the safety of future dividend payments. Are you interested in learning more about using exchange traded funds (ETFs) in your trading? Leslie N. Masonson, who actively trades ETFs daily, is president of Cash Management Resources, a financial consulting firm that focuses on ETF strategies. He is the author of Buy—Don’t Hold: Investing With ETFs Using Relative Strength To Increase Returns With Less Risk; and All About Market Timing, as well as Day Trading On The Edge. His website is buydonthold.com, where he writes a monthly blog. To submit topics for future columns, reach him at [email protected].

Resources

• www.direxion.com • www.fidelity.com • www.invesco.com • www.ishares.com • www.proshares.com • www.ssga.com • vanguard.com • xtf.com

POSTER/SCALING LAWS Continued from page 28

FurTher reading

Poster, Richard [2020]. “Using Scaling Laws For The Development Of FX Trading Models,” Technical Analysis of StockS & commoditieS, Volume 38: February. Müller UA, Dacorogna MM, Olsen RB, Pictet OV, SchwarzM, Morgenegg C. Statistical study of foreign exchange rates, empirical evidence of a price change scaling law, and intraday analysis. J Bank Finance 1990;14:1189.

VAN EYDEN/CHASE OF VOLATILITY Continued from page 39

volatility, the trader ends up with a larger stop (risk) with less potential (reward). That makes it a trade motivated by emotion, rather than by a sound reward-to-risk ratio as determined by the trading plan. Traders should not trade the “long bar” entry. Emotional traders tend to make this trade because FOMO drives them to do it. It is a costly emotional entry, which can be prevented!

The anti-FOMO checklist

Here are some things to remember to help prevent the placing of an emotionally driven trade: • Stick to a trading plan. The trader needs to meet the trading plan requirements consistently with no secondguessing. • Trading is a long-term game. Trading is about the next series of trades and not just about a single trade; the market will provide other opportunities.

• Knowledge of the markets is essential. Every trader should study and understand the markets and do their analysis to make informed trades. The market is always right; a trader should never have an opinion. The market rewards a disciplined trader. • Take stock with a critical self-analysis. If you are suffering from anxiety, depression, irritation, or self-doubt, then don’t trade!

• Interact with a mentor or coach. Coaches or mentors should hold the trader accountable to the process rather than to the outcome.

• The use of nudges. Nudges help the trader to put themselves in high-probability situations to succeed, thus ignoring FOMO. Nobel Prize-winning economist Richard Thaler and his co-author introduced the concept of “nudge” a few years ago. In essence, a nudge is a checklist. The checklist should be automatically followed to ensure that the best outcome is achieved every time, in order to override human tendencies. Similar to the way a pilot reviews a checklist before takeoff,

Guillaume DM, Dacorogna MM, Davé RD, Müller UA, Olsen RB, Pictet OV. From the bird’s eye to the microscope: a survey of new stylized facts of the intra-daily foreign exchange markets. Finance Stoch 1997;1:95. Glattfelder JB, Dupuis A, Olsen RB [2010]. Patterns In HighFrequency FX Data: Discovery Of 12 Empirical Scaling Laws. Quant Finance; 11:599. Reprinted by permission of the publisher (Taylor & Francis) at www.tandfonline.

a checklist should never be rushed. Pilots review their checklists carefully and systematically, which ensures safety. A trader’s “nudge” is their trading plan, and it also should never be rushed.

Applying the Ulysses principle, learn to ignore (or manage): • social media noise • news

• human tendencies.

Conclusion

While volatility is simply the rate of change in price, the fact is, volatility can be small at times or large—and this is normal. Traders should not chase volatility if it is counter to their trading plan. The correct course of action may be to take no action. Behavioral biases are a part of human nature, such as FOMO. There is no avoiding them. However, with awareness and strategy, there is a way to navigate them. Bringing back Ulysses again, a trader should only discard the beeswax and the rope once a valid trading signal is generated by the system, a signal that is aligned to the trading plan. Without a recognizable trading signal, there is no way for a trader to
justify a position, short or long. Robert J. Van Eyden, PhD, is CEO of a stockbroking and portfolio management business. He is the author of The Money Fountain (2013). He may be reached at rvaneyden@ icloud.com.

Further reading

Herman, Dan [2000]. “Introducing Short-Term Brands: A New Branding Tool For A New Consumer Reality,” Journal of Brand Management, 7 (5):. DOI:10.1057/bm.2000.23. Lauren Foster, quoting Greg Davies, https://blogs.cfainstitute.org/ investor/2012/02/17/avoiding-the-siren-song-of-emotions-notesfrom-the-wealth-management-conference/#.T0AHtponJKY. wordpress Thaler, Richard H., & Cass R. Sunstein [ 2008]. Nudge: Improving Decisions About Health, Wealth, And Happiness, Caravan Books. Van Eyden, Robert J. [2013]. The Money Fountain.

July 2020

• Technical Analysis of Stocks tockS & C commodities ommoditieS • 45

Explore Your Options Got a question about options? Jay Kaeppel has over three decades of experience in the options markets. He was a head trader for a CTA firm, an options trading software developer, and is a portfolio manager for an investment management firm. He also spent several years writing a weekly column titled “Kaeppel’s Corner” and now publishes a blog, “Jay On The Markets” (http:// jayonthemarkets.com). He is the author of several books, including The Four Biggest Mistakes In Option Trading; The Option Trader’s Guide To Probability, Volatility, And Timing; and Seasonal Stock Market Trends. Send your questions or topic suggestions to Jay Kaeppel at [email protected]. Selected questions will appear in a future issue of S&C. TLT recently experienced an explosive advance and has since been consolidating without making a new high. Trader A does not expect a long-term upside reversal in interest rates (which would likely result in a decline in the price of TLT) anytime soon, but is concerned that TLT may have hit resistance and is due for a reasonably sized pullback sometime in the next several weeks. Since Trader A does not want to sell his shares of TLT and incur a taxable event, he or she might consider a collar. For the sake of example, we will assume that with TLT trading at $170.84 a share,

FIGURE 1: TLT COLLAR POSITION DETAILS

• Holding shares of stock • Selling a call option • Buying a put option With a collar, you sell a call option (typically out-of-the-money, although that is not a requirement) and then use the proceeds to pay for some (or in some cases, all) of the put premium. As always, the best way to illustrate is with an example. Ticker TLT In this example trade, Trader A holds 100 shares of ticker TLT, an ETF that tracks the long-term treasury bond.

Trader A: • Sells 1 190 call with 56 days left until expiration for $1.44 • Buys 1 170 put with 56 days left until expiration for $5.58 To enter this position, Trader A must pay the difference between the two options, or $558 minus $144, or $414. The particulars for this collar position appear in Figure 1 and the risk curves through expiration appear in Figure 2. As with most things in life, with a collar there is no “free lunch.” The good news

OPTIONSANALYSIS.COM

HEDGING INDIVIDUAL STOCK POSITIONS I have certain stock holdings that I would prefer not to sell—either for tax reasons or simply because I think they will do well over time. However, I am extremely nervous about the prospects for the overall stock market in the months ahead. I’ve never had much success with trying to hedge an overall portfolio. So, is there a way to hedge the positions I am most concerned about on a positionby-position basis? Of course. One approach is simply to buy a put option. If the stock declines by enough, the put option can offset part of the loss on the stock position. However, this can get expensive over time, since you have to pay cash to buy the puts. An alternative is a commonly used strategy referred to as a “collar.” A collar can be especially useful if you simply think that a stock that you hold is in a longer-term uptrend but is due for a reasonable price pullback in the near term. A collar involves:

Jay Kaeppel

FIGURE 2: TLT COLLAR POSITION RISK CURVES

46 • July 2020 • Technical Analysis of Stocks & Commodities

Explore Your Options is that the maximum possible risk for this position through option expiration is -$498. So, if TLT does in fact experience a pullback in the weeks ahead, Trader A cannot lose more than that amount as long as the collar is in place, no matter how far the price of TLT may fall. The bad news is that upside potential is capped as long as the collar is in place. In this case, the maximum upside potential is +$1,502. Some thoughts on trade management There are a number of things that can happen after a trader enters a collar, and there are a number of potential responses to any situation. One possibility is simply to hold the collar until expiration. In this case there will be one of three outcomes:

Considerations in choosing the options to use in a collar There are many possible call/put/month combinations to consider for most stocks. In general, there are two basic approaches: • One approach focuses on having the call option sold pay for most or all of the put option purchased. The advantage to this approach is obviously that the call and put portion of the collar is entered at little or no additional cost to the trader. The downside is that this can leave the trader with a 50/50 (or worse) upside reward to downside risk equation. Unlike the example trade shown here with about a 3-to-1 reward-to-risk ratio, picture a trade with upside reward of say +$300 and downside risk of -$300. The trader puts up less (or possibly no) cash to enter the collar and has less downside risk (-$300 versus -$498 in our example trade), however, he or she also has very little profit potential as long as the collar is in place. • The other approach focuses on maintaining more upside potential (as in our example trade). This approach typically (though not always) requires the trader to pay more for the long put than he or she receives for the short call—that is, there is additional cost to enter the collar. However, if the trader wants to maintain decent upside potential and a favorable reward-to-risk ratio, this is often necessary.

• If TLT is above $190 a share, one possibility for Trader A is to let the call option be exercised, in which case the 100 shares of TLT will be called away at $190 a share. The 170 put option will expire worthless and the net profit from the time the collar was entered will be +$1,502. • If TLT is below $170 a share, one possibility for Trader A is to exercise the put option and sell the 100 shares of TLT at $170 a share. The 190 call option will expire worthless and the net loss from the time the collar was entered will be -$498. • If TLT is between $170 and $190 a share, both the call and the put will expire worthless and the profit or loss will depend on the price of TLT shares at the time of expiration. In addition, Trader A would need to decide whether to enter a new collar or to simply revert to holding shares of TLT unhedged.

Things to consider regarding a collar • In a standard collar, the investor will sell 1 call and buy 1 put for every 100 shares of stock held

Prior to option expiration, Trader A can at any time exit either or both parts of the collar. For example, if the price of TLT declines—thus causing the price of the short call to decline—the trader can buy back the short call and continue on with what is essentially a “married put” position, that is, long stock shares and long a protective put option.

A 100 shares × 1 call × 1 put ratio is not mandatory. For example, if you hold 500 shares of stock, you can buy 5 puts and sell only 4 calls, for example. The tradeoff is this: The fewer calls you sell, the less premium you take in and the higher the net cost of entry. One reason for selling fewer calls would be to avoid capping your upside potential. July 2020

• A key question is, “How long do you want to hold the collar?” Obviously, a collar can simply be held until option expiration. However, in many cases, an investor enters a collar in anticipation of a period of potential risks, such as prior to a crucial earnings announcement, after a sharp, unexpected advance starts to lose steam, and so on. Once that period passes, the investor may choose to lift the collar (that is, sell the put and buy back the call) and return to a long stock position. • It can make sense to lift one side of the collar If the underlying stock declines in price, the long puts will limit the amount of loss. If in the meantime, the price of the call option falls significantly, the investor may choose to buy back the calls if he or she can do so at a much lower price than where they were sold. For example, in our TLT trade example, if TLT shares fall in price and the call option declines from $1.44 to, say, $0.40, the investor might consider buying back the call, which turns the trade back into an unlimited profit potential position.

YOUR ONLINE RESOURCE FOR TECHNICAL ANALYSIS Join us on Facebook at www.facebook.com/ STOCKSandCOMMODITIES Follow us on Twitter @STOCKSandCOMM

• Technical Analysis of Stocks & Commodities • 47

The focus of Traders’ Tips this month is John Ehlers’ article in this issue, “Truncated Indicators.” Here, we present the July 2020 Traders’ Tips code with possible implementations in various software. The code for the following Traders’ Tips selections is posted here: • Traders.com → S&C Magazine → Traders’ Tips

F TRADESTATION: JULY 2020 TRADERS’ TIPS CODE In his article “Truncated Indicators” in this issue, author John Ehlers introduces a method that can be used to modify some indicators, improving how accurately they are able to track and respond to price action. By limiting the data range, that is, truncating the data, indicators may be able to better handle extreme price events. A reasonable goal, especially during times of high volatility. Here, we are providing TradeStation EasyLanguage code for both an indicator and strategy based on the author’s work. Indicator: Truncated BP Filter // Truncated BP Filter // John F. Ehlers // TASC JUL 2020 inputs: Period( 20 ), Bandwidth( .1 ), Length( 10 ) ; variables: L1( 0 ), G1( 0 ), S1( 0 ), count( 0 ), BP( 0 ), BPT( 0 ) ; arrays: Trunc[100]( 0 ) ;

At Traders.com you can also rightclick on any chart to open it in a new tab or window and view the chart at a much larger size. The Traders’ Tips section is provided to help readers implement a selected technique from an article in this issue or another recent issue. The entries here are contributed by software developers or programmers for software that is capable of customization.

+ L1 * ( 1 + S1 ) * Trunc[count + 1] - S1 * Trunc[count + 2] ; end ; BPT = Trunc[1]; //convert to a variable Plot1(BP, "BP Filt" ) ; Plot2( BPT, "Trunc BP Filt") ; Plot4( 0, "ZL" ) ; Strategy: Truncated BP Filter // Truncated BP Filter // John F. Ehlers // TASC JUL 2020 inputs: Period( 20 ), Bandwidth( .1 ), Length( 10 ) ; variables: L1( 0 ), G1( 0 ), S1( 0 ), count( 0 ), BP( 0 ), BPT( 0 ) ; arrays: Trunc[100]( 0 ) ; //Standard Bandpass L1 = Cosine( 360 / Period ) ; G1 = Cosine( Bandwidth * 360 / Period ) ; S1 = 1 / G1 - SquareRoot( 1 / ( G1 * G1 ) - 1 ) ; BP = .5 * ( 1 - S1 ) * ( Close - Close[2] )

//Standard Bandpass L1 = Cosine( 360 / Period ) ; G1 = Cosine( Bandwidth * 360 / Period ) ; S1 = 1 / G1 - SquareRoot( 1 / ( G1 * G1 ) - 1 ) ; BP = .5 * ( 1 - S1 ) * ( Close - Close[2] ) + L1 * ( 1 + S1 ) * BP[1] - S1 * BP[2] ; If CurrentBar <= 3 then BP = 0 ; //Stack the Trunc Array for Count = 100 downto 2 begin Trunc[count] = Trunc[count - 1] ; end ; //Truncated Bandpass Trunc[Length + 2] = 0 ; Trunc[Length + 1] = 0 ; for count = Length downto 1 begin Trunc[count] = .5 * ( 1 - S1 ) * ( Close[count - 1] - Close[count + 1] )

48 • July 2020 • Technical Analysis of Stocks & Commodities

FIGURE 1: TRADESTATION. The truncated bandpass filter indicator and strategy are applied to a daily chart of the SPY ETF.



+ L1 * ( 1 + S1 ) * BP[1] - S1 * BP[2] ;

If CurrentBar <= 3 then BP = 0 ; //Stack the Trunc Array for Count = 100 downto 2 begin Trunc[count] = Trunc[count - 1] ; end ; //Truncated Bandpass Trunc[Length + 2] = 0 ; Trunc[Length + 1] = 0 ; for count = Length downto 1 begin Trunc[count] = .5 * ( 1 - S1 ) * ( Close[count - 1] - Close[count + 1] ) + L1 * ( 1 + S1 ) * Trunc[count + 1] - S1 * Trunc[count + 2] ; end ;

FIGURE 2: WEALTH-LAB. Here is an example of creating a rule-based strategy with the truncated bandpass in Wealth-Lab.

BPT = Trunc[1]; //convert to a variable if BPT crosses over 0 then Buy next bar at Market else if BPT crosses under 0 Then SellShort next bar at Market ;

To download the EasyLanguage code, please visit our TradeStation and EasyLanguage support forum. The files for this article can be found here: https://community.tradestation.com/Discussions/Topic.aspx?Topic_ID=168100. The filename is “TASC_JUL2020.ZIP.” For more information about EasyLanguage in general, please see http://www.tradestation.com/EL-FAQ. A sample chart is shown in Figure 1.

This article is for informational purposes. No type of trading or investment recommendation, advice, or strategy is being made, given, or in any manner provided by TradeStation Securities or its affiliates. —Doug McCrary TradeStation Securities, Inc. www.TradeStation.com

F WEALTH-LAB: JULY 2020 TRADERS’ TIPS CODE In his article in this issue, “Truncated Indicators,” author John Ehlers shows how to improve a bandpass filter’s ability to reflect price by limiting the data range. Filtering out the temporary spikes and price extremes should positively affect the indicator stability. Enter a new indicator—the TruncatedBandPass filter. Despite the math behind it may not appear as easy to some, Wealth-Lab proves that prototyping a trading system should not be a complex task. In fact, our strategy from rules feature makes it possible for everyone to achieve without having to invest much effort. For example, crossovers of the truncated bandpass with zero could indicate a trend change. Let’s see if the idea has merit:

FIGURE 3: WEALTH-LAB. The example trading system is applied to a daily chart of TQQQ. (Data provided by AlphaVantage)

Step 1. Install (or update) the TASCIndicators library to its most-recent version from our website or using the built-in Extension Manager. Step 2. Add an entry and exit block, then drag and drop “Indicator crosses above (below) value” from general indicators under the conditions tab on top of each one (respectively). Step 3. For each entry and exit, choose the TruncatedBandPass as Indicator and zero as the value to cross where prompted. Figure 2 shows an example of creating a rules-based strategy in Wealth-Lab. A quick test shows we’re onto something, and with some more tweaking, we may be able to make a trading system out of it, as we’ve done in Figure 3. Whether you’ve prototyped the trading system code using our strategy from rules feature described above or whether you’ve downloaded the code from Wealth-Lab (hit Ctrl-O and choose download...), to peek into the code behind it, simply click “Open code in new strategy window.” Wealth-Lab strategy code (C#): using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; July 2020

• Technical Analysis of Stocks & Commodities • 49

using WealthLab.Indicators; using TASCIndicators; namespace WealthLab.Strategies { public class TASC2020_07 : WealthScript { protected override void Execute() { var tbp = TruncatedBandPass.Series(Close, 20, 0.10, 10); HideVolume(); ChartPane pane1 = CreatePane( 25,true,true); PlotSeries( pane1,tbp,Color.MidnightBlue,LineStyle. Solid,1); for(int bar = GetTradingLoopStartBar( 21); bar < Bars. Count; bar++) { if (IsLastPositionActive) { Position p = LastPosition; if (CrossUnder(bar, tbp, 0)) SellAtMarket( bar + 1, p); } else { if (CrossOver(bar, tbp, 0)) BuyAtMarket( bar + 1); } } } } }

—Robert Sucher & Gene (Eugene) Geren, Wealth-Lab team MS123, LLC www.wealth-lab.com

F ESIGNAL: JULY 2020 TRADERS’ TIPS CODE For this month’s Traders’ Tip, we’ve provided the study “TruncatedIndicators.efs” based on the article in this issue by John Ehlers, “Truncated Indicators.” The study is designed to improve cycle indicators by introducing truncation. The study contains formula parameters that may be configured through the edit chart window (right-click on the chart and select “edit chart”). A sample chart is shown in Figure 4. To discuss this study or download a complete copy of the formula code, please visit the EFS Library Discussion Board forum under the forums link from the support menu at www. esignal.com or visit our EFS KnowledgeBase at http://www. esignal.com/support/kb/efs/. /********************************** Provided By: Copyright 2019 Intercontinental Exchange, Inc. All Rights Reserved. eSignal is a service mark and/or a registered service mark of Intercontinental Exchange, Inc. in the United States and/or other countries. This sample eSignal Formula Script (EFS) is for educational purposes only. Intercontinental Exchange, Inc. reserves the right to modify and overwrite this EFS file with each new release.

50 • July 2020 • Technical Analysis of Stocks & Commodities

Description: Truncated Indicators by John F. Ehlers Version:

1.00 05/13/2020

Formula Parameters: Period Length Bandwidth

20 10 0.1

Default:

Notes: The related article is copyrighted material. If you are not a subscriber of Stocks & Commodities, please visit www.traders.com. **********************************/ var fpArray = new Array(); var bInit = false; function preMain() { setStudyTitle("Bandpass and Truncated"); setCursorLabelName("Standard", 0); setCursorLabelName("Truncated", 1); setPriceStudy(false); setDefaultBarFgColor(Color.RGB(0x00,0x94,0xFF), 0); setDefaultBarFgColor(Color.RGB(0xFE,0x69,0x00), 1); setPlotType( PLOTTYPE_LINE , 0 ); setPlotType( PLOTTYPE_LINE , 1 ); addBand( 0, PLOTTYPE_DOT, 1, Color.grey); var x=0; fpArray[x] = new FunctionParameter("Period", FunctionParameter.NUMBER); with(fpArray[x++]){ setLowerLimit(1); setDefault(20); } fpArray[x] = new FunctionParameter("Length", FunctionParameter.NUMBER); with(fpArray[x++]){ setLowerLimit(1); setUpperLimit(98); setDefault(10); } fpArray[x] = new FunctionParameter("Bandwidth", FunctionParameter.NUMBER); with(fpArray[x++]){ setLowerLimit(0); setDefault(.1); } } var bVersion = null; var L1 = null;

FIGURE 4: ESIGNAL. Here is an example of the study plotted on a daily chart of the SPY.

var G1 = null; var S1 = null; var BP = null; var BP_1 = null; var BP_2 = null; var BPT = null; var Trunc = []; var xClose = null;

The eSignal formula script (EFS) is also available for copying & pasting from the Stocks & Commodities magazine website at Traders.com in the Traders’ Tips section.

—Eric Lippert eSignal, an Interactive Data company 800 779-6555, www.eSignal.com

function main(Period,Length,Bandwidth) { if (bVersion == null) bVersion = verify(); if (bVersion == false) return; if ( bInit == false ) { L1 = Math.cos(2 * Math.PI / Period) G1 = Math.cos(Bandwidth * 2 * Math.PI / Period) S1 = 1 / G1 - Math.sqrt(1 / (G1*G1) - 1) xClose = close(); BP_1 = 0; BP = 0; for (var i = 0; i <= 100; i++){ Trunc[i] = 0 } }

bInit = true;

if (getCurrentBarCount() <= Length) return; if (getBarState() == BARSTATE_NEWBAR) { BP_2 = BP_1; BP_1 = BP; } if (getCurrentBarCount() <= 3) BP = 0; else BP = .5 * (1 - S1) * (xClose.getValue(0) - xClose.getValue(-2)) + L1 * (1 + S1) * BP_1 - S1 * BP_2; //Stack the Trunc Array for (var i = 100; i > 1; i--) { Trunc[i] = Trunc[i-1] } //Truncated Bandpass Trunc[Length + 2] = 0; Trunc[Length + 1] = 0; for (var i = Length; i > 0; i--) { Trunc[i] = .5 * (1 - S1) * (xClose.getValue(-i + 1) - xClose. getValue(-i - 1)) + L1 * (1 + S1) * Trunc[i + 1] - S1 * Trunc[i + 2]; }

F NINJATRADER: JULY 2020 TRADERS’ TIPS CODE The BandPassFilter indicator discussed in John Ehlers’ article in this issue, “Truncated Indicators,” is available for download at the following links for NinjaTrader 8 and for NinjaTrader 7: NinjaTrader 8: www.ninjatrader.com/SC/July2020SCNT8.zip NinjaTrader 7: www.ninjatrader.com/SC/July2020SCNT7.zip

Once the file is downloaded, you can import the indicator into NinjaTader 8 from within the Control Center by selecting Tools → Import → NinjaScript Add-On and then selecting the downloaded file for NinjaTrader 8. To import in NinjaTrader 7, from within the Control Center window, select the menu File → Utilities → Import NinjaScript and select the downloaded file. You can review the indicator’s source code in NinjaTrader 8 by selecting the menu New → NinjaScript Editor → Indicators from within the Control Center window and selecting the BandPassFilter file. You can review the indicator’s source code in NinjaTrader 7 by selecting the menu Tools → Edit NinjaScript → Indicator from within the Control Center window and selecting the BandPassFilter file. A sample chart is shown in Figure 5. NinjaScript uses compiled DLLs that run native, not interpreted, to provide you with the highest performance possible. —Jim Dooms NinjaTrader, LLC www.ninjatrader.com

BPT = Trunc[1] //convert to a variable }

return [BP, BPT]

function verify(){ var b = false; if (getBuildNumber() < 779){ drawTextAbsolute(5, 35, "This study requires version 10.6 or later.", Color.white, Color.blue, Text.RELATIVETOBOTTOM|Text. RELATIVETOLEFT|Text.BOLD|Text.LEFT, null, 13, "error"); drawTextAbsolute(5, 20, "Click HERE to upgrade.@ URL=http://www.esignal.com/download/default.asp", Color.white, Color.blue, Text.RELATIVETOBOTTOM|Text. RELATIVETOLEFT|Text.BOLD|Text.LEFT, null, 13, "upgrade"); return b; } else b = true; }

return b;

FIGURE 5: NINJATRADER. The BandPassFilter indicator is shown on SPY from December 2018 to December 2019. July 2020

• Technical Analysis of Stocks & Commodities • 51

FIGURE 7: QUANTACULA. The resulting equity curve for the example TruncBandPass trading model is shown.

FIGURE 6: QUANTACULA. Shown here is the TruncBandPass trading model mocked up in Quantacula Studio Building Blocks.

over time. We used $100,000 starting capital, a trade size of 15% of equity, and 1.5:1 margin. Over the past 10 years, the model performed quite well, returning an annualized gain of 19.84% (see Figure 7). —Dion Kurczek, Quantacula LLC [email protected] www.quantacula.com

F QUANTACULA STUDIO: JULY 2020 TRADERS’ TIPS CODE John Ehlers’ article in this issue, “Truncated Indicators,” features his bandpass indicator, which we’ve already integrated into the Quantacula TASC library. This means the indicator is ready for use both in Quantacula Studio and the Quantacula. com website. We decided to test the indicator out by creating a trading model using drag & drop building blocks in Quantacula Studio. This type of model is composed of entry, exit, condition, and qualifier blocks. You drop conditions onto entries and exits to specify when to get into and out of a trade. You can drop qualifiers onto conditions to give them more specific criteria (see Figure 6). We used two conditions for the entry here, indicator new high/low to specify that TruncBandPass should make a 100bar new low. The second condition we used is indicator turns up/down, to specify that TruncBandPass should turn up, that is, move up after having moved down. We used the qualifier within the past N bars to give the first condition some flexibility. This results in a buy after the TruncBandPass turns up after having hit a 100-bar low sometime within the past 10 bars. We exit the trade when TruncBandPass hits a 50-bar new high. We backtested the trading model on the Nasdaq 100 stocks, using the QPremium universe that automatically accounts for symbols that dropped into and out of the index 52 • July 2020 • Technical Analysis of Stocks & Commodities

F NEUROSHELL TRADER: JULY 2020 TRADERS’ TIPS CODE The truncated bandpass filter described by John Ehlers in his article in this issue, “Truncated Indicators,” can be easily implemented in NeuroShell Trader using NeuroShell Trader’s ability to call external dynamic linked libraries (DLLs). DLLs can be written in C, C++, and Power Basic. After moving the code given in Ehlers’ article to your

FIGURE 8: NEUROSHELL TRADER. This NeuroShell Trader chart shows the standard bandpass and truncated bandpass filters.

preferred compiler and creating a DLL, you can insert the resulting indicator as follows: 1. Select new indicator from the insert menu. 2. Choose the external program & library calls category. 3. Select the appropriate external DLL call indicator. 4. Set up the parameters to match your DLL. 5. Select the finished button. Users of NeuroShell Trader can go to the Stocks & Comsection of the NeuroShell Trader free technical support website to download a copy of this or any previous Traders’ Tips. A sample chart is shown in Figure 8. modities

—Marge Sherald, Ward Systems Group, Inc. 301 662-7950, [email protected] www.neuroshell.com

F T HE ZORRO PROJECT: JULY 2020 TRADERS’ TIPS CODE Cumulative indicators, such as the EMA or MACD, are affected not only by previous candles, but by a theoretically infinite history of candles. Although this effect is often assumed to be negligible, John Ehlers demonstrates in his article in this issue that it is not so. Or at least not for a narrow-band bandpass filter. Bandpass filters are normally used for detecting cycles in price curves. But they do not work well with steep edges in the price curve. Sudden price jumps cause a narrow-band filter to “ring like a bell” and generate artificial cycles that can cause false triggers. As a solution, Ehlers proposes to truncate the candle history of the filter. Limiting the history to 10 bars effectively dampened the filter output and produced a better representation of the cycles in the price curve. For limiting the history of a cumulative indicator, we’re not using Ehlers’ code here, but instead we’ll write a general “truncate” function that works for any indicator:

FIGURE 9: ZORRO PROJECT. The chart displays a truncated narrow bandpass (blue line). For comparison, the green line is a nontruncated medium-wide bandpass filter.

The following code shows how the truncate function is used with our narrow bandpass filter: function run() { BarPeriod = 1440; StartDate = 20181101; assetAdd("SPY","STOOQ:SPY.US"); // load price history from Stooq asset("SPY");

}

UnstablePeriod = 10; vars Prices = series(priceClose()); var PB = BandPass(Prices, 20, 0.1); var Trunc = truncate(BandPass, Prices, 20, 0.1); plot("Bandpass",BP,NEW|LINE,RED); plot("Truncated",Trunc,LINE,BLUE);

var indicator(vars Data,int Period,var Param); var truncate(function Indicator,vars Data,int Period,var Param) { indicator = Indicator; var *Trunc = zalloc(UnstablePeriod*sizeof(var)); var Ret; int i; for(i = UnstablePeriod-1; i >= 0; i--) { SeriesBuffer = Trunc; Ret = indicator(Data+i,Period,Param); shift(Trunc,0,UnstablePeriod); } return Ret; }

This function does basically the same as Ehlers’ code for his bandpass filter. It accesses the internal history buffer of the cumulative indicator that’s passed as the first argument. The SeriesBuffer variable replaces that buffer with an external array that’s temporarily allocated on the C heap. UnstablePeriod is a global variable already used for limiting the history range of traditional indicators, such as EMA or MACD.

FIGURE 10: ZORRO PROJECT. Shown for comparison are sine chirp responses from three bandpass variants (the original narrow bandpass, the truncated narrow bandpass, and the wide bandpass). July 2020

• Technical Analysis of Stocks & Commodities • 53

The chart shown in Figure 9 confirms Ehlers’ observation that the truncated narrow bandpass (blue line) represents cycles better than the original bandpass (red line). For comparison I’ve added a medium-wide bandpass filter as it is normally used in trading systems (green line). This filter doesn’t “ring” either, truncated or not. So what’s the better choice for detecting cycles, a truncated narrow bandpass or a nontruncated wide bandpass? To find out, we feed the three bandpass variants with a sine chirp and compare their responses. The resulting plots are shown in Figure 10. The top panel is the chirp, a sine wave with a period rising from 5 to 60 cycles. The panels below that show the chirp responses of the original narrow bandpass, the truncated narrow bandpass, and the wide bandpass. We can see that the truncated bandpass got a wider bandwidth, artifacts at low cycles, and a shifted center frequency. A nontruncated filter with an already wider bandwidth seems here the better solution. The advantage of truncating is that the indicator output is clearly defined, regardless of the lookback period of the trading system. A disadvantage is speed—truncating makes indicators much slower because they run in a loop. Not very relevant for normal trading systems, but relevant for HFT (high-frequency trading) systems. The truncate function and the test scripts can be downloaded from the 2020 script repository on https://financialhacker.com. The Zorro platform can be downloaded from zorro-project.com. Zorro version 2.27 or above is needed.

FIGURE 11: TRADERSSTUDIO. The bandpass (BP) and truncated bandpass (BPT) indicators are shown on a chart of MSFT.

FIGURE 12: TRADE NAVIGATOR. This chart displays the Ehlers truncated bandpass filter.

F T RADERSSTUDIO: JULY 2020 TRADERS’ TIPS CODE The importable TradersStudio files based on John Ehlers’ article in this issue, “Truncated Indicators,” can be obtained on request via email to info@TradersEdgeSystems. com. The code is also available on this magazine’s website at Traders.com in the Traders’ Tips section. I coded the indicators described by the author. Figure 11 shows the bandpass (BP) and truncated bandpass (BPT) indicators using the default lengths of 20, 0.1, 10 on a chart of Google (GOOGL).

the program update by clicking on the telephone button (or use the file pulldown menu, then select update data). Then select download special file, and click on the start button. You will then be guided through an upgrade of your Trade Navigator. If prompted to “re-import libraries,” please do so. This will import the new tools into the software. Once that is completed, you will find a study named “Ehlers BandPass filters.” You can insert these indicators onto your chart by opening the charting dropdown menu, selecting the add to chart command, then on the studies tab, finding the new study, selecting it, then clicking on the add button. If you need assistance with upgrading or applying the study, our technical support staff is happy to help via phone or via live chat through our website. A sample chart is shown in Figure 12.

F TRADE NAVIGATOR: JULY 2020 TRADERS’ TIPS CODE In “Truncated Indicators” in this issue, author John Ehlers presents a truncation technique for cycle indicators and demonstrates the technique using a truncated bandpass filter. To install these new tools into Trade Navigator, first obtain

F MICROSOFT EXCEL: JULY 2020 TRADERS’ TIPS CODE In his article in this issue, “Truncated Indicators,” John Ehlers takes us aside to look at the impact of sharp price movements on two fundamentally different types of filters: finite impulse response, and infinite impulse response filters. Given recent market conditions, this is a very well timed subject. In this article, Ehlers suggests “truncation” as an approach

—Petra Volkova The Zorro Project by oP group GmbH www.zorro-project.com

—Richard Denning [email protected] for TradersStudio

54 • July 2020 • Technical Analysis of Stocks & Commodities

—Genesis Financial Data Tech support 719 884-0245 www.TradeNavigator.com

to the way the trader calculates filters. He explains why truncation is not appropriate for finite impulse response filters but why truncation can be beneficial to infinite impulse response filters. He then explains how to apply truncation to infinite impulse response filters using his bandpass filter as an example. Figure 13 replicates the figure FIGURE 13: EXCEL. Bandpass and truncated bandpass filters. from his article using Excel. Next, it seemed appropriate to take a look at this concept within a filter or indicator that uses the normal bandpass filter as a starting point. A quick dive into my Traders’ Tips spreadsheet archive brought me to an August 2019 S&C article by John Ehlers titled “A Peek Into The Future.” That article introduced the Voss predictive filter, where the first step in the Voss FIGURE 14: EXCEL. Voss predictive filter. Note: The Voss article used a wider bandwidth setting of 0.25. computation is the bandpass filter. Three columns of cell formulas make up the Voss filter and I already have the bandpass column. So it is a simple exercise to port the Voss filter forward to the current spreadsheet to demonstrate the result of bandpass truncation in a more complex environment. Figure 14 replicates the chart from Ehlers’ August 2019 article. Figure 15 is the same chart using FIGURE 15: EXCEL. Voss filter calculated using the truncated bandpass filter. the truncated bandpass filter as the first stage of Voss calculations. Figure 16 below puts the as a feedback input. two Voss calculations side by side. Truncation requires that we break that backward reference At this writing, we are well into the impact that Covid-19 at the specified truncation length. The EasyLanguage code is having on the world economy. Figure 17 takes a look at the given in the sidebar in his article introduces a pair of zero recent S&P 500 index with the Voss filter and the truncated feedback values just beyond the truncation length to provide Voss filter. that break. Between the truncated version needing the two oldest Some technical explanations behind the creation of this feedback values to be zero, the complexity of the bandpass spreadsheet filter formula itself, and the requirement that it be calculated User-defined function: BPTrunc—A VBA code implementa- fresh at each bar, I was stymied as to how to create a purely tion of Ehlers’ truncated bandpass filter. Excel cell formula computation for this. In his article in this issue, Ehlers mentions “mathematical Perhaps a better mathematician than I could figure out a sleight of hand tricks.” refactoring of the bandpass filter, similar to Ehlers’ discusIn the time available, I have not been able to come up with sion in his article of the “transfer response of a filter,” that any mathematical jujitsu that would keep an implementation would allow this bandpass truncation to be coded with naof the truncated bandpass filter entirely within native Excel tive Excel cell formula capabilities. cell formula capabilities. The problem is due to the bandpass Instead, I have used VBA to create a user-defined function filter formulation requiring two of its previous output values (UDF)—“BPTrunc”—that can be used directly in complex July 2020

• Technical Analysis of Stocks & Commodities • 55

cell formulas. The only real drawback to the UDF approach is that it is inherently slower to calculate than a native cell formula solution. Thus, for this spreadsheet, there is a noticeable delay in response when the user changes any of the control values or buttons. For this spreadsheet, I have chosen to use BPTrunc in a column by itself to facilitate on-chart side by FIGURE 16: EXCEL. Voss filter and truncated Voss filter. side comparisons. But it is not a requirement of BPTrunc to be used standalone in a cell formula. The BPTrunc function is portable. The following is for those comfortable with VBA and who might wish to try the truncated bandpass filter in other spreadsheets that have used the bandpass filter. The easiest approach is to have the VBA editor export a copy of the module from this spreadsheet FIGURE 17: EXCEL. Forward space the chart in Figure 16 to today. to your hard drive. Close this spreadsheet. Open your target spreadsheet and use the VBA editor to import download it, follow these steps: the “truncated bandpass” module from where you stored it. • Right-click on the Excel file link, then Then modify cell formulas that use the bandpass filter, simi• Select “save target as” to place a copy of the spreadsheet lar to what I have done here for the Voss filter calculation. file on your hard drive. To download this spreadsheet The spreadsheet file for this Traders’ Tip can be downloaded from Traders.com in the Traders’ Tips area. To successfully

LETTERS TO S&C

Continued from page 7

an updated volume-based indicator to use and I think OBVM is exactly what I need. Thanks again and best wishes. F.D. Author Vitali Apirine replies: Thank you for the good words about my latest article. Happy trading! ON-BALANCE VOLUME MODIFIED (OBVM) Editor, Thank you very much for Vitali Apirine’s superb articles. Over the years I have found his articles helpful and fun to use. I will play around with his latest idea about OBV [“On-Balance Volume

Modified (OBVM)”]. Historically, I have not had a lot of success using OBV (and other volume indicators), but it should be interesting. I have had the most success lately using a variation of his exponential deviation bands. One of the things I have struggled a bit with over the years is using shorter-term indicators with some kind of a trend filter (such as only taking long trades when the trend is up, or short when the trend is down). I have used his moving average stochastic as a trend filter at times, and I very much like this indicator. However, like all trend filters, I get frustrated when it lags. I am wondering if there any trend filters that he uses that he particularly likes and finds useful? In any case, I wanted to write to thank

56 • July 2020 • Technical Analysis of Stocks & Commodities

—Ron McAllister Excel and VBA programmer [email protected]

you for his articles. In my opinion they are some of the very best published by StockS & commoditieS. I hope he continues to submit his ideas. E.K. Author Vitali Apirine replies: Thank you for the high evaluation of my articles. We trade in a high-risk market right now. As I write this, the Volatility Index (VIX) is higher than 50 every day. I am careful with any indicators in such a time. No one knows when the threat from the coronavirus will pass. Thank you again and stay safe.

Free Information From Advertisers Advertiser

Page

Page

Publications

Brokerages

Charles Schwab

5

Schwab.com/tradefutures

Stocks & Commodities

2, 63

Store.Traders.com, Traders.com

Interactive Brokers

3

ibkr.com/progateway

Software

MetaStock

Ninjatrader

64

ninjatrader.com 29

tdameritrade.com/thinkorswim

11

MetaStock.com/TASC

Ninjatrader

TD Ameritrade

64

ninjatrader.com Websites

courses/seminars

MoneyShow

Advertiser

Stocks & Commodities 19

2, 63

Store.Traders.com, Traders.com

Online.MoneyShow.com

Editorial Resource Index TradeStation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 06

The Zorro Project.. . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Tom Bulkowski.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

TradersStudio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

MetaTrader 4 (MetaQuotes Software Corp.) .. . . 24

Trade Navigator (Genesis Financial Tech.) . . . . 54

eSignal .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 xtf.com.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 StockCharts.com.. . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 OptionsAnalysis.com.. . . . . . . . . . . . . . . . . . . . . . . 46 Wealth-Lab.com. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 NinjaTrader. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Quantacula Studio .. . . . . . . . . . . . . . . . . . . . . . . . . . 52 NeuroShell Trader (Ward Systems Group) .. . . 52

For more information about our advertisers, go to Traders.com/reader where you will find the alphabetized list of this month’s advertisers. For reference, the list is also printed above along with the corresponding page number for each ad. Just follow the simple directions below and the advertisers will get your requests the same day! Step 1: Go to Traders.com/reader and

scroll through the list of our current month’s advertisers.Click the box for each advertiser you’d like to hear from. At the bottom of the list, click Continue when finished.

How to reach us For questions, address changes, or ordering information for Technical Analysis of Stocks & Commodities magazine and its online publications: Toll-free 800 832-4642 (800-Technical) or: 206 938-0570. Email us at: [email protected]. Or write to us at: 4757 California Ave. SW, Seattle, WA 98116-4499.

Do your magazines arrive tattered and torn? Polybagging of magazines (domestic delivery) is available for $6/year. Single back issues from the current year (subject to availability) are $8 prepaid. Subscribers have access to our digital archive of all past articles. Individual articles can be purchased from the Online Store at our website, Traders.com. Editorial feedback We always want to know more about the needs of our readers: What kinds of articles would you like to see more of? What do you find useful? Address your written questions and comments to [email protected] or to: Editor, Stocks & Commodities, 4757 California Ave SW, Seattle, WA 98116-4499. Sorry, we cannot perform research on individual financial questions not related to this magazine and we cannot respond to all mail. Letters or emails containing questions or information that other readers may enjoy or that relate to our articles or technical analysis topics may be published in our Letters to S&C column. Join us on Facebook at www.facebook.com/ STOCKSandCOMMODITIES Follow us on Twitter @STOCKSandCOMM

Step 2: Fill out your contact information

and click Send Request. Your request will then be sent to the advertisers you selected. And that’s it!

To receive information on the products and services listed in the Editorial and Advertisers’ Indexes, go to: Traders.com/reader/ These indexes are published solely as a convenience. While every effort is made to maintain accuracy, last-minute changes may result in omissions or errors.

July 2020

• Technical Analysis of Stocks & Commodities • 57

FUTURES LIQUIDITY

T

rading liquidity is often overlooked as a key technical measurement in the analysis and selection of commodity futures. The following explains how to read the futures liquidity chart published by Technical Analysis of Stocks & Commodities every month.

very high volumes. The greatest number of dots indicates the greatest activity; futures with one or no dots show little activity and are therefore less desirable for speculators. Courtesy of CBOT

Commodity futures

The futures liquidity chart shown below is intended to rank publicly traded futures contracts in order of liquidity. Relative contract liquidity is indicated by the number of dots on the right-hand side of the chart. This liquidity ranking is produced by multiplying contract point value times the maximum conceivable price motion (based on the past three years’ historical data) times the contract’s open interest times a factor (usually 1 to 4) for low or

three-year period. Thus, all numbers in this column have an equal dollar value. Columns indicating percent margin and effective percent margin provide a helpful comparison for traders who wish to place their margin money efficiently. The effective percent margin is determined by dividing the margin value ($) by the three-year price range of contract dollar value, and then multiplying by one hundred.

Stocks

All futures listed are weighted equally under “contracts to trade for equal dollar profit.” This is done by multiplying contract value times the maximum possible change in price observed in the last

Trading liquidity has a significant effect on the change in price of a security. Theoretically, trading activity can serve as a proxy for trading liquidity and equals the total volume for a given period expressed as a percentage of the total number of shares outstanding. This value can be thought of as the turnover rate of a firm’s shares outstanding.

Trading Liquidity: Futures

Contracts to Trade for Equal Relative Contract Liquidity Dollar Profit S&P 500 E-Mini (Jun ’20) CME 8.9 33.3 3 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••>> Ultra T-Bond (Jun ’20) CBOT 6.2 18.9 2 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••> 10-Year T-Note (Jun ’20) CBOT 1.6 10.2 6 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••> T-Bond (Jun ’20) CBOT 3.7 15.3 3 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••> 5-Year T-Note (Jun ’20) CBOT 0.7 6.8 10 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••> Ultra 10-Year T-Note (Jun ’20) CBOT 2.5 12 4 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 2-Year T-Note (Jun ’20) CBOT 0.3 5.9 13 •••••••••••••••••••••••••••••••••••••••••••••• Crude Oil WTI (Jul ’20) NYMEX 39.5 17.9 2 •••••••••••••••••••••••••••••••••••••••••••• Russell 2000 E-Mini (Jun ’20) CME 5.8 19.4 3 •••••••••••••••••••••••••••••••••••••••••••• Soybean Meal (Jul ’20) CBOT 0.8 1.9 2 ••••••••••••••••••••••••••••••••• Nasdaq 100 E-Mini (Jun ’20) CME 8.7 21 2 ••••••••••••••••••••••••••••••• Gold (Jun ’20) COMEX 5.8 17.1 2 •••••••••••••••••••••••••••• Soybean (Jul ’20) CBOT 2.1 8.1 6 ••••••••••••••••••••••• Eurodollar (Jun ’20) CME 0.2 6.9 21 •••••••••••••••••••••• Euro FX (Jun ’20) CME 1.8 12.5 7 ••••••••••••••••••••• Natural Gas (Jul ’20) NYMEX 11.5 7.3 4 •••••••••••••••••••• Corn (Jul ’20) CBOT 6.9 13.9 17 ••••••••••••••••••• Gasoline RBOB (Jul ’20) NYMEX 23.6 20.2 3 •••••••••• ULSD NY Harbor (Jul ’20) NYMEX 18.5 13.5 2 ••••••••• 30-Day Fed Funds (Jul ’20) CBOT 0.1 5.9 14 •••••••• S&P Midcap E-Mini (Jun ’20) CME 11.1 35.5 3 ••••••• Silver (Jul ’20) COMEX 11 31.4 4 ••••••• Sugar #11 (Jul ’20) ICE/US 8.4 19.8 26 •••••• British Pound (Jun ’20) CME 3.9 22.1 10 ••••• Crude Oil Brent (F) (Dec ’20) NYMEX 21.8 16.9 3 ••••• Dow Futures Mini (Jun ’20) CBOT 10.8 41.1 4 ••••• Wheat (Jul ’20) CBOT 6.1 24.6 21 ••••• Australian Dollar (Jun ’20) CME 3 12.9 9 •••• High Grade Copper (Jul ’20) COMEX 6.7 19.2 6 •••• Live Cattle (Aug ’20) CME 7 18.8 9 •••• Canadian Dollar (Jun ’20) CME 2.4 15.5 12 ••• Cotton #2 (Jul ’20) ICE/US 10 15.2 7 ••• CBOT Chicago Board of Trade, Division of CME Hard Red Wheat (Jul ’20) KCBT 7 21.9 19 ••• CFE CBOE Futures Exchange Coffee (Jul ’20) ICE/US 11.2 29.4 9 •• CME Chicago Mercantile Exchange COMEX Commodity Exchange, Inc. CME Group Japanese Yen (Jun ’20) CME 3.8 56.6 17 •• ICE-EU Intercontinental Exchange-Futures - Europe Lean Hogs (Jul ’20) CME 14 20.7 9 •• ICE-US Intercontinental Exchange-Futures - US Platinum (Jul ’20) NYMEX 10.6 26.5 7 •• KCBT Kansas City Board of Trade Bitcoin CME Futures (May ’20) CME 36.8 31.9 2 • MGEX Minneapolis Grain Exchange Brazilian Real (Jun ’20) CME 8.1 9.5 9 • NYMEX New York Mercantile Exchange Cocoa (Jul ’20) ICE/US 8.7 33.1 21 • Feeder Cattle (Aug ’20) CME 8.3 32.9 8 • 2007 Mexican Peso (Jun ’20) CME 9.7 30.3 20 • Trading Liquidity: Futures is a reference chart for speculators. It compares markets “Relative Contract Liquidity” places commodities in descending order according to according to their per-contract potential for profit and how easily contracts can be bought how easily all of their contracts can be traded. Commodities at the top of the list are easior sold (i.e., trading liquidity). Each is a proportional measure and is meaningful only est to buy and sell; commodities at the bottom of the list are the most difficult. “Relative Contract Liquidity” is the number of contracts to trade times total open interest times a when compared to others in the same column. The number in the “Contracts to Trade for Equal Dollar Profit” column shows how volume factor, which is the greater of: many contracts of one commodity must be traded to obtain the same potential return In volume 1 or exp –2 as another commodity. Contracts to Trade = (Tick $ value) x (3-year Maximum Price In 5000 Excursion). Commodity Futures

Exchange

% Margin

Effective % Margin

58 • July 2020 • Technical Analysis of Stocks & Commodities

ADVISORY SERVICES

ADVISORY SERVICES

INTENSIVE OPTION MENTORING

Yes, You Can Cash In On Chaos! Certified Chaos Traders Courses teach you how. Learn to earn at http://moneytide.com?r=s EMini MoonTide Hotline up 219 months in a row http://daytradingforecasts.com?r=s

McMillan Mentoring Program 14 YEARS OF OPTION TRAINING LEARN from the MASTERS 24 One-On-One Sessions

SOFTWARE Build and test systems without coding! www.NeuroShell.com

SOFTWARE

[email protected]

TO ADVERTISE CONTACT:

Ed Schramm

Technical Trading Signals Swing Trading & Investing www.TheTechnicalTraders.com

[email protected] • (206) 938 0570 TRADERS' RESOURCE

TOP 10 VIEWED publications FOR TRADERS

LINKS

Where can traders turn for market Product Company insight, trade recommendations, and 1. The Zanger Report ChartPattern.com education about trading and investing? Perhaps the question should 2. Technical Analysis of Stocks & Commodities Technical Analysis, Inc. be where can’t you? These days, financial information is put out in 3. Traders.com Advantage Technical Analysis, Inc. print, on TV, on your smartphone, and over the Internet in various 4. Working Money, at Working-Money.com Technical Analysis, Inc. formats, but there’s still nothing 5. Traders World Magazine Traders World Magazine more readable, reliable, or researchable than a regularly published newsletter or magazine. 6. Monthly Product Special MicroMedia In the Traders’ Resource section of our website, Traders.com, we present a listing of publications on a 7. Tomorrow’s Market Email MicroMedia variety of subjects—printed on paper, accessed online, or delivered straight to your email inbox—that may help 8. Chaos Trader’s Email MicroMedia you improve your trading. Some publications have been 9. Cash In On Chaos Newsletter MicroMedia around for quite a while (in fact, this magazine itself has been published since 1982), and they can be well worth 10. Futures Truth Magazine Futures Truth Company the asking price for the information they deliver. In the listing, you’ll find information about each pub- These are the 10 publications for traders clicked on most often on the Traders’ Resource lication, such as how many years it’s been published and website, in order of clicks received. This is not an editorial rating or ranking. For more information on specific products and services, try checking store.Traders.com for archived whether it is available on the newsstand. S&C product reviews.

TRADERS’ RESOURCE AT TRADERS.COM In the Traders’ Resource area you’ll not only find the publications listing, but also information on other products and services in numerous other categories, such as data services, brokerages, consultants, seminars, hardware, software, and trading systems.

Just click on the Traders’ Resource link. Then follow the Publications category link, or use the search feature to find products or services with specific attributes in this or other categories.

The information in Traders’ Resource is the most accurate at the time of posting and is subject to change. Because the vendors posting to Traders’ Resource are responsible for their own listing, Technical Analysis, Inc. declines any and all liability for any representations made by the businesses and individuals listed. Nor can Technical Analysis, Inc. endorse any business or individual listed on Traders’ Resource. Technical Analysis, Inc. makes no warranties, express or implied, as to the accuracy and reliability of claims herein. You agree to release Technical Analysis, Inc., together with its respective employees, agents, officers, directors and shareholders, from any and all liability and obligations whatsoever in connection with or arising from your use of Traders’ Resource. If at any time you are not happy with the information posted to Traders’ Resource or object to any material within Traders’ Resource, your sole remedy is to cease using it. This list is updated frequently. If you are aware of a business that should be listed, please email us at [email protected].

July 2020

• Technical Analysis of Stocks & Commodities • 59

Trading Perspectives SOME PERSPECTIVES ON THE EQUITIES WORLD Rob Friesen is a professional trader and president & COO of Bright Trading (www. stocktrading.com), a proprietary trading firm hosting independent trader/members, an online trading school, and utilizing the StockOdds database (www.stockodds. net). This column shares his thoughts and outlooks on trading, locating opportunity, probabilistic outcome, and maintaining perspective throughout industry changes. He can be reached at [email protected] or via www.stocktrading.com. Rob Friesen

TRADING! A PERFECT STAY-ATHOME JOB? Whether you are just starting to look into trading or are already an active career trader, have you given enough thought to what contributes to the viability of trading? Here, I’ll offer some reflections on what I believe it takes to be successful at trading. I hope it resonates with you and also gives you some ideas on how you can help ensure more success in your trading career, especially for newer traders. Getting started in trading? These days, as the pandemic continues and the economy is suppressed, some people are considering getting into trading. Maybe they have lost their job temporarily or permanently. Maybe they are rediscovering their entrepreneurial spirit that has been laid to waste with the pandemic. Or maybe they are just ready for a change, and a trading career sounds plausible. After all, as the pandemic forces many to stay home, trading may offer to some an opportunity to stay home and still make money. Volatile markets Many investors are finding the investable landscape uncertain and the volatility high, which may cause them to shorten their timeframes and rotate positions more frequently, which leads to increased activity and inventory turnover. They may be trading more frequently rather than sitting on positions for long durations. Of course, all retail traders and investors need to be mindful of the tax consequences of buying and selling securities. The dream Becoming a successful trader is the dream of many, regardless of back-

ground. Over the years, I have worked with people from many different industries and fields of expertise who were interested in pursuing trading as a career. They tended to share a common message: Despite being in work that they trained to do or have credentials in, they disliked or even hated what they did each day. Adding to that may be a dislike of the daily commute, the expense of parking or transit, a dislike of their bosses or coworkers, corporate politics, and so on. Some of those challenges may end up being resolved post-pandemic as more companies shift to remote work. But not all jobs can be performed from home.

Trading is a probabilitybased endeavor and the fact is, there are no guarantees, no safety net, and no set salary. Daytrading has often been advertised as a career in which someone can pay themselves a good income within a year. Is this reality? Some traders have done quite well early on in their trading career, but most take many years to develop the knowledge, experience, and skills necessary to pull money from the market consistently. As with most skills, being able to trade profitably and consistently takes many hours of practice. The less dreamy aspects of trading New traders also should realize the importance of building capital reserves, and many new traders don’t do this adequately. Even if someone starts making a little money while they are developing their skills, it’s important that they don’t

60 • July 2020 • Technical Analysis of Stocks & Commodities

spend everything they make, as tempting as that may be. Building adequate capital reserves will allow you to accomplish more. Some may be attracted to the excitement of the markets—the thrill of the trade and the endorphins that can result. But the money a trader makes actually comes from doing the boring things: the hours poured into research & analysis, the preparation, the planning, reviewing & journaling, monitoring positions, aggregating data, testing and more testing. It also comes from being able to process and manage stress, and from developing mental and emotional strength for each new day and to meet the myriad of events that can arise. Let me offer this quote from our StockOdds podcast episode 2, which presented a talk with Dennis Dick, CFA, proprietary trader with Bright Trading, and host of the Benzinga premarket morning show: [Having] a trading career affects your thinking—the way I analyze everything in my life. It’s risk–return. I look at, you know, what’s the risk? What’s the reward? And I analyze even normal decisions and daily activities [that way]. Why do you want to be a trader? Being a trader has been compared to being an athlete, since trading is similar to an individual sport. Trading is also a business, an art form, a job that requires attention and focus, and it’s also a probability game. As with any accomplishment, doing that “one thing well” can bring happiness and contentment, but the journey of sacrifice and the hardships along the way are underestimated by most new entrants. Yes, there are perks, but it is not fair

Trading Perspectives and balanced to only present the benefits. So first, let’s run down some of the benefits: Traders may be able to trade from anywhere as long as they have good internet connectivity, giving them freedom to be where they want. Traders may be able to set their own hours, which lets them attend events or schedule vacations when they want. There are no employees to have to hire and look after. No suit and tie is needed as with many finance-related jobs; trade in your pajamas if you want! And finally, the ultimate benefit and what everyone who enters trading dreams of: no cap on your potential income. But are you ready for all the challenges, the surprises, and the realities of trading? Do you understand that you can do the wrong thing and get great results or can do the right thing and get terrible results? There are many setbacks on the road to becoming a successful trader, depending on your level of education, experience, skill, and discipline. What you may need to overcome will vary with the individual. Trading results also tend to clump, with setbacks and dry spells along the way. Unfortunately, having a good work ethic will not guarantee success. You also need to have a gaming theory mindset. You can have an edge, but you may have to live through many times when it does not work as intended. Trading is a probability-based endeavor and the fact is, there are no guarantees, no safety net, and no set salary. What does it take to be a consistently profitable trader? Discipline is the overwhelming key factor in any individual’s success in becoming consistently profitable. Many people want to go into trading without fully understanding the level of commitment it takes to make profits in the long run. It takes more dedication and discipline than most think. “A lot of traders get themselves into trouble and they don’t know how to work themselves out of trouble,” continues Dennis Dick in our podcast episode. “On any given day I might make 50 or 100 trades, or maybe on a really crazy

day I might be making 200 trades. So we’re trading quite a bit. And inevitably in trouble every single day! You can’t be right 100 percent of the time, so you’ve got to learn how to work yourself out of trouble. “I’ve seen this through the years: The traders that aren’t willing to take a loss will struggle in this business and usually blow up their account very quickly. Traders add to losers, thinking ‘it’s got to come back.’ [But the market] doesn’t have to do anything. The markets can stay irrational much longer than you can stay solvent, and this applies to daytrading more than anything. “The number one thing is when I enter a trade, I’m not thinking about how much money I can make. I enter the trade thinking about how much money I can lose. I am really a risk manager. I put my capital to work when I see the risk relatively low or I see myself having a

Discipline is the overwhelming key factor in any individual’s success in becoming consistently profitable. potential out, but I always enter the trade having a contingency plan.” What is needed? In my view, here is what is needed to be a successful trader: • Having a trading plan with all the essential ingredients: profit expectancies, loss parameters, entry and exit guidelines, position sizing, and models or variations of strategies for the context of the day. • Discipline, diligence, and perseverance. No matter what the difficulties are, overcome them as best you can. • Capital. As with any business, you can fail by not having enough for the journey. The trader must account for fixed expenses, variable July 2020

expenses like commissions, losses from mistakes, losses from events beyond their control, and edges that diminish—even though the trader is doing the right things. When the markets are changing and strategies are not performing, it is challenging to know when to shelve it or whether to continue. If you do shelve it and pick up another strategy, then testing that new strategy also costs money, even if it’s done perfectly, since you have to prove out the strategy, usually with real money at some point. • You must have good data. It needs to be accurate, and with corporate adjustments applied. Are there off-the-shelf strategies that work? It’s really about the validation of new or existing strategies, no matter whether you get them from a book, a friend, a website, or even from an advanced quant site. Do they work? That is for you to test and prove to yourself. If you do not take personal ownership of the idea and make it fit for you and where you are at, you may fail even if the strategy works. I’ve seen a common theme in many working strategies: These strategies are long/short orientated, and the traders using them are focused on taking slices from the noise rather than trying to hit homeruns. These often focus on compounding rather than on one-off setups from a signal-based strategy. If you are trading for a living, you will want to be able to scale and take the same types of trades repeatedly. How long can an edge last if a trader discovers one? Edges usually do not last as long as a trader would like. There is very little low-hanging fruit these days but there are still many soft edges, which come and go as market regimes shift and change. I am a firm believer that many past strategies that are thought to no longer work can be dusted off and repurposed, looking at them through today’s lenses. So traders can consider: What were the past obstacles for some strategies that today’s technological developments can solve?

• Technical Analysis of Stocks & Commodities • 61

Trading Perspectives Pair trading strategies have been widely used by professional traders for many years. (I’ve discussed pair trading strategies in this column several times before.) There is the need to always adapt and understand the dynamics of outperformers versus underperformers in peer groups. Do not get caught in the trap of thinking there are guarantees for trades. Weak stocks can catch up to strong stocks in time or they could continue to diverge. Fundamentals, statistical measures, technicals, sentiment, and news all play a role in how things play out. These forces must be considered for optimum results. Pair trading is only limited to one’s imagination, as there are so many combinations that one can employ, and each pair acts like a trading business employee: Either it is doing a great job for us, or we may have to tell that position that it’s “fired.” In my observation, pair

INTERVIEW/KAEPPEL Continued from page 35

strategy like this fits nicely in that 30% of a portfolio that uses tactical strategies. An objective, rules-based approach that cranks out market-beating gains over long periods of time—provided you have the financial and emotional wherewithal to follow it. Do you still follow the Dow Jones Industrials 11-month rate of change indicator? How accurate has it been, and when was its last signal? It’s technically known as the Coppock guide (Figure 5). The calculation is actually a little more involved and I use the S&P 500 stock index now. When it goes negative and then turns up, you buy and hold for 12 months or until the indicator turns down—whichever comes first. This is more of a “weight of the evidence” type of indicator. By that I mean: 1) every once in a while it generates a signal, 2) typically those signals are useful, but 3)

If you do not take personal ownership of an idea and make it fit for you and where you are at, you may fail even if the strategy works. trading strategies have stood the test of time and have contributed to the long and successful careers of some professional traders. What kind of technology or tech skills are needed? Since everything is online these days, there’s no question about it: computer skills are needed for trading. Excel (or another spreadsheet program) can be a

like a lot of other indicators, just when you think it’s infallible you get a flurry of errant signals—see 2002. Including the 2002 whipsaws, the average gain was +16%. If you exclude the 2002 signals, the average 12-month gain following a buy signal was +26%. So it is certainly worth paying attention to. But you can’t really base your whole investment strategy on it. Jay, thank you very much for your insights on many different trading ideas. I am sure some readers will now have a more in-depth understanding of how to benefi t from seasonality, options trading, and other strategies you covered. Thank you, Les. I appreciate the opportunity to share some examples of market anomalies and insights that I’ve worked with over many years.

FURTHER READING

Kaeppel, Jay [2009]. Seasonal Stock Market Trends: The Definitive Guide To Calendar-Based Stock Market

62 • July 2020 • Technical Analysis of Stocks & Commodities

helpful tool, and you may even want to add basic to advanced Python programming to your mix of skills, as this skill goes a long way in gathering data as well as executing and managing positions. Python can also assist you in creating your own systems to trade with. Treat trading like a business It is important to educate yourself before taking on the risks of trading in the markets, just as you would not start a business without extensive research, calculations, and planning. I am a proponent of investing in yourself first and having an opportunity to do what you love. If you think trading is for you or if you need help to improve your trading career, I welcome that conversation. I also hope you will check out our new podcast series.

Trading, Wiley. [2006]. The Four Biggest Mistakes In Option Trading, Wiley. [2000]. The Four Biggest Mistakes in Futures Trading, Wiley. [2002]. The Option Trader’s Guide To Probability, Volatility, And Timing, Wiley. [2020]. “Seeking Long-Term Growth With The Power Zone/Dead Zone Approach,” Technical Analysis of StockS & commoditieS, Volume 38: January. [2019]. “Stock Market Seasonality: A Global Phenomenon,” Technical Analysis of StockS & commoditieS, Volume 37: November. [2001]. “Trade Sector Funds With Pure Momentum,” Technical Analysis of StockS & commoditieS, Volume 19: November. [1999]. “A System For Trading Fidelity Select Funds,” Technical Analysis of StockS & commoditieS, Volume 17: July.

subscribe or renew today!

A subscription to Technical Analysis of  Stocks & Commodities magazine gets you so much more than just a magazine! Every subscriber gets full access to the magazine in digital format. No waiting for the mail to be delivered — just log on to Traders.com on any internet-capable device to read any issue or article we’ve ever published, either in your browser, or downloaded to your device as a PDF for reading anytime, anywhere. • Digital Edition The complete magazine as a PDF you can download or read in your browser.

• Working Money The information and insight you need to invest smartly and successfully.

• Digital Archives Every article since 1982 — over 17,000 pages of searchable articles!

• Traders.com Advantage Ideas, insights, evaluations, tips and techniques that can help you trade smarter. Plus much more!

1 year

8999

$

2 years

14999

$

5 years

3 years

19999

$

29999

$

Visit www.Traders.com to find out more! Email: [email protected] • Phone: 206-938-0570

facebook.com/STOCKSandCOMMODITIES

@STOCKSandCOMM

We are honored to be recognized as a top trading software provider in the 2020 Readers’ Choice Awards.

WINNER: Trading Software > $1000 WINNER: Trading Software < $500 Thank you to all who voted for NinjaTrader’s industry leading platform & brokerage services. Futures, foreign currency and options trading contains substantial risk and is not for every investor. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading.

ninjatrader.com

Related Documents

Stocks Commodities.pdf
March 2021 0
Stocks For
January 2021 0
Gestion De Stocks
January 2021 1
Gestion De Stocks Completo
February 2021 1

More Documents from "Mohammed Fakhir"