How to multirank symbols in rotational backtest

Hi, Is there a way to rank symbols in a 2nd and 3rd pass in a rotational backtest?

// using monthly bars

SetBacktestMode(backtestRotational);
SetOption("WorstRankHeld", 20);

PositionScore = ROC(C, 12);

1st pass = as above, ROC(C, 12)
2nd pass = from 1st pass, take the top 20 results and then rank these by ROC(C, 6)
3rd pass = from 2nd pass, take the top 10 results and then rank these by ROC(C, 3)

Thank you.

I think you can use this method to perform ranking as many times as you want.
AFL Function Reference - STATICVARGENERATERANKS (amibroker.com)

start with 'symlist' in the example and get list of tickers from the ranks. (1st pass)
use ticker list from pass 1 and again generate ranking.
this way you will be able to do it as many times as needed.

Then from the final list, assign to PositionScore.
I've not done it but this would be my approach.

OK thanks, that could be a way to go

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.