10 2022

December 13, 2023 | Author: Anonymous | Category: N/A
Share Embed Donate


Short Description

Download 10 2022...

Description

THE TRADERS’ MAGAZINE SINCE 1982 www.traders.com

RECURRING PHASE OF CYCLE ANALYSIS Using phasor analysis to identify market trend

8

TRADING STRATEGY DEVELOPMENT

Take an idea from the vault 16

FOUR STEPS TO BULL AND BEAR PROFITS Compound your returns

URBAN ENERGY REVOLUTION A choice or a must?

INTERVIEW

Perry Kaufman

A CRYPTOCURRENCY SCALPING STRATEGY

22

28 32

5-minute and 1-hour charts 36 OCTOBER 2022

4O TH

AN

NIV

OCTOBER 2022

ER

SA

RY I

SS

UE

Take Control of Your Trading with the

Professional Traders’ Starter Kit ™ only

5

$

per month!*

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

IBKR charges margin loan rates from 2.83% to 3.83% 1

Use the Interactive Brokers Debit Mastercard2 to borrow against your account for purchases or bill payment at low rates. For more information visit ibkr.com/ibmc

ibkr.com/iwantmore Trading on margin is only for sophisticated investors with high risk tolerance. You may lose more than your initial investment. Member - NYSE, FINRA, SIPC – [1] Margin Loan rate as of 07/29/2022. IB calculates the interest charged on margin loans using the applicable rates for each interest rate tier listed on its website. Rates shown apply to IBKR Pro clients only. Rates subject to change. For additional information on margin loan rates, see ibkr.com/interest. [2] Interactive Brokers Debit Mastercard is for US residents only. For more information, see ibkr.com/ibmc. BY USING THIS CARD YOU AGREE WITH THE TERMS AND CONDITIONS OF THE CARDHOLDER AGREEMENT AND FEE SCHEDULE, IF ANY. This card is issued by Metropolitan Commercial Bank (Member FDIC) pursuant to a license from Mastercard International. “Metropolitan Commercial Bank” and “Metropolitan” are registered trademarks of Metropolitan Commercial Bank © 2014. All interest and borrowing activity is through Interactive Brokers LLC. Please see your customer agreement with Interactive Brokers LLC for further details. Card program marketed and administered by Interactive Brokers LLC, the Program Manager of the Interactive Brokers Debit Mastercard. 08-IB22-1563CH1556

CONTENTS 6 Explore Your Options 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 660-8577 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.

by Jay Kaeppel Got a question about options?

FEATURE ARTICLE 8 Recurring Phase Of Cycle Analysis by John F. Ehlers On this occasion of the 40-year anniversary of this magazine, S&C Contributing Editor John Ehlers takes a look back at technical analysis history and reviews what we’ve come to understand about cycles in the financial markets.

OCTOBER 2022, VOLUME 40 NUMBER 11

31 Algo Q&A

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

INTERVIEW 32 Perry Kaufman: Still Dancing

by Barbara Diamond-Kaufman Perry J. Kaufman began his career in technical trading in 1969. As the markets grew up and market products grew, he grew with them. His company, Kaufman Signals, offers subscribers daily trading signals before the opening bell. On the occasion of this magazine’s 40-year anniversary, we take a look back at market history and how that has informed (and continues to inform) his views on how to successfully trade today’s markets.

15 Market Rap

by Emilio Tomasini “Unserious” thoughts on serious topics in finance.

16 Developing And Testing A Trading Strategy From The Vault by Kevin J. Davey A dive into this magazine’s vast article archives can provide you with myriad ideas for trading strategies to develop and test. Here’s an example of doing just that by returning to the very first issue of this magazine to pull out a trading idea. Will it work? Let’s find out.

22 Four Steps To Bull And Bear Profits

by Jon Wolfenbarger, CFA The major cyclical trends in the financial markets create both risk and opportunity for investors, yet most lack a system to identify and profit by these cycles. Here is a tutorial to help you build a comprehensive system in four steps—using a wide variety of proven fundamental and technical indicators—to identify and profit in both bull and bear markets.

35 Futures For You

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

36 A Cryptocurrency Scalping Strategy

by Azeez Mustapha Here is a short-term and easy trendfollowing trading strategy for you to consider and to test for yourself.

42 Greed And Fear Index

by Howard Wang Here’s a relative strength type of indicator called the GFI that can provide warning of an overheated or oversold market.

46 The Savvy Technician

by Stella Osoba, CMT, Esq. Recognizing and applying technical chart patterns to trading.

48 A Retrospective: 40 Years

A look back at a few early S&C interviews.

27 Swing Trading In The 50/200MA Channel

by Ken Calhoun You can use the popular 50-day and 200-day moving averages for more than looking for crosses of the two lines. You can also use the channel that the two lines create to swing trade in a continuous uptrend. Here’s how.

28 Urban Energy Revolution: A Choice Or A Must?

by Jerry Zhao Where can investors put their money to capitalize on opportunities brought by new sources of energy? Take a look.

60 Trading Perspectives

by Rob Friesen Perspectives on the equities world.

DEPARTMENTS 50 57 57 58 59 59 62

Traders’ Tips Advertisers’ Index Editorial Resource Index Futures Liquidity Classified Advertising Traders’ Resource Trade News & Products

n Cover: Jose Cruz n Cover concept: Christine Morrison

Copyright © 2022 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 • October 2022 • Technical Analysis of Stocks & Commodities

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

WINNER: Stand Alone Analytical Software $$$ WINNER: Stand Alone Analytical Software $ 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

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 was a portfolio manager for an investment management firm. He is presently Senior Research Analyst for Sentimentrader.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. THE “OPEN COLLAR” STRATEGY I read your column on the collar strategy with interest. I like the hedging aspect of the strategy but find the limited profit nature of the strategy to be quite unappealing. Is there any way to hedge with a collar without limiting profit potential? Yes, in some cases, there are ways. There is a little-known option trading strategy that I refer to as the “open collar.” Whether or not it makes sense to use this strategy will vary from situation to situation and depends heavily on the pricing of the call options relative to the pricing of the put options. First, a quick review: A collar is typically used as a temporary hedge and involves:

The “open collar” strategy

This strategy is essentially the same as a regular collar, however: • Enough puts are bought to hedge

A collar is typically used as a temporary hedge.

the shares held long • But, a lesser number of call options are sold than puts bought Let’s start with a quick example of a standard collar and then look at how to implement the open collar instead. Standard collar: AMC On August 3, AMC is trading at $18.21, and a trader holding 500 shares believes the stock may be at a resistance level and due for a pullback. In this case, the trader may: • Hold their 500 shares of AMC @ $18.21 • Sell 5 Sep16 2022 19 Call @ $2.40 • Buy 5 Sep16 2022 16 Put @ $1.79 In this example, the trader takes in

OPTIONSANALYSIS.COM

• Holding shares of stock • Selling a call option • Buying a put option

Buying the put option limits the amount of downside risk. Selling the call option helps to pay for some (or all) of the cost of the put option. In other words, selling the call option pays some portion of the cost of the hedge. The catch is that when done on a 1×1 basis, this strategy limits upside potential as long as the short call is held. For some examples, see last month’s column.

Jay Kaeppel

FIGURE 1: TRADE DETAILS, STANDARD COLLAR, AMC. In this example, the trader takes in $1,200 of premium for selling the call options and pays out $895 to buy the put options. 6 • October 2022 • Technical Analysis of Stocks & Commodities

Explore Your Options Whether or not it makes sense to use this strategy will vary from situation to situation and depends heavily on the pricing of the call options relative to the pricing of the put options. FIGURE 2: RISK CURVES, STANDARD COLLAR, AMC. As long as both options are held, the maximum profit is limited to $700 and the maximum risk is limited to −$800.

FIGURE 3: TRADE DETAILS, OPEN COLLAR, AMC. In this “open collar” example trade, the trader takes in $960 of premium for selling four call options and pays out $895 to buy five put options (a “4×5” configuration).

$1,200 of premium for selling the call options and pays out $895 to buy the put options. The particulars for this position appear in Figure 1 and the risk curves in Figure 2. Things to note: • As long as both options are held, the maximum profit is limited to $700 • As long as both options are held, the maximum risk is also limited to −$800 Open collar: AMC This trade is entered as follows: • Hold 500 shares of AMC @ $18.21 • Sell 4 Sep16 2022 19 Call @ $2.40

FIGURE 4: RISK CURVES, OPEN COLLAR, AMC. In this “4×5” open collar trade, where the trader sells four calls and buys five puts, the maximum risk is higher than in the standard collar (−$1,040 versus −$800) and the maximum profit potential is unlimited (versus being limited to $700 in the standard collar example).

• Buy 5 Sep16 2022 16 Put @ $1.79

in $960 of premium for selling only four call options and pays out $895 to

In this example, the trader takes

Continued on page 14

October 2022

• Technical Analysis of Stocks & Commodities • 7

CYCLE ANALYSIS

Using Phasor Analysis To Identify Market Trend

Recurring Phase Of Cycle Analysis On this occasion of the 40-year anniversary of this magazine, S&C Contributing Editor John Ehlers takes a look back at technical analysis history and reviews what we’ve come to understand about cycles in the financial markets. His years of technical research on this topic has led to insights and advancements that he has shared with us in many articles, and continues to share here.

C

JOSE CRUZ

ycle analysis for technical analysis has come a long way since the launch of this magazine in 1982. Cycle analysis was pretty primitive back then. J.M. Hurst had established that patterns such as double tops, head & shoulders, and even Elliott waves could be synthesized with just a few harmonics of a fundamental sine wave. Anthony Warren wrote some seminal articles in Stocks & Commodities about Fourier analysis, demonstrating the duality between events in the time domain and their representation in the frequency domain. Engineer Jack Hutson, publisher and founder of Stocks & Commodities magazine, recognized the importance of cycle analysis and Fourier transforms and encouraged research in this area. In the beginning In those earlier days, resolution in the frequency domain was relatively poor, but the peaks in the spectrum shapes could discern between long-wavelength seasonal periods, intermediate-length periods for trading, and short-period random variations from the peaks in the spectrum shapes. So the basic use of cycle analysis was to determine whether it was best to do trend trading or swing trading. Fast fourier transforms

(FFT) were the technical rage back then, but turned out to be just not the right tool for technical analysis because of their resolution. Some evolution of technical analysis Maximum entropy spectral analysis (MESA) was developed in 1976 for use in the exploration of oil. It could provide a high-resolution display from shortburst seismic echoes. Recognizing that the highresolution capability had merit, I started using it in my personal futures trading. Encouraged by Hutson, I wrote several articles for this magazine describing how MESA worked and what kind of performance it could deliver. As a result, MESA became popular among a few early adaptors. Consequently, I wrote more articles as PCs became more available and more capable. In retrospect, I recall a funny footnote. MESA is computationally intensive. When programmed in BASIC on an Apple II computer, a single analysis would take a very long time. Just to ensure the computer had not locked up, I mapped the computing registers to the display registers so you could watch the Apple II do its work. It was actually kind of cool. Today’s computers can handle the MESA algorithm without even breaking a sweat. So MESA raised the bar for performance with regard to swing trading. The evolution through the years involved improved displays and improved timing signals for swing trading. The one constant throughout the evolution was the concept that happenings in the time domain are expressly tied to happenings in the frequency domain. Either description was a full and complete description of market activity. That relation-

by John F. Ehlers October 2022

• Technical Analysis of Stocks & Commodities • 9

y(t)

We can now use cycle analytics to know when to trade the trend. phase angle of the phasor is −90 degrees, the cycle is at its valley in the time domain. When the phase of the phasor is +90 degrees, the cycle is at its peak in the time domain.

A current approach

We can create the real and imaginary components of market data by correlating the market data with cosine and sine, respectively, of fixed cycle period. The wavelength of the fixed cycle period should be about midrange of the spectrum components in the market data. The phase angle of the phasor is then easily computed as the arctangent of the ratio of the imaginary component to the real component. The computation is repeated for each bar in the data set. I show the precise computation using EasyLanguage in the sidebar, “Phasor Analysis, In EasyLanguage.” When the indicator in the code listing is applied to daily data for the stock symbol RTX (Raytheon Technologies Corp.) we get the display shown in Figure 2. The phasor is the red line in the first subgraph. The phasor starts at −180 degrees and advances through the cycle period until it reaches +180 degrees, whereupon it repeats with time. The valleys of the computed waveform are easily identified at −90 degrees, and the timing of the phase angle crossing −90 degrees can be compared to the valleys in the price waveform. Correspondingly, the peaks of the computed waveform are easily identified at +90 degrees, and the

ship can be better understood with reference to Figure 1. In simplest terms, the time waveform is represented by a pure sine wave in the left-hand side of the chart. It is also represented as a phasor in the right-hand side of the chart. A phasor is a two-dimensional vector, pinned at the origin. Its rate of rotation is the frequency of the sine wave in the time domain. Its rotation starts at −180 degrees and advances to +180 degrees throughout the cycle period, whereupon the next cycle begins. (Note: The graphic in Figure 1 is static for the printed page, but it can be viewed at my website as an animated graphic.) The projection of the tip of the phasor onto the vertical axis as a function of time traces out the sine wave in the left side of the graphic. The projection of the phasor onto the horizontal axis as a function of time traces a cosine wave at the same time the projection onto the vertical axis produces a sine wave. The horizontal axis is called the real axis and the vertical axis is called the imaginary axis. It can be shown that the activity on the two axes are orthogonal. That is, they are statistically independent over the period of the cycle. The activity on the real and FIGURE 2: IDENTIFYING PEAKS AND VALLEYS IN PRICE. This displays the phasor indicator in the code listing apimaginary axes defines plied to RTX using daily data. The phasor is the red line in the first subgraph. The phase angle crossings of −90 and +90 the phasor. When the degrees basically constitute buy and sell signals of a trading algorithm, albeit trimmed in the real world. 10 • October 2022 • Technical Analysis of Stocks & Commodities

TRADESTATION

FIGURE 1: TIME DOMAIN VS. FREQUENCY DOMAIN. Happenings in the time domain are expressly tied to happenings in the frequency domain. The time domain and the frequency domain both represent events equally, so that either description provides a full and complete description of market activity. Expressed graphically here, the time waveform is represented by a pure sine wave in the left-hand side of the chart. The time waveform is also represented as a phasor (a two-dimensional vector pinned at the origin) in the right-hand side of the chart.

timing of the phase angle crossing +90 degrees can be compared to the peaks in the price waveform. Thus, the phase angle crossings of −90 and +90 degrees basically constitute buy and sell signals of a trading algorithm. Of course, these need to be trimmed in the real world. You want to hold a long position when the phase angle is between −90 degrees and +90 degrees. You want to hold a short position (or be out) when the phase angle is greater than +90 degrees or less than −90 degrees. You want the phase angle to be less than −90 degrees when you are swing trading. Note that the period of the phasor is not the period of the fixed cycle period used in the correlation process. In

It is much more preferable to perform analyses in terms of phase angle rather than in terms of cycle period. fact, there are times when the phase is not advanced at all. When the cycle phase is not advancing, the waveform is not cycling. If it is not cycling, it must be trending. Since the slope of the phasor is changing, the frequency of the spectrum must not be constant. Frequency is the rate-

PHASOR ANALYSIS, IN EASYLANGUAGE { }

Phasor Analysis (C) 2013-2022 John F. Ehlers

Inputs: Period(28); Vars: Signal(0), count(0), Sx(0), Sy(0), Sxx(0), Sxy(0), Syy(0), X(0), Y(0), Real(0), Imag(0), Angle(0), DerivedPeriod(0); Signal = Close; //Correlate with Cosine wave having a fixed period Sx = 0; Sy = 0; Sxx = 0; Sxy = 0; Syy = 0; For count = 1 to Period Begin X = Signal[count - 1]; Y = Cosine(360*(count - 1) / Period); Sx = Sx + X; Sy = Sy + Y; Sxx = Sxx + X*X; Sxy = Sxy + X*Y; Syy = Syy + Y*Y; End; If (Period*Sxx - Sx*Sx > 0) and (Period*Syy - Sy*Sy > 0) Then Real = (Period*Sxy - Sx*Sy) / SquareRoot((Period*Sxx Sx*Sx)*(Period*Syy - Sy*Sy)); //Correlate with a Negative Sine wave having a fixed period Sx = 0; Sy = 0; Sxx = 0; Sxy = 0; Syy = 0; For count = 1 to Period Begin X = Signal[count - 1];

Y = -Sine(360*(count - 1) / Period); Sx = Sx + X; Sy = Sy + Y; Sxx = Sxx + X*X; Sxy = Sxy + X*Y; Syy = Syy + Y*Y; End; If (Period*Sxx - Sx*Sx > 0) and (Period*Syy - Sy*Sy > 0) Then Imag = (Period*Sxy - Sx*Sy) / SquareRoot((Period*Sxx Sx*Sx)*(Period*Syy - Sy*Sy)); //Compute the angle as an arctangent function and resolve ambiguity If Real 0 Then Angle = 90 - Arctangent(Imag / Real); If Real < 0 Then Angle = Angle - 180; //compensate for angle wraparound If AbsValue(Angle[1]) - AbsValue(Angle - 360) < Angle - Angle[1] and Angle > 90 and Angle[1] < -90 Then Angle = Angle - 360; //angle cannot go backwards If Angle < Angle[1] and ((Angle > -135 and Angle[1] < 135) or (Angle < -90 and Angle[1] < -90)) Then Angle = Angle[1]; //Phasor Indicator Plot1(Angle, "Angle", red, 4, 4); Plot2(0, "Ref", white, 1, 1); Plot4(90, "", cyan, 2, 2); Plot8(-90, "", cyan, 2, 2); { //Frequency derived from rate-change of phase Vars: DeltaAngle(0), AvgPeriod(0); DeltaAngle = Angle - Angle[1]; If DeltaAngle 60 Then DerivedPeriod = 60; Plot9(DerivedPeriod, "", red, 4, 4); } { //Trend State Variable Vars: State(0); State = 0; If Angle - Angle[1] = 90 or Angle -90 and Angle < 90 Then State = -1; End; Plot10(State, "", red, 4, 4); } October 2022

• Technical Analysis of Stocks & Commodities • 11

rate-change of phase.” So when is the data trending? It is trending when it is not cycling. I have defined trending as occurring when the instantaneous period is longer that 60 days (about three months). This is also when the rate-change of angle is 6 degrees per bar or less. Trend rules are the opposite of swing rules. When trending, you FIGURE 3: CYCLE PERIODS. We can express the computed instantaneous period of the data as 360 divided by the rate-change of angle. The resulting derived period is shown here. As you can see, instantaneous derived cycle periods want to be long when are all over the place. It is preferable to perform analyses in terms of phase angle rather than in terms of cycle period. the phase angle is greater than +90 degrees or less than −90 degrees. You want to be short or out when the phase angle is between −90 degrees and +90 degrees. These rules can be used to create a state variable that is +1 for long positions, 0 for cycling, and −1 for short positions (or out). This state variable is shown in Figure 4. You can compare the timing of FIGURE 4: TREND STATE IS LONG (+1) OR SHORT (−1). We can use the rules to create a state variable that is +1 for the +1 and −1 states with long positions, 0 for cycling, and −1 for short positions (or out). This state variable is shown here. You can compare the the short-term trends in timing of the +1 and −1 states with the short-term trends in the price data. the price data. With reference to the change of angle. For example, the dimension of cycles sidebar’s code listing for phasor analysis, you can replicate per second can also be expressed in terms of angles as the state variable display by removing the curly brackets 360 × rotations per second, Therefore, we can express around the code segment titled “Trend state variable” the computed instantaneous period of the data as 360 and ensuring curly brackets are placed around the other divided by the rate-change of angle. The resulting derived display code segments. period is shown in Figure 3. Instantaneous cycle periods are all over the place, which demonstrates the difficulties The cycle is complete in cycle analysis. It is much more preferable to perform In the beginning, we used cycle analysis to determine analyses in terms of phase angle rather than in terms of whether the market was trending or whether it was suitable cycle period. for swing trading. Evolution has occurred. Our computers With reference to the code listing in the sidebar on phasor are far more capable than they were 40 years ago. Our analysis, you can replicate the results show in Figure 3 by continued research and application of the science of DSP commenting out the code block plotting the phase indica- to the art of trading has brought us full circle. We can now tor (with curly brackets) and removing the curly brackets use cycle analytics to know when to trade the trend. around the code block titled “Frequency derived from Congratulations to S&C for 40 years of successfully 12 • October 2022 • Technical Analysis of Stocks & Commodities

It takes confidence to trade options. (And some pretty powerful tools.)

If you want to start trading options—like really start trading options—you’re going to need more than just a click of a button. Log in to thinkorswim® and get immersive education, award-winning technology, and knowledgeable trade desk support. And the confidence? That’ll come naturally. Start learning options today at tdameritrade.com/options

Ranked #1 Platforms & Tools, 2022 StockBrokers.com Annual Review. Options involve risks and are not suitable for all investors. Before trading options, carefully read Characteristics and Risks of Standardized Options. Contact TD Ameritrade at 800-669-3900 for a copy. Supporting documentation for any claims, comparison, statistics, or other technical data will be supplied upon request. All investing involves risks, including loss of principal. TD Ameritrade, Inc., member FINRA/SIPC, a subsidiary of The Charles Schwab Corporation. © 2022 Charles Schwab & Co., Inc. All rights reserved.

bringing new technical concepts to traders. It has been a wonderful journey. Thanks to S&C for letting me be a part of it.

articles on cycle analysis, phasor display, and other topics related to market analysis and digital signal processing.

John Ehlers, a Contributing Editor to Stocks & Commodities, is a pioneer in the use of cycles and DSP (digital signal processing) technical analysis. This article is his 100th article to appear in this magazine, with his first article appearing in the December 1985 issue. Ehlers is president of MESA Software and can be reached through his website at MESAsoftware.com. Ehlers will hold his annual workshop online October 10–14, 2022, during which he will teach and discuss concepts and trading methods from his years of work in digital signal processing. More information can be found at MESAsoftware.com. Subscribers to this magazine can visit our article archives at Traders.com to read any of John Ehlers’ past

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

Further reading

Hurst, J.M. [1970]. The Profit Magic of Stock Transaction Timing. Warren, Anthony W., PhD, and Jack K. Hutson [1984]. “Maximum Entropy Optimization,” Technical Analysis of Stocks & Commodities, Volume 2: July. ‡TradeStation

‡See Editorial Resource Index

Explore Your Options

KAEPPEL/OPTIONS

Continued from page 7

buy five put options. The particulars for this position appear in Figure 3 and the risk curves in Figure 4. This position involves a tradeoff relative to the standard collar. The 5×5 position has a maximum profit potential of $700 and a maximum risk of −$800. By using the open collar in a 4×5 configuration: • The maximum risk is higher (−$1,040 versus −$800) • The maximum profit potential is unlimited (versus $700)

COMParing the tWO StrategieS

Figure 5 displays the expected P/L for both positions at expiration. The tradeoffs are pretty obvious: • Below a price of roughly $21.60 for AMC shares, the 5×5 collar will show either a greater profit

FIGURE 5: STANDARD COLLAR VS. OPEN COLLAR, P&L, AMC. This shows the expected profit & loss for both positions at expiration. The tradeoffs between the two approaches are clear.

or a smaller loss. • Above $21.60 for AMC shares, the 4×5 collar will enjoy pointfor-point profit with AMC shares, while the 5×5 collar will enjoy no additional profit beyond the maximum of $700.

SuMMarY

The open collar strategy can make a lot of sense for a trader looking for a complete hedge but who also wants to retain significant profit potential.

14 • October 2022 • Technical Analysis of Stocks & Commodities

Nevertheless, it is essential to note that being able to put on an open collar with a favorable reward/risk ratio somewhat depends upon the pricing of the options considered. If put options are relatively more expensive than call options, it may be challenging to find an advantageous position.

MARKET RAP THE WORLD OF RETAIL TRADING Emilio Tomasini is an adjunct professor of corporate finance at the University of Bologna in Italy and is a professional trader. He has audited over 5,000 accounts of traders during 13 years of a real-money trading competition, giving him unique insights into what helps a retail trader to succeed. He has expertise in technical analysis and trading Emilio Tomasini system design. In this column, he shares his sometimes “unserious” thoughts on serious topics in finance. In his writings, he hopes to help the retail trader better understand the leap from unprofitable to profitable trader, firmly believing that the right answers can come only if the right questions are asked. At his website at www.emiliotomasini.com, he offers some of his expertise in a free video course. SPECULATION VS. INVESTING What is an “investment” and how does it differ from “speculation”? Economic literature has been discussing this topic for centuries and it seems that investment is connected to production, while speculation is based on price forecasting. But can an investment turn into speculation or vice versa? In the end it may be impossible to say precisely, since it’s connected to psychology and motivation. (And that is something that is written in the clouds.) Whenever I am asked about the difference between investing and speculating, I always think of a fabulous comment by agriculture futures expert Roger Gray (1921–1996). The comment was made in response to the eternal debate over whether farmers are purely hedging in the agricultural markets: Is a farmer who buys a futures contract against his real crop production involved only in operational hedging without any speculative intent? Or is there a hint of speculation in there? What Gray said was this: “A clearcut definition of investment and speculation is meaningless because it presupposes not that most hedgers are arbitragers trying to get ahead in the world, which they are, but that they are a peculiar sort of conservative commercial idiot, striving always and only ‘to break even’ with an average rate of return.” For the purposes of our discussion

here, we could adapt Roger Gray’s comments as follows: Investment does not necessarily aim to achieve an average, boring rate of return, but rather, it aims to maximize wealth. In the war of definitions, which can often turn quickly from supporting one side of the argument to supporting the other, it is almost always true that speculation is an investment gone wrong. Putting aside the academic and theoretical debate over how to define investing and speculation, I’d like

A good investment involves some risk. And in exchange for risk, it gives back a return. We all agree on that. to offer a down-to-earth thought. It simply has to do with the odds of making a profit or the odds of losing money. A good investment involves some risk. And in exchange for risk, it gives back a return. We all agree on that. But there are degrees to it. An investment that is very uncertain and that causes a lot of apprehension and psychological stress must make a higher return than a less uncertain investment, one that produces little to no anxiety, for the investment to be worth the risk. In trading, say you go to place a trade after checking off all the boxes October 2022

that greenlight the trade (for example, the trendline is broken, the 200-day moving average is up, volume is increasing, the RSI indicator is not overbought, the e-margin is growing, the forecasts for the next quarter’s earnings per share are upbeat, and generally, everything seems to be in place). Well, having all the ducks line up and having everything point to green and “all clear” implies that you will lose money. Why? Because if everything is “all clear,” then there is no risk. And if there is no risk, then theoretically there won’t be a return. If you watch a real scalper in action, then you will realize that what he does would be crazy to the average investor. For the scalper, in every case there is a lot of insanity, and insanity means that there is no playbook to follow, no handbook to read. This produces risk. When the definition of “risk” moves from the pages of a college textbook to how it looks in reality, it’s a monster nobody wants to live with. In reality, you are hoping against hope that you don’t run up against a black swan. So when you talk about “risk and return,” please put a real face on risk. When you acknowledge that in reality, risk feels more like “battle shock,” “trauma,” or “clinical depression,” then you can start to appreciate the real meaning of “return.” Continued on page 21

• Technical Analysis of Stocks & Commodities • 15

Looking To The Past For Trading Ideas

Developing And Testing A Trading Strategy From The Vault A dive into this magazine’s vast article archives can provide you with myriad ideas for trading strategies to develop and test. Here’s an example of doing just that by returning to the very first issue of this magazine to pull out a trading idea. Will it work? Let’s find out.

Here, I’ll explain how I go about doing this, and I’ll also provide an example of developing a trading strategy based on an idea taken from the very first issue of S&C, the October 1982 issue.

by Kevin J. Davey

Over the last 40 years, there have been countless trading ideas written about in this magazine. And for someone like me, an algo trader and strategy developer, these ideas are a veritable goldmine. My style of algo trading needs lots and lots of ideas, since I am constantly testing new strategies, concepts, and approaches. While most ideas I test do not pass all my rigorous tests (somewhere around 95 to 99 out of 100 ideas fail), I find if I test enough ideas, eventually I discover tradable algo strategies. And that makes it all worth it! Here is an example of how I utilize the S&C article

16 • October 2022 • Technical Analysis of Stocks & Commodities

AURIELAKI/SHUTTERSTOCK COLLAGE: CHRISTINE MORRISON

As

Technical Analysis of Stocks & Commodities magazine celebrates its 40-year anniversary, I thought I’d share a way I take advantage of the 40 years of article archives that S&C magazine subscribers have access to at the magazine’s website, Traders.com. Using the article archives (which includes thousands of articles!) is a great way to discover potential trading ideas.

Algorithmic trading

TRADING STRATEGIES

Input: mlookback(50); Var: momentum1(0); momentum1=close-close[mlookback]; if momentum1 crosses above 0 and close>close[2*mlookback] then buy next bar at market; if momentum1 crosses below 0 and close BOKO, then GFI will be positive. When GFI is close to +1, it means there is little profit-taking. If BOKC < BOKO, then GFI will be negative. When GFI is close to −1, it means there is too much profit-taking. If B=0, then GFI is 0, meaning there is an inflection point in buying and selling. Thus, the GFI describes the relative strength of buying and selling. GFI ranges between +1 and −1, that is, −1< GFI < +1. If GFI is close to +1, it indicates there is overheated buying sentiment and traders may have overbought by this point. This may be a good time to sell in advance of the crowd, in order to sell close to a top. If GFI is close to −1, it indicates that stoplosses are being hit, indicating selling, and the market may be reaching an oversold condition. This may be a good time to buy in advance of the crowd (that is, buy the dip). If GFI = 0, it indicates we are at an inflection point, which means a change may be about to occur in the current buysell activity.

FIGURE 1: SPY, 1/18/2022–4/27/2022. In this chart of the ETF representing the S&P 500 index (SPY), the GFI provided three sell signals while the RSI provided no signals.

FIGURE 2: QQQ, 1/18/2022–4/27/2022. In this chart of the ETF representing the Nasdaq (QQQ), the GFI had three sell signals while the RSI provided no signals.

Examples

As this is being written in May 2022, the market is down heavily from January 2022. Seeing this downturn occurring in the market meant I wanted to find a good sell FIGURE 3: NFLX, 1/18/2022–4/27/2022. In this chart of Netflix Inc., the GFI provided two signals while the RSI provided no signals. signal to use because I want to sell earlier in the downtrend rather than later. As mentioned earlier, the well-known RSI is a classic overbought/oversold indicator, serving to signal when we may have reached overbought or oversold conditions. In this article, I have Here in this article, I have introduced the GFI as a introduced the GFI as a tool for tool for measuring on a relative basis the strength of overbought and oversold conditions. The GFI can give measuring on a relative basis you an indication of whether a buying or selling trend is the strength of overbought and underway, and how far along the curve it is. oversold conditions. In the following example charts (Figures 1–4), I will compare the signals given by both the GFI and RSI, so 44 • October 2022 • Technical Analysis of Stocks & Commodities

you can see how the signals from each compare and how signals from the GFI may be more helpful. All five charts cover the same timespan in early 2022 from 1/18/2022 to 4/27/2022. In the charts, you can see the sell signals that appeared on the GFI, whereas few to no signals occurred in the RSI. Figure 1 is a candlestick price chart of the SPY. The RSI is in the middle pane and the GFI is in the bottom pane. During this time period of about three months in 2022, FIGURE 4: FB (NOW META), 1/18/2022–4/27/2022. On this chart of FaceBook (now Meta which saw a downtrend in the market, the Platforms), the GFI provided three sell signals while the RSI provided no signals. GFI provided three sell signals, while the RSI provided no signals. The signals are marked by a vertical line that corresponds to peaks in the GFI indicator plot at its upper boundary. Figure 2 is a chart of the QQQ. During this period, the GFI had three sell signals here as well, while the RSI provided no signals. Figure 3 is a chart of Netflix Inc. (NFLX). Here, the GFI provided two signals while the RSI provided no signals. FIGURE 5: OXY, 1/18/2022–4/27/2022. On this chart of Occidental Petroleum Corp., both Figure 4 is a chart of Meta Platforms the GFI and the RSI provided two sell signals. (formerly FaceBook, with a ticker symbol of FB at the time this chart was created, ticker symbol now META). In this example, the GFI provided Further reading three sell signals while the RSI provided no signals. Wang, Howard [2016]. New Concepts In Trading: Profit Figure 5 is a chart of Occidental Petroleum Corp. Taking Theory (published in Chinese). [2016]. “Waves And Profit-Taking,” Technical (OXY). Here, the GFI provided two sell signals and the Analysis of Stocks & Commodities, Volume 34: RSI also provided two sell signals. November. Conclusion [2015]. “The Breakout Relative Strength Index,” In addition to the classic RSI indicator, the greed and Technical Analysis of Stocks & Commodities, fear index (GFI) is another useful relative strength inVolume 33: September. dicator. It is an index of trading transactions. It is based [2019]. “Sell Relative Strength Index,” Technical on the strength of profit-taking by traders in the market. Analysis of Stocks & Commodities, Volume 37: For traders, it can be used as a contrarian indicator and February. can help them to buy and sell in advance of the crowd. When trading, it can provide more effective buy and sell signals than the RSI. Howard Wang has a master’s degree in mathematics and economic statistics, and has over two decades of investment experience. He is particularly interested in analyzing technical indicators, candlestick construction, and designing breakout trading software and automated trading systems. He may be reached at [email protected].

The GFI can provide more effective buy and sell signals than the RSI. October 2022

• Technical Analysis of Stocks & Commodities • 45

The Savvy Technician

KEEP YOUR MARKET OUTLOOK BASED IN REALITY “The stupid shall be punished” is a military maxim. It is an admonishment that mistakes can be costly and can literally be the difference between life and death. This is why the importance of interpreting and dealing with events as they appear before one’s own eyes is so essential in the military. One profession that often seeks to align itself with military parlance is traders. Trading the financial markets is a profession where politics and propaganda are at best useless and worst destructive. Just because you can convince others that you believe the market will rally does not mean it will. The market does not care about your biases, beliefs, and political agenda. You have to adjust your mindset to deal with the market on its own terms and move your perspective to align as closely as possible with reality. Eventually, the market will reveal the incompetent, the arrogant, and the dangerous fool. The market will expose those who seek to bamboozle others with lies, mistruths, and plain old stupidity. It never fails. The S&P 500 index (SPX) entered bear market territory when it fell 20% from its high. It will leave bear

Adjust your mindset to deal with the market on its own terms.

STOCKCHARTS.COM

CHARTING THE MARKETS Stella Osoba, CMT, Esq., is an attorney, trader, and financial writer in New York, NY. Her work in financial litigation involving regulatory bodies and large multinational corporations led to an interest in the financial markets, then technical analysis and the psychological aspects of market behavior. She earned a CMT charter in 2013 and was a director-at-large on the board of the CMT Association for four years. This column will focus on recognizing and applying technical chart patterns to trading with flexibility and astuteness for better decision-making in trading. She can be reached at [email protected].

FIGURE 1: SPX DAILY, BEAR MARKET. On May 20, 2022, the S&P 500 index entered bear market territory when it broke below 3,854 to touch a low of 3,810.

market territory when it rises 20% from its low. On January 4, 2022 the SPX touched a high of 4,818. On May 20, 2022, the SPX officially entered bear market territory when it broke below 3,854 to touch a low of 3,810. The ensuing volatility resulted in wild daily market swings and brought the SPX back up above 4,000. Some people thought then that the bear market was done, or maybe it never even

46 • October 2022 • Technical Analysis of Stocks & Commodities

happened. But look at first principles. Look at the evidence before you and pay no attention to pundits who are paid to form opinions. Research tells us that bear markets last on average 289 days or about one third as long as an average bull market. As technicians, we must do what we are trained to do and look for evidence on price charts. Figure 1 is a daily price chart of the SPX.

The Savvy Technician We can see that it is a mostly bearish chart. From the time it made its high at the beginning of January 2022, it has proceeded to make a series of lower lows and lower highs (the classic definition of a bear market). The 50-day moving average crossed the 200-day moving average in a death cross in March 2022. So, what about this chart will tell us that the bear market is over? Figure 2 shows a weekly price chart of the SPX. We can see that it completed a rounded top and then broke down as it crossed below the 50-day moving average. Over the last seven weeks, we see that price is forming a flag. Now, it is possible that the flag will fail and price will move to the upside. If that happens, we must trade accordingly. But flags are continuation patterns and it is also possible that it will break out in the direction in which it entered the pattern, which will be to the downside. Technical analysis is the map, not the territory. Either scenario can happen. As traders, we derive information from price action. We do not “do stupid.” “Doing stupid” means listening to pundits and others seeking to make money by telling you what they cannot know. We cannot know what

We have the tools to enable us to trade wisely no matter what does in fact happen.

FIGURE 2: SPX WEEKLY, WHEN WILL THE BEAR MARKET END? As technicians, we look for market clues on the price charts. The S&P 500 index completed a rounded top and then broke down as it crossed below the 50-day moving average. We can see that price is forming a flag.

will happen, but we have confidence that we have the tools to enable us to trade wisely no matter what does in fact happen. Flexibility is our superpower.

‡StockCharts.com

‡See Editorial Resource Index

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

• Technical Analysis of Stocks & Commodities • 47

A RETROSPECTIVE: 40 YEARS A LOOK BACK AT SOME EARLY S&C INTERVIEWS This issue marks 40 years that Technical Analysis of Stocks & Commodities magazine has been published. Over the decades, we’ve presented interviews with hundreds of analysts, technicians, traders, and educators. All of those interviews add up to a lot of trading wisdoms. We wanted to share a few quotes from some of our earliest published interviews, so we dove deep into our article archives to pluck out some quotes. And this is just a small sampling from our article archives. Subscribers to this magazine can visit the article archives at our website, Traders.com, to read all our timeless interviews with those who have a lot to teach us about trading and market analysis, from years ago up through the present today. We hope you’ll enjoy this look back.

“I would go so far as to say that whether one makes money in the markets depends on whether or not one uses the proper money management. How much money you make depends on where you enter and exit the markets.”—J. Welles Wilder, February 1986 “If you look at the people who are in the advisory business, you’ll get a good answer as to why they write a [market] letter. There’s a common thread running through a lot of them who’ve done it successfully. Number 1 is, I think it’s almost like being a teacher; you’ve discovered or you’ve evolved something you think, even if it doesn’t move the market, it’s an important factor in why the market moves. It’s like any discovery anyone makes—they want to share it with other people.”—Peter Eliades, December 1986 “Superb investors tend to invest unconsciously in the sense that most of what they do is automatic. They don’t even have to think about it.” —Van K. Tharp, April 1987 “One of the important things for me is the realization in the last 10 months that you can never be right trading

commodities. I’ve always wanted to be right but you’re never going to be right. You’re not going to get the high. You’re not going to get the low. Once I realized that, I felt much more relaxed.”—Larry Williams, June 1987 “What it’s all about in options trading is trying to choose a sensible volatility and then arranging strategies that will be profitable if you’re right, but won’t force you to go out of business if you’re wrong.”—Shelly Natenberg, November 1989 “The most important thing about analyzing the markets and trading is discipline. I know that when I’m trading the markets, my enemy is not the market.”—Alex Elder, January 1991 “The early Japanese traders had a lot of practical market philosophies, and those philosophies translated into technicals over the next couple of hundred years.”—Steve Nison, March 1991 “The most money is made in the market by those who are able to iden-

48 • October 2022 • Technical Analysis of Stocks & Commodities

tify trends early and stick with them—not trade out of issues just because they’ve gone theoretically too far too fast.”—Robert Nurock, April 1991 “Being a technical analyst, you can follow all these different markets; you can follow all the international markets easily. It’s difficult for fundamental analysts to do that because you can’t absorb that much fundamental information, so that’s one of the advantages of technical analysis. That also explains why those of us who do this kind of work are primarily technical analysts.”—John Murphy, June 1991 “Essentially, we are not trying to call tops and bottoms, we are trying to follow an approach that will make money over time and produce consistent returns.”—Tim Hayes, August 1991 “The ma rket cycle model is really an arrangement whereby we recognize there is a primary trend, an intermediate trend, and a short trend. A market cycle model is just the arrangement of a chart with those three trends.”—Martin Pring, February 1992 “Good money management is equity invariant. I’d ask a trader who thinks he needs a certain amount before he can trade exactly what amount he would need to stop trading.”—Ed Seykota, August 1992

A RETROSPECTIVE: 40 YEARS “I was first inspired by R.W. Schabacker’s Stock Market Theory And Practice. It had many of the stock formations that were described in more detail 18 years later by Edwards & Magee.”—Arthur Merrill, October 1992 “Quite frankly, people practice too much technical commentary, always focusing on where the market is going, instead of having a better understanding of where the market is.”—Laszlo Birinyi, February 1993 “One of the signatures of a nontrending market is the number of reversal patterns. In nontrending markets, you tend to pick up a large number of reversal patterns. In trending markets, you pick up relatively few reversal patterns.”—John Bollinger, July 1993 “Short-term momentum precedes long-term momentum. And momentum precedes price. Usually, trend reversals or the beginning of new moves start with an increase in the short-term momentum.”—Linda Bradford Raschke, September 1993 “You shouldn’t only understand that an indicator works, you should understand why it works, what’s behind it, and how you think it might change.” “... It is critical to test all theories, technical or economic. Fundamental macroeconomic analysis is a function of somebody saying, this is how the

world looks. Since many people have different hypotheses, they can’t all be right.”—“Trader Vic” Sperandeo, December 1993 “The better the technical indicators you use, the higher the confidence level you’ll have in those indicators. This is an excellent way to trade, but money management becomes more important.”—Marc Chaikin, January 1994 “If you have too many rules in your model, all you’ve done is created a very curve-fitted model that may look good in back-testing, but it’s not likely to perform well in real-time usage.”—Gerald Appel, December 1994 “When verifying a strategy, people should question profitable results as much as they question losing results.” “... Most markets are highly correlated during a price shock. The markets react the same way. And markets that have nothing to do with the price shock reverse direction because many investors liquidate positions in other markets in order to cover losses in the markets that they’re on the wrong side of.”—Perry Kaufman, June 1995 “But the most exciting thing about all of this is how well technical analysis has worked. If you keep it simple and stay with the basics, follow the trend, use bottom-up analysis, then you’ll have a map to follow. You’ll have a strong sense of where you’re going. That’s what I really think October 2022

technical analysis has to offer.”—Ralph Acampora, February 1997 “I tell people that you need two things to trade. First, you need an approach with a realistic chance of making money in the long run, and it doesn’t have to be fancy. Make sure you cover the basics, like “Go with the trend,” “Cut your losses,” “Let your profits run,” and so forth. Having the plan is part 1. Part 2 is having the discipline to follow the plan.”—Jay Kaeppel, May 1997 “I always tell people that there are three things you need to do when you actually take a position. First, you want to know your profit targets. Second, you need to have your stop-loss. Then, and only then, are you ready to take a position.”—John Hill, July 1998 “It’s human nature to be influenced by the actions of the crowd, particularly in emotionally charged settings. ... The crowd behaves the same way in every market cycle. Some trends last longer than others and some travel farther than others, but the psychological progression through each bull and bear market is always the same.”—Robert Prechter, January 1996 “You need to decide whether you want to trade the trend mode or the cycle mode. That’s first. Second, you want to look at key parameters when you’re designing the system.” —John Ehlers, January 2004

• Technical Analysis of Stocks & Commodities • 49

The focus of Traders’ Tips this month is Vitali Apirine’s article in the February 2022 issue, “Relative Strength Moving Averages, Part 2 (RS VA EMA).” Here, we present the October 2022 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: OCTOBER 2022 TRADERS’ TIPS CODE Vitali Apirine’s 2022 three-part article series examines moving averages based on relative strength. The indicators he presents are designed to reduce the lag of traditional EMAs, making them more responsive. In part 2 of his article series, which appeared in the February 2022 issue of S&C, he explores the relative strength volume-adjusted exponential moving average (RS VA EMA). The indicator is designed to account for relative strength of volume and as part of the calculation incorporates a measurement between the positive and negative volume flow. Volume is considered positive when the close is above the prior close and considered negative when the close is below the prior close. The indicator can be used to help establish trends and define turning points. It is important to note that when using the EasyLanguage function code given here, it should be configured as a series function in the general tab of the function’s properties window.

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.

Vup = IFF(Close > Close[1], MyVol, 0); Vdwn = IFF(Close < Close[1], MyVol, 0); RS = AbsValue( XAverage(Vup, Pds) XAverage(Vdwn, Pds)) / (XAverage(Vup, Pds) + XAverage(Vdwn, Pds) + 0.00001); RS = RS * Mltp; Rate = Mltp1 * (1 + RS); if CurrentBar = 1 then RSVAEMA = Close else RSVAEMA = RSVAEMA[1] + Rate * (Close - RSVAEMA[1]); Indicator: TASC OCT 2022 RS VA EMA // TASC OCT 2022 // RSVAEMA - Relative Strength Volume-Adjusted // Exponential Moving Average (RS VA EMA) // 2022 Vitali Apirine inputs: Periods( 10 ), Pds( 10 ),

Series Function: RSVAEMA // TASC OCT 2022 // RSVAEMA - Relative Strength Volume-Adjusted // Exponential Moving Average (RS VA EMA) // Series Function // 2022 Vitali Apirine inputs: Periods( NumericSimple ), Pds( NumericSimple ), Mltp( NumericSimple ); variables: Mltp1( 0 ), Vup( 0 ), Vdwn( 0 ), RS( 0 ), Rate( 0 ), MyVol( 0 ); Mltp1 = 2 / (Periods + 1); { Daily, Weekly, or Monthly bars } if BarType >= 2 and BarType < 5 then MyVol = Volume else MyVol = Ticks;

FIGURE 1: TRADESTATION. This shows a TradeStation daily chart of the S&P 500 ETF SPY with the indicator (blue) applied and an exponential moving average (red). The RS VA EMA indicator uses inputs 20, 20, 20 and the exponential average uses a length of 20.

50 • October 2022 • Technical Analysis of Stocks & Commodities

Mltp( 10 ); variables: RSVAEMAValue( 0 ); RSVAEMAValue = RSVAEMA( Periods, Pds, Mltp ); Plot1( RSVAEMAValue, "RS VA EMA" );

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. —John Robinson TradeStation Securities, Inc. www.TradeStation.com

F THINKORSWIM: OCTOBER 2022 TRADERS’ TIPS CODE We put together a study based on an article by Vitali Apirine on the relative strength volume-adjusted exponential moving average (the RS VA EMA), which appeared in the February 2022 issue of S&C as part of a series. We built the strategy referenced by using our proprietary scripting language, thinkscript. To ease the loading process, simply click http://tos.mx/ffByDgy or enter it into the address into setup → open shared item from within thinkorswim, then choose view thinkScript study and name it “RS_VA_EMA” or whatever you like and can identify. You can then add the strategy to your charts from the edit studies menu from within the charts tab and then selecting studies. The chart in Figure 2 shows our version of Figure 3 from the original article. Please see the article by Vitali Apirine for more information on how to utilize the study.

FIGURE 2: THINKORSWIM. This chart replicates the chart in Figure 3 of Apirine’s article.

FIGURE 3: WEALTH-LAB. This shows an example of laying out the system’s rules in the Building Blocks feature of Wealth-Lab 8.

—thinkorswim A division of TD Ameritrade, Inc. www.thinkorswim.com

F WEALTH-LAB: OCTOBER 2022 TRADERS’ TIPS CODE The RS VA EMA, introduced by Vitali Apirine in his February 2022 S&C article, is a trend-following indicator interpreted in a similar way to the EMAs, but responds more quickly than other lagging indicators. Its speed of response can cause whipsaws. Here is a simple trick to avoid that undesirable effect when designing trend-following systems. Rather than rely on a crossover or crossunder, we can require the close price to stay X consecutive closes above or below the RS VA EMA to determine that the trend has changed. In our example system, we break this variable into two for better precision: A long entry is triggered af-

FIGURE 4: WEALTH-LAB. This demonstrates some trades taken by the system applied to a chart of the SPY.

ter X consecutive closes above the MA and a long exit is performed after the close price drops below the MA for Y consecutive bars. In this example, the entry is relaxed by requiring only two consecutive closes above the MA whereas the system will wait for five consecutive closes below the MA for the October 2022

• Technical Analysis of Stocks & Commodities • 51

exit to trigger. It lets profits run but a downside is the delay of an exit if the market starts moving against your position strongly. Figure 3 shows setting up the rules in Wealth-Lab’s Building Blocks feature and Figure 4 shows the indicator on a chart of SPY. The RSVAEMA has been added to Wealth-Lab 8 which makes it available to any tools and extensions automatically. —Gene Geren (Eugene) Wealth-Lab team www.wealth-lab.com

F NINJATRADER: OCTOBER 2022 TRADERS’ TIPS CODE The relative strength volume-adjusted exponential moving average (the RS VA EMA), as detailed in a February 2022 S&C article by Vitali Apirine, is available for download at the following links for NinjaTrader 8 and for NinjaTrader 7:

FIGURE 5: NINJATRADER. The RSVAEMA (10, 50, 50) indicator (green) and a 20-period EMA (blue) are displayed on a daily chart of the DJIA from September 2018 to April 2019.

NinjaTrader 8: www.ninjatrader.com/SC/October2022SCNT8.zip NinjaTrader 7: www.ninjatrader.com/SC/October2022SCNT7.zip

Once the file is downloaded, you can import the indicator into NinjaTrader 8 from within the control center by selecting Tools → Import → NinjaScript Add-On and then selecting the downloaded file for NinjaTrader 8. To import into 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 source code in NinjaTrader 8 by selecting the menu New → NinjaScript Editor → Indicators folder from within the control center window and selecting the RSVAEMA 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 RSVAEMA file. NinjaScript uses compiled DLLs that run native, not interpreted, which provides you with the highest performance possible. A sample chart displaying the indicator is shown in Figure 5. —Emily Christoph NinjaTrader, LLC www.ninjatrader.com

FIGURE 6: TRADINGVIEW. The relative strength volume-adjusted exponential moving average (RS VA EMA) is shown on a chart of the SPX. //  TASC Issue: October 2022 - Vol. 40, Issue 11 //     Article: Relative Strength Moving Averages //              Part 2: The Relative Strength Volume-Adjusted //              Exponential Moving Average (RS VA EMA) //  Article By: Vitali Apirine //    Language: TradingView's Pine Script v5 // Provided By: PineCoders, for tradingview.com //@version=5 indicator('TASC 2022.10 RS VA EMA', overlay=true) float   src = input.source(close,  'Source:') int periods = input.int(10,    'EMA Length:', minval=1) int     pds = input.int(10,     'VS Length:', minval=1) float  mltp = input.int(10, 'VS Multiplier:', minval=0)

F TRADINGVIEW: OCTOBER 2022 TRADERS’ TIPS CODE Here is the TradingView Pine Script code implementing the relative strength volume-adjusted exponential moving average (RS VA EMA) described by Vitali Apirine in his article in the February 2022 issue of S&C. 52 • October 2022 • Technical Analysis of Stocks & Commodities

rsvaema(float    source = close,    simple int  emaPeriod = 50,    simple int   vsPeriod = 50,         float multiplier = 10.0        ) =>     var float mltp1 = 2.0 / (emaPeriod + 1.0)     var float coef1 = 2.0 /  (vsPeriod + 1.0)

    var float coef2 = 1.0 - coef1     float pv   = source > source[1] ? volume : 0.0     float nv   = source < source[1] ? volume : 0.0     float apv  = na, apv := coef1 * pv + coef2 * nz(apv[1])     float anv  = na, anv := coef1 * nv + coef2 * nz(anv[1])     float vs   = math.abs(apv - anv) / (apv + anv)     float rate = mltp1 * (1.0 + nz(vs, 0.00001) * multiplier)     float rsma = na     rsma := rate * source + (1.0 - rate) * nz(rsma[1],source)     rsma float rsvaema = rsvaema(src, periods, pds, mltp) plot(rsvaema, title='RS VA EMA', color=#B21BD8, linewidth=2)

The indicator is available on TradingView in the PineCodersTASC account: https://www.tradingview.com/u/ PineCodersTASC/#published-scripts An example chart is shown in Figure 6.

—PineCoders, for TradingView www.TradingView.com

F NEUROSHELL TRADER: OCTOBER 2022 TRADERS’ TIPS CODE The relative strength volume-adjusted exponential moving average (RS VA EMA), as introduced by Vitali Apirine in his February 2022 article in S&C, can be easily implemented in NeuroShell Trader by combining some of NeuroShell Trader’s 800+ indicators. To implement the indicators, select new indicator from the insert menu and use the indicator wizard to create the following indicators:

VUEMA:  ExpAvg( IfThenElse( A>B( Momentum(Close, 1), 0 ), Volume, 0 ), 10) VDEMA:  ExpAvg( IfThenElse( A priceC(1),marketVol(),0), Vdn = ifelse(priceC(0) < priceC(1),marketVol(),0); var EMAUp = EMA(Vup,Pds), EMADn = EMA(Vdn,Pds); var RS = abs(EMAUp-EMADn)/ (EMAUp+EMADn+0.00001)*Mltp; var Rate = 2./(Periods+1)*(1+RS); return EMA(priceC(),Rate); }

Figure 9 shows the RSEMA2(20,20,10) applied to a chart of the DJIA in comparison with EMA(20). We can see that the RSEMA2 (red) has noticeably less lag than the original EMA (blue). This is not surprising since its time period is modulated by the volume. The RSEMA2 indicator can be downloaded from the 2022 script repository on https://financial-hacker.com. The Zorro software can be downloaded from https://zorro-project.com.

FIGURE 9: ZORRO PROJECT. The RSEMA2(20,20,10) is applied to a chart of the DJIA in comparison with EMA(20). The RSEMA2 (red) has noticeably less lag than the original EMA (blue).

—Petra Volkova The Zorro Project by oP group Germany https://zorro-project.com

F AIQ: OCTOBER 2022 TRADERS’ TIPS CODE The importable AIQ EDS file based on Vitali Apirine’s article in the February 2022 issue titled “Relative Strength Volume-Adjusted Exponential Moving Average” 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. Code for the author’s indicator is set up in the AIQ EDS code file. Figure 10 shows a comparison of the EMA(40) versus the RS_VA_EMA on a chart of SPY during three months of 2022. CODE: ! Relative Strength Volume Adjusted Exponential Moving Average ! Author: Vitali Apirine, TASC October 2022 ! Coded by: Richard Denning, 8/16/2022 Periods is 40. Pds is 40. Mltp is 10. C is [close]. v IS [volume]. Mltp1 is 2/(Periods+1). Vup is iff(C>valresult(C,1),V,0). Vdwn is iff(C Periods*2. DaysInto is ReportDate() - RuleDate(). Stop if DaysInto > 50. stopesa is iff(stop,C,RS_VA_EMA). !myesa is alpha * [close] + beta * valresult( stopesa, 1 ). RS_VA_EMA is iff(HD,valresult(stopesa,1)+Rate*(Cvalresult(stopesa,1)),C). !If(Cum(1)=Periods*2,C,PREV+Rate*(C-PREV)).

54 • October 2022 • Technical Analysis of Stocks & Commodities

FIGURE 10: AIQ. Here, the exponential moving average of close over 40 bars (smooth blue line) is compared to the RS_VA_EMA(40,40,10) (jagged red line) on SPY. ListValues if 1. EMAp is expavg(C,Periods).

—Richard Denning [email protected] for AIQ Systems

F EXCEL: OCTOBER 2022 TRADERS’ TIPS CODE This month we’ll explore the second article in a series by Vitali Apirine on relative strength moving averages. Here, we’ll look at the relative strength volume-adjusted exponential moving average (RsVaEMA), which he described in his February 2022 article. The RsVaEMA indicator uses the volume at each bar to calculate a relative strength. That relative strength value is used to scale the coefficient used in the EMA calculation at each bar. In the example charts that the author provided with the

FIGURE 11: EXCEL. This chart is an approximation in Excel of Figure 3 from Vitali Apirine’s article.

article, RsVaEMA values appear to track price action more closely than a standard EMA with less apparent lag. The spreadsheet I am providing here is set up to allow up to two standard EMAs and up to two RsVaEMAs, each with their own specifications, so that users may mix and match as they explore. To download this spreadsheet: The spreadsheet file for this Traders’ Tip can be downloaded from www.traders.com in the Traders’ Tips area. To successfully download it, follow these steps: • Right-click on the link to the Excel file, then • Select “save target as” to place a copy of the spreadsheet file on your hard drive. Note: The spreadsheet provided in the September 2022 issue contained an error that will interfere with data retrievals. For those willing to venture into the VBA editor, two simple fixes will bypass problem. Here are the steps:

4. Fill in the “Find what” box with: Call ButtonText1( 5. In the search box, click the “Current project” button. 6. Then click the “Find next” button. The target line will be highlighted in yellow. 7. On the target line, place a single quote (‘) in front of the word “Call” 8. In the “Find” dialog box, change the “Find what:” box to read: Call ButtonText2( 9. Then click the “find next” button. The target line will be highlighted in yellow just a few lines down. 10. On this target line, place a single quote (‘) in front of the word “Call” 11. Close the VBA editor (the red X in the upper-right corner) 12. Close the spreadsheet and “save changes” when prompted. “Price refresh” or “download for a new symbol” should now work correctly for the September 2022 spreadsheet. —Ron McAllister Excel and VBA programmer [email protected]

1. Open the spreadsheet but do not refresh prices. 2. Open the VBA editor (ALT-F11—that is, hold down the ALT key and press the F11 key). 3. Open VBA Find dialog (hold down the CTRL key and press the “F” key).

ZHAO/ENERGY

Continued from page 30

FURTHER READING

Zou, C., Zhao, Q., Zhang, G., and Xiong, B. [2016]. “Energy Revolution: From A Fossil Energy Era To A New Energy Era.” Natural Gas Industry, 3(1), 1–11. https://doi.org/10.1016/j.ngib.2016.02.001 Zhao, Jerry [2022]. “Momentum And Seasonality: What Can We Learn From Nearly 100 Years Of Historical

Data?” Technical Analysis of StockS & commodiVolume 40: February. Rodrigue, J.P., editor, “Evolution Of Energy Sources,” https://transportgeography.org/contents/chapter4/ transportation-and-energy/energy-sources-evolution/, accessed on May 23rd, 2023. tieS,

‡Bloomberg Terminal; ‡finviz.com; ‡Yahoo Finance ‡See Editorial Resource Index October 2022

• Technical Analysis of Stocks & Commodities • 55

Algo Q&A DAVEY/ALGO Q&A

Continued from page 31

markets and tougher trading for retail traders. Currently, trading is 60–70% technology, and in 40 years it could easily be 99% technology based. I see the very real possibility where the human factor could be gone, or at least greatly diminished.” Andrea Unger Finally, I asked my dear friend and four-time trading contest winner Andrea Unger what he thought about the future of trading. Unger states: “I believe 40 years

from now, the battle will be among algos, even in retail. Edges will become smaller and good execution and proper timing will be very important. Yet I still believe trend-following will be there. We keep on stating it is dead, but sooner or later it comes back to produce profits.” And, my own thoughts Where do I see trading in 40 years? I have to agree with just about everyone I spoke with. I see retail trading still happening, although a lot of trading will be (sentient?) computers fighting each other for profits. Yet at the same time, simple approaches such as trend-following will probably still

Markets are driven in part by human nature, and I think that will continue. work. Markets are driven in part by human nature, and I think that will continue. In 40 years from now, I’ll be in my mid-90s, and a lot can happen in that time. I hope S&C and I are both around to see how these predictions turn out!

Futures For You GARNER/FUTURES

Continued from page 35

generally exhausting itself, but more telling is a speculative long position falling below 200,000 which has historically, eventually, led to bullish opportunities.

NATURAL GAS

Unlike gold and oil, speculators are continually net short natural gas futures. With a few brief exceptions, this has been the case for several decades. A quick look at a monthly chart will make it obvious why this is the case: natural gas spends most of the time moving lower with the trend

interrupted by violent, but temporary, rallies. Thus, when looking at the COT Report for gas, the question should be how short speculators are and whether are they vulnerable to a price squeeze. It should also be noted that natural gas traders often get the shortest a few months before a significant bottom but are the least short near significant tops.

WRAP UP

The purpose of this month’s column is to introduce a few tips and tricks for using the COT Report as a potential speculative tool. Obviously, there is much more to learn and observe. Further, just like markets are everchanging, so are market participants

When parsing data, everything is relative. and their tendencies, so users of this data must recognize that the analysis is static. The CFTC’s website offers COT data in free text format, but those interested in seeing what the COT Report has to offer should consider viewing a source that charts the data. There are a few free sources for COT charts. One is Barchart. com, and another is the CMEGroup. com website.

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

56 • October 2022 • Technical Analysis of Stocks & Commodities

Free Information From Advertisers Advertiser

Page

Advertiser

Page

Software

Brokerages

Interactive Brokers

3

ibkr.com/iwantmore

AbleSys

19

www.AbleSys.com/SCM

Ninjatrader

5

ninjatrader.com

MetaStock

64

MetaStock.com/whats-new

TD Ameritrade

13

tdameritrade.com/options

Ninjatrader

5

ninjatrader.com

Publications

Websites

Stocks & Commodities

2, 63

Store.Traders.com, Traders.com

Stocks & Commodities

2, 63

Store.Traders.com, Traders.com

Editorial Resource Index OptionsAnalysis.com. . . . . . . . . . . . . . . . . . . . . . 6 TradeStation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Multi Opt Software.. . . . . . . . . . . . . . . . . . . . . . . . 21 fred/stlouisfed.org.. . . . . . . . . . . . . . . . . . . . . . . . 23 StockCharts.com. . . . . . . . . . . . . . . . . . . . . . . . . . 23 eSignal.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Bloomberg Terminal. . . . . . . . . . . . . . . . . . . . . . 29 finviz.com.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Yahoo Finance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 US Patent and Trademark Office.. . . . . 29 TradingView.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 thinkorswim (by TDAmeritrade) .. . . . . . . . . . . . . 51 Wealth-Lab.com . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 NinjaTrader.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

NeuroShell Trader (Ward Systems Group) . 53 Optuma.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 The Zorro Project. . . . . . . . . . . . . . . . . . . . . . . . . . 53 AIQ.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Microsoft Excel.. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Anthony Liew/ Business Management Dynamics. . . 60 mystockodds.com.. . . . . . . . . . . . . . . . . . . . . . . . 61

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.

October 2022

• 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 (Sep ’22) CME 5.6 11.8 2 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••>>> Ultra T-Bond (Sep ’22) CBOT 4.8 7.3 2 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••> 10-Year T-Note (Sep ’22) CBOT 1.7 8.6 7 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••> 30-Year T-Bond (Sep ’22) CBOT 3 7.5 3 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••> 5-Year T-Note (Sep ’22) CBOT 1.4 10.4 11 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• Russell 2000 E-Mini (Sep ’22) CME 3.1 6.3 2 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• Ultra 10-Year T-Note (Sep ’22) CBOT 2.4 8.6 5 ••••••••••••••••••••••••••••••••••••••••••••••••••••••• Soybean (Nov ’22) CBOT 3.3 7.4 2 •••••••••••••••••••••••••••••••••••••••••••••••••••••• Crude Oil WTI (Oct ’22) NYMEX 10.1 7.1 1 •••••••••••••••••••••••••••••••••••••••••••••• Nasdaq 100 E-Mini (Sep ’22) CME 6.4 13.2 1 •••••••••••••••••••••••••••••••••••••••••• Corn (Dec ’22) CBOT 9.1 16.7 9 •••••••••••••••••••••••••••••••••••••• Soybean Meal (Dec ’22) CBOT 1.2 3.5 2 ••••••••••••••••••••••••••••••••••• 2-Year T-Note (Sep ’22) CBOT 0.6 9.8 14 •••••••••••••••••••••••••••••••• Euro FX (Sep ’22) CME 2.3 9.9 6 ••••••••••••••••••••••••••• 3-Month Eurodollar (Dec ’22) CME 0.3 8.6 17 •••••••••••••••••••••• Gold (Dec ’22) COMEX 4.1 21.6 5 ••••••••••••••••• S&P 500 VIX (Sep ’22) CFE 46.4 21.2 3 •••••••••••••• 3-Month SOFR (Mar ’23) CME 0.3 8.9 18 ••••••••••••• ULSD NY Harbor (Oct ’22) NYMEX 9.7 11.4 1 ••••••••••••• Natural Gas (Oct ’22) NYMEX 13.5 16 2 •••••••••••• Gasoline RBOB (Oct ’22) NYMEX 12 13.9 2 ••••••••••• Japanese Yen (Sep ’22) CME 3.3 9.5 5 •••••••••• Wheat (Dec ’22) CBOT 9.1 11.6 5 •••••••••• Coffee (Dec ’22) ICE/US 11.6 19.4 3 •••••••• Dow Futures Mini (Sep ’22) CBOT 5.3 11.9 2 •••••••• 30-Day Fed Funds (Aug ’22) CBOT 0.2 8.6 17 •••••• Sugar #11 (Oct ’22) ICE/US 7.4 14.9 16 •••••• British Pound (Sep ’22) CME 3.3 16.4 11 ••••• Cotton #2 (Dec ’22) ICE/US 8.8 15.5 5 ••••• Live Cattle (Oct ’22) CME 3 7 6 ••••• Hard Red Wheat (Dec ’22) KCBT 8.5 14.5 6 •••• Silver (Sep ’22) COMEX 8.7 14.5 3 •••• CBOT Chicago Board of Trade, Division of CME CFE CBOE Futures Exchange Australian Dollar (Sep ’22) CME 3.2 15.6 12 ••• CME Chicago Mercantile Exchange High Grade Copper (Sep ’22) COMEX 6.6 14.9 4 ••• COMEX Commodity Exchange, Inc. CME Group Lean Hogs (Oct ’22) CME 5.2 8.6 7 ••• ICE-EU Intercontinental Exchange-Futures - Europe Canadian Dollar (Sep ’22) CME 1.9 16.1 18 •• ICE-US Intercontinental Exchange-Futures - US Cocoa (Dec ’22) ICE/US 6.8 21.4 22 •• KCBT Kansas City Board of Trade Crude Oil Brent (F) (Oct ’22) NYMEX 9.3 11.1 2 •• MGEX Minneapolis Grain Exchange Mexican Peso (Sep ’22) CME 5.7 25 28 •• NYMEX New York Mercantile Exchange Platinum (Oct ’22) NYMEX 7.1 13 7 •• U.S. Dollar Index (Sep ’22) ICE/US 1.9 10.8 8 •• 2210 Canola (Nov ’22) ICE/CA 8.9 18.4 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 • October 2022 • Technical Analysis of Stocks & Commodities

ADVISORY SERVICES

SEMINARS

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 246 months in a row http://daytradingforecasts.com?r=s

JOHN EHLERS WORKSHOP

BROKERAGE

SOFTWARE

10–14 October — San Simeon, CA An intimate and intense learning experience

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

www.MESASoftware.com

PitBase.com

TO ADVERTISE CONTACT:

Discount futures & options trading

[email protected] • (206) 660 8577

Ed Schramm

TRADERS' RESOURCE

TOP 10 VIEWED BROKERAGES FOR TRADERS

LINKS

Self-directed traders, as Stocks & Brokerage Company Commodities readers usually are, Interactive Brokers 1. Interactive Brokers have more choices than ever in their search for speed, pricing efficiency, TD Ameritrade, Inc. 2. TD Ameritrade and good accounting when it comes NinjaTrader Group, LLC 3. NinjaTrader Brokerage to brokerages. First, you have to find a brokerage that handles your Charles Schwab 4. Charles Schwab tradable; you can choose between a full-service Charles Schwab 5. Schwab Active Trading brokerages or a discount brokerage. Full service would mean you would sit down with your broker, Bright Trading, LLC 6. Bright Trading, LLC whereas discount brokerage would involve trading Global Forex Trading (GFT) 7. Global Forex Trading online without any advice from a professional. Most institutions that offer full service brokerages also Investrade Discount Securities 8. Investrade Discount Securities have the discount broker option. Infinity Futures 9. Infinity Futures Other considerations are what kinds of tools or services do they provide? Do they provide real-time Fidelity Investments 10. Fidelity Active Trader Pro data? Which markets do they give you access to? Do they have account minimums? How fast are their These are the 10 Brokerage listings clicked on most often on the Traders’ Resource website, in executions? How much are their commissions? What 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 S&C product reviews. kind of support do they offer? With the presence of freely available company information online, retail brokerage research is less valuable than TRADERS’ RESOURCE AT TRADERS.COM it ever has been. Nevertheless, if you’re in less intensively studied Our full Traders’ Resource database is available at our website, but highly commercial markets such as futures, a brokerage’s Traders.com. There, you’ll not only find a listing of brokerages, ability to provide market statistics, hedging activity reports, and you’ll also find information on products and services in numerous other commercial information may be critical to your trading and other categories as well, such as data services, software, hardware, investing decisions. trading systems, consultants, advisors, publications, courses, Finally, don’t forget the security of your money. Inquire about and more. Just click on the Traders’ Resource link, then choose a brokerage’s clearing operations, and if you’re in equities, about a category, or use the search feature to find products or services Securities Investor Protection Corp. (SIPC) coverage. with specific attributes. 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].

October 2022

• Technical Analysis of Stocks & Commodities • 59

Trading Perspectives

USING DATA STRATEGICALLY I am frequently asked about how to use data correctly. While this is a big subject, we can cover a few items that relate to the world I am most familiar with, which is trading equity pairs and baskets. The entire point of utilizing approaches to the market like pair trading is the benefits that come from relationship-based trading and the relative performance between long and short capital. Given all that we have witnessed over these past few years, expect the unexpected, and when the unexpected arrives, know that it may have many jagged edges. The reasons many choose hedged strategies include the preservation of trading account capital, and the opportunity to make money from defined probabilities and m a t h e m a t ic a l r el a t io n sh ip s. This is especially true in pairs trading, where you have meanreverting opportunities that are compoundable. With respect to data, those who utilize data embark on a journey, whether knowingly or not. Many beginners put more weight on the data itself, lacking understanding about its makeup, and lacking skills on how to effectively utilize it. I like this pictorial from Applications Of Computational Intelligence In Data Driven Trading by Cris Doloc (see Figure 1). I highly recommend reading Cris

Doloc’s book if you are embarking on ML or data science or want to expand your insights further in the areas of data-driven trading. In viewing that data journey staircase, what leaps off the page is at the very top: having wisdom to execute appropriately. At the end of the day, that ability may be of higher value than any debate over the substance and quality of the data. For

Execution, position sizing, inventory turnover, and risk management all come into play.

Rob Friesen

a variety of data sources, one of which I will show here. For executing on a more dollarneutral approach with baskets, there are five main approaches: A. Longs with single hedge B. Shorts with single hedge C. Longs with sector ETF hedges D. Shorts with sector ETF hedges E. Long stocks and short stocks Note: Besides the sector ETFs, one can get more granular with industry ETFs, and thankfully there are an abundance of liquid ones to choose from. Strategic deployment of those baskets ties in with what conditions are favorable:

example, pair traders could wrestle with the best cointegration test: Is the Philips-Ouliaris or Johansen test • If the market is gapping down, method better? Regardless of which then A, C, or E could be emtest produced better cointegrating ployed, executing the long side factors, I would argue that even a first and deciding on whether baseline knowledge of two stocks that are related, coupled with knowing how to trade them, is superior to a higher-quality statistical number. Execution, position s i z i n g, i nve n t o r y tur nover, and r isk management all come into play. In basket trading, traders may create long lists and short lists from FIGURE 1: JOURNEY FROM DATA TO INTELLIGENCE

60 • October 2022 • Technical Analysis of Stocks & Commodities

ANTHONY LIEW/BUSINESS MANAGEMENT DYNAMICS

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.mystockodds.com). 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 stocktrading.com.

Trading Perspectives

Then there is the context, which also determines which approach would be the best fit. Assume that any of the following were occurring: • Market sentiment is negative • Breakdown from a consolidation range • Significant macro driver to the downside We know that high beta, high PE, high historical volatility (HV), speculative stocks, small caps, tech stocks, and discretionary can move greater relative to the market ETF they are most associated with. This would also apply to sector ETFs and industry ETFs, which by their very nature of construction don’t move as much as individual stocks can. There are some exceptions for up days after a stock market rout, when market participants are leery about stock picking and prefer to pile into ETFs to play the move. Let’s say we are working with the S&P 500 stocks. With a potential move down, and if we were playing from open to close with baskets, we would deploy the short basket of stocks at the open and then purchase the SPY if necessary. Figure 2 shows a list that was generated after the close of April 21 (which was a large reversal day closing down) while preparing for trading on April 22, 2022.

MYSTOCKODDS.COM

the short side is needed immediately, can wait, or is not necessary at all. • If the market is gapping up, then B, D, or E could be utilized, doing the short side first. • If the market opening is approximately flat, then deploying longs and shorts simultaneously would be the best approach. • For flat opens, any of A, B, C, D, or E could be used. FIGURE 2: LIST GENERATED FROM STOCKODDS WEB SCREENER APRIL 21, 2022

What did the SPY do the next day in case we used it for the long hedge? SPY performance was −2.49% open to close and −2.74% from close to close. The overall performance of the short basket was −1.68% from open to close, so the basket did not drop as much as the SPY did, due mostly to the EA positive performance. SPY bought as hedge against the stocks would not have resulted in a profitable day of relative performance between long dollars and short dollars. This showcases how there is nothing wrong with data. The curated short basket for the day performed as expected. The key is how one applies long and short capital, or how one skillfully trades with the variables presented. As EA was showing incredible strength in a falling market, why be short? Closing that out early would have saved losses on that symbol. The next item is this: Was there ever an indication that SPY had to be bought as a hedge? Looking at the reversal day of April 21 as our “context” and then opening lower on April 22, which could not break above the previous day’s close (see Figure 3), and the multi-day support getting taken out, where is the concern to protect our October 2022

FIGURE 3: DAILY CHART OF SPY

short basket with long dollars? With the hedge standing by but not deployed, you would have benefitted from the performance of the basket. You can see that we did not execute with the A, C, or E approach doing the long side first, as there was a gap down to start the day. Why the departure? Context. It may be one of the hardest things to learn. For this particular morning, the edge was shorting stocks, but there were also various ways it could have worked. You could have utilized approach E

• Technical Analysis of Stocks & Commodities • 61

Trading Perspectives with deploying both long and shorts right at the open, but you would want to check your long list construction for magnitude of beta and sector exposure, as it would be best to have a defensive-orientated basket. I have often witnessed in the hedging community a posture to over-hedge and often a lack of effort put into the variables of what should constitute a need to hedge or not. But you might ask: At the market open, how do we know what the direction is going to be? We never know for certain, but you can also pull odds on the ETFs and combine that with what the markets have been doing overnight and

premarket for a probability backdrop. We know there are no guarantees, but approaching each day with the

JOHN EHLERS MESA VIRTUAL WORKSHOP, OCT. 10–14, 2022 The annual John Ehlers MESA workshop will be held on October 10–14, 2022 (Monday–Friday), with this year’s being conducted online over Webex as a live event. The workshop teaches algorithmic trading techniques and how to apply digital signal processing and a scientific approach to your trading, based on Ehlers’ decades of experience. Ehlers is the author of Cycle Analytics For Traders and Rocket Science For Traders among other books and numerous articles. He has won many Readers’ Choice Awards over the years for his articles appearing in this magazine. An interview with Ehlers about his

work can be found in the September 2019 issue. The workshop will present four modules per day after the market close, with the final day on Friday reserved for open discussion. A working knowledge of EasyLanguage as well as high school-level algebra and trigonometry is recommended. Topics will include cycle theory, effective data smoothing and filtering techniques, spectrum estimators, data correlation, and predictions. Attendees will receive advanced unique indicators, unpublished strategies, and walk-forward optimizers in open-code EasyLanguage. Workshop cost is $4,000. Traders can view the full list of topics to be covered as well as enroll in the workshop at the MESA Software website.

We know there are no guarantees, but approaching each day with the intention of deploying capital in the best manner possible makes a difference. intention of deploying capital in the best manner possible makes a difference. Finally, shifting gears here but

www.mesasoftware.com

TRANSFORMED CHARTS BY APPLYING A FORMULA The technical analysis website Slope of Hope (slopeofhope.com) has introduced a feature that allows the user to apply a formula to every 62 • October 2022 • Technical Analysis of Stocks & Commodities

in keeping with using data wisely: October is historically a volatile month with this year’s being followed by mid-term elections. My thoughts are to use the StockOdds Seasonality Almanac for the ETFs favored to perform and those that are not favored to perform. That way, you can be aligned to flow with the current by selecting stocks in those groups to represent your long and short baskets. Combine that with some volatility trading by using best practices for gap up or down days, and context on how we arrived there. My feeling is this will be the most beneficial approach.

symbol entered into the SlopeCharts platform. The feature is designed to be a time-saver, since it is vastly more efficient to have the formula automatically applied as opposed to altering every symbol you want to see. The feature also provides a customized perspective into any symbols entered, particularly those in a watchlist. The user can enter any kind of formula within the given format, including using basic arithmetic operators, real numbers, and financial symbols. A simple example would be if the user wanted to view a series of assets proportionate to the Federal Reserve’s M2 money supply (in other words, you want to see every symbol divided by the M2 value). Viewing your symbols from this perspective might lead you to some important new insights. There is no limit to the kind of “transformations” applied, such as using gold, currency exchange rates, or any other formulaic transformation desired.

slopeofhope.com

Subscribe Or Renew Today! Every article at your fingertips.

Did you know that every subscriber to Technical Analysis of  Stocks & Commodities magazine has full access to the magazine in digital format? No waiting for the mail to be delivered, no need to carry around back issues — just log on to Traders.com on any internet-capable device and 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. Each subscription comes with: • Full access to our Digital Edition The complete magazine as a PDF you can download. • Full access to our Digital Archives Every article since 1982! • Complete access to WorkingMoney.com The information you need to invest smartly and successfully. • Access to Traders.com Advantage Insights, tips and techniques that can help you trade smarter. PROFESSIONAL TRADERS’ STARTER KIT A 5-year subscription to S&C magazine that includes everything above PLUS a free* book, Charting The Stock Market: The Wyckoff Method, all for a price that saves you $150 off the year-by-year price! *Shipping & handling charges apply for foreign orders.

8999 $ 99 2 years............ 149 $ 99 3 years............ 199 1 year..................

5 years............

$

$

29999

That’s around $5 a month!

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

facebook.com/STOCKSandCOMMODITIES

@STOCKSandCOMM

37 Years in the Making

metastock.com/whats-new

This is neither a solicitation to buy or sell any type of financial instruments, nor intended as investment recommendations. All investment trading involves multiple substantial risks of monetary loss. Don’t trade with money you can’t afford to lose. Trading is not suitable for everyone. Past performance, whether indicated by actual or hypothetical results or testimonials are no guarantee of future performance or success. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFITS OR LOSSES SIMILAR TO THOSE SHOWN. IN FACT, THERE ARE FREQUENTLY SHARP DIFFERENCES BETWEEN HYPOTHETICAL PERFORMANCE RESULTS OR TESTIMONIALS AND THE ACTUAL RESULTS SUBSEQUENTLY ACHIEVED BY ANY PARTICULAR TRADING PROGRAM. Furthermore, all internal and external computer and software systems are not failsafe. Have contingency plans in place for such occasions. MetaStock assumes no responsibility for errors, inaccuracies, or omissions in these materials, nor shall it be liable for any special, indirect, incidental, or consequential damages, including without limitation losses, lost revenue, or lost profits, that may result from reliance upon the information presented.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF