Ranking exploration

#1
I have the following explorer, where SPX stands for S&P500

SetForeign("SPX-I-5676");
SP=C;
RestorePriceArrays();
RS12=(C/Ref(C,-252))/(SP/Ref(SP,-252));
SetSortColumns(-3);
Filter = RS12;
AddColumn( RS12, "RS12",1.3,colorBlack,colorGreen);

I want backtest only the top 20% lines from the explorer, that is the stocks that come with the higher value of the parameter RS12. Any suggestions?
Giuseppe
 

iamaaditya

Active Member
#2
I have the following explorer, where SPX stands for S&P500

SetForeign("SPX-I-5676");
SP=C;
RestorePriceArrays();
RS12=(C/Ref(C,-252))/(SP/Ref(SP,-252));
SetSortColumns(-3);
Filter = RS12;
AddColumn( RS12, "RS12",1.3,colorBlack,colorGreen);

I want backtest only the top 20% lines from the explorer, that is the stocks that come with the higher value of the parameter RS12. Any suggestions?
Giuseppe

I hope you realise that to get the top 20% first it has to run across all the symbols !
Once you have the top 20 in exploration window, either you could select the top 20 and add them to a watchlist (after sorting the column by RS12) and then run backtest on this watchlist only or you could use PositionScore (see more in AB helpfile)
 

Similar threads