Tue05212013

Last update12:00:00 AM

BackHomeS&C MagazineDepartmentsTraders' Tips THINKORSWIM, SECTOR ROTATION MODEL (SRM)

THINKORSWIM, SECTOR ROTATION MODEL (SRM)

logo

In true Olympic fashion, author Giorgos Siligardos has delivered us a gold medal in the form of his new sector rotation model (SRM) study, described in his article in this issue, “Applying The Sector Rotation Model.”

The article goes over the macroeconomic concepts needed to understand the logic behind the theory of market rotation. Siligardos also briefly explains rotation theory, and describes how this study is interpreted with the knowledge of rotation. The study uses ETFs that are built to track the movement of specific market sectors, that when charted on daily charts are used to recognize market tops, bottoms, and reversals (Figure 2).

Image 2

FIGURE 2: THINKORSWIM, SECTOR ROTATION MODEL STUDY. The sector rotation model study uses ETFs that are built to track the movement of specific market sectors, that when charted on daily charts are used to recognize market tops, bottoms, and reversals.

We have recreated Siligardos’ study for thinkorswim users in our proprietary scripting language, thinkScript. The lower study is not going to be affected by the charted symbol but rather by the prices of each sector ETF used in the code. The sector rotation model is built to be used with traditional technical analysis for long-term stock market analysis.

The code is shown here along with instructions for applying it. You can also download the code here.

  1. From TOS charts, select “Studies” → “Edit Studies”
  2. Select the “Studies” tab in the upper left-hand corner
  3. Select “New” in the lower left-hand corner
  4. Name the study (such as “sector rotation model”)
  5. Click in the script editor window, remove “plot data = close,” and paste in the following code:
    declare lower;
    input length = 75;
    def bull1 = close("XLY") / close("XLY")[length] - 1;
    def bull2 = close("XLF") / close("XLF")[length] - 1;
    def bear1 = close("XLE") / close("XLE")[length] - 1;
    def bear2 = close("XLU") / close("XLU")[length] - 1;
    def bear3 = close("XLP") / close("XLP")[length] - 1;
    def bull = (bull1 + bull2) / 2;
    def bear = (bear1 + bear2 + bear3) / 3;
    plot Osc = 100 * (bull - bear);
    plot ZeroLine = 0;
    Osc.SetDefaultColor(GetColor(4));
    Osc.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
    Osc.SetLineWeight(3);
    Osc.DefineColor("Positive", Color.UPTICK);
    Osc.DefineColor("Negative", Color.DOWNTICK);
    Osc.AssignValueColor(if Osc > 0 then Osc.color("Positive") else Osc.color("Negative"));
    ZeroLine.SetDefaultColor(GetColor(7));
    

—thinkorswim
A division of TD Ameritrade, Inc.
www.thinkorswim.com


To read the entire issue click here and subscribe today!

PTSK — The Professional Traders' Starter Kit
Home| Working Money Magazine | S&C Magazine | Traders.com Advantage | Online Store | Traders’ Resource
Add a Product to Traders’ Resource | Message Boards | Subscribe/Renew | Free Trial Issue | Article Code | Search

DEPARTMENTS: Advertising | Editorial | Circulation | Employment | Contact Us | BY PHONE: (206) 938-0570

Join us on Facebook     Follow us on Twitter     Follow Us on StockTwits

Bookmark and ShareCopyright © 1996-2013 Technical Analysis, Inc. All rights reserved. Read our disclaimer & privacy statement.

SUBSCRIBE TO OUR FREE
EMAIL NEWSLETTER!