Score ranking in Back testing

Hallo everyone,

In case of back testing “Long only”, I want to arrange the scores from the largest positive (top of the array) to the largest negative (bottom of the array). We will then scan the array from top to bottom.

In case of back testing “Short only”, I want to arrange the scores from the largest negative (top of the array) to the largest positive (bottom of the array). We will then scan the array from top to bottom.

Only in the case of back testing “Long and Short”, I want to take the modulus of of all scores and then choose the biggest scores. And the backtesting engine would decide which of the chosen stocks would be “Long” and which would be “short”, depending on their original sign, current signal and last signal combination.

thanks in advanced

Please read the manual about ranking
https://www.amibroker.com/guide/h_ranking.html

And Rotational mode
https://www.amibroker.com/f?enablerotationaltrading

and separate short/long rank (SeparateLongShortRank option), see:
http://www.amibroker.com/guide/afl/setoption.html

1 Like

thanks, you Tomasz but, I tried to get score values with its sign, and it return the same result with absolute score values

Again: read the whole thing. Separate long/short ranking is explained in THIRD link.

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