• No results found

STCM 2015 May

N/A
N/A
Protected

Academic year: 2021

Share "STCM 2015 May"

Copied!
64
0
0

Loading.... (view fulltext now)

Full text

(1)

Schrödinger’S cat

Finding information in

market data

8

Filtering Price

MoveMent

Introducing a new zigzag

indicator

12

Predicting the viX

By reordering the data

26

10 Selling tiPS

Knowing when is “when” 30

intervieW

Technical analyst

Boon Chin Low

34

revieWS

n

Haguro Method

n

MetaStock XIV

MAY 2015

(2)

Take ConTrol of Your Trading wiTh The

Professional Traders’ sTarTer KiT

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. Articles added several times a month. 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.

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)!

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.

Online: www.TRADERS.com Toll free: 1-800-832-4642

206-938-0570 • Fax: 206-938-1307 Email: [email protected]

(3)

Interactive Brokers

LOWER YOUR COSTS TO MAXIMIZE YOUR RETURN

ibkr.com/

iwantmore

Interactive Brokers is a member of NYSE, FINRA, SIPC – Lower investment costs will increase your overall return on investment, but lower costs do not guarantee that your investment will be profitable. Supporting documentation for any claims and statistical information will be provided upon request. Commissions and Margin Rates as of March 2, 2015. Services vary by firm. [1] For additional information on our commissions and margin rates and execution quality, see www.interactivebrokers.com/compare. * Based on independent measurements, the Transaction Auditing Group, Inc., (TAG).

Interactive Brokers

Commissions

1

are:

64-89

%

lower than

• Charles Schwab • TDAmeritrade • ETrade

For 100 to 1000 shares and 1 to 10 option contracts

Interactive Brokers

Financing Rates

1

are:

78

%

lower than

• Charles Schwab • TDAmeritrade • ETrade

For a margin loan of $50,000 to $1,000,000

Stocks:

better than the industry per 100 shares

Options:

50¢

better than the industry per contract

Interactive Brokers

Executions

1

are:

Second half 2014*

stocks • options • futures • forex • bonds — on over 100 markets worldwide from one account

Keep more of what’s yours with our low cost platform

for professional traders, investors and institutions.

BREAK FREE

(4)

TIPS

8 Schrödinger’s Cat

by John F. Ehlers

What information is contained in market data? Can you develop an indicator or trading system that can extract this information to provide an edge in trading? Here’s a look.

12 Filtering Price Movement

by Giorgos E. Siligardos

Here is an alternative to the classic zigzag indicator, which may prove useful to visual technical analysts and chart pattern researchers.

22 Mean Reversion And The S&P 500

by Stephen Beatson

It is generally believed that mar-kets tend to mean-revert. But this is true for some markets more than others. Here’s an in-depth look at how the S&P 500 responds to mean reversion.

25 Futures For You

by Carley Garner

Here’s how the futures market really works.

26 Predicting The VIX By Reordering Data

by Stephen Butts

In recent years, the CBOE Volatil-ity Index (VIX) has increased in importance and use as an indicator of market direction. This article demonstrates how the direction of tomorrow’s change in the VIX might be determined by restructur-ing readily available market data.

29 Q&A

by Don Bright

This professional trader answers

a few of your questions. n Cover: Jose Cruz

n Cover concept: Christine Morrison

Copyright © 2015 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.

INTERVIEW FEATURE ARTICLE

CONTENTS

MAY 2015, VOLUME 33 NUMBER 6

REVIEWS

42 • Haguro Method

Product review: MetaStock add-on based on the Haguro method

46 • MetaStock XIV

Product review: Trading and chart-ing platform

DEPARTMENTS

6 Opening Position 7 Letters To S&C 44 †Traders’ Glossary 49 Trade News & Products 50 Traders’ Tips

56 Futures Liquidity 57 Advertisers’ Index 57 Editorial Resource Index 58 Books For Traders 59 Classified Advertising 62 Traders’ Resource 30 10 Selling Tips

by Thomas Bulkowski

Do you spend as much time decid-ing to sell as deciddecid-ing to buy? Here are 10 tips to make deciding when to sell easier.

34 TA For The Longer Term With Boon Chin Low

by Jayanthi Gopalakrishnan BC Low has been a teacher and practitioner of technical analy-sis since the 1980s. He is one of Singapore’s earliest practitioners to attain the Chartered Market Techni-cian credential. At Singapore Polytechnic, he created and taught two modules of “Technical Analy-sis and Trading,” the only formal course on technical analysis in Sin-gapore. He was a technical analyst for Merrill Lynch Bank, where he provided currency views to dealers, private bankers, and institutional clients. Currently, he continues to trade his own equity. We asked him about how longer-term investors can apply technical analysis.

41 Explore Your Options

by Tom Gentile

Got a question about options?

60 Gambling, Speculating, & Investing

by Stella Osoba

What do these terms mean as applied to the participant in the fi-nancial markets? Let’s have a look to try to come up with some clear definitions.

AT THE CLOSE

This article is the basis for Traders’ Tips this month.

(5)

NON-SUBSCRIBERS

$

6

99

per issue

$

5

per month!*

SUBSCRIBERS StOCkS & COmmOdItIES magazine

StOCkS & COmmOdItIES magazine, delivered Basic access to traders.com

Full access to traders.com, including: Complete access to Working money

Complete access to traders.com Advantage

Complete 30–year S&C archive (PdF) Article code to copy & paste

Optimized trading systems

Complete issues of S&C magazine in digital format (PdF) for downloading

per month*

The maTh is simple. The benefiTs are clear.

Technical Analysis of

S

tockS

& c

ommoditieS

, published since 1982, is the savvy trader’s guide to

profiting in any market. For subscribers, our content, the heart of the technical analysis industry, is

also available online in our digital edition — the complete magazine in digital format (PDF) on our

website,

Traders

.com — available for download. We also offer a digital-only subscription, allowing

you to save on shipping charges — no more waiting for the mail to arrive!

At

Traders

.com, subscribers will also find our two online-only publications, Working Money and

Traders.com Advantage, plus our entire 30-year online archive of every article we’ve published

since 1982, which you can browse by month and year or search by keyword, author, or subject.

Visit

Traders

.com today to see how we can help you trade better and smarter. Explore the

benefits of a subscription to S

tockS

& c

ommoditieS

Magazine at

Traders

.com/tour/tour.html.

Subscribers pay less, get more!

Online: www.Traders.com

Email: [email protected] 206-938-0570 • Fax: 206-938-1307Toll free: 1-800-832-4642

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

(6)

O

pening

p

OsitiOn

Jayanthi gopalakrishnan, editor

EDITORIAL

[email protected]

Editor in Chief Jack K. Hutson Editor Jayanthi Gopalakrishnan Production Manager Karen E. Wasserman Art Director Christine Morrison Graphic Designer Wayne Shaw Webmaster Han J. Kim

Contributing Editors John Ehlers,

Anthony W. Warren, Ph.D.

Contributing Writers Don Bright, Thomas Bulkowski,

Martin Pring, Barbara Star, Markos Katsanos

The Traders’ MagazineTM

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 grant-ed by Tech ni cal Anal y sis, Inc. for users reg is tergrant-ed 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 i za 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/2015 $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 noti-fication. 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 infring-ing on trademark rights.

OFFICE OF THE PubLISHER Publisher Jack K. Hutson

Industrial Engineer Jason K. Hutson Project Engineer Sean M. Moore Controller Mary K. Hutson

ADvERTISInG SALES

4757 California Ave. S.W. Seattle, WA 98116-4499 1 206 938-0570 Fax 1 206 938-1307

[email protected]

National Sales Manager, Classified & Web Sales

Edward W. Schramm

Advertising Sales Summer Davis CIRCuLATIOn

Subscription & Order Service 1 800 832-4642 1 206 938-0570 Fax 1 206 938-1307

[email protected]

Subscription Manager Sean M. Moore Subscription Sales Carmen Hale

WEbSITE

http://www.traders.com

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

ill they, or won’t they, and if so, when? All eyes were on the policy statement released by the Fed on March 18. The takeaway from it was that the word “patient” was not used, implying that there is a chance that we will see a rate hike this year. And rate hikes means that the economy is improving, or that is what we are led to believe. Immediately after the Fed released their statement suggesting they may start raising interest rates sometime in 2015, it was almost as if there was a huge

sigh of relief. Stocks moved higher, commodities moved higher, treasuries moved lower, and the US dollar moved lower.

May 2015 • Volume 33, Number 6

W

Miami Do wnto wn Richard Ca valler i/Shutterstoc k

if

you take a moment to analyze what really moves the markets, you’ll find that it’s a lot more than interest rates. Fundamental analysts focus on valu-ations such as price/earnings ratios, debt-to-equity ratios, EBITDA, and so on, but as technical analysts, we need to look at indicators such as market breadth, advances over declines, and investor sentiment using variables such as TRIN, TICK, and VIX. Keeping an eye on these variables can be used as a barometer to gauge the strength of the market and whether investors are risk averse. Any divergence between the movement of the broader markets and these barometers or a lack of confirmation from all these variables should be considered as a sign to tread cautiously. At the moment there seems to be too much uncertainty in the markets together with too much optimism. The two don’t mix well and that’s a cause for concern.

We’re too focused on the central banks and placing importance on their choice of words. First, it was irrational exuberance, then patience, and now reasonably

confident. According to the recent statement released by the Fed, it’s inflation,

unemployment, and wages that will indicate how well the economy is doing and ultimately be the deciding factor for raising interest rates. But other indicators such as credit spreads, treasury yields, performance of commodities, and performance of the manufacturing/service sector give much earlier signals of the underlying economic fundamentals. But getting a real gauge of the economy is no easy task, especially when it’s been stimulated by funds from the central banks. I seriously doubt we’ll be seeing any interest rate hikes in the next FOMC meeting. We have to patiently wait to see when and if it will happen this year.

(7)

1. You really need two, three, or four sequential patterns to make the re-sults discrete enough

2. Then you need tons of data to build the dataset to get enough patterns to make their numbers significant.

And those two items fight each other. Fortunately, on Quantopian.com, you can use 200 instruments going back to about 2003 to build the source database of patterns.

Thanks for your inquiry.

MORE ON CONDENSED CANDLES

Editor,

I was interested in the article by Dave Cline in the Febru-ary 2015 issue (“Candle-sticks, Condensed”), so I decided to see if I could replicate his work. A summary of results follows and the relevant spreadsheet is attached [not shown]. I would be interested in Cline’s comments. I have also written code in PowerBASIC.

I analyzed 53 years (1962–2014) of S&P 500 index weekly candlesticks with reference to the past 10 weeks, and each candle was assigned a three-letter code for the body, upper shadow, and lower shadow, as follows: “A” means +2 SD (standard deviations) “B” means +1 SD “C” means normal “D” means -1 SD “E” means -2 SD

My analysis showed minimal predic-tive significance, as SD was usually wider than the gap between zero and the percent-age gain for the following week.

The exceptions were limited to pat-terns that were only seen once over the reference interval (SD = 0) and the following:

BDE seen twice 1.43% SD=0.01 CCE seen twice 1.02% SD=0.64 CEA seen twice -1.25% SD=0.3 DEB seen twice -1.33% SD=0.03 EEC seen 5 times -1.62% SD=1.34 EBD seen 3 times -1.79% SD=1.37

My conclusion: Single weekly candle-sticks were of no value in predicting the following week’s market action for the S&P 500 index.

John Rathbun

Asheville, NC Author Dave Cline replies:

Interesting translation into a StdDev-based variation. The compression technique already is fairly lossy; are you sure you’re not losing any additional information by this technique?

Also, you’ve got 2,751 samples, which I would suggest is a somewhat limited set to work with.

As you can probably surmise, and I think I alluded to this in my article, single candles have nearly zero pre-dictive information within them. But in sequences, they may provide small probability benefits. Unfortunately, you need tens or hundreds of thousands of sequence samples to build up statisti-cally significant sets. So I would suggest building pairs of candles as patterns. For instance, what is the average return on the CDC-CBA sequence (if it exists)?

When I built and tested this mecha-nism, I ran 10 years of daily data on all the S&P securities through it. I used three-candle sequences. I've also tried two years of hourly data of the same. Within those tests, I could find significant sequences that tested out-of-sample to about one half of their in-sample return. So I think there's value, if tiny and hard to see, in the technique. To me, its just one more layer of probability to add to a list of filters when scanning thousands of instruments for possible trades.

Thanks for reading and going through the trouble of testing the theory. It means a lot to me.

The editors of S&C invite readers to submit their opinions and information on subjects relating to technical analysis and this magazine. This column is our means of communica-tion with our readers. Is there something you would like to know more (or less) about? Tell us about it. Without a source of new ideas and subjects coming from our readers, this magazine would not exist.

Email your correspondence to [email protected] or address your correspondence to: Editor, StockS & commoditieS, 4757 California Ave. SW, Seattle, WA 98116-4499. All

letters become the property of Technical Analysis, Inc. Letter-writers must include their full name and address for verification. Letters may be edited for length or clarity. The opinions expressed in this column do not necessarily represent those of the magazine.—Editor

CANDLESTICKS, CONDENSED

Editor,

I just read Dave Cline’s February 2015 article in StockS & commodi -tieS, “Candlesticks, Condensed,” and found it quite interesting. I had never thought of using the approach he describes. It’s a nice way to create pat-tern signatures. I took a course through Coursera on quantitative analysis by Tucker Balch and used Python during the course. One of the exercises was to analyze historical events based on price movements. Adding a candlestick signature could be used as an extension to this.

I have also done some basic simula-tions of crossing EMAs in Excel. When I went to download the Python code associated with Cline’s article from Traders.com, I read that Cline had also done some work in Excel and wondered if he is willing to share a version of the Excel file referred to there.

moRley

Author Dave Cline replies:

I can provide the Excel spreadsheet, although it’s not much, really. I can also provide the Access.MDB file into which I dumped the Excel data for grouping/ consolidation. You can get these files from the following link:

https://dl.dropboxusercontent. com/u/29771494/Finance/ CandlesticksCondensed.xlsx

You’ll find that some of the problems with the compressed candles approach are:

(8)

T

PA TR IC K K EL LE Y

Random With Memory

Schrödinger’s Cat

What information is contained in market data? Can you develop an indicator or trading system that can extract this information to provide an edge in trading? Here’s a look.

by John F. Ehlers

he purpose of technical analysis is to discern what information is contained in market data and, if you are clever enough, to develop an indicator or trading system that extracts this information to provide an edge in trading. On the other hand, there are those who believe in the efficient market hypothesis: that all the information about the markets is known and the effects are purely random due to the law of large numbers of traders. The discussion goes downhill from there.

One of my favorite theoretical descriptions of market activity is the drunkard’s walk. When the random variable is position, the partial differential equation solution is called the diffusion

equation, and it describes random motion like a particle of smoke in a smoke plume. When

the random variable is momentum, then the partial differential equation solution is called the

wave equation. Taken together, the drunkard’s walk describes physical phenomena like the

meandering of a river, which can be random (trending) or cyclical. Unfortunately, there is no closed solution for the differential equations that can lead to an indicator, because they require

boundary value solutions and there is no definable boundary.

In another physical area, Peter Swerling noted that the radar echoes returned from flying aircraft were noise-like. The echoes would vary from pulse to pulse and from one antenna sweep to another. The explanation is that there was a total average power returned, but the total power was the summation of components that were bounced off the fuselage, wings, rudder, and so on, and the changing aspect of the aircraft caused the sum-mation of these components to look like noise. When building deception jammers for radars, I simulated the

Swerling noise by using the

received radar pulse plus an exponential moving average (EMA) of past pulses. This jamming signal was a remark-ably good replica of the real radar echo. This kind signal is called random with memory, and it’s consistent with other phenomena described by the Hurst coefficient. Synthesiz-ing market data usSynthesiz-ing a ran-dom number generator and an EMA is simple to do and could be an interesting way to examine the nature of market data. Knowing the nature of the data can therefore lead to the generation of an indicator that possibly can give us a trading edge.

M

easuringsynThe

-sizedMarkeTdaTa

Synthesizing market data is one thing, and measuring its characteristics is quite anoth-er. The problem is similar to that of the “Schrödinger’s cat” thought experiment: Merely

measuring the outcome

deter-mines the outcome itself. Here’s the problem: When

(9)

the market is modeled as a random variable with memory, the memory is provided by a filter such as an EMA. However, when measuring the fre-quency content of market data with any technique such as a Fourier trans-form or a contiguous bank of bandpass filters, they all have filters with memory as part of the analysis technique. Thus, measuring a truly ran-dom set of data would

involve the memory being provided by the measurement technique, and the entire process would become self-fulfilling. Measuring the frequency content of synthesized data must avoid the use of filters.

Interfering with the synthesis of market data is minimized through the use of an autocorrelation periodogram. This process first creates the autocorrelation of the data, a process that is basically without filters. Then, a Fourier transform of the autocorrelation function is taken to extract the frequency content of the data. On a related note, the autocorrelation periodogram is now my preferred method of frequency mea-surement of market data because it mitigates the effects of spectral dilation.

Figure 1 shows what the measured spectrum of real market data looks like. The data is approximately one year’s worth of daily bars of the SPDR S&P 500 (SPY). The measured spectrum is shown below the price bars as a heatmap. The strength of the cycle amplitude is shown in colors ranging from white hot through red hot to ice cold. The period of the measured cycles is indicated on the vertical scale from zero through 48-bar periods. Figure 1 shows that the dominant cycle period was between

20 and 25 bars in the fall of 2012; was on the order of 15 bars during most of the uptrend; and was an ill-defined longer cycle period most recently.

Now that you are fa-miliar with displays of market spectra, let’s turn your attention to the measurement of purely random data with no memory, as shown in Figure 2. The random data is shown as the green ragged line over ap-proximately 250 samples (essentially one year of

daily data). The spectrum shows that there is not much cyclic activity, and the dominant cycle is mostly near a 10-bar cycle due to aliasing noise.

The next experiment is to see the effects of adding memory to the random data. For example, Figure 3 shows the data and spectrum when the memory low-pass filter has a criti-cal period of 20 bars. Not unexpectedly, the data is much smoother than in Figure 2. Also, the dominant cycle period in the measured spectrum is near a 20-bar period most of the time.

Continuing with the experiment, the memory of the low-pass filter is changed to have a critical period of 40 bars (Figure 4). In this case, the data is smoother across the graph. Further, the measured dominant cycle period has increased.

s

owhaTdoesiTallMean

?

Dealing with random data is tricky because you can never reproduce your results. The best you can do is infer charac-teristics from your measurements. The first observation is that market cycles are ephemeral—they come and go, and the cycle periods of the dominant cycle can often change rapidly.

FIGURE 1: MEASURED SPECTRUM OF THE SPDR S&P 500 OVER THE LAST YEAR. The dominant cycle period was between 20 and 25

bars in the fall of 2012, was on the order of 15 bars during most of the uptrend, and was an ill-defined longer cycle period most recently.

FIGURE 2: MEASURED SPECTRUM OF PURELY RANDOM DATA WITH NO MEMORY. The spectrum shows that there is not much

cyclic activity, and the dominant cycle is mostly near a 10-bar cycle due to aliasing noise.

TR AD ES TA TI O N

(10)

FIGURE 3: MEASURED SPECTRUM OF RANDOM DATA WITH MEMORY HAVING A 20-BAR CRITICAL PERIOD. The dominant cycle period in the measured spectrum is near

a 20-bar period most of the time.

Market cycles are ephemeral —

they come and go, and the cycle

periods of the dominant cycle

can often change rapidly.

Synthesizing market data as random with memory does gain some credibility because the resulting measured spectra look similar to real market data. Further, the characteristics of the synthesized data can be controlled simply by varying the critical period of the memory component of the synthe-sized data. Credible replicas of market data can therefore be created simply by making the critical period of the memory

time variable across the chart.

But most of all, you can gain the edge in your trading that you sought in the first place. Knowing that market cycles are ephemeral, you can quickly jump on them with predictive filters when they appear. You can get an idea of how this works by looking at the trade setup analyzer on www.StockSpotter. com. A trade setup occurs when the MESA cycle indicator is at or near a cycle trough and the MESA momentum indicator is declining or is at a minimum.

S&C Contributing Editor John Ehlers is a pioneer in the use of cycles and DSP techniques in technical analysis. He is presi-dent of MESA Software. MESASoftware.com offers the MESA Phasor and MESA intraday futures strategies. He is also the chief scientist for StockSpotter.com, which offers stock trading signals based on indicators and statistical techniques.

F

urTher

reading

Ehlers, John [2013].

Cycle Analytics For Traders, Wiley &

Sons. [2014]. “The Quotient Trans-form,” Technical Analysis of StockS & commoditieS, Volume 32: Au-gust. ‡TradeStation, ‡StockSpotter.com ‡See Editorial Resource Index

FIGURE 4: MEASURED SPECTRUM OF RANDOM DATA WITH MEMORY HAVING A 40-BAR PERIOD. The data is smoother across the

(11)

Client Name: TD Ameritrade

Job No.:

67084_65163_M01R1

Description: “DeLorean” Magazine P4CB Pub: Futures, Stocks & Commodities Bleed: 8.50”w x 11.50”h

Trim: 7.875 x 10.50 Safety: 7 x 10 Full PG 4/C BLEED

This advertisement prepared by: HAVAS WORLDWIDE NY

200 Hudson Street

New York, New York 10013 AD: Akira Nakamura AAE: Derek Monson Prod: Linda Pino

BILL LABOR OOP TO JOB NUMBER:

67084

Featuring

Have the confi dence to take on futures with thinkorswim.® Explore

strategies by practicing with virtual paperMoney.® Assess portfolio

risk in real time relative to indexes. And get access to real-time information on commodity and futures markets right from the pit. So you can get into futures, minus the fl aming tire tracks.

Learn from our veteran futures professionals.

Get into futures.

No DeLorean necessary.

Futures and futures options trading is speculative and is not suitable for all investors. Futures accounts are not protected by the Securities Investor Protection Corporation (SIPC).

Futures and futures options trading services provided by TD Ameritrade Futures & Forex LLC. Trading privileges subject to review and approval. Not all clients will qualify.

paperMoney® application for educational purposes only. TD Ameritrade, Inc., member FINRA/SIPC. TD Ameritrade is a trademark jointly

owned by TD Ameritrade IP Company, Inc. and The Toronto-Dominion Bank. © 2015 TD Ameritrade IP Company, Inc. All rights reserved. Used with permission.

Open an account with TD Ameritrade at

tdameritrade.com/thinkorswim S:7” S:10” T:7.875” T:10.5” B:8.5” B:11.5”

Job # 65163_M01R1 Filename 67084_65163_M01R1.indd

Art Director Artist jblumenau Damian User / PrevUs-Last Modified CMYK 3-11-2015 1:28 PM Bleed Trim Saftey 8.5” x 11.5” 7.875” x 10.5” 7” x 10” Path Premedia:Prepress:67084_65163:Fi-nal:Prepress:67084_65163_M01R1. indd Derrick.Edwin / Luis.Garcia Client Create Proof TD Ameritrade 3-5-2015 2:46 PM Traffic lpino 5_FINAL

Fonts Helvetica Neue LT Std (65 Medium, 55 Roman, 45 Light; OpenType)

Art TDA_63955_04a_SW_MonitorScreen.psd (Arts_Logos:TD Ameritrade:Art:Artwork:2014:TDA_63955_04a_SW_MonitorScreen.psd), TDAM_LOGOS_V3_YGT_LOCKUP_SW_P.ai (Arts_Logos:TD

(12)
(13)

Here is an alternative to the classic zigzag

indi-cator, which may prove useful to visual technical

analysts and chart pattern researchers.

hen there is need for algorithmic

iden-tification of price swings in a chart,

there is a word that always comes to

mind for technical analysts: zigzag. The zigzag

indicator is based on the concept from Arthur

Merill’s 1977 book Filtered Waves, Basic

Theory: A Tool For Stock Market Analysis. It

filters price movements below a cutoff level,

that is, a threshold. The threshold is either in

point terms or in percentage terms. If you were,

for example, using a threshold of x points, the

zigzag would disregard all price movements

less than x points. If, on the other hand, you

used a threshold of x percent, the zigzag would

disregard all price movements of magnitude

less than x percent. When plotted, the zigzag

is shown as a crooked line connecting peaks

and troughs. The line segments of the zigzag

are commonly referred to as its legs.

Notwithstanding that the zigzag identifies

promi-nent peaks and troughs, it doesn’t filter the price

swings the same way a technician’s eye would. In this

article, I will introduce you to a more natural way of

filtering the price, which is accomplished via what are

called perceptually important points. This alternative

to the classic zigzag indicator is closer to the way a

human perceives the movement of price.

L

imitationsofthezigzag

The zigzag is accused of a serious drawback: Its last

two legs (or, depending on the software, its last leg)

JOSE CR

UZ

INDICATORS

W

For Your Digital Eyes Only

Filtering

Price Movement

by Giorgos E. Siligardos

are dynamic and usually change significantly as new

data comes in. Consequently, the historical values

of the zigzag are based on hindsight. So if you’re

using the zigzag in the same way that you use other

classic technical indicators such as moving averages,

relative strength index (RSI), stochastics, and so

on, then zigzag won’t be of much use. However, it

can be useful if it’s used to identify prominent price

swings on a chart. Simply put, there is no way to

know when the current price movement will pass the

cutoff threshold before that happens (see Figure 1 for

an example). In effect, the zigzag is a static tool that

Applied Micro Devices (daily)

T1 T2

Zigzag (20%)

Zigzag (20%)

May Jun Jul Aug Sep Oct Nov 2014 Feb Mar Apr May 15.5 15.0 14.5 14.0 13.5 13.0 12.5 12.0 11.5 11.0 10.5 10.0 9.5 9.0 8.5 8.0 7.5 7.0 6.5 6.0 5.5 5.0 4.5 4.0 3.5

Figure 1: the dynamic nature oF the zigzag’s last legs. The red zigzag in this daily chart

of Applied Micro Devices, Inc. (AMD) is based on a percentage threshold of 20% and it uses data up to date T1. The blue zigzag is based again on the 20% percentage threshold but it uses data up to date T2. In other words, the red zigzag is a snapshot from the history of the blue one. Notice how the last two legs of the red zigzag changed when price information from T1 and later were taken into account to create the blue zigzag. This chart was created in MetaStock, which plots the zigzag in a way such that its last two legs are dynamic. In other versions of zigzag, only the last legs are dynamic.

(14)

tries to mimic—often in a clumsy way—the eye of the analyst when it looks at a snapshot of a chart. It does so from a more mathematically rigid point of view, concentrating on the major swings of price (as defined by the cutoff threshold).

It must come as no surprise then that for the chart pattern

1 2 Zigzag (20%) 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4

1

2

3

4

5

2007 2008 2009 J A S O N D A M J J A S O N D A M J J A S O N D A M J CBS Corp. CL B (daily)

analyst, the dynamic nature of the zigzag’s last legs is not a drawback but a merit. For example, in his November 2003 StockS & commoditieS article “The Zigzag Trend Indicator,” Spyros Raftopoulos introduced an interesting binary indicator that he called zigzag trend. The zigzag trend is essentially the zigzag without its dynamic feature, so its strong point is that it can be used and treated the same way as other common trend indicators such as the MACD, with the additional benefit of a low number of whipsaws. From a pattern analyst’s standpoint, however, the absence of dynamic parts makes it completely incapable of identifying visually prominent peaks and troughs in a snapshot of a chart.

A more substantial drawback of the zigzag as a tool to rep-resent a chartist’s perception could be its dependence on the threshold parameter. In other words, you can’t use the same cutoff threshold for all charts. A 20% threshold for long-term daily charts of stocks does a pretty good job most of the time, but it might be inefficient for short-term daily charts. So the analyst must first see the chart and then define the threshold that will give the zigzag the opportunity to identify the major swings. That initially negates the usefulness of the zigzag as a representative of the human eye when there is need for iden-tification of major swings in thousands of charts. This is not a serious drawback, however, since there is a simple (albeit not perfect) workaround: You can take the range of values in a chart (highest value minus lowest value) and then define the threshold as a percentage of that range.

So what are the essential limitations of the zigzag from a chartist’s point of view? One limitation is that it focuses exclusively on prominent price swings (peak to trough and trough to peak). More precisely, although it indeed identifies meaningful pivots in price, it often misses other pivots that are even more important regarding their role in the visual comprehension of the movement of the price (Figure 2). Also, its bias toward only price swings makes it incapable of perceiving special cases where connection of peaks to peaks or troughs to troughs describes the price behavior in a better way (see Figure 3). Another important limitation of the zigzag has to do with the way it summarizes and ranks information on a chart. More precisely, you can’t force the zigzag to sum-marize the price action into a specific number of swings. For example, you can’t tell the zigzag to filter the price action and condense it into, say, four swings (legs). You will know the total number of the zigzag’s legs only after it has filtered the price.

m

eetthe

PiP

smethod

An alternative method of filtering price fluctuations is one that is based on the idea of perceptually important

points, or PIPs. While roots of this method trace back to

1973, it was mainly introduced in 2001 by F.L. Chung et

al. in their academic research paper “Flexible Time

Se-ries Pattern Matching Based On Perceptually Important Points.” The PIPs method makes it feasible to construct a modified version of the classic zigzag indicator that will

Figure 2: not all points identiFied by the zigzag are visually prominent.

The zigzag always tries to find and accent prominent price swings based on how high or low these swings go, but this makes it quite stiff. In this iconic example, the zigzag would disregard point 2 just because point 1 is a bit lower. From a visual perspective, however, point 2 was more important than point 1 since it was the pivot that sparked a swift and strong uptrend.

Figure 3: the zigzag always connects peaks with troughs. The zigzag has a unilateral

way to filter price movements. It always connects peaks with troughs. This means that it is blind regarding changes in the strength of directional movements and so misses important information with respect to the visual perspective of a price trend. In this daily chart of CBS Corp., the 20% threshold zigzag (in blue color) is unable to see the visual importance of points 2 and 3 although they clearly mark changes in the severity of the downtrend. It considered point 4 as significant, but that is not visually prominent. The pink crooked line gives a much better sight of the price movement from point 1 to point 5.

(15)

Euclidian

distance distanceVertical Perpendiculardistance

X Z Y Y X Z X Z Y d1 d2 dx(Y,Z) = d1+d2 dx(Y,Z)

{

d x(Y,Z)

{

overcome the limitations I mentioned earlier because its filtering process is much closer to the way a technician’s eye scans a chart. This doesn’t mean that this new method should wholly replace the classic zigzag. It is just a different method serving a different purpose. The PIPs method is more appropriate for representing price movement from a visual standpoint. In brief, while the zigzag starts from the left of a chart and creates legs as

it moves to the right, the PIPs method identifies important points based on a holistic approach: All price data is indirectly taken into account for the identification of each and every leg.

t

heconcePtofdistance

Before diving into the details of PIPs, it is necessary to define the concept of the distance of one point with respect to two other points. Let X, Y, and Z be three points in a time–price chart in this order: Y, then X, then Z. In their 2008 paper “Representing Financial Time Series Based On Data Point Importance,” Tak-chung Fu et al. proposed three ways to define the concept of distance dX(Y,Z) of X from points Y and Z:

n Euclidian distance: d

X(Y,Z) is defined as the distance of X from Y plus the distance of X from Z.

n Vertical distance: If ε is the straight line connecting the points

Y and Z, then dX(Y,Z) is defined as the vertical distance of X from ε.

n Perpendicular distance: If ε is again the straight line that

connects the points Y and Z, then dX(Y,Z) is defined as the perpendicular distance of X from ε.

In Figure 4 you can see pictorial examples for these three flavors of distance.

i

dentifyingthe

PiP

s

Consider a set of points in a time–price chart that are derived by the values of an indicator such as the MACD or the closing price of a stock. A point from this set will be considered perceptually important when it dominates all other points in terms of importance in the perception of the visual shape that these points create.

That’s a loose definition, I know, so let me define the PIPs via a formal inductive procedure using the vertical kind of distance (refer to Figure 5 for a visual aid).

Step 1: The first two PIPs are the first and last points in the chart.

Name them A and B, respectively. I call these PIPs marginal for obvious reasons. All the other PIPs will be called internal.

Step 2: To find the third PIP, calculate the vertical distances of

all points of the set from the couple A, B (that is, calculate all dX(A,B) where X runs all points of the set). The point X, which produces the maximum distance, is the third PIP. Let

A

B

C

A

A

D

B

C

D

B

E

C

Identifying the third PIP

Identifying the fourth PIP

Identifying the fifth PIP

Figure 4: the three Flavors oF distance oF one point From a pair oF two points. Three ways to define

the distance of a point X from a pair of points Y, Z have been proposed in the literature: The Euclidian, the vertical, and the perpendicular.

Figure 5: identiFying perceptually important points (pips) us-ing the vertical distance. The first two PIPs are the first and last points

(A and B). From there on, to designate a point as perceptually important, you go through a procedure that takes into account all price data in the chart. More precisely, you go through calculations of vertical distances involving all data in the chart and lines connecting previously identified PIPs.

(16)

this point be C. There are now three PIPs that appear in this time order in the chart: ACB.

Step 3: Using the same previous idea, run through all set

points between A and C and calculate their vertical distances from the couple A, C. Also run through all set points between C and B and calculate their vertical distances from the couple C, B. The maximum distance found from these two runs marks point D, which is the fourth PIP.

Step 4: Say that D is between A and C. For the fifth PIP

you make three runs of vertical distance calculations: one from A to D, one from D to C, and one from C to B. The maximum distance found marks the fifth PIP (E in Figure 5).

Next steps: You can repeat this procedure to find as many

PIPs as you like (a new PIP for every step). The pro-cedure stops when you have identified your desired number of PIPs or when the maximum distance in a step is zero (as this would mean that no additional information is gained by identifying new PIPs). Of course, there is always a natural limit to the number of PIPs you can identify—and that limit is the total number of points in the chart.

As you probably noticed, the inductive procedure used to identify the PIPs has an additional benefit: The PIPs are automati-cally ranked in descending order of perceptual importance. The mathematically inclined, however, might have already found a possible problem with this procedure: What if there is not one and only one maximum distance among the vertical distances you calculate for a step? This is rare but it can happen. In this occasion, there will be more than one finalist for the next PIP designation, so you either designate all of them as PIPs or, when you need to select only one of them because you want only one PIP, you need a selection convention regarding which one to designate as the next PIP.

As a simple solution for the second case, I opt for the finalist, which lies in the right-most side of the chart. In other words, I focus on the most recent data. You could use other methods of selection, but I believe this is the simplest and most efficient for our purpose.

A similar procedure could be used to identify PIPs using Euclidian or perpendicular distance. But what is the most ap-propriate distance to use? A study of various examples shows that from a visual point of view, the Euclidian distance identifies terrible PIPs. Further, the vertical and perpendicular distances produce exactly the same PIPs in most of the real cases. In ef-fect, you can use only the vertical distance and disregard the other two. The indicator I will present uses the vertical distance and the selection convention discussed earlier.

t

hezz

toP

indicator

Now that you know how to calculate PIPs in an indicator’s plot, you can connect them using straight line segments to create legs

and, voilà—you have a new zigzag-like indicator. (Note that the number of legs equals the number of PIPs minus one.) I call this indicator zzTOP. The “zz” part of the name comes from it being a generalized kind of zigzag and—what can I say—the “TOP” part comes because I am listening to ZZ Top’s hit song “Legs” as I write this article.

The zzTOP indicator requires three arguments (parameters). These are: indicator, LegsNo, and scale. Let’s look at them in detail.

Indicator

Unlike the classic zigzag, the zzTOP doesn’t rely on cutoff thresholds, so it can be directly applied successfully to any kind of indicator. The indicator parameter is therefore the indicator upon which you want the zzTOP to be applied. It can be the closing price line, the MACD, the RSI, or any indicator you can think of.

LegsNo

This is a numeric parameter (a positive integer greater than or equal to 1) that defines the total number of legs you want the zzTOP indicator to have. The number of PIPs equals this number plus 1. For example, a value of 20 for this parameter indicates that you want the zzTOP to have exactly 20 legs (or equivalently, you are interested in 21 PIPs).

zzTop (Close,5,L) 2000 2010 1990 1980 Ball Corp. (daily) 50 50 zzTop (Close,20,L)

Figure 6: zztop perFormance in the daily chart oF ball corp. (bll). The

zzTOP indicator is a nice way to approximate the price action via a predefined number of linear legs. The more legs that are used, the closer the approximation.

(17)

Scale

This parameter refers to the scaling of the y-axis of the chart, and it has a significant effect on the performance of the zzTOP. The scale parameter can take two values: “A” (arithmetic) and “L” (logarithmic). If you want the zzTOP to filter the movements of the indicator parameter as seen in an arithmetic scale, then you set this parameter to “A.” This instructs the zzTOP indicator to apply its PIPs identification algorithm to the indica-tor itself. If, however, the indicaindica-tor is positive and you want the zzTOP to filter its movements as seen in a semi-logarithmic scale (in such a scale, the y-axis is logarithmically scaled, whereas the x axis is arithmetically scaled), then you set this parameter to “L.” This latter case is equivalent to first taking the natural logarithm of the indicator, then applying the zzTOP with a scale parameter of “A,” and then applying the exp() function in the result.

As an example, zzTOP(close, 30, L) refers to the zzTOP indicator applied on the semilogarithmic chart of the closing price of a security demanding that the zzTOP must have exactly 30 legs. Simi-larly, zzTOP(MACD, 20,A) refers to the zzTOP applied on an arithmetic chart of MACD and demanding that the zzTOP must have exactly 20 legs.

It is important to note again that while the zigzag scans the price series from left to right using a number (the threshold) to classify a price swing as important, the zzTOP uses information from all loaded data in a chart every time it identifies a new internal PIP. This is invaluable from the point of visual comprehension of a chart, but it comes at a price: The zzTOP is much more prone to changing many of its legs when new price data is added to the chart.

c

hartexamPLes

It is now time to go through some chart examples. In Figure 6 you can see how the zzTOP(close,5,L) and zzTOP(close,20,L) perform in the same chart. The former scans all prices shown in the chart, finds six PIPS, and summarizes the price action

(18)

Zigzag (20%) 2000 2010 2011 2012 2013 2014 1996 1997 1998 1999 2001 2002 2003 2004 2005 2006 2007 2008 2009 1995 ASML (daily) 50 100 50 zzTop (Close,20,L) 100

Baxter Intl. Inc. (daily) 2000 2001 2002 2003 2004 2005 2006 2007 2008 zzTop (Close,20,L) zzTop (Close,20,L) Period 2 Period 1 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 80 70 60 50 40 30 20 10

Figure 7: zztop and zigzag vis À vis. The upper and lower daily charts of ASML Holding (ASML) are the same. The

zzTOP(close,20,L) indicator is overlaid in the upper chart, whereas in the lower chart, the zigzag identifies peaks & troughs based on a percentage threshold of 20%. From a visual standpoint, the zzTOP indicator can effectively render the essentials of the price movement using much fewer legs than the zigzag (see its performance between late 1999 and late 2001). This is mainly because of two reasons: First, it is allowed to connect peaks to peaks and troughs to troughs, and second, it takes into account all price data for the calculation of each leg. The zigzag on the other hand doesn’t look at all price data every time it creates a leg. It processes the data strictly from left to right and it can only change its last two legs during the identification procedure.

Figure 8: zztop usually changes dramatically when new data is added. That zzTOP identifies an internal PIP

taking into account all previously identified PIPs, and that the first and last prices in the chart are always the first two PIPs means that all internal PIPs (and consequently all legs) are indirectly affected by the first and last prices of the chart. So as new data is added to a chart, all the legs of the zzTOP face the danger of change. As more and more data is added, all of its legs will finally change, since the number of legs is constant. This feature of the zzTOP is clearly seen in the daily chart of Baxter International Inc. (BAX), where the zzTOP(close,20,L) is applied to price data for two periods. The red zzTOP is applied to price data for period 1 and the blue zzTOP is applied to price data for period 2.

into only five legs. The latter finds 15 more PIPs and summarizes the price action into 20 legs. Note that the zzTOP doesn’t have to connect only peaks with troughs. It can also connect peaks to peaks or troughs to troughs and thus it is more flexible in summarizing and expressing the price movement quirks. In this regard, the choice of “zz” in the name zzTOP is perfectly suited because the zzTOP is not limited to only zigzags—it can do

zigzigs and zagzags too.

In Figure 7 you can see how the zzTOP(close,20,L) differs from the classic zigzag

in-dicator with a percentage threshold of 20%. Note especially the period from the end of 1999 until the end of 2001. The zzTOP clearly depicts the price movement in a better way than the zigzag does in terms of visual clarity, using just a few legs.

Figure 8 shows how the zzTOP may change when you put new data in a chart. Period 2 starts at the beginning of 1983 and ends at the beginning of 2000, whereas period 1 starts at the beginning of 1983 and ends near the summer of 2009. The zzTOP indicator in blue is applied in period 2 only (that is, it doesn’t look outside period 2) and identifies 20 legs for that period. The zzTOP indicator in red is ap-plied in period 1 and summarizes the price action into 20 legs for the entire period. Both zzTOPs have the same parameters except for the time period upon which they are applied. It is obvious that new data can have a significant effect on the performance of zzTOP not only because of the restriction in the number of legs it is allowed to pres-ent but also because its algorithm identifies all internal PIPs, starting from the marginal ones (the first and last prices in the chart). In effect, all internal PIPs—and consequently all legs—are affected by the first and last prices in the chart.

In Figure 9 you can see why the scale parameter is important. In the top chart you see the weekly price of Caterpillar Inc. (CAT) with the 20-leg zzTOP based on the closing price using arithmetic as its scale parameter. In the lower chart you see the same weekly chart of CAT with the same 20-leg zzTOP indicator, but this time, the scale parameter is logarithmic. The upper chart is arithmetic, whereas the lower one is semilogarithmic. It is clear that the scale parameter is there to ensure that the zzTOP “sees” the chart the same way a chartist would do with his eyes. In the upper chart (the arithmetic one), the price movement before the year 2000 is seen as al-most horizontal by the human eye.

For the chart pattern analyst, the dynamic nature of

the zigzag’s last legs is not a drawback but a merit.

(19)

Caterpillar Inc. (weekly) 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 1990 1992 1993 1994 1995 1996 1997 1998 1999 zzTop (Close,20,A) zzTop (Close,20,L) Arithmetic scale Semilogarithmic scale 90 80 70 60 50 40 30 20 10 0 100 50 2010 2011 2012 2013 2014 2000 2002 2003 2004 2005 2006 2007 2008 2009

Archer Daniels Midland Co. (weekly) zzTop (Close,20,L) MACD zzTop (MACD,20,A) 50 40 30 20 10 4.0 3.0 2.0 1.0 0.0 -1.0 -2.0 -3.0 -4.0 -5.0 2001 That’s because after 2000, the prices

advanced significantly. In effect, the swings of the price after 2000 overshadow those before 2000 from an arithmetic perspective and the arithmetic-scale zzTOP correctly focuses on the price swings after 2000 because that’s what a human eye would naturally do.

In the lower chart, though, the semilogarithmic scale makes it pos-sible to see things from a percentage perspective, so the price swings be-fore 2000 are visually more promi-nent now. The logarithmic-scale zzTOP in the lower chart correctly identifies the 20 most noticeable price swings the same way a human eye would.

Most chartists use semilogarith-mic charts to plot the prices of trading instruments, so an arithmetic-scale zzTOP is practically useless when applied to the price charts (especially the long-term ones). The charts of common technical indicators (such as stochastics, MACD, and RSI) are nonetheless always arithmetic, so the ability of zzTOP to adapt to scale differences can be useful. In Figure 10 you can see how the arithmetic-scale zzTOP performs in a weekly chart of Archer Daniels Midland Co. (ADM).

a

utomation

The zzTOP requires you to state how many legs you are interested in. The opportunity to a priori define the

number of legs gives you tremendous freedom, but sometimes you may want the indicator to choose how many legs to identify based on a goodness of fit level that you desire. In other words, you might be interested in a hybrid between the zzTOP and the zigzag. This can be accomplished by requiring the zzTOP indi-cator to keep finding PIPs and to create legs up to a predefined proximity level (an equivalent to the threshold of the zigzag). I named this automated version of zzTOP the zzTOPauto.

The zzTOPauto indicator has the same indicator and scale parameters as the zzTOP does, but instead of LegsNo, it has a proximity parameter. So zzTOPauto(close,10,L), for ex-ample, refers to the zzTOPauto applied to the closing price of a security on a semilogarithmic chart with a proximity of 10. Proximity is a positive number up to 100 and represents a percentage of the range of values of the indicator parameter. Its purpose is to give the zzTOPauto a level of goodness of fit you are interested in. Note that the lower the proximity, the

the zztop doesn’t rely on cutoff thresholds so it can be

directly applied successfully to any kind of indicator.

Figure 9: arithmetic vs. logarithmic scale. The scale parameter of the zzTOP determines the way the zzTOP “sees”

the price. The “A” (arithmetic) scale parameter instructs the zzTOP to see the price from an arithmetically scaled y-axis whereas the “L” (logarithmic) scale parameter instructs it to see the price from a logarithmically scaled y-axis. The results can be strikingly different for these two cases as it is seen in this weekly chart of Caterpillar Inc. (CAT).

Figure 10: identiFying the swings oF macd in a weekly chart oF archer daniels midland co. (adm). The

zzTOP indicator performs pretty well when applied in indicators without the need to define filtering thresholds.

closer the zzTOPauto line must be to the indicator plot and thus the more legs will be needed.

Consider, for example:

zzTOPauto(indicator,20,A)

and say that the highest value of the indicator is 200 and its lowest value is 40. The range of the indicator is therefore R=200-40=160. Since the proximity parameter is 20, you are interested in the required number of legs such that the verti-cal distances between the values of the indicator and the legs are less than 20% of 160 (which equals 32). In other words, a proximity of 20 means that you want the zzTOPauto to keep finding PIPs and to keep creating legs up to the point where the indicator’s values will not divert more than 20% of R from the zzTOPauto’s plot. Of course, for logarithmic-scale zzTOPauto, the range of the indicator must be measured in a way that will

(20)

take into account the visual idiosyncrasy of the semilogarithmic charts. More precisely, for the logarithmic-scale zzTOPauto, the range of the indicator is measured using the logarithms of the indicator values instead of the values themselves. In Figure 11 you can see how the zzTOPauto (close,10,L) did a great job in outlining the price movements of Boston Scientific Inc. (BSX). Using a higher proximity parameter would result in fewer legs for the zzTOPauto, whereas a lower proximity parameter would result in more legs.

c

odingandusage

The correct way to perform backtesting is to recalculate the values of all indicators involved whenever a new bar is taken into account. But that would require too many calculations. To decrease the time needed to

perform the backtesting, the typical technical analysis software loads all historical data, then calculates the values of indicators, and then uses these calculated values to simulate the backtesting. This is fine for common indicators such as MACD and RSI, but for dynamic indicators like zigzag, zzTOP, and zzTOPauto (which change their historical values when new data comes in), this approach produces erroneously prettifying results. As a consequence, the zzTOP and zzTOP auto indicators must not be used for backtesting in the typical software program using the software’s built-in backtest-ing feature. You can, however, use these indicators in a static fashion as a digital substitution for your eyes when you want your software to scan thousands of charts.

Coding the zzTOP and zzTOPauto indicators requires some time and effort. For software whose formula language lacks looping capabilities (like MetaStock, for example), the zzTOP and zzTOPauto must be coded using a versatile programming language, embedded inside a dynamic link library (DLL) file, and then be called by the software as external functions from the DLL. To plot the zzTOP and zzTOPauto indicators in MetaStock, I created a DLL (named “zzTOPindicators.dll”) that’s available for download from the Article Code area of www.traders.com, or from http://traders.com/files/zzTOPindi-cators.zip directly. In the sidebar “ZZTOP And ZZTOPauto Indicators In Metastock,” you can find information on how to download and use it.

r

ock

&

roLL

The zigzag’s way of filtering fluctuations, although simple, is not always appropriate for capturing the visual representation of price behavior. The zzTOP and zzTOPauto indicators presented in this article offer an alternative way to transfer your visual perception to your software. Perhaps, if you go through thou-sands of charts, chances are you will encounter cases where the zzTOPs will miss a few points that your eye would consider as visually important; however, that would generally be rare. So if you are not pleased with the way the zigzag indicator perceives the price movements in a chart, then get ready to rock and let the zzTOPs do their magic.

Giorgos Siligardos holds a PhD in mathematics and a market maker certificate in derivatives from the Athens Exchange. He is a financial software developer, coauthor of academic books in finance, and a frequent contributor to Technical Analysis of StockS & commoditieS magazine. He has also been a research

and teaching fellow to the University of Crete as well as a teaching fellow to the Department of Finance and Insurance at the Technological Educational Institute of Crete for many years teaching math and financial courses and supervising masters dissertations. His academic website is http://www.tem.

zztop and zztopauto indicators in metastock

Readers can download my “zzTOPindicators.dll” file as a .zip archive from http://traders.com/files/zzTOPindicators.zip or from the Article Code of the Technical Analysis of StockS & commoditieS website,

www.traders.com. After downloading, you will need to expand

the .zip file and place a copy of it in MetaStock’s external function DLLs folder (usually located at C:\Program Files\Equis\MetaStock\ External Function DLLs).

The zzTOP and zzTOPauto indicators can be called by the fol-lowing code:

ExtFml( "zzTOPindicators.zzTOP",Indicator ,LegsNo ,Scale) and

ExtFml("zzTOPindicators.zzTOPauto",Indicator,Proximity,Scale) respectively. For example, the code:

ExtFml( "zzTOPindicators.zzTOPauto",CLOSE ,15 ,L )

calls the zzTOPauto indicator for the close price in a semilogarithmic scale with a proximity of 15.

—G. Siligardos Boston Scientific (daily) zzTOPauto (Close,10,L) 2008 2009 2010 2011 2012 2013 2014 2001 2002 2003 2004 2005 2006 2007 55 50 45 40 35 30 25 20 15 10 5

Figure 11: perFormance oF zztopauto with a proximity parameter oF 10 in a daily chart oF boston scientiFic inc. (bsx). The zzTOPauto indicator in this chart did a great job in outlining the price movements of BSX. Using

a higher proximity parameter would result in fewer legs for the zzTOPauto, whereas a lower proximity parameter would result in more legs.

References

Related documents

A spacious master bedroom suite with rear and side facing timber double glazed windows, pendant light point, wall mounted light points, USB power points, under floor heating

Table 1 Phosphorus (P) adsorption studies that have been carried out using bauxite residues,

For the poorest farmers in eastern India, then, the benefits of groundwater irrigation have come through three routes: in large part, through purchased pump irrigation and, in a

Factors, Practices, and Policies Influencing Students’ Upward Transfer to.. Baccalaureate-Degree Programs and

The following software is required for Rumba to install: • Micro Focus License Manager.. • Windows Installer 3.1

Bibb, Bryan, Bulloch, Chatham, Lowndes, Muscogee, Putnam, Toombs, Upson, Ware.

Rezultati istraživanja, odnosno polinomne jednadžbe krivulje sušenja, ukazuju da su neke sorte jabuka pogodnije za proizvodnju čipsa od jabuka (Cripps Pink, Golden