Trading as a Business - Chap 6

  • Upload
    david

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

  • 8/14/2019 Trading as a Business - Chap 6

    1/13

    Chapter 6: The Art of

    Strategy Design In PracticeLet's walk through the process of creating a strategy discussing the steps along the

    way. I think we should be able to develop a strategy using the up key reversals(UKR) that I pointed out in the last chapter. If you recall, we had looked at a fullchart of UKRs and realized that there was more substance there than we hadoriginally thought. UKRs were not only at bottoms but occurred all over thechart. I have reproduced the chart as Chart 1 below.

    The first question we will ask ourselves is what type of strategy are we trying tocreate? Will it be a trend-following, support and resistance, or volatility expansionstrategy? In this case, I will choose to create a volatility expansion strategy, making

    Chart 1

    This is the same as Chart 5in Chapter 5. It includes aShowMe Study marking everyup key reversal (UKR).

  • 8/14/2019 Trading as a Business - Chap 6

    2/13

    114 Chapter 6: The Art of Strategy Design In Practice

    the assumption that with a UKR will come an increase in volatility that will lastfor a few days. We could also try to create a trend-following strategy based on the

    UKR as the long entry and a down key reversal as the short entry, but you can trythat on your own. For this example, we will stick to a volatility expansion strategybased only on the up key reversal.

    So at this point we have chosen the market type: volatile. For our time frame wellchoose daily charts. We have designed and charted the indicator (UKR) and

    written the criteria as a ShowMe study (Chart 1) and have started to modify ourthinking based on what we saw in the ShowMe study.

    Now let's test the UKRs knowing that there might be some problems we will findalong the way. Our set-up will be the UKR itself. The current bars low lowerthan the previous bar, and the close higher than the close of the previous bar.

    For the entry, we want to start with something that meets our two entry rules.First, our entry must force prices to move in the direction of the set-up (in thiscase up). Second, our entry must guarantee that we get in the market after a UKR(we wont miss a move after an UKR). We could justify a market on close orderbecause the close is in the direction of the set-up, but I always try to use abreakout entry with a stop order. So I chose to force prices to get us long with abuy stop one tick above the high of the UKR.

    I write this signal so that the breakout must occur on the day following the UKR,reasoning that if it did not, the volatility has diminished and that I didnt want to

    be in the trade. The result is that if we are not filled on the following day, we willhave to cancel the order, and wait for the next signal.

    We also need an exit for this strategy. A volatility expansion strategy is not in themarket all the time, and it is not a reversal strategy, so an exit is necessary. As I

    view Chart 1, it looks as if we might make a profit by exiting the market on theentry day at the close. A significant number of these trades look as if they willmake money. SPF 1 outlines the parameters of this strategy.

  • 8/14/2019 Trading as a Business - Chap 6

    3/13

    Chapter 6: The Art of Strategy Design In Practice 115

    Strategy Parameter FileUp Key Reversal Breakout

    Set-Up Up Key Reversal (UKR)

    Entry Breakout over High of UKR

    Stops None ExitsEntry day onClose

    MaxBarsBack 50 Slippage 0

    Margin None Used Commission 0

    Data Source S&P Futures Omega Research CD

    Data Duration 4/21/82 to 4/2/97

    At this point, we will test this on the S&P futures. I have not used any slippageand commission, although please note that I always recommend at least $100 forthis cost. I keep an eye on this cost by watching the profit per trade results on thePerformance Summary, and I always put it in the last test of the strategy. PS 1shows the results of this strategy.

    This obviously was unsuccessful. The only way we are going to find out whatwent wrong is to look at the chart. We need to scroll through the trades and lookat the execution to see what is going on.

    Out of the ten trades shown on Chart 2, I count four winners, with only one

    being very profitable (mid-February). In several cases, had we held on for a fewmore days, we would have made more money. It looks like the exit may be theproblem. Also, remember from our previous discussion that we were concernedabout taking all of the trades, that we wanted some sort of filter to ensure that themarket was in a downtrend before we used the UKR.

    SPF 1

    TradeStation EasyLanguageStrategy: Up Key Reversal

    Condition1 = Low < Low[1];Condition2 = Close > Close[1];

    If Currentbar > 1 and Condition1and Condition2 then Buy at High+ 1 point stop;

    PS 1

    Note that 48% of the tradeswere profitable.

    The important statistic here isthat the average losing tradewas greater than the averagewinning trade.

  • 8/14/2019 Trading as a Business - Chap 6

    4/13

    116 Chapter 6: The Art of Strategy Design In Practice

    So we now have two things to try as we attempt to improve the strategy. The firstis varying the length of the holding period, and the second is filtering the signalsthemselves so that the market is in more of a downtrend before we use a UKR.

    First, let's look at making sure that the market is in a downtrend before we take aUKR. To do this we require that instead of the low being lower than the previouslow, we will require that the low be lower than the last 10 lows. Using a two-weeklow rather than only the previous days low should make sure that the market is ina downtrend.

    As PS 2 shows, this change resulted in substantial improvement even thoughoverall it was still a loss. We will keep in mind that there probably is an optimalnumber of lows before entry, but remember, we want the strategy to be profitable

    without optimization.

    Chart 2The key reversals are stillmarked with the cross onthe high.

    The entries and exits fromthe strategy test are markedas well.

    PS 2TradeStation EasyLanguageStrategy:UKR Ten Lows

    Condition1 = Low < Lowest(Low,10)[1];Condition2 = Close > Close[1];

    If Currentbar > 1 and Condition1 andCondition2 then

    Buy at High + 1 point stop;

  • 8/14/2019 Trading as a Business - Chap 6

    5/13

    Chapter 6: The Art of Strategy Design In Practice 117

    Since this was a major improvement, let's move on to testing the holding period.Well change the low back to the low of the previous day so that we are only

    testing one change at a time.

    From looking at the Chart 1, I think holding for 5 days instead of exiting on theday of entry should be interesting. PS 3 shows the results, a major improvementover PS 1. In fact, we actually moved into profitability. The average winning tradehas finally become greater than the average losing trade, and this, coupled withthe 52% profitable trades, has put us into the black.

    At least now we know that we have something to work with and we dont have tothrow out the whole concept. If this had not worked, I probably would have

    started over with a new idea.

    Now its time to add the two improvements at the same time and run a test. Wewill call this test UKR Breakouts 2. The Strategy Parameter File is shown in SPF2.

    Strategy Parameter FileUp Key Reversal Breakout

    Set-Up UKR 10 day low

    Entry Breakout over High of UKR

    Stops None Exits 5 day Close

    MaxBarsBack 50 Slippage 0

    Margin None Used Commission 0

    Data Source S&P Futures Omega Research CD

    PS 3TradeStation EasyLanguageStrategy: UKR Long ExitsCondition1 = Low < Low[1];Condition2 = Close > Close[1];

    If Currentbar > 1 and Condition1and Condition2 then Buy at High+ 1 point stop;

    IF BarsSinceEntry(0) = 5 thenExitlong on Close;

    SPF 2

    TradeStation EasyLanguageStrategy: UKR Breakouts 2Inputs:BSI(5),LL(10);

    Condition1 = Low < Lowest(Low,LL)[1];Condition2 = Close > Close[1];

    If Currentbar > 1 and Condition1 andCondition2 then Buy at High + 1 point stop;

    IF BarsSinceEntry(0) = BSI then Exitlongon Close;

  • 8/14/2019 Trading as a Business - Chap 6

    6/13

    118 Chapter 6: The Art of Strategy Design In Practice

    Data Duration 4/21/82 to 4/2/97

    The results of this test combining the two were surprising, as you can see in PS 4.

    I did not expect the improvement to be so good.

    This strategy is actually getting to where we might consider trading it. Now wehave several things to consider as we go forward. First, we might want tooptimize the parameters, both the number of days that we should hold the tradeand the number of days we should go back for the lowest low. Second, we might

    want to work on the largest losing trade and the drawdown, as both are a littlesteep for my blood. Lets work on the optimization first.

    The results after optimization, shown in PS 5, clearly show that we are on tosomething here. We improved a strategy that already was profitable, which fitsour criteria for optimization. We also made improvements overall on the strategy.

    What still bugs me about this strategy is the $8,750 largest losing trade. I dontknow if would want to be exposed to that big a trade.

    PS 4There are substantialimprovements in every categoryof this strategy. Clearly there issynergy between the twoimprovements that we used.

    PS 5The two best parameters are thelow of today being lower than thelowest low of the last 10 days;coupled with holding the trade for8 days.

  • 8/14/2019 Trading as a Business - Chap 6

    7/13

    Chapter 6: The Art of Strategy Design In Practice 119

    When you scroll through the chart, you can see that the losses are uncontrolled.See Chart 3. The strategy currently does not have any stop loss to limit the risk;

    the strategy simply exits the market after eight days. This leaves us exposed to themarket with no downside protection. For my own trading, I usually want somesort of protection, if only for my peace of mind.

    This is where the money management stops come in. I always recommend that, ifpossible, you design a money management stop to reflect market action. Usually Itry to place money management stops one tick below some recent low. It is only

    when I havent been able to find some market action that works, that I try theplain old dollar amount stop. The dollar amount money management stop is

    always my last resort.

    The problem with money management stops is that they invariably interfere withmarket action. If they are too close, we end up getting stopped out of profitabletrades that take a little more room to develop. If they are too far away, you mightas well not have one at all. In the end, I just look for a balance. I always know thatthe performance of the strategy is going to get worse using a money managementstop. However, using a stop may permit me to trade a strategy that I would nototherwise feel comfortable trading. This is the tradeoff that you will be forced tomake.

    In our UKR strategy, the logical thing to try first is to put a stop below the low ofthe UKR. We know that the UKR represents a volatility type signal that we wantto use to take a long trade. It is my first thought that if the low of the bar is

    violated, the signal is then invalid. Let's see whether the additional stop helps thestrategy or makes it worse.

    Chart 3You can see from this chart that there is no stoploss to get us out if the market goes against us.We must simply wait for the eight days.

    We need to try to fix this because it could be

    difficult to trade; having a position on with no stopcan be very painful.

  • 8/14/2019 Trading as a Business - Chap 6

    8/13

    120 Chapter 6: The Art of Strategy Design In Practice

    If you look as PS 6, you will note that it pretty much came out as we hadexpected. The profit was down as we took more losing trades because of the stop.

    The percentage profitable was also down. Clearly we have made some winnersinto losers by using the stop. The largest losing trade increased, which is theopposite of what we had wanted, and the drawdown also increased, which iscounter to what we had expected. For the most part this was not a great idea.

    One thing to understand is the details on how testing a stop alters a strategy. IfTradeStation is long on an UKR breakout, it will ignore any subsequent signalsuntil it is flat. Even though there may be another UKR breakout two bars after anentry, the strategy will not take it if it is already long.

    If, because of placing a stop, as we did in PS 6, the strategy gets prematurely flat,TradeStation will take the next UKR Breakout. This could be a signal that wasoverlooked in the previous test. Thus we incurred additional trades. We canconclude that using this stop really altered the strategy more than we had wanted.It forced us to take signals that were not taken in the original test.

    Since this didnt work, let's try using a straight dollar amount money managementstop instead. Since we know from PS 5 that our largest loss is $8,750, reducingthat to $5,000 is a reasonable goal, so well add a $5,000 money management stop.

    PS 6

    TradeStation EasyLanguageStrategy: UKR Breakouts 3

    Inputs: BSI(8), LL(10);

    Condition1 = Low < Lowest(Low,LL)[1];Condition2 = Close > Close[1];

    If CurrentBar > 1 and Condition1 andCondition2 then begin

    Buy at high + 1 point Stop;End;

    If BarsSinceEntry(0) = BSI thenExitlong on Close;

    Exitlong(UKR Low) at Value1 - 1 pointSto

  • 8/14/2019 Trading as a Business - Chap 6

    9/13

    Chapter 6: The Art of Strategy Design In Practice 121

    If you look at PS 7, you will see that we took another step backward. The most

    troubling is the largest losing trade moved up to over $20,000. When I seesomething like this, I have to check it out and find it on the chart. Heres what Ifound.

    As you can see from Chart 4, the strategy got long two days after the crash in1987. This day in fact was a huge UKR. After getting long and closing at 258.25on the 21st the market gapped down and opened at 202.00. Thats a 56-point loss.

    And with my luck there probably would have been slippage!

    The reality is that any stop loss would have been hit on the open as the marketopened so much lower. There are two considerations for this trade. First, it is

    Chart 4

    The day of the 1987 Crash and for a good periodof time afterward the stock index future marketwas very illiquid and volatile. When I test an S&Pstrategy, or stocks for that matter, I always checkand see what would have happened on October19th and several months after.

    I did not want to trade for several months after thecrash, because of the craziness of the market.One way I deal with this is to simply write out theday of the crash and a subsequesnt length of time.For me, I did not feel like getting back in themarket until after the first of December.

    The TradeStation code for this is:Condition1 = Date < 871019 or Date > 871201;

    PS 7This is the same strategy asin SPF 2 (UKR Breakouts 2)but with a $5,000 MoneyManagement Stop.

  • 8/14/2019 Trading as a Business - Chap 6

    10/13

    122 Chapter 6: The Art of Strategy Design In Practice

    highly unlikely that you would have put on this trade given the emotions that werebubbling up at this time. The S&P pit itself was in chaos. I personally did not put

    on any trades for the last few weeks of October, and all of November. Let's seewhat removing these dates does to the strategy.

    PS 8 show the results of eliminating the days after the crash. There is substantialimprovement by eliminating just that one trade. This is why you should take alook at the important trades in a Performance Summary. Scroll through the chartand look at the worst couple of trades and the best trades to see if there isanything unusual there. I also look at the periods of the largest drawdown to see ifI can learn anything from that period as well. And, be careful when testing theS&P and stocks around the crash of 1987.

    The last thing I try before wrapping up a test series is a profit target. There is justsomething appealing about having a price target in the market and getting out

    with some money on a short-term basis. When I can get the percentage profitabletrades up over 60%, I begin to think in terms of a 1-to-1 risk/reward ratio with ahigh percentage chance that I will win. So in this case I opted to try a $5,000 pricetarget. This means that when I have $5,000 profit, I will take it.

    As you can see from PS 9, there is substantial improvement again. We havemoved up to 68% winners with the price target. In this version of the strategy, if Idont hit the target I will either get stopped out with a $5,000 loss or get out 8

    days after the entry. The drawdown has come down substantially as we haveworked on this strategy.

    PS 8

    TradeStation Easy LanguageStrategy:UKR Breakouts 4Inputs:BSI(8),LL(10);

    Condition1 = Low < Lowest(Low,LL)[1];Condition2 = Close > Close[1];Condition3 = Date < 871019 or

    Date > 871201;If Currentbar > 1 and Condition1and Condition2 and Condition3then Buy at High + 1 point Stop;

    IF BarsSinceEntry(0) = BSI thenExitlong on Close;

  • 8/14/2019 Trading as a Business - Chap 6

    11/13

    Chapter 6: The Art of Strategy Design In Practice 123

    However, if you look at PS 5, we have done all of this work and have really made

    only slight improvements. PS 5 was the original version of the strategy with nostops and not targets, just a simple UKR breakout entry with an 8-day exit. All ofthe work we have done to soothe our psychological problems associated with risk(no stop), largest losing trades and drawdown have not really made us that muchmore money.

    However, we could and should argue that with a $5,000 stop loss and profittarget, UKR Breakout 4 in PS 9 is much easier to trade than UKR Breakout 2 inPS 5. We could argue that giving up the profit advantage would be worth theability to sleep better at night.

    And finally, when I get a strategy that looks pretty good, I like to test the finalversion without any stops. SPF 3 reflects this strategy. I really want to see thefinancial price I am paying for being unable to trade without stops.

    Strategy Parameter FileUp Key Reversal Breakout

    Set-Up UKR 10 day low

    Entry Breakout over High of UKR

    Stops None Exits8 day Close &

    $5,000 Target

    MaxBarsBack 50 Slippage 0

    Margin None Used Commission 0

    Data Source S&P Futures Omega Research CD

    Data Duration 4/21/82 to 4/2/97

    SPF 3

    TradeStation Easy LanguageStrategy: UKR Breakouts 4Inputs:BSI(8),LL(10);

    Condition1 = Low < Lowest(Low,LL)[1];Condition2 = Close > Close[1];Condition3 = Date < 871019 orDate > 871201;

    If Currentbar > 1 and Condition1and Condition2 and Condition3 then

    Buy at High + 1 point Stop;

    IF BarsSinceEntry(0) = BSI thenExitlong on Close;

    PS 9This is Strategy:UKRBreakouts 4 with a $5,000money management stopand a $5,000 price target.

  • 8/14/2019 Trading as a Business - Chap 6

    12/13

    124 Chapter 6: The Art of Strategy Design In Practice

    The results for our last test in this run are shown in PS 10.

    Here is a strategy that is profitable 75% of the time, the drawdown below $15,000and almost a $2,000 average profit per trade. The price we have to pay for thesecharacteristics is trading with no stop.

    Frankly, this is a good strategy. It has all of the performance characteristics thatyou would want to have behind you to actually trade it. Even if you take out thelargest winner, the strategy performance is hardly affected.

    Summary

    In this chapter, we followed the steps previously outlined to create a strategy. Itried to give you some of the thought process that I go through as I look at theresults of each of my design moves. Sometimes there are improvements,sometimes there are none. Bit if you follow the principles, you will stay on theright track.

    Conventional wisdom tells us that to make money you have to cut your lossesshort and let your profits run. This is human nature. This is what we all strive todo, because it is easy to take small losses and big profits. However, as I have saidpreviously, in order to make money trading you have to trade against your humannature.

    If we want to trade against conventional wisdom we would actually trade thestrategy in PS 10. Why? Because the strategy is designed to manage trades inopposition to our human nature. It limits profits to $5,000 and lets its losses runfor eight days without any stops. After what I have told you, it shouldnt be asurprise that the most profitable version of the strategy is the hardest to trade.

    PS 10These results are from theUKR Breakout 4 Strategywith a $5,000 price targetand no stop.

  • 8/14/2019 Trading as a Business - Chap 6

    13/13

    Chapter 6: The Art of Strategy Design In Practice 125

    One more caveat. This is a strategy that only takes long trades. The market wetested, the S&P futures, had been in a bull market since its inception in 1982. It is

    not surprising that we could find a strategy that made money with long trades.The real challenge would be to take the down key reversal and see if we couldfind a strategy to short this market. Finding a strategy that made money shortingthe biggest bull market in history would be a challenge worth taking.

    What should we do next? Well, we could keep working on the strategy or add theshort signals. We could try other exits, other money management strategies, andother stops. You could literally keep on fiddling with this strategy indefinitely.

    What I like to do is to take all of the performance summaries, get a cup of tea, puton some Mozart, and contemplate which strategy I could trade and how to makeit better.

    Could I trade without stops? Note that the drawdown is actually less without anystops. If not, and if I insist on having a stop, how much of a stop? What price amI willing to pay for my human nature?

    Next, I would wait for some signals and get a feel for how the strategy works. Iwould paper trade a few signals to see if they in fact work as I have imagined. Iwould then trade one or two to get a live feel for the strategy. There is nosubstitute for putting your money on the line to get a feel for whether or not youcould trade the strategy.

    After all of the testing and all of the analysis, trading is still a visual undertaking.

    We still need to get a feel for the market and the strategy in real time. Once we getthat feel, we will know which of the versions we should trade and how we mightalter the strategy to make it easier to trade.

    NOTE: What you have just read has been presented solely for informational or

    educational purposes. No investment or trading advice or strategy of any kind

    is being offered, recommended or endorsed by the author or by TradeStation

    Technologies or any of its affiliates, agents or employees.