Académique Documents
Professionnel Documents
Culture Documents
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.
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
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
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.
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
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
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
/20
/20
/20
/20
/20
/20
/20
/20
/20
/20
/20
/22
/22
/22
/22
/22
/22
/22
/22
/22
/22
/22
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.
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 ($)
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
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.
5 years..........
$
29999
That’s around $5 a month!