You are on page 1of 15

Issue 9, September 2015

In this issue:

2+1 Moving Average


Strategy
Adaptive
VIX Bands
Strategy
Ready to expand your TradeStation
horizons with EasyLanguage®?
Creating your own indicators and strategies will give you
new perspectives on markets and on your trading.
TradeStation’s Client Training and Education Department has taught thousands of traders how to use EasyLanguage
and would like to count you among them. We can guide you through all the steps in creating indicators, ShowMe™
and PaintBar™ studies and trading strategies. And if you’re thinking “but I’m not a programmer,” well, most of the
thousands of people we’ve taught weren’t programmers either. But, like you, they were passionate about markets
and willing to spend a few hours working with us to learn.

You’ll be surprised by how quickly you can get up to speed and begin writing your own indicators and trading
strategies in EasyLanguage, and how this will open up a whole new world of market analysis.

Beginners Course Advanced Users Course


For the EasyLanguage beginner, the same course work can be For advanced users, step up to the latest in EasyLanguage by
accessed LiveOnTheWeb and in a self-paced home study course. incorporating objects in your studies and strategies. Here, too, the
same course work can be accessed LiveOnTheWeb and in a self-
EasyLanguage Boot Camp paced home study course.
A two-day LiveOnTheWeb class
$249 SCC Member Price: $124.50 Implementing Objects in EasyLanguage
A two-day LiveOnTheWeb class
Register with promo code ELBC4SCC
$249 SCC Member Price: $124.50
Your instructor will guide you step by step through more than 30 Register with promo code IOEL4SCC
practical exercises covering such topics as creating indicators,
ShowMes™, PaintBars™, and trading strategies, including indicators In this course, your instructor will guide you through exercises using
designed specifically for use with TradeStation’s RadarScreen® the latest in EasyLanguage features, including price series providers,
feature. You will learn how to: timers and accounts providers. These open up possibilities beyond
the already formidable capabilities of conventional EasyLanguage.
• Use inputs for flexibility and optimization
In this advanced course, you’ll learn how to:
• Design indicators specifically for RadarScreen
• Create real-time alerts based on your custom market conditions • Create multi-data analysis in RadarScreen
• Write market, limit and stop orders into strategies • Access real-time account and position updates
• Incorporate money-management exits in your strategies • Place and track real-world orders
• Read and write to Excel files
Exclusive webcast bonus: • Build your own interactive windows
• Ask questions and interact with your instructor in real time
• Review the recordings of the course at any time Exclusive webcast bonus:
• Retake the LiveOnTheWeb class any time it is offered • Ask questions and interact with your instructor in real time
• Review the recordings of the course at any time
• Retake the LiveOnTheweb class any time it is offered
EasyLanguage Home Study Course
A self-paced home-study book
EasyLanguage Objects Home Study Course
$99 SCC Member Price: $49.50 A self-paced home-study book
Complete and return the order form
$99 SCC Member Price: $49.50
This book covers the same range of material as the EasyLanguage Complete and return the order form
Boot Camp, in an easy-to-follow format that takes you through
each exercise in the course, with instructions and explanations. This book covers the same range of material as the Implementing
The book is printed in vibrant color and is spiral bound, making it Objects in EasyLanguage web class, in an easy-to-follow
easy to work through each exercise right on your computer. format that takes you through each exercise in the course, with
instructions and explanations. The book is printed in vibrant color
and is spiral bound, making it easy to work through each exercise
right on your computer.
Contents Issue 9

IN THIS ISSUE
STAFF
PUBLISHER 2+1 Moving Average Strategy. . . . . . . . . . . . . . . . . . . . 2
Michael Burke
The 2+1 Moving Average strategy uses crossovers of the two faster averages to
VP, Client Training and Education
trade only in the direction of the trend as defined by the slow average, as well
EDITOR
as offering some suggestions on testing a strategy in its simplest state, making
Stanley Dash, CMT
VP, Applied Technical Analysis adjustments for trade size and then comparing the results.

Adaptive VIX Bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8


SENIOR CONTRIBUTING EDITOR
Frederic Palmliden, CFA, CMT
Senior Quantitative Analyst
The Adaptive VIX Bands strategy generates swing-trading signals that are
PRODUCTION
meant to capitalize on extreme readings in this oscillator as defined by
Kristina Hunt
Media Content Coordinator the adaptive bands.

DOWNLOAD FILES
TradeStation Labs
8050 SW 10th Street, Suite 2000 EDITOR’S MESSAGE
Plantation, FL 33324
TSLabs@TradeStation.com Welcome to the September 2015 issue of TradeStation Labs’ Strategy Concepts
Club.
All support, education and training services and materials on the
TradeStation website are for informational purposes and to help cus- All of us here at TradeStation want to congratulate our colleague Frederic
tomers learn more about how to use the power of TradeStation soft-
Palmliden, Sr. Quantitative Analyst, on completing the requirements for the
ware and services. No type of trading or investment advice is being
made, given or in any manner provided by any TradeStation affiliate. Chartered Financial Analyst (CFA) designation. Fred adds this to the Chartered
This material may also discuss in detail how TradeStation is Market Technician (CMT) designation. It’s quite an achievement!
designed to help you develop, test and implement trading strate-
gies. However, TradeStation does not provide or suggest trading
In this month’s issue, Fred revisits use of the VIX to generate signals in stock
strategies. We offer you unique tools to help you design your own index futures and ETFs. He has created a unique volatility oscillator from the VIX
strategies and look at how they could have performed in the past.
with bands that represent, well, the volatility of the volatility. The Adaptive VIX
While we believe this is very valuable information, we caution
you that simulated past performance of a trading strategy is Bands strategy generates swing-trading signals that are meant to capitalize on
no guarantee of its future performance or success. We also do extreme readings in this oscillator as defined by the adaptive bands.
not recommend or solicit the purchase or sale of any particular
securities or derivative products. Any symbols referenced are used My article is an application of three simple moving averages in a manner
only for the purposes of the demonstration, as an example—not a
recommendation.
that differs from a traditional three-line moving-average strategy. The 2+1 Moving
Average strategy uses crossovers of the two faster averages to trade only in
Finally, this material may discuss automated electronic order place-
ment and execution. Please note that even though TradeStation the direction of the trend as defined by the slow average. The article also offers
has been designed to automate your trading strategies and deliver some suggestions on testing a strategy in its simplest state, making adjustments
timely order placement, routing and execution, these things, as well
as access to the system itself, may at times be delayed or even fail
for trade size and then comparing the results.
due to market volatility, quote delays, system and software errors,
Internet traffic, outages and other factors.
As summer winds down here in the Northern Hemisphere, we’re working
on a variety of new strategies for autumn, including candlestick and other bar
TradeStation Group, Inc. Affiliates: All proprietary technology in
TradeStation is owned by TradeStation Technologies, Inc. Equities, patterns, and a trend-following strategy for use on intraday data.
equities options, and commodity futures products and services are
offered by TradeStation Securities, Inc. (Member NYSE, FINRA, NFA Read on and, as always, thanks for being a subscriber!
and SIPC). TradeStation Securities, Inc.’s SIPC coverage is available
only for equities and equities options accounts. Forex products and
services are offered by TradeStation Forex, a division of IBFX, Inc.
(Member NFA). Stanley Dash, CMT.
Copyright © 2001-2015 TradeStation Group, Inc.

STRATEGY CONCEPTS CLUB | 1


2+1 Moving Average
Strategy
Stanley Dash, CMT
VP, Applied Technical Analysis

BACKGROUND
The moving average needs little introduction. It may be the Features
most widely used, discussed and, sometimes, belittled indi- u Strategy Style: Trend-following
cator. Moving average strategy signals are usually based on u Markets: Equities, futures, forex
prices crossing a moving average, or two or more moving
u Trading Horizon: Position trading
averages of different lengths crossing each other, or various
combinations of relative position ad infinitum.
Studies/Files Included
The TSL:2+1 Moving Average strategy uses three u Strategy
moving averages in a manner that differs from the
TradeStation-supplied MovAvg3Line Cross LE and SE
u Workspace
strategy components. Whereas the supplied strategies
generate signals based on the relative positions of price and DOWNLOAD FILES
three moving averages, the 2+1 Moving Average strategy
uses crossovers of the two faster averages to trade only in
the direction of the trend. The trend is defined by the rela-
fast average, the fast average is above the
tive position of price and the slow average.
medium average and the medium average is
Given that this article uses daily bars of an ETF and a above the slow average. Customarily, these
test period exceeding 10 years, it is also an opportunity to are entry-only signals in and of themselves
consider using some of TradeStation’s features to shed light and are often tested as part of a “reversing”
on characteristics such as trade size that lie outside the core or “always in” strategy. The 2+1 Moving
signals. Average strategy differs in both the entry
Readers interested in additional moving average rules and the inclusion of exit rules.
strategies may want to review the Moving Average Channel The 2+1 Moving Average strategy uses
strategy, published in Issue 1, January 2015, and the Moving the slow average for the trade setup: when
Average Machine, published in Issue 3, March 2015. prices are above the slow average, entry
(long in this case) is prompted by the fast
average crossing over the medium average.
STRATEGY ELEMENTS As shown in figure 2, price and the averages
A traditional 3-line moving average strategy, including need not be aligned as in a traditional 3-line
the TradeStation-supplied MovAvg3Line Cross LE and moving average strategy described above.
SE, generates a long entry when a bar closes above the The crossover of the two faster averages

2 | STRATEGY CONCEPTS CLUB


Figure 1: iShs Russell 2000 ETF
(IWM) with Mov Avg 3 Lines
indicator and TSL:2+1 Moving
Average strategy.

may occur at levels below the slow average even when the Figure 2: Fast average crosses over medium average while both those
averages are below the slow average. Yet price is above the slow
bar closes above the slow average. While the setup remains average and so long entry is taken.
bullish (prices above the slow average), a cross of the fast
average below the medium average is a signal to exit longs.
Setup, entry and exit for short trades are the reverse.
A few notes on terminology are in order. The words
“setup” and “entry” were used in the paragraphs above.
Strategy traders often use the word setup to refer to the
background conditions that identify market direction
and the possibility of an imminent signal. In this strategy,
the setup requirement is that price be above (below) the
slow average. The entry occurs on the crossover of the two
shorter averages.
Although this is primarily a matter of semantics, the
setup might also be construed as a filter. Many readers
are by now familiar with the idea of a filter: a trading rule
intended to reduce the number of unprofitable trades. The
2+1 Moving Average strategy could be viewed as a two-line
moving average strategy with trades filtered based on the
relationship of price to the third average.
TSL:2+1 Moving Average strategy has only four inputs,
used for setting the price value and the lengths of the
STRATEGY RULES
averages. The entry and exit rules outlined above are summarized
in this section. There are no protective or trailing stops
integrated into the strategy. TradeStation-supplied strategy
Input Default Description components such as Stop Loss and Dollar Trailing may be
Price value used in calculation of moving
added to a chart with this strategy.
Price Close averages and in comparison with slow
average for identification of trend Long Entries
u If price is above the slow average and the fast average
FastLength 10 Length (bars) of fast average
crosses over the medium average, then buy the open of
MedLength 50 Length (bars) of medium average the next bar. That is, long signals generated by the fast
SlowLength 200 Length (bars) of slow average average crossing over the medium average are taken
only when the prices are above the slow average.
STRATEGY CONCEPTS CLUB | 3
Short Entries Ratio Avg. Win:Avg. Loss
u If price is below the slow average and the fast average u These values are the same as the Profit Factor due to the
crosses under the medium average, then sell short the Percent Profitable of exactly 50%.
open of the next bar. That is, short signals generated by
the fast average crossing under the medium average are Avg Bars in Winning Trades and Avg Bars in Losing
taken only when the prices are below the slow average. Trades
u Holding periods for winning trades are more than double
Exits
those of losing trades. This is positive confirmation of the
u E xit long positions when the fast average crosses under trend-following nature of the strategy and reassurance that
the medium average. This could be a complete reversal psychological capital may be preserved.
of position if price is below the slow average.
Max. Shares/Contracts Held
u E
 xit short positions when the fast average crosses over
u This field is highlighted here as it will be compared to the
the medium average. This could be a complete reversal
same field in the next test.
of position if price is above the slow average.
Percent of Time in the Market (not shown)
STRATEGY PERFORMANCE u At 64.16%, this is a reasonable metric for a trend-following
REPORT HIGHLIGHTS strategy.
The input values for the lengths of the moving averages were These results offer a profile of the strategy and its
left at the default values of 10, 50 and 200. The Price input was trend-following characteristics: number of trades, win rate,
left at the default value of Close. iShs Russell 2000 ETF (IWM) holding periods, time in market, etc. However, would a trader
was used in the following examples. have applied this strategy with a fixed 100-share position, or
BACK-TESTING SETTINGS is it more realistic to assume that a trader would have used a
fixed commitment of capital? During the test period, IWM
Trade Size 100 shares
ranged between 34.26 and 129.10, a very big range in which to
Commissions $.01 per share be trading a fixed number of shares.
History 11 years ending 6/30/2015 The next set of results was generated with the same
Bar Interval Daily trading rules but with the trade size based on constant capital
Max Bars Back 200
Figure 3: Strategy Performance Report – Performance Summary Tab
It may seem odd to use 11 years of history
instead of a round number. To accommodate
the slow average, the maximum number of
bars study will reference (MaxBarsBack) is set
to 200. That means that the earliest point at
which a signal could be taken is almost the end
of the first year of the 11 years, resulting in a
trade history approximating 10 years. In these
tests, the first entry was taken on 5/27/2005.
The first set of results presented below is
intended to provide feedback as to the basic
characteristics of the strategy and the quality of
the signals. As noted above, each trade is 100
shares regardless of the price of IWM.

Profit Factor
u Th
 ese are encouraging values notwith-
standing the tilt to the short side.
Total Number of Trades and Percent
Profitable
u Although 32 trades is a limited sample, a
win rate of 50% is a promising metric for a
trend-following strategy. All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily indicative of future results.

4 | STRATEGY CONCEPTS CLUB


Figure 4: Strategy Properties – General tab with Trade Size settings emphasized
As expected, the following fields return
the same values regardless of trade size: Total
Number of Trades, Percent Profitable, Avg
Bars in Winning Trades and Avg Bars in
Losing Trades, and Percent of Time in the
Market (not shown).
Profit Factor (and Ratio Avg. Win:Avg.
Loss)
u These values improved, implying that
there was some reward for the risk of
the larger trade size. Was that reward
adequate?
Max. Shares/Contracts Held
u The effect of the variable trade size is seen
here.
Total Shares/Contracts Held
instead of a fixed number of shares. See figure 4. (This is u This field offers more information on whether the addi-
not to be confused with a compounding scheme in which tional trade size and risk were worthwhile. The Total Net
starting capital plus/minus realized profit/loss is used for Profit in this test was three times the Total Net Profit in the
each trade.) The same number of trades (signals), win rate, first test (figure 3): $16884/$5617.
holding periods and time in market will appear in this test.
 et, recalling that every trade in the first test was 100 shares,
Y
Comparing the profit/loss and risk characteristics is the point
the average trade size in this test was only 2.46 times that of
of the experiment.
the first test: 7880/32 = 246. Three times the profitability for
There are many possibilities for the trade size setting in less than three times the trade size.
this example. Consideration was given to using the average,
highest or lowest price for the period and multiplying by 100
or some other factor. These may yield useful insights and the
Figure 5: Strategy Performance Report – Performance Summary tab; 2+1
reader is encouraged to try them. Bear in mind, though, that Moving Average strategy with constant capital of $20,000 rounded as
these price points are only known retrospectively. Ultimately, shown in figure 4
the values below were chosen subjectively as being reasonable
for this demonstration.
Readers doing strategy development and testing might
consider breaking down some of their testing in this way.
First, test to get perspective only on the quality and quantity of
the signals, since they are the crux of the strategy. Then varia-
tions such as this may be introduced to discover what may be
done to enhance performance and mitigate risk.
When looking at the Strategy Performance Report, bear
in mind that more capital was committed to the market in this
test than in the former; position size ranged from 160 shares
to 440 shares.

Symbol IWM
$20,000, rounded to nearest 20 shares, minimum
Trade Size position 50 shares
Commissions $.01 per share
History 11 years ending 6/30/2015
Bar Interval Daily
All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily
Max Bars Back 200 indicative of future results.

STRATEGY CONCEPTS CLUB | 5


Figure 6: Strategy Performance
Report – Performance Graphs –
Equity Curve Line; 2+1 Moving
Average strategy trading constant
capital of $20,000 rounded as
shown in figure 4

All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily indicative of future results.

SUGGESTIONS FOR IMPROVEMENT


There are no protective or trailing stops integrated into the Additional ideas for testing might come from comparing
strategy. TradeStation-supplied strategy components such the 2+1 Moving Average strategy to the TradeStation-
as Stop Loss and Dollar Trailing may be added to a chart supplied MovAvg3Line Cross LE and SE. Given the fact
with this strategy. that there is no perfect strategy, developers are always
striving to improve by comparison. Is this strategy an
The 2+1 Moving Average strategy uses three simple
improvement over another, and by what metrics?
moving averages. Might there be some benefit to using
weighted or exponential moving averages, or a combina- Finally, a more sophisticated and customized trade size
tion? This concept was suggested in the Moving Average rule could be written directly into the EasyLanguage for
Machine as published in Issue 3 of Strategy Concepts the strategy. This would be an attempt to capitalize on the
Club, March 2015. best signals.

Stanley Dash, CMT is Vice-president, Applied Technical Analysis, at


TradeStation. He and his group support active and institutional traders
with analytical tools and education designed to help them become more
effective traders.
His Wall Street career began in 1975 and includes time as an active
floor trader at one of the leading U.S. futures and options exchanges. Mr.
Dash has lectured for the New York Institute of Finance and the Institute
for Financial Markets. He is also a Chartered Market Technician and a
member of the Market Technicians Association, where he serves on the
Editorial Board of the Association’s Journal of Technical Analysis.

6 | STRATEGY CONCEPTS CLUB


Visit TradeStation Labs
in the TradingApp Store
®

Built by traders for traders, the TradingApp® Store gives TradeStation clients
access to more ideas, strategies and custom trading solutions than ever before.
TradeStation Labs is an active contributor to the TradingApp Store, with dozens
of custom products available for download.
uS
 elect and download any product instantly
Products from TradeStation Labs in the TradingApp Store download directly to your TradeStation desktop platform
in seconds – offering full compatibility and seamless integration.
u I n-house support
TradeStation Labs is a team of technical analysts who work side by side with the platform developers, bridging
the possibilities of what can be done with TradeStation and what you need to realize those possibilities. All
TradeStation Labs’ products are geared to helping you make the most of your TradeStation experience.

TRADESTATION LABS’ FEATURED PRODUCT

Correlation Analysis - Coefficient R - Updated


Many traders understand that
intermarket relationships may
shed light on both trading
opportunities and potential weak
spots in a portfolio. Yet it can
be a challenge to monitor these
dynamic relationships effectively.
While a security may have
closely followed another security
historically, the relationship can
change very rapidly with little or
no warning. This highlights the
importance of active monitoring
on an ongoing basis.
The TSL:CoeffR indicator is custom-
designed to provide correlation analysis,
both historically and in real time, to
monitor ever-changing market conditions.
The indicator also provides you with the flexibility you need with adjustable settings such as the look-back length for the correlation
calculations. Use it to see that “diversification” doesn’t turn into “concentration” just when you don’t expect it.

LEARN MORE

STRATEGY CONCEPTS CLUB | 7


Adaptive VIX
Bands
Frederic Palmliden, CFA, CMT
Senior Quantitative Analyst

BACKGROUND
The Adaptive VIX Bands strategy builds on the Features
ideas in the Normalized VIX strategy published u Strategy Style: Volatility based
in the August 2015 issue of Strategy Concepts u Markets: Stock-index futures and ETFs
Club. This strategy also utilizes the VIX index u T rading Horizon: Swing trading
as a gauge of stock market volatility, but with
different characteristics. Instead of comparing the
normalized volatility to firm levels and holding Studies/Files Included
positions for only one trading session, this strategy u Strategy
compares the current volatility reading to adaptive u Indicator
bands and holds positions for a much longer u Workspace
period on average. The main benefit of adaptive
bands is the continuous flexibility to acclimate to DOWNLOAD FILES
the current environment. The custom bands will
widen when the volatility of the volatility increases
and narrow when it decreases. A contrarian
perspective is still employed, with long positions STRATEGY ELEMENTS
taken with relatively high volatility readings, The TSL:Adaptive VIX Bands strategy
while short positions are taken with relatively low requires a secondary data series (i.e., VIX
volatility readings. data) to function properly. The necessary
The custom strategy is outlined and analyzed VIX data can be inserted in a TradeStation
in detail below and provides another perspective chart using the symbol $VIX.X. The data
on applying the VIX index in strategy trading. series is purposely hidden in the screenshots
A custom indicator with vibrant graphics is also throughout this article to emphasize the
included in order to help visualize trading signals. strategy signals and improve their visibility.

8 | STRATEGY CONCEPTS CLUB


Figure 1: E-mini S&P 500 Continuous Contract (@ES=107XN) with the TSL:Adaptive VIX Bands Strategy

The strategy’s core element is the adaptive bands that hug The TSL:Adaptive VIX Bands indicator is provided to
the modified VIX data. Since the VIX data follows more of a help visualize the trade signals. The indicator is used with
log-normal distribution as opposed to a normal distribution, inputs set as listed below.
the VIX data is first modified in this application using the nat-
Input Default Description
ural logarithm of the data. The arithmetic mean of the natural
log values (i.e., geometric mean at a log scale) is then sub- GSD_Num 2 Number of geometric standard deviations
to use for the Adaptive VIX Bands.
tracted from it to generate the current volatility reading used
in this strategy. The adaptive bands use a rolling approach: the Sample size length for the geometric
Sample_Size 20 mean and the standard deviation
top band is constructed using a specified positive multiple of calculation.
the rolling geometric standard deviation, while the lower band
uses the same deviation but on the negative side. Color used when the Adaptive VIX Bands
Wide_Band_Color Cyan are the widest in a rolling look-back
The current volatility reading (i.e., the natural logarithm period of 100 bars.
of the VIX minus the arithmetic mean of the natural loga- Color used when the Adaptive VIX Bands
rithm values of the VIX data) can then be compared to the Narrow_Band_Color Darkblue are the narrowest in a rolling look-back
adaptive bands. By default, the bands encompass about 95% period of 100 bars.
of the volatility readings on a rolling basis. This is to say that if Color used for the current volatility
the current reading is beyond one of the two bands, it is con- Base_Vol_Color White reading when the Adaptive VIX Bands are
sidered a significant reading and a strategy signal is generated. narrow.
If the current volatility reading crosses over the top band, a
Plot Description
long entry is taken on the following bar, while a short entry is
taken if the current volatility reading crosses below the lower Adaptive VIX Plots the current volatility reading.
band. This again is in accord with typical contrarian interpre- High AV Band Plots the rolling high adaptive VIX band.
tation of the VIX. Low AV Band Plots the rolling low adaptive VIX band.

STRATEGY CONCEPTS CLUB | 9


Figure 2: TSL:Adaptive VIX Bands Strategy Order Generation Example

To help visualize the current volatility reading contex- Input Default Description
tually, gradient colors are used both for the bands and for GSD_Num 2 Number of geometric standard deviations to
the volatility reading itself. The typical colors will fluctuate use for the Adaptive VIX Bands.
between the extreme colors specified as indicator inputs. The Sample size length for the geometric mean
colors used for the current volatility reading are reversed from Sample_Size 20 and the geometric standard deviation
calculation.
the colors used by the bands in order to see the plot more
easily. The wide band color is an exception, as it is replaced by Trail_Stop_Length 2 Look-back period for the lowest low and the
a base color. Otherwise, the volatility reading would be hard to highest high.
see when it is halfway between narrow and wide. Min_Long_Hold 5 Minimum holding period, in bars, for long
trades.
Positions are held for a minimum number of bars, which
Minimum holding period, in bars, for short
is specified as a strategy input. Then, long trades are closed Min_Short_Hold 5
trades.
when the low is less than the lowest low in a specified look-
back period. In a similar fashion, short trades are closed when The default input values were found, in part, by strategy
the high is greater than the highest high in a specified look- optimization and sensitivity analysis. (See the sensitivity anal-
back period. There is therefore open exposure (with long and ysis comments in the Strategy Performance Report Highlights
short trades) at least up to the specified minimum holding section.) Applying the strategy to other securities would likely
period. require adjustments to the input values.
Figure 2 illustrates an example of a long entry. In this case,
the current volatility reading crossed the top band and a long STRATEGY RULES
signal was generated at the open of the next bar. The position The TSL:Normalized VIX strategy was applied to the E-mini
is then closed after 12 bars when the low broke the lowest low S&P 500 Continuous Contract (@ES=107XN) using daily
for the last two bars with a minimum holding period of five bars. However, the strategy could be modified to be used on
bars. Again, notice that the VIX data series is hidden in order other securities (e.g., SPY) and bar intervals using the same
to highlight only the trades. basic principles. The detailed strategy rules are listed below.

10 | STRATEGY CONCEPTS CLUB


Long Entries Figure 3: Strategy Performance Report – Performance Summary Tab
u I f the current volatility reading crosses
over the high adaptive VIX band, buy on
a market order on the next bar.
Short Entries
u I f the current volatility reading crosses
under the low adaptive VIX band, sell
short on a market order on the next bar.
Exits
u Exit any long on a market order on the
open of the next bar when the low is
below the lowest low of the last 2 bars
following a minimum holding period of
5 bars.
u Exit any short on a market order on the
open of the next bar when the high is
above the highest high of the last 2 bars
following a minimum holding period of
5 bars.
Note: Please keep in mind that for the ES,
entries and exits occur at 6 p.m. ET, which is
the opening time of the daily session for the
futures contract.

STRATEGY PERFORMANCE
REPORT HIGHLIGHTS
The strategy was tested on the ES using
the custom continuous futures contract (@
ES=107XN), which is the closest replication
to the CME roll. The custom continuous
contract utilizes no back adjustment and All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily indicative of future results.

the rollover trigger is seven trading days prior


to the expiration date. The problem when using the @ES BACK-TESTING SETTINGS
adjusted continuous contract is that some theoretical trades Initial Capital $20,000
would not have occurred at the prices listed in the back-test.
Trade Size 1 Contract
As a reminder, the main purpose behind any continuous
contract is to create a longer history than is possible using data Commissions $2.36 per side per contract
from just one delivery month; however, the method of con- History 10 years ending 6/30/15
struction of the continuous contract series should be consid- Bar Interval Daily
ered when back-testing.
Average Bars in Winning/Losing Trades
Total Number of Trades = 102 u Th  e average holding period in a winning trade was about
u Th e total trades are unevenly split between long trades two weeks, while the average holding period for a losing
(67) and short trades (35). Testing revealed that, overall, trade was just over one week. The largest winning trade
the strategy worked better on the long side versus the was $7,832.78, while the largest losing trade was $3,217.22.
short side. This is also highlighted by a profit factor that Percent of Time in the Market = 31.66%
is considerably higher for long trades (2.74) than for u Th  e time in the market is substantial and the RINA index
short trades (1.87). is reasonable at 149.17. The Sharpe ratio registered 0.25
and the K-Ratio came out at 3.16, which are quite good.

STRATEGY CONCEPTS CLUB | 11


The equity curve is linear overall for Figure 4: Strategy Performance Report – Equity Curve Detailed
the back-tested period. Relatively small
drawdowns were experienced in the tested
period, which is quite good considering the
average holding period and the amount of
history included in the back-test. Keep in
mind that the overall market experienced
much turmoil in the analyzed period (e.g.,
2008) when the VIX index experienced
dramatic fluctuations. The back-tested period
also includes different types of markets (i.e.,
bull and bear markets as well as low- and
high-volatility markets). The experienced
volatility of the equity curve translated to a
maximum weekly drawdown of about 19%.
The most negative aspect of the equity
curve may be the extended sideways
performance, especially in 2010-2012. This
would have been challenging to navigate
before the strategy’s performance picked
back up in 2013. Understanding a strategy
fully and having confidence that the premise
behind a strategy will prevail in the long term
may help keep a trader from throwing in
the towel at the point of maximum financial All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily indicative of future results.
opportunity. Of course, that is the strategy
trader’s challenge and the reason for back-
testing with a solid understanding of the Figure 5: TSL:Adaptive VIX Bands Strategy Inputs Sensitivity Analysis
strategy’s characteristics.
Instead of analyzing one strategy input
in isolation, data from TradeStation’s Strategy
Optimization Reports can be utilized in
Microsoft Excel to perform sensitivity
analysis between two strategy inputs at
the same time by creating a 3-D chart. For
instance, an exhaustive Strategy Optimization
Report can be run on the Trail_Stop_Length
and Min_Long_Hold strategy inputs, and the
resulting data can be used to create a surface
chart in Excel.
Figure 5 illustrates the impact on the
back-tested net profit when the Trail_Stop_
Length and Min_Long_Hold input values
change. The back-tested net profit is fairly
stable for the most part in the surface. The
chosen default values for the two inputs
happen to be peak values in this case (when
the Trail_Stop_Length input is 2 and the All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily indicative of future results.
Min_Long_Hold is 5).

12 | STRATEGY CONCEPTS CLUB


Figure 6: Strategy Performance
Report – Average Profit by Month

All performance results are hypothetical. Past performance, actual or hypothetical, is not necessarily indicative of future results.

SUGGESTIONS FOR IMPROVEMENT


The Adaptive VIX Bands strategy displays characteristics that Lastly, one impressive aspect of this custom strategy is the
differ from those of the Normalized VIX strategy published consistency of its back-tested performance. However, there
in the previous issue. The average holding period is longer may be some seasonality to the strategy that could be used to
and the current volatility reading is constantly evaluated in the trader’s advantage. Notice in figure 6 above that the back-
light of the recent past (e.g., about one month by default). tested performance dipped in the summer months, especially
One interesting discovery is that the strategy performed in August. The reader may want to explore the idea of turning
better using futures versus an ETF tracker (e.g., SPY). Also, the strategy off in the summer months to take advantage of
including only the day session with the continuous futures this seasonality effect.
contract resulted in a back-tested performance between that
of the SPY and the near 24-hour trading session of the ES.
This is puzzling and could lead to an interesting research
project.
Also, just like the strategy in the previous issue, another
possible area of improvement has to do with the short trades
Frederic Palmliden, CFA, CMT, is Senior Quantitative Analyst at
taken by the strategy. Again, it is no secret that the VIX index
TradeStation. As part of the TradeStation Labs team, he designs custom
works better on the long side. From the testing performed on
strategies, indicators and related educational content for TradeStation
the custom strategy, it is possible to add value by including
publications. In addition to being a Chartered Market Technician (CMT),
short trades, but this usually comes with lower risk-adjusted
Frederic holds the Chartered Financial Analyst ® designation and has
performance. The reader may simply want to turn short trades
15 years’ experience in the financial services industry, ranging from
off entirely in the Format Strategy dialog. The reader may also
research and asset allocation strategies to proprietary trading. Frederic
want to consider exploring additional rules and conditions to
is also trilingual in English, French, and Swedish.
initiate short trades.

STRATEGY CONCEPTS CLUB | 13

You might also like