|SPY with sector etf comparisons.|
sdi_comp plots the same comparison line but adds a bubble at the endpoint of each comparison plot to identify the ticker. also, a chart label is displayed at the top in the same color as the comparison line. here's how this looks:
|SPY compared to sector etf performance using sdi_comp|
in the theory of sector rotation xly, the consumer descretionary sector etf, is typically a beneficiary of the late stages of an economic contraction cycle while xle, the energy sector etf, is typically prominent in the late stages of an economic expansion. iyt, the transportation etf, is a beneficiary of the early stages of economic expansion and it is clearly lagging a little bit. so this array of sector performance would seem to indicate the economy is in the late stages of an economic contraction soon to begin an expansion phase ... in theory.
here's the code: