Você está na página 1de 11

Simply Advanced

Just launched...
XVI
Featuring the NEW Explorer
Discover the latest features at metastock.com/whats-new
Daily technical commentary
by expert analysts to help you
make smarter investing decisions
From daily blogs to live web shows, StockCharts.com hosts free
current market analysis and educational commentary from some
of the industry’s most distinguished technical analysts.

Free daily blogs featuring over a


John Murphy Martin Pring
dozen renowned technical commentators
StockCharts.com hosts free daily blog content from over a
dozen professional technical analysts, including prominent
names such as John Murphy, Martin Pring and Arthur Hill.
Thousands of online investors trust StockCharts.com
Arthur Hill Tom Bowley to provide the unbiased expert analysis and enriching
educational commentary they need to cut through the
noise and make smarter investment decisions.

Greg Schnell Chip Anderson


Live web shows hosted by
seasoned market technicians
Our free web shows are hosted by some of the financial
industry’s most distinguished chartists. Join these technical
titans LIVE as they put their years of experience on display
Carl Swenlin Erin Swenlin
and share invaluable insights into the tools and strategies
they use in their own trading. Visit StockCharts.com/webinars
to learn more and watch our next show.

Gatis Roze Julius de Kempenaer

and more!

StockCharts.com
© StockCharts.com,Inc. All Rights Reserved. Information provided by StockCharts.com is not investment advice. You are responsible for your own investment decisions.
Stocks & Commodities V. 35:11 (10–16): Trading The Tech Emini With The Leavitt Convolution by Jay A. Leavitt, PhD

Copyright © Technical Analysis Inc. www.Traders.com


Stocks & Commodities V. 35:11 (10–16): Trading The Tech Emini With The Leavitt Convolution by Jay A. Leavitt, PhD
TRADING SYSTEMS

Modified And Modernized

Trading The Tech Emini


With The Leavitt Convolution
Here’s a trading strategy applied to the emini Nasdaq Several different LCs are employed in this strategy.
futures that uses analytical tools based on linear Fast=LC(18,4) and Slow=LC(49,7) are the most com-
regression rather than traditional ones associated mon. VFast=LC(9,3) plays a lesser role in entries and
with moving averages. The new indicator presented exits. Trend = LC(100, 10) plays a minor role, which
here has some unusual properties. Read on to find is in contrast to what many others would use it for.
out what they are. When a moving average is below a chart, it signi-
fies a rising market. The Leavitt convolution does not

In
this article, I’ll explore trading the share this property. In time series, moving averages are
emini Nasdaq futures contract (^NQ) employed as a data smoothing process. This applies
on a 30-minute chart over a five-year to moving linear regressions as well. With the Hull,
period with new analytical tools based the smoothing results in something that is extremely
on linear regression rather than tra- effective in that you can interpret market direction
ditional ones associated with moving based on only two data points. A Leavitt convolution
averages. I’ll present a new indicator that supersedes considers the market long when its value at the current
crossovers along with several unusual stops. The bar is higher than the previous; short if lower.
strategy has a peculiar property—higher investments In Figure 1 you see how these curves may not be
have greater rates of return, while the profit factor below a rising market. It’s also clear that it’ll take more
remains essentially unchanged. than these two indicators, fast and slow, to develop a
viable trading system.
The Leavitt convolution
As you know, averages produce a single value. Linear
regression derives more information from the same
data and yields two values—a straight line’s slope and
intercept. This has implications regarding time series,
in general, and the technical analysis of stocks, stock
options, and futures in particular.
This line allows for extrapolation, a feature central
to the Leavitt convolution, denoted as LC(Plength,
Clength). Its construction is modeled after the Hull
moving average. The Leavitt projection is the one-bar
tradestation

extrapolation of the linear regression of price. The


Leavitt convolution is the one-bar extrapolation of the
linear regression of the projection. Plength indicates
FIGURE 1: FAST AND SLOW LINEAR REGRESSION CURVES. Moving
ROY WIEMANN

linear regression is often not below a rising chart. The red/green curve
the length of the Leavitt projection, while Clength is is the fast one; the light blue/pink curve is the slow. Green and light blue
indicate a rising chart; red and pink, a falling.
the length of its convolution.

by Jay A. Leavitt, PhD

Copyright © Technical Analysis Inc. www.Traders.com


Stocks & Commodities V. 35:11 (10–16): Trading The Tech Emini With The Leavitt Convolution by Jay A. Leavitt, PhD

Contraction, by itself, is not a sufficient condition for an exit.


Whipsaws are common with moving linear regressions. Other
factors are needed to close a trade.

State of the market


There are three states: bull, bear, and neither. Bull means both
fast and slow are long; namely, fast > fast[1] and slow > slow[1].
The bear state requires both indicators to be short. Later on in
this article where entries and exits are defined, you will see these
are not sufficient conditions for a trade action. Other conditions,
such as expansion and volume, will be required.

FIGURE 2: Expansion and contraction in long and short trades. When


Normalized volume
the fast curve is above the slow curve, you would enter a long trade. When the fast Volume plays a critical role in this strategy. It is normalized into
curve is below the slow curve, you would enter a short trade. the range [0:1] by its relative distance from its lowest to its highest
of the current N values. In the strategy descriptions, VR represents
the normalized volume. VR displays in Figure 4 as islands of
activity in 30-minute charts due to after-hours trading.

Strategies
In this study, only a fixed number of shares are traded. Profits
are not reinvested. A commission of $5.00 and $5.00 for slip-
page is associated with each entry and exit.
The long and short positions are established in two separate
strategies. The long positions tend to stay in a trade as long as
FIGURE 3: EXAMPLE OF A FAILED BREAKOUT. When prices are moving sideways, possible. Short trades often close quickly.
expansion could reduce the number of false entries. Only one of the long and short positions can be active at
the same time. Each may have its own parameters for fast
and slow.
Long entries allow a wide range of VR up to 0.5. Short are
more restrictive, requiring VR being greater than 0.85 or 0.9.
FIGURE 4: VOLUME’S ROLE. By normalizing volume into a range from zero to 1, you
can see when volume is greater. On this 30-minute chart of volume, you see islands
of activity due to after-hours trading. Long entries
The first of the three long entries is primarily based on the
Leavitt convolution indicators. The other two are triggered by
Expansion and contraction pivot lows. Each has a stop entry and a volume constraint.
Expansion occurs when the difference be-
1. VFast, fast, and slow must all be increasing with VR <
tween the fast and slow at the current bar is
0.5 and a green candle. The stop entry is the greater of the
greater than their difference at the previous
close and close[3] plus 0.005. A Keltner stop, described
bar. Expansion and its opposite indicator,
later, is set. This entry accounted for 80.98% of the entries,
contraction, replace traditional tools such
81.14% of the long entry profit and had an expected return/
as MACD and Dave Landry’s bowties.
trade of $2,416.26. (Statistics in entries and exits are based
Figure 2 displays expansion in light gray
on data from trading one contract.) The expected return
and contraction in darker gray.
per trade calculation is:
An ideal setup for a long trade is displayed on the left with the
fast curve above the slow. The reverse is true for the short trade. % Wins * Average win + % Losers * Average loss
In both examples, the dividing lines between these two indicators 2. Its pivot low uses parameters [close, 3, 1, 2] with a require-
are many bars ahead of the fast and slow crossovers. ment that high[2] is greater than high[1]. In addition, VR
In this study, several entries and exits are employed. Expan- < 0.45, slow is increasing and fast > slow. This entry uses
sion is a required condition with two of the six entries. However, the same stops as #1. It accounted for 18.61% of the long
contraction is a required condition in nine out of the 14 exit trades, 16.69% of the long trade net profit, and had an
conditions, including several stops. expected return/trade of $2,163.64.
An additional benefit is provided by expansion. It tends to
reduce false entries in horizontal channels. An example of a 3. This entry requires a double pivot low. The parameters are
failed breakout from a horizontal channel is shown in Figure 3. [low[1], 3, 1, 2] and [high[1], 3, 1, 2] and has an additional
An entry was not taken because of the lack of expansion. requirement high[4] > high[3]. Both fast and slow must be

Copyright © Technical Analysis Inc. www.Traders.com


Stocks & Commodities V. 35:11 (10–16): Trading The Tech Emini With The Leavitt Convolution by Jay A. Leavitt, PhD

increasing with VR < 0.45. Fast must be below the close There are three more stops
and expansion must be present. The stop entry = high[1]. linked with long trades. These
This entry only accounted for 0.41% of the entries, 2.16% are in effect only when there is
of the long entry profit, but had a remarkable expected contraction.
return per trade of $12,650.00.
1. A stop is set whenever
there is a gap up equal
Short entries
to the current low. In
There are three short entries. These, to a degree, are a mirror
addition, a red candle
image of the long, except two have limit entries.
or decrease in the close
1. Bear, VR > 0.9 and a red candle. The entry is limited to is required. Some gap
the lower Keltner channel. A conditional stop is set equal ups fail, occasionally
to the close. This entry represents 20.93% of all short due to another trader’s
trades, 19.42% of the short net profit with an expected input error. This can
return/trade of $4,518.00. skew the data for this FIGURE 5: KELTNER STOPS. The value of
strategy and cause an the lower channel, circled in yellow, could
2. Pivot high with parameters [close, 3, 1, 2], bear and VR
entry. 85% of these stops be set as a stop at some long trade entries.
> 0.8. Its limit entry is the same as above. A stop is set
were winning, resulting The Keltner stop is a fixed value offset from
equal to the upper Keltner channel. This produced 73.02% the average.
in an expected return of
of all short trades, 62.04% of short net profit showing an
$45,020.00.
expected return/trade of $4,123.84.
2. A whipsaw can cause an entry. A stop is set on the bar
3. Double pivot high with parameters: [low[1], 3, 1, 2] and
following an entry equal to the current low or the previ-
[high[1], 3, 1, 2], bear, fast < slow, VR > 0.8 and expan-
ous, if lower. There are two additional requirements for
sion. A stop entry is set at low[1]. This entry was used
execution: bull must be false and the candle red.
in 5.86% of the short trades generating 18.54% of its net
profit and with an expected return/trade comparable to 3. If a trade is under water by -$500, a stop is set at the low
the long trade double pivot equal to $15,400.00. and executed if fast and slow are below the low.

Stops—when to use them Four of the six short exits are stops. Three of these require
Stop-losses are not used in these strategies. contraction.
However, most entries have their own stop in
1. Gap-downs set their high as a stop when they occur. It is
addition to other stops. Unlike stops in most
the exception by not requiring contraction.
strategies, these stops are rarely executed
solely because they are hit. Other conditions 2. When both VFast and trend are short, with Vfast greater
are required, such as contraction. than high and a red candle, then VFast is set as a stop.
Two long entries employ a stop based on the value of the
3. If fast and slow are short, with VR greater than 0.9 plus
Keltner channel at the point of entry of 25 bars with -1.5 times
a red candle, then a stop is set equal to the close.
the average true range (ATR). These entries take their values
from the lower channel. 4. Instead of a stop-loss, if two consecutive trades show an
Figure 5 shows a chart with its upper and lower Keltner chan- increasing loss, then a stop is set equal to the close.
nels. At some long trade entries, the value of the lower channel,
circled in yellow, is set as a stop. The small white triangle three Long exits
bars later indicates its execution. The red dotted line indicates There are three long exits that do not rely on stops:
a loss starting from the entry to the exit. 1. Bear and contraction. 12.54% of the long trades terminated
The Keltner stop is a fixed value offset from the average. There when these conditions were met.
is another similar stop that
moves with each bar’s low. @NQ 6/24/12 — 6/23/17 30 Minute Chart

This stop is offset from the


Maximum
Rate of Return on % Time in Expected
Shares Intraday Rina Net Profit Profit Factor # Trades % Profitable
low by -1.5 times the ATR.
Return Account Market Return
Draw Down
Frequently, it is tighter 2 $14,796 17.40% 314 $138,209 1.31 934.10% 49.85% 2,110 39.15% $66.98
4 $18,036 27.83% 405 $300,898 1.35 1668.32% 48.24% 2,222 41.90% $138.11
than the Keltner. Unlike 6 $25,964 34.73% 443 $465,650 1.37 1793.44% 47.04% 2,303 43.64% $206.23
with traditional moving 8 $32,274 39.40% 443 $611,853 1.37 1895.81% 46.62% 2,367 44.06% $263.61
stops, its value rises and 10 $31,973 43.97% 501 $796,930 1.39 2492.51% 46.35% 2,398 44.33% $337.24
12 $41,023 47.51% 533 $970,517 1.40 2365.79% 46.00% 2,434 44.21% $404.16
falls. While the Keltner 100 $318,783 87.53% 562 $7,782,306 1.39 2441.26% 44.02% 2,644 41.64% $2,989.37
requires contraction, this FIGURE 6: DIFFERENT NUMBER OF SHARES HAVE DIFFERENT PROPERTIES. As the number of shares increase, rates of returns,
stop does not. profit factor, and net profit all increase. But so does drawdown and that is worrisome.

Copyright © Technical Analysis Inc. www.Traders.com


Stocks & Commodities V. 35:11 (10–16): Trading The Tech Emini With The Leavitt Convolution by Jay A. Leavitt, PhD

2. Contraction, highest trade profit > $500 and current trade profitable column. However, the RINA demonstrates there are
profit < 50% highest trade profit. 45.46% of the long trades other measures to consider beyond gross loss and percent of
had this pull back. winning trades.
The ratio of net profit divided by maximum intraday drawdown
3. Contraction, bars since entry > 4, VR >= 0.85 or (VR >=
equals the return on account. TradeStation equates maximum
0.75 and close = lowest(close,3) and open = lowest(open,3)).
intraday drawdown with the amount of equity required to trade
This combines two key factors for an exit, contraction,
the strategy. Thus, trading two shares would require risking
and high VR. Of these trades, 95.12% were profitable
almost $15,000. Over five years, this investment would grow
generating an expected return/trade = $57,573.17.
9.34 times the initial risk. With the same strategy, trading 10
Short exits shares grows over the same period by a multiple near 25.
Two short exits do not employ stops. They are similar to exits The entries in this strategy are highly selective. This results
1 and 3 above. in equity being exposed to risk under 50% of the time, as shown
in the column % time in market—an important component in
1. Bull and contraction. Of the short trades, 14.64% were
the RINA calculation.
closed by these conditions. Only 5.61% of them were
Expected return is a probability measure calculated from
profitable.
the % profitable, average win, and average loss. In a perfect
2. Contraction, bars since entry > 4, VR < 0.45 and VFast world, without any rounding, expected return multiplied by the
increasing. Of these trades, 98.04% were profitable, gen- number of trades should equal the net profit. The plot of the
erating an expected return per trade of $49,666.67. expected return against the number of shares is a straight line.
This implies the expected return can be extrapolated, growing
Performance at the rate of shares/2.
The table in Figure 6 shows that trading a different number In many ways, trading one contract of @NQ behaves like an
of shares has different properties. Furthermore, behavior with extension of the other data. The maximum intraday drawdown
one contract—100 shares—appears quite distinct from the seems large. However, Figure 8 shows that drawdown is not
smaller numbers. Because of this, the analysis is divided into any more of a concern than in Figure 7. Furthermore, it’s the
two parts: statistics for trading two to 12 shares of @NQ, and best statistic among the RINA values and second best in the
one contract. return on account column.
By and large, everything improves going further down the The rate of return, 87.53%, and net profit, over $7.75 million,
column. Only the drawdown appears worrisome. However, indicate a reward that justifies the drawdown. The net profit and
Figure 7 shows the drawdown does not grow disproportionately expected return grow linearly across all data. This implies the
with the faster growing charts. rate of return and net profit will continue to grow with more
The rate of return grows smoothly from a modest 17.5% (or contracts. A two-contract test had a rate of return in excess of
close to it), to approaching a robust 50%. The RINA index is an 100% and doubled the one-contract net profit.
alternative to the Calmar ratio and similar measures. While it In contrast with the percent of winning trades, the percent
penalizes for large drawdowns, it rewards for shorter duration of profitable months, as displayed in Figure 9, far exceeds the
in the market. percent of months with losses. The magnitude of those profit-
able is significantly greater than the losers, with eight greater
RINA index = (Net profit - Net profit in outliers) / than $300,000. And there is only one losing quarter.
(Average drawdown * Percent time in the market)

A discussion of the RINA index can be found at: @NQ 30 Minute Chart
http://signaltradinggroup.com/wp-content/DCSArticles/ $1,100,000

TSperform.pdf
$1,000,000 12 shares
$900,000
Generally speaking, a system with a RINA index of 30 or
10 shares
$800,000
8 shares
higher could be considered to have reasonably good performance. $700,000
6 shares
Based on this level of 30, the strategy delivers very good per- $600,000
Net Profit

4 shares
formance for trading any number of shares. Each has a RINA
$500,000
$400,000 2 shares
value at least 10 times higher than that standard. $300,000
The net profit grows linearly with the number of shares. In $200,000

all likelihood, this is due to several of the strategy parameters $100,000


$0
being constants rather than scalable with the number of shares.
This is reflected in the charts in Figure 7, where their spacing
17
16
16
15
15
14
14
13
13
12
12

/20
/20
/20
/20
/20
/20
/20
/20
/20
/20
/20

/22
/22
/22
/22
/22
/22
/22
/22
/22
/22
/22

on the right side appears uniform.


06
12
06
12
06
12
06
12
06
12
06

Profit factors in the table in Figure 6 are a warning that FIGURE 7: COMPARING DRAWDOWNS. When you compare equity growth from two
gross losses are relatively large compared to gross profits. to 12 shares, you see that drawdown doesn’t grow disproportionately with the faster-
This is because most trades are losers, as indicated in the % growing charts.

Copyright © Technical Analysis Inc. www.Traders.com


Stocks & Commodities V. 35:11 (10–16): Trading The Tech Emini With The Leavitt Convolution by Jay A. Leavitt, PhD

Equity Curve Detailed - @NQ 30 min. (6/24/2012 18:30 - 6/23/2017 15:30)


8000000 The net profit and expected
7000000 return grow linearly across
6000000 all data. This implies the rate
5000000 of return and net profit will
continue to grow with more
Equity ($)

4000000

3000000
contracts.
2000000

1000000

0
demonstrates that the ends previously assigned to moving aver-
6/26/13 6/26/14 6/25/15 6/22/16 6/21/17
ages may be better served with linear regression with today’s
FIGURE 8: Net profit trading one contract. Although the maximum intraday capabilities.
drawdown seems large, the drawdown isn’t really a concern.
Jay Leavitt has a master’s and PhD in applied mathematics
Monthly Net Profit - @NQ 30 min. (6/24/2012 18:30 - 6/23/2017 15:30)
700000
from the Courant Institute of Mathematical Sciences, and
Profit attended the University of Italy at Pisa on a Fulbright Schol-
600000
Loss arship. He has been an active advocate for the disabled and
500000 has served on multiple commissions. He taught mathematics
400000 and computer science at the University of Minnesota and has
Net Profit ($)

300000 since retired from SUNY at Buffalo as director of academic


200000
computing. He now develops computerized trading systems.
He may be reached via email at leavitt@buffalo.edu.
100000
0 Further reading
-100000 Leavitt, Jay A. [2017]. “Beyond The Hull With Leavitt Projec-
tions,” Technical Analysis of Stocks & Commodities,
Volume 35: February.
5/13 5/14 5/15 5/16 5/17

FIGURE 9: Monthly net profit trading one contract. The percent of [2017]. “Riding The Waves With The Leavitt Convo-
profitable months far exceeds those with losses. The magnitude of those profitable lution,” Technical Analysis of Stocks & Commodities,
is significantly greater than the losers, with eight greater than $300,000. And there Volume 35: August.
is only one losing quarter.
• http://signaltradinggroup.com/wp-content/DCSArticles/
TSperform.pdf
Moving averages were introduced in the early 20th century ‡TradeStation
by G.U. Yule. At that time, only hand-held calculating devices ‡See Editorial Resource Index
were available. They were an essential tool for technical analysts. †See Traders’ Glossary for definition
For a wide range of scientific fields, it played a central role in
smoothing time series data.
Since the late 20th century, computers became ubiquitous.
Calculation of linear regression became easier. Most trading
platforms make it available for chart analysis. This exploration

Copyright © Technical Analysis Inc. www.Traders.com


How much is your
broker charging you?

US Margin Loan Commission Rates


Rates Comparison Comparison
Equity Options1 Base
$300K Trades per contract
no base cost
Interactive Brokers2 3.36%3 $2.23
$0.67 per contract4
$6.95 base
E-Trade 8.75% $6.95
+ $0.75 per contract
$4.95 base
Fidelity 7.82% $4.95
+ $0.65 per contract
$4.95 base
Schwab 7.82% $4.95
+ $0.65 per contract
$6.95 base
TD Ameritrade 8.50% $6.95
+ $0.75 per contract
Each firm’s information reflects the standard online trades pricing obtained from the respective firm’s
websites as of 12/5/18. Pricing and offers subject to change without notice.

To see the full comparison visit:


ibkr.com/iwantmore

Interactive Brokers Rated #1


Best Online Broker 2018 by Barron’s*

Trading on margin is only for sophisticated investors with


high risk tolerance. You may lose more than your initial investment.
Member - NYSE, FINRA, SIPC – Supporting documentation for any claims and statistical information will be provided upon request. Services vary by firm. *Interactive
Brokers rated #1, Best Online Broker according to Barron’s Online Broker Survey 2018: All Together Now, March 26, 2018. For more information see, ibkr.com/info -
Barron’s is a registered trademark of Dow Jones & Co. Inc. [1] Options involve risk and are not suitable for all investors. For more information read the “Characteristics
and Risks of Standardized Options”. For a copy, call 312 542-6901. [2] The IB commission rates shown are the average of the client commissions for trades executed in
November 2018 and are subject to minimums and maximums as shown on the IB website. Some of the firms listed may have additional fees and some firms may reduce
or waive commissions or fees, depending on account activity or total account value. Under some commission plans, overnight carrying fees may apply. [3] IB calculates
the interest charged on margin loans using the applicable rates for each interest rate tier listed on its website. For additional information on margin loan rates, see ibkr.
com/interest. [4] $1.00 commission minimum.
02-IB19-1167CH1165
Traders take many paths to reach their destination.
Can your platform get you there?

Search apps and services to personalize the


NinjaTrader platform to meet your requirements.
Indicators, automated strategies, free tools & more.

Explore now at ninjatraderecosystem.com

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.
subscribe or renew today!
Every Stocks & Commodities subscription
(regular and digital) includes:
• Full access to our Digital Edition
The complete magazine as a PDF you can download.
• Full access to our Digital Archives 8999
1 year.................
$
That’s 35 years’ worth of content!

2 years............ 149
• Complete access to WorkingMoney.com $ 99
The information you need to invest smartly and successfully.

3 years............ 199
• Access to Traders.com Advantage $ 99
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 & han-
dling charges apply for foreign orders.

5 years..........
$
29999
That’s around $5 a month!

Visit www.Traders.com to find out more!


Email: Circ@Traders.com • Phone: 206-938-0570 facebook.com/STOCKSandCOMMODITIES @STOCKSandCOMM

Você também pode gostar