Rotational trading is a kind of backtest where you trade by switching positions between various symbols based on their relative score instead of traditional buy\/sell\/short\/cover signals. <\/p>
Since there are no signals used, only PositionScore assigned to given symbol matters.<\/p>
It is worth noting that in case of rotational test, the Positions<\/strong> field in General tab of the Analysis settings is ignored. It is only used for regular backtests that use actual buy\/sell\/short\/cover signals.<\/p>
In the rotational mode the trades are driven by values of PositionScore variable alone. <\/p>
In particular:<\/p>
As you can see the SIGN<\/strong> of PositionScore variable decides whenever it is long or short.<\/p>
Therefore – if we want to test long-only system in rotational backtesting mode, then we should use only positive values in PositionScore variable. For example – if we are trading a system, which uses 252-bar rate of change for scoring purposes: <\/p>SetBacktestMode<\/span>( <\/span>backtestRotational <\/span>);
<\/span>SetOption<\/span>(<\/span>"MaxOpenPositions"<\/span>,<\/span>5<\/span>);
<\/span>SetOption<\/span>(<\/span>"WorstRankHeld"<\/span>,<\/span>5<\/span>);
<\/span>SetPositionSize<\/span>( <\/span>20<\/span>, <\/span>spsPercentOfEquity <\/span>);
<\/span>PositionScore <\/span>= <\/span>ROC<\/span>( <\/span>Close<\/span>, <\/span>252 <\/span>)<\/code>
Then, to trade only long positions, we should change PositionScore defintion for example to:<\/p>
PositionScore <\/span>= <\/span>1000 <\/span>+ <\/span>ROC<\/span>( <\/span>Close<\/span>, <\/span>252 <\/span>); <\/span>\/\/ make sure it is positive by adding big constan<\/code>
This way our scores will remain positive and that will effectively disable short trades.<\/p>
More information about the rotational mode of the backtester can be found in the manual: http:\/\/www.amibroker.com\/guide\/afl\/enablerotationaltrading.html<\/a><\/p>","protected":false},"excerpt":{"rendered":"