Steps: - Click on "Analysis" then "Screener" to open the screener tool - In the "Formula Editor", type the following formula: dji = GetSeries("^DJI", close, LastData); var1 = correl(perf(close, 1), perf(dji, 1), 30); filter = var1 >= 0.5; AddColumn("Correl", var1); In the first line, we use the "GetSeries" function to reference an external time-series (Dow Jones Index or ^DJI in this case) In the second line, we calculate the 30-bar correlation between a stock daily returns and the daily returns of the Dow Jones ("Perf" indicator with one bar as parameter) In the third line, we instruct the application to display stocks with at least 50% correlation. In the fourth line, we instruct the application to create a correlation column in the "Result" table. - Select Date/Bar, ticker symbols then click on "Start" to begin the screening process. In the "Result" table, click on the correlation column header to sort stocks by their 30-Bar correlation with the Dow Jones Industrial Average. To return stocks' correlation with other indices or funds, simply replace "^DJI", in the "GetSeries" function, by the new index or fund ticker symbol. Do not forget to download the latest historical data for the asset.
|
|