Beruflich Dokumente
Kultur Dokumente
For this article I am working with the Zignals MarketPortal which gives full access to
all of our services (trading system, stock alerts, stock charts, stock screener,
watchlist and portfolio manager) in a single application. The key advantage to the
MarketPortal over stand-alone applications is the seamless switching between
applications and is recommended for users wishing to publish their own trading
strategies.
The first strategy will be built around a price cross above a 20-day Simple Moving
Average (SMA). This will be a long only strategy.
On loading the Trading System interface you will be greeted with a grid-interface;
along the top is a set of menu options and on the left is a series of steps, numbered
1 to 5, which are required to create a strategy.
To start creating a strategy first select “My Strategies”.
Selecting “My Strategies” will open a window with options to set the
risk management and exit rules employed by the trading strategy.
The current (first) version of our trading strategy builder offers exits based on
percentile targets or optional trailing percentile values; with trailing target and stops
profitable trades are allowed run, while underperforming trades are cut short.
There is a great deal of flexibility available to adjust these variables and “Risk
Management – Zignals Style” in Part II will expand on this. There is no one-
solution-fits-all and tinkering these values will be necessary to get the best out of
your strategy; strategies built around volatile trading instruments, like leveraged
ETFs, will likely benefit from a more open risk management strategy than a risk
management strategy built for blue-chip pharmaceutical companies.
The „Delay Between Trades‟ is used to control whipsaw and represents the minimum
number of days between signals; an entry trigger inside the set number of days
from the last exit will be ignored. For this strategy I have arbitrarily set this to 5
days.
The „Stop Condition‟ defines how trades are exited. The first option is whether to use
a trailing stop. If a trail is not used a position will be exited at either the target or
stop percentage from price at entry. E.g. A stock entered at $100 with a 15% target
and 8% stop will exit at $115 or $92.
To maximise the benefit of following a trend we will use a trailing exit (check the
„Use Trail‟ box). In this case the trail kicks in once the initial Target Percentage is
reached, but a position will exit if prices reach the Stop Percentage before the trail
starts. Once the Target Percentage is hit the rolling target and stop defined by the
Trail Percentages is activated. Positions are exited at the Profit Target or the Trailing
Stop – whichever is hit first. E.g. In the case of 15% Target, 8% Stop, 10% Trail
Target and Stop with a 25% Profit Target, a stock entered at $100 will kick in the
trail at $115 or exit at $92. If the stock gets to $115 a new trailing target will be
$126.50 with a trailing a stop at $103.50. If the stock gets to $125 then the position
is sold (so the position is exited before the next trailing target is reached).
To create a rule, first give it a name. Rules are split into two inputs and an operator.
A detailed view of available rules is given in Appendix I. The type of rule selected as
the „Left Indicator‟ will dictate available options as the „Right Indicator‟. In the
example been used, price can be compared against a constant or a Trend indicator;
we have created a rule where closing price crosses above a 20-day simple moving
average (SMA). Once a rule is created it should be saved. The rule will now be
available for selection under „All‟ or under the category of rule it belongs to (in this
case „Price‟).
After a rule is created it needs to be introduced into the work space. Select the rule
and [+ Add to Strategy]. This places the rule into a rule list on the right; from there
it's a matter of dragging it into the workspace.
The first rule dragged-in will automatically connect to the starting point. Other rules
you drag-in can either be connected to existing rules, or by dragging the top box
down to the new rule, connect to the dragged-in rule (see below).
Multiple rule paths are possible (see below); the key thing is to ensure rules are
connected from top to bottom. With multiple rule paths only one signal is supported
i.e. trades in a given stock are only entered once – there is no doubling, trebling etc.
of positions.
The final step is to connect the price-cross-SMA rule
to the end-point to complete the rule flow.
[1] The strategy rules can be further edited, with updated portfolios produced OR
[2] The strategy can be Published so that the trading signals can be received
by email.
To do either it‟s necessary to switch back from the Portfolio Manager to the Trading
System. In the Trading System application open the saved Strategy. Any of the
aforementioned steps can be edited, but it‟s the final step which activates the
strategy and allows you and your subscribers receive the resulting trade signals by
email (i.e. the daily monitoring of your strategy begins).
The first build of the Zignals Trading System enters trades by technical signals and
exits them based on fixed percentile target/stop or trailing targets/stops from price
at entry. However, the success of a given exit strategy will be influenced by the
underlying volatility (beta) of the component stocks/ETFs/FX pairs in the trading
system.
Stock Beta
In Part I a simple trading strategy was built Apple (AAPL) 1.50
using default risk management settings. In Boeing (BA) 1.32
Part II the impact of risk management Citigroup (C) 3.05
changes on a strategy will be investigated – Caterpillar (CAT) 1.85
but with an attempt at not trying to 'best fit' Cisco (CSCO) 1.19
the output. Disney (DIS) 1.15
Ford (F) 2.71
The core stocks in the trade system and Hewlett Packard (HPQ) 1.00
International Business Machine
associated Beta values are listed in the table
(IBM) 0.73
on the right.
Intel (INTC) 1.15
International Paper (IP) 2.57
The seventeen stocks had an average Beta of J.P. Morgan (JPM) 1.20
1.36 which was slightly more volatile than the Coca Cola (KO) 0.62
underlying market. The Beta ranged from a Microsoft (MSFT) 0.96
low of 0.2 up to a high of 3.05. Starbucks (SBUX) 1.30
AT&T (T) 0.65
Changes were made to „Stop Wal-Mart (WMT) 0.20
Conditions‟ available under
Step 1: My Strategies. Average Beta 1.36
The strategy was based on a long entry following a price cross above a stock‟s 20-
day SMA.
For the back-test period the dates 24th Nov 2007 to 23rd Nov 2009 were used.
The adjustment to the initial „Stop Percentage‟ generated the following returns:
The relatively close-to-market Beta of our component stocks allowed for a relatively
strong return with a tight stop of 4%, even though there was a sharp drop in the
percentage of winning trades.
Taking the 6% stop as a fixed point and adjusting the „Target Percentage‟ (the price
at which the Trailing prices kicked in) brought an improvement in the percentage of
profitable trades. Dropping the Target price from 15% to 10% increased the
percentage of profitable trades to a morale boosting 57% with an additional kick on
the resulting percentage profit.
Locking the „Stop Percentage‟ at 6% and the „Target Percentage‟ at 10%, then
changing both „Trail Target Percentage‟ and „Trail Stop Percentage‟ didn‟t improve
the return and in the case of raising the „Trail Target Percentage‟ made the returns
substantially worse.
Leaving the „Trail Target Percentage‟ and „Trail Stop Percentage‟ unchanged from
default and increasing the Profit Target made modest improvements up to a ceiling
imposed by the back test period.
Adopting a „Profit Target Percentage‟ at 50% and going back to „Stop Percentage‟,
how would the trading strategy have performed if values of either 5% or 10%
versus the favoured 6% were used as the „Stop Percentage‟?
Dropping the „Stop Percentage‟ by a percentage point didn't lose any of the 31%
return for the past 2 years. Increasing the „Stop Percentage‟ to 10% gave the
strategy a little more breathing room which increased the percentage of profitable
trades (on fewer trades) - although there was a slight drop in net profit.
For the purposes of building a new strategy the following settings are a good
starting point.
For the simple one-rule strategy used on a core set of relatively price stable US
stocks, the largest impact on net profit and percentage of winning trades came from
adjustments in the initial „Target Percentage‟ and „Stop Percentage‟ values versus
changes in the values of „Trail Target Percentage‟ and „Trail Stop Percentage‟.
However, trading strategies built around different assets and rule types will respond
differently to the risk management plan outlined here. For example, it‟s unlikely a
trading strategy built on x2 or x3 leveraged index ETFs will give as strong returns
with a 5% stop percentage as they might with a 10% stop percentage. Only by
testing different exit strategies is it possible to get the best out of your developed
trading strategies.
Part III: Modifying and Testing Indicators
For new or existing users of our Trading System builder the time will come to modify
or create new technical rules with the objective of finding the most profitable
combination of rules for the core group of stocks on which a strategy is based. How
can this be achieved?
In line with the initial How to Build a Trading Strategy article we will call the new
trading strategy "My Second Strategy". We will keep the standard 'Strategy Setup'
with the exception of the 'Trail Stop Percentage' which we will set at "10%" instead
of "5%". It will be a long only strategy.
For modifying rules I selected for indicators which use a single input
parameter/period as testing relative performance is easier. But I did adopt
assumptions for a positive trigger. The following technical indicators and their
assumptions are given below.
There were two strong performing indicators: RSI and Money Flow. In the case of
RSI the best returns came from using non-traditional period settings, although the
total number of trades generated was low (which can skew the results). Similarly,
Money Flow also posted good returns using higher period settings. For both RSI and
Money Flow, period values of 20 days or more generated an average ROI of over 4%
per trade. The caveat is the use of trailing stops and defined targets - not the
traditional inverse 'sell' trigger for an exit - so this may in part explain the stronger
performance from the longer period range. When you consider the (non-)
performance of the S&P over the test period this is quite incredible.
Second Step
We could probably stop here and just use either a long period RSI or Money Flow
indicator as our entry trigger. But is there a way to improve this return? Will a mix-
and-match offer a better return?
The first match was to use RSI [5] with Linear Regression Slope [5] and Money Flow
Index [5]. For each combination type there were a large number of signals,
increasing the probability for a good subset of results. For a trigger to be true, all
signals must occur on the close of business on the same day.
A selection of OR
combinations did not improve
the ROI of the strategy and
was considerably worse than
the linear flow of all three
rules together. The additional
rule path also lowered the
ROI of the paired rule set.
Third Step
How did paired matches perform using different period settings? Can performance
be improved over the individual indicator?
This combination generated few trades outside of RSI [5] and Linear Regression
(Slope) [5] and RSI [10] and Linear Regression (Slope) [5]. The [5] / [5] setting
was the best performer with an ROI of 4.15% over the 3.24% ROI of [5] / [10].
Beyond these two the number of triggered trades was too low to generate consistent
results; neither combination beat RSI [20] with its 155 trades and ROI of 4.94%.
The second match of RSI and Money Flow produced a more diverse range of signals,
but there was no significant improvement in ROI; best of the pairings was RSI [10]
and Money Flow [10] for a 3.83% ROI, but below the aforementioned 4.94% of RSI
[20].
The last comparison paired Linear Regression (Slope) with Money Flow. As with the
earlier pairing of Linear Regression (Slope) with RSI, the number of generated
trades was low. Linear Regression (Slope) [5] matched with Money Flow [5] or [10]
had the most trades with a 3.40% and 2.42% ROI respectively - the worst return for
any of the pairings.
Fourth Step
The final step extends the second step by looking at alternative period settings
for the three indicators together. But outside the initial set of RSI [5], Linear
Regression Slope [5] and Money Flow [5] there were very few trades.
Out-of-test
The final phase ran the two best set-ups from the start of 2008 to the current day.
The three-indicator set up - RSI [5], Linear Regression (Slope) [5], Money Flow [5] -
generated 37 trades with 65% winners and an ROI of 6.92%. RSI
[20] didn't perform as strongly with 58 trades on 52% winners and 2.26% ROI.
Global Trading Strategies
Relative US, Relative UK, Relative India, Relative Aussie, Relative Frankfurt, Relative
Forex, Relative ETF, Relative Irish, Relative Canada, and Relative US Dividends
How did the strategy perform across market types? This time there was a clear
winner:
RSI [20] had an average ROI range of -2.86% to 4.04% with a Standard Deviation
of 2.66%.
RSI [5] + Money Flow [5] + Linear Regression (Slop) [5] had an average ROI of
4.03% with a range of 0.68% to 7.60% on a Standard Deviation of 2.45%
Summary
Single even triggers can offer strong returns but sacrifice consistency. Multiple
trigger events per trade can improve performance stability across market
conditions and market types, even if net return per trade can sometimes be lower.
Appendix I: Rule Types
Trend Operator
Exponential Moving Average Crosses above
Accumulation Swing Index Crosses below
Linear Regression (Forecast, Intercept, R- Smaller
Squared, Slope) Equal or Smaller
MACD Equal
MACD Signal Greater or Equal
Moving Average Envelope Greater
Parabolic SAR Between
Time Series Moving Average
Variable Moving Average
VIDYA
Weighted Close
Weighted Moving Average
Welles Wilder Smoothing
Momentum Candlestick
Bollinger Bands Bearish Doji Star
Chande Momentum Oscillator Bearish Engulfing Pattern
CCI Bullish Doji Star
Detrended Price Oscillator Bullish Engulfing Line
High / Low Bands Dark Cloud Cover
Mass Index Evening Star
Median Hanging Man
Momentum Oscillator Harami Cross
Price Oscillator Morning Star
Rate of Change Piercing Line
Relative Strength Index Shooting Star
Standard Deviation Spinning Top
Stochatics
Swing Index
Typical Price
Ultimate Oscillator
Williams % R
Volume Price
Chaikin Money Flow Open
Chaikin Volatility Oscillator High
Ease of Movement Low
Money Flow Index Close
On-balance-volume Volume
Positive Volume Index
Price Volume Trend
Volume Oscillator
Volume Rate of Change
Williams Accumulation Distribution