April 17, 2016
Long-only rotational back-test
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.
Since there are no signals used, only PositionScore assigned to given symbol matters.
It is worth noting that in case of rotational test, the Positions 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.
In the rotational mode the trades are driven by values of PositionScore variable alone.
- higher positive score means better candidate for entering long trade
- lower negative score means better candidate for entering short trade
As you can see the SIGN of PositionScore variable decides whenever it is long or short.
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:
SetBacktestMode( backtestRotational );
SetPositionSize( 20, spsPercentOfEquity );
PositionScore = ROC( Close, 252 )
Then, to trade only long positions, we should change PositionScore defintion for example to:
PositionScore = 1000 + ROC( Close, 252 ); // make sure it is positive by adding big constan
This way our scores will remain positive and that will effectively disable short trades.
More information about the rotational mode of the backtester can be found in the manual: http://www.amibroker.com/guide/afl/enablerotationaltrading.html
Filed by Tomasz Janeczko at 9:59 pm under General
Comments Off on Long-only rotational back-test