Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

Stock Trading Business

VIEWS: 1 PAGES: 19

Stock Trading Business document sample

More Info
  • pg 1
									Part I: Building a Trading Strategy in Zignals
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.


                                                          Default trading strategies
                                                          start with $100,000 capital
                                                          and an allocation of $10,000
                                                          per position. Checking
                                                          „Autocalculate‟ will
                                                          automatically set the capital
                                                          invested per trade based on
                                                          the number of stocks in the
                                                          strategy (to ensure a
                                                          strategy doesn‟t overinvest
                                                          in a situation where
                                                          simultaneous triggers are
                                                          given for all constituents).

                                                          Because I find the
                                                          „Autocalculate‟ a little too
                                                          sensitive (i.e. I have yet to
                                                          come across a situation
                                                          where all stocks had
                                                          overlapping entries) I favour
                                                          a manual set for capital
                                                          allocation per trade.

                                                         The strategy is built using
17 stocks (how to select these stocks is step 2) giving an allocation of $5,888 per
trade; I have rounded this to $6,000 per position. The commission is set at $10 –
standard for most discount brokers. I have left the slippage percentage unchanged.

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

                  The second step is to assign
                  the stocks to your trading
                  strategy. I have created a
                  new stock list, called Active
Trader, with the following US stocks: Apple
(AAPL), Boeing (BA), Citigroup (C),
Caterpillar (CAT), Cisco (CSCO), Disney
(DIS), Ford (F), Hewlett Packard (HPQ),
International Business Machine (IBM), Intel
(INTC), International Paper (IP), J.P.
Morgan (JPM), Coca Cola (KO), Microsoft
(MSFT), Starbucks (SBUX), AT&T (T), and
Wal-mart (WMT). Strategies can also be built
using Canadian, Indian, Australian, Irish, UK,
Frankfurt or Euronext stocks, Forex or
Commodities (Energy and Precious Metals) –
the main caveat is assets must share the
same currency.

                 The next step is to assign
                 the rules your strategy will
                 use. There are a number of
preset rules you can use or you can create
your own rules.

To add a rule to your workspace first select
the rule you want then [+ Add to Strategy].
This introduces the rule to the tile manager
right of the grid. Zignals rules can be hidden
by un-checking the „Show Zignals Rules‟.

To get the most out of the trading strategy
builder rules should be created. As a first rule
a simple price crossing a moving average will be used. Select [Technical] – this will
open the technical rule builder.

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.

Once you are happy with your strategy it should
then be saved.

               Step 4 defines the back-test period.
               The default period is the past 2-
               years from the previous day, but the
back-test period can be run for any period back to
2001 (for US stocks).

When a back test is run an historical portfolio is
created displaying all the trades over the test
period. The portfolio can be given a name (or the
default name will be used – usually „Untitled x‟) and
will be listed in the drop-down menu of the Portfolio
Manager application. The option to view the
portfolio is offered at the end of the back test run.




After viewing a back-test portfolio two options are available:

[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).

               Step 5 is the final step
               and achieves two goals.
               First it locks the strategy
and starts the monitoring process which
produces the trade signals. Trade
signals are generated after the market
close and are delivered by email.

Second, publishing a trading strategy
makes it available to potential
subscribers in our MarketPlace.

During the process of publishing a brief
description and a subscription charge is
set; the income earned from a strategy
is split between the trading strategy
publisher and Zignals.

The Publish Strategy window also gives
a summary of the strategy conditions
as a final review.

                                             Trading Strategy Publishers are
                                             automatically subscribed to their published
                                             strategies and receive trade signals as
                                             they occur. Published strategies also
                                             appear in the Published Trading Strategies
                                             window and the associated widget in the
                                             MarketPortal. Leading strategies are also
                                             displayed in the Top 20 Trading Strategies
                                             widget of the MarketPortal.

                                             Once a strategy is published you should
                                             start to receive signal triggers by email.
Part II: Risk Management – Zignals Style


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 following Money Management settings were
                               adopted:

                                      $100,000 Starting Capital
                                      $5,872 per trade
                                      $10 commission
                                      0.2% Slippage
                                      15-days delay between trades

                               How do the Stop Conditions work?

                               The Target Percentage sets the conditions at which the
                               Trail Target/Stop kicks in. The Stop Percentage is the
                               opening risk for the trade, assuming the Trail fails to
                               kick in. Once the Target Percentage is hit the Trail
                               Target and Stop becomes the new exit rules. As each
Trailing Target is hit the Trailing Stop is updated. If at any point the Trailing Stop is
hit then the position is exited. The Trailing Target continues until the Profit Target is
hit. Once a Profit Target is hit the position is exited.

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.


What were the returns based on default ‘Stop Condition’ settings?

      Target Percentage: 15%
      Stop Percentage: 10%
      Trail Used: Yes
      Trail Target Percentage: 10%
      Trail Stop Percentage: 10%
      Profit Target Percentage: 25%

       No. of Trades: 142
       Profitable Trades: 47%
       Net Profit: 17%

What happened when ‘Stop Conditions’ were changed?

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.

      Stop Percentage: 10%
      Target Percentage: 10%
      Use Trail: Yes
      Trail Target Percentage: 10%
      Trail Stop Percentage: 5%
      Profit Target Percentage: 25% (or 50%?)

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.

                                       The Active Trader stock list will be the test-
                                       bed: Apple (AAPL), Boeing (BA), Citigroup
                                       (C), Caterpillar (CAT), Cisco (CSCO), Disney
                                       (DIS), Ford Motor Company (F), Hewlett
                                       Packard (HPQ), International Business
                                       Machine (IBM), Intel (INTC), International
                                       Paper (IP), J.P. Morgan (JPM), Coca Cola
                                       (KO), Microsoft (MSFT), Starbucks (SBUX),
                                       AT&T (T), and Wal-Mart (WMT).

                                       Before I jump to the editable rules I will
                                       configure the back-test period from the start
                                       of 2000 to the end of 2007; effectively
                                       covering the last major cyclical bear and bull
                                       market. Later I will run an out-of-range test
                                       from the start of 2008 to the current day.

                                       The key element I will be looking at will be
                                       modifying the technical rules. There are two
                                       ways of creating your own rules; the first
                                       involves modifying an existing rule - if you are
                                       doing this you need to do a 'Save As' and give
                                       your rule a new name - otherwise your
                                       changes won't be saved.
The second way is to create a new rule by choosing either [Technical] or
[Candlestick]




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.

[Momentum] RSI crosses above 30

[Trend] Linear Regression slope crosses above 0

[Volume] Money Flow Index crosses above 20

When reporting the initial
set of results I only used
the outputs given in the
Trading System Results - I
didn't look to the more
detailed outputs offered by
the Portfolio Manager.
First Step

How did each indicator perform independently?




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.




Pairing of the aforementioned indicators brought improved performance over
individual indicators. Better still, using all three in tandem brought the strongest
performance with a healthy 156 trades (approximately 22 a year) with an average
return of 5% per trade and nearly 60% winning trades. Of the paired indicators, a
combination of momentum (RSI) and trend (Linear Regression Slope) brought the
best returns at an ROI of just over 4% per trade with 56% winners.

                                                        A unique feature of the
                                                        Zignals Trading System
                                                        Builder is the ability to create
                                                        multiple trigger paths for a
                                                        trade. So while the
                                                        aforementioned examples
                                                        were created with simple
                                                        linear paths we can modify
                                                        them to allow for OR
                                                        scenarios.



                                                        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?

The first matched RSI and Linear Regression (Slope).




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

Based on the aforementioned results I have published the following strategies
available in Trading Strategy MarketPlace:

Tri-Indicator US, Tri-Indicator UK, Tri-Indicator India, Tri-Indicator Aussie, Tri-
Indicator Frankfurt, Tri-Indicator Forex, Tri-Indicator ETF, Tri-Indicator Irish, Tri-
Indicator Canada, and Tri-Indicator US Dividends.

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

								
To top