Rotational Trading: A simple but powerful system [II./II.]

Part I. of this series covered the background and why YOU should look into rotational trading. In Part II. I’m going to present a simple yet powerful system. Let me clearly state that i don’t trade the system as outlined below. However I use the same concept and similar ingredients.  I suggest you use the system as a starting point for your own research.

In case you current trading platform doesn’t offer rotational trading capabilities then you should definitely look into Amibroker. It’s only 199$.  I’m not associated with AmiBroker, but I think it offers great BANG for the BUG.

.

Ranking

One of the basic principles of rotational trading: you ride the best stocks as long as they are among the best stocks, then you change horses and go again. For this to happen I want to find the strongest trending stock as they promise to continue to go for some time. My preferred way of measuring trend strength is TSI. So I rank the stocks according to their TSI value (highest TSI value at the top). Let me give you some background on how I conducted the test. I looked at today’s Nasdaq 100 stocks. First year of trading 2001. I don’t want the “bubble” times to be included in my test results. No commission. I take top 5 stocks and assign 20% of equity.

Already the result is pretty good given the fact that the principle is extremely simple and sound. About 32% CAGR, high Avg% winning trade as well as almost 55% winners. However the system has an issue: almost 60% MaxDD (= max. draw down). Emotionally that will be VERY hard to trade! What you don’t see. One of the most profitable times of the system is right AFTER this severe draw down. I’m not sure I could trade this! So either you hedge, e.g. by shorting the index or you add a timing component to your rotational system. I do both, depending on the state of the market.

.

Avoiding severe draw downs

But let’s look into adding a timing component to the system.  I only trade the system at times  where the index is either above the 200 MA or 30 MA . Usually these severe draw downs  happen bellow the 200MA average and the second 30 MA average will help me to get in when the recovery happens. So this small change will improve the performance significantly while making it a lot easier to trade. I know this is partially against the philosophy of rotational trading (=be always in the market and avoid market timing), so you need to figure out your own risk tolerance level.

.

Frequency of trades

Currently the system produces  585 trades in about 10 years. It’s not a lot. So trading cost shouldn’t be an issue.  From a convenience as well as emotional point of view the system can be further improved. TSI isn’t a rapidly changing indicator, but out of the 585 trades there are about 120 trades with a duration of 2 bars only. That indicates that the ranking changes to frequently and therefore produces these avoidable trades. I therefore suggest you execute the trades only once a week. So pick a day of the week that’s most convenient for you. I picked Tuesday for this test, however all other weekdays produce similar good results. As you see, the performance metrics stay about the same while the number of trades have been significantly reduced.

.

Summary

The system presented has a decent performance of 37% per year while it’s emotionally possible to trade. It gives you a good starting point for your own rotational system. However, more important than the system I presented is the fact that you should look into diversifying your trading strategies because of the reasons I outlined in Part I.

.

AFL Code

SetCustomBacktestProc("formulas\\include\\cbt_midlevel.afl",True);
SetOption("CommissionAmount",0.0);
SetOption("MaxOpenshort",0);
SetOption("MaxOpenLong",5);
SetOption("MaxOpenPositions",5);
SetPositionSize( 20, spsPercentOfEquity);
SetTradeDelays(0,0,0,0);
SetBacktestMode(backtestRotational);
EnableRotationalTrading() ;
idx           = Foreign("QQQQ","Close");
score         = TSI();
Score         = IIf(idx>MA(idx,200) OR idx>MA(idx,30),score,0);
PositionScore = IIf(Year()>=2001 AND DayOfWeek()==2,score,scoreNoRotate);

Comments

  1. Hi Frank,
    I have been following your Blog ever since you started it. I like your work as it seems we are on similar paths! Currently I am setting up my Blog however still working on exact scoping, however I think I am getting there :-)

    As to the Rotational system you discuss here. Have you looked into the “survivor bias” – effect? I have been working on a similar system in the past and noticed that constituents of the index can change significantly in 1 year (>10%) resulting in very few index members of 2001 still trading in the 2010 index.
    This is when I started to investigate the application of the rot system to (country, sector) ETF’s. Maybe you try this for a future analysis?

    Good luck!

    Michel

    • Hello Quanting Dutchman,

      Thanks for your feedback. I’m also slightly concerned about the survivor bias effect. However this is as good as i can test it for NOW. I’m working on getting the “real” historical index data.

      Indeed one of my upcoming projects is too look into sector ETF’s.

      Regards,
      Frank

      • Hi Frank,
        When looking into the survivor-bias, I found the following suggestion (can’t remember where) to mitigate the effect: include in the watchlist of today all the tickers that have been index-component in the past. The result is that the list will grow to >100 components so that at leat the “not-survivors” are still in there. This is a relatively fast alternative.

        I also tried to make the AFL code switch watchlists per year, but I found it a lot of work to make seperate watchlists with constituents. The problem is that the nasdaq-site only has reported historical changes in the composition and has not provided dated lists with all 100 components at the start of a year. I think I have kept some files on this. Let me know if you are interested.

        Michel

  2. Hi Frank – Thanks for publishing the results and the AFL code. I too find Amibroker invaluable for testing. One thing to consider instead of using the moving averages as filters for trading (something I totally agree with), is also to have some additions to your stock selections that have a negative correlation to the overall market – usually government bonds. That way the system can always be in the market, but you’ve provided choices that should be ranked at the top during a market downturn. This is what I’ve seen with the systems I’m publishing at my site. All the best, and keep up the great work.

  3. eatcake says:

    hi Frank, thanks for your work. I’ve started reading your blog lately

    I do not have much experience in programming (yet)

    the rotational system I’ve seen in the past simply took the best performers by % each week or month and rotated them

    I’m not sure in the CAGR but these are all things I would like to build on in the future

  4. scrilla_gorilla says:

    Is there any way you can post results with the system hedged against the index? I’m sure the returns will still be strong, but it’s interesting to see how this affects the risk metrics. I’ve been testing similar systems using S&P 100 index and want to compare. In my tests, there was still a lot of volatility in the equity curve even after 100% hedging, which suggests that a significant portion of the momentum effect may really be a beta effect, which causes the hedge to perform poorly at turning points or in choppy markets.

    • Hello Scrilla_Gorilla,

      I would LOVE to test this, but i’m missing this in AB. Are you using AB / have you got “hedging” build into CBT?

      Regards,
      Frank

      • scrilla_gorilla says:

        Hi Frank,

        Believe it or not, I use Excel for my backtests. (All the data is imported more-or-less automatically so it’s not as bad as it sounds.) I have been fiddling with AmiBroker but haven’t had time to really dive in.

        Can AB break performance down by period (say monthly)? If so, unless I’m missing something, you should be able to make a simple spreadsheet that calculates net performance based on the strategy return minus the index return.

        • Hi Scrilla_Gorilla,

          of course that would be possible in order to get an overview. I would like to have it more precise, because sometimes the system might not be invested or only partially.

          Regards,
          Frank

  5. scrilla_gorilla says:

    Frank,

    Why couldn’t you do this for the first variation? That is fully invested at all times, no? (My understanding is that you just take the top 5 at all times). I see the problem for the timing variations, but the hedge would be most useful in the original version, as you’d probably want to do either the hedge or the timing but not both.

    Like I said, not too familiar with AB, but I’m curious why you can’t do this? If your system is going long $10k of 5 different stocks, why can’t you just have it also go short $50k of QQQQ at the same time?

    • Hi Scrilla_Gorilla,

      thanks for keep pushing! I finally managed to build a hedged version. (for non compound version, meaning fixed position size).

      The baseline (without hedge, non compound, 10k per position out of 100k) :
      - CAR% 11.09
      - Sharpe 0.92

      Hedged (non compound, 100k total equity, 5 long positions with 10k each and 50k hedge)
      - CAR% 9.56

      The system contains a small timing component, as described in the post: ” I only trade the system at times where the index is either above the 200 MA or 30 MA . ”

      I also tested the system without any market timing, of course the hedged version was slightly better. Bottom line: hedge works best when market is bellow MA200 or MA30.

      Regards,
      Frank

      • scrilla_gorilla says:

        Hi Frank,

        Thanks for sharing that. How did the risk metrics compare for the hedged vs. baseline? Hopefully they would be much better. (I’ve found that usually they are although sometimes they surprise me and don’t make much difference, in this case possibly because buying strength may buying significant beta in many cases which then gets hit worse than the hedge at turns.)

        I am pushing b/c I am curious! I was working on something similar for S&P 100, but I only tested as completely hedged with no timing. There was definitely alpha there (1-1.5% per month depending on parameters), but the max DD was still pretty big and the equity curve too inconsistent for a hedged system. So much better than buy&hold but needed major improvement before I would consider adding it to my basket of strategies.

        I basically had two seemingly contradictory observations:
        1) For max return you want to be as selective as possible: if you are buying the top X% of an index, keep X% small. Absolute returns were OK with 10 tickers (top 10%) but improved markedly with top 5 and further with top 3.
        2) For risk metrics and minimizing drawdowns (when hedged), a smaller X equals an uglier equity curve and more return volatility. If only using 3-5 tickers, equity curve is volatile and drawdowns unacceptable, even if long-term returns are better. (100% hedged the max DD was better than buy&hold but it was “buy&hold-like” with long stretches of poor performance.) Using top 10% of index produces smoother equity curve but also significantly less returns, so the RAR doesn’t improve or actually worsens.

        Considering these, my tentative conclusion was that this type of system (or at least the variation I was running) would work much better on a larger index like the S&P 500, and better still on the 400 or 600 or Russell where there is (usually) more return diffusion. This would allow you to remain selective (buy only top 3-5%) but diversify the holdings sufficiently (~15-25 tickers) to achieve a smoother, more heart-friendly equity curve.

        I am guessing that the absolute return of my system would have been much better on the Nasdaq-100 over the S&P 100, b/c it is a more dynamic index with greater return diffusion among the stocks. But I am not sure how the risk metrics would be affected. Maybe I will test that next.

        BTW, your blog is great, keep up the good work,
        scrilla_gorilla

  6. scrilla_gorilla says:

    P.S. One other idea I’m pondering is that the key to improving performance for these types of systems might be making a distinction between tickers that are outperforming because they are highly levered to the market and those that are generating true alpha. The former will still do great when the market is in a strong trend, but will get killed at turning points and produce lots of headfakes in chop. Whereas the momentum of the latter is a more “real”, persistent momentum.

  7. pointsmax says:

    Hi,

    the system looks very good, but do you think that you can trade the system in reality? You are calculating the TSI with todays close and you are trading the signal the same day (SetTradeDelays(0,0,0,0);). So you are trading after the close of the exchange?
    Or did you implement the tradedelays in custom backtest?

    pointsmax

    • Hi Pointsmax,

      I’m trading a very similar system, that’s not an issue. Furthermore it trades rather infrequent (every friday).

      I’m placing my order 1-2min before close.

      Frank

  8. Ilya Malikov says:

    Hi Frank, first of all, thanks for your great article in Traders. Following questions:
    1) To keep the horizont window wide open, it could be better not to be fixed just on 1 stock index but to choose the current best performing index in the world and then pick the best stocks out of it. What do you think about?
    2) Dont you place stops at all in your rotation systems? And if you do place stops, how is the logic behind?

    Early thanks and best regard from Aschaffenburg:)

    Ilya

    • Hello Ilya,

      Thanks for you feedback:

      1.) good idea and makes sense, however I do not have survivorship adjusted indeces from around the world. If you have, let me know ;-)
      2.) No stops at all! If a stock performs “worse” then the remaining stocks, then it will be sold only due to its fallen rank.

      Frank

Trackbacks

  1. [...] an excellent way to diversify your trading systems.  A while ago I had two posts (first / second) on  rotational trading, since then I continued my research and further worked on my database. So [...]

  2. [...] is to find ways to control the strategy’s drawdowns. One solution is discussed in the Avoiding severe draw downs [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 226 other followers