THINKORSWIM, SECTOR ROTATION MODEL (SRM)
- Details
- Parent Category: Departments
- Category: Traders' Tips
- Written by thinkorswim

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

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.
- From TOS charts, select “Studies” → “Edit Studies”
- Select the “Studies” tab in the upper left-hand corner
- Select “New” in the lower left-hand corner
- Name the study (such as “sector rotation model”)
- 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));


Join us on Facebook
Follow us on Twitter