I am trying to get my Excel to mimic this post from Brett Steenbarger but have been unable to.
I was hoping some our programming experts might be able to help.
The programming part needed is:
He says a matter of minutes to create... :roll eyes: Guess that depends on how much Excel you know.
Any help would be appreciated as always.
--------------
Follow up: after emailed Brett, he shared this with me:
I was hoping some our programming experts might be able to help.
The programming part needed is:
Above is one of my analytical tools that helps me identify market conditions as they're evolving. The blue line is the S&P 500 Index (SPY) at 15-minute intervals. As we can see, over the two day period charted, we have been quite rangebound.
The pink line represents the correlation among four key S&P 500 sectors: financials (XLF), energy (XLE), consumer discretionaries (XLY) and consumer staples (XLP). I calculate the correlation of each sector with every other sector over a moving one-day period (26 15-minute periods) and then plot the average of those correlations. Historically, this average correlation among sectors is .53. When we see the correlation significantly higher than .53, it suggests that the different sectors are moving very much in tandem intraday. When we see the correlation significantly lower than .53, it suggests that the different sectors are not moving in unison.
He says a matter of minutes to create... :roll eyes: Guess that depends on how much Excel you know.
Any help would be appreciated as always.
--------------
Follow up: after emailed Brett, he shared this with me:
You have each ETF in a separate column of 15 minute closing values and then you calculate the 15-minute price change for the four ETFs (A,B,C,D) in a next set of columns. You then correlate the price changes for each ETF with every other ETF (A with B; A with C; A with D; B with C; B with D; C with D) over a period of one day (27 15-minute periods). The final sector correlation is simply the average of the six individual correlations and is updated every fifteen minutes.