backtestRegular with ranking across existing signals

Hi,

Two quesitons:

  1. Is it possible to filter the signals, even in backtestRotational mode? Say, you provide a PositionScore which will rank your entries, then you limit the entries to a MAX value ... still you would also like to vary the ranking for each day (say of daily bars for a basket). Something like a switch-off trigger, or an on/off layer on top of the existing "always in" backtestRotational mode?

  2. In the normal backtestRegular mode, one can limit the number of long/short open positions, still is there a ranking functionality possible across generated entries? (I mean, an elegant way, other than going through the for loop for all instruments)

Yes, it is all possible, read the Users' Guide
https://www.amibroker.com/guide/h_portfolio.html
https://www.amibroker.com/f?enablerotationaltrading
https://www.amibroker.com/f?setoption

To answer your first question, in backtestRotational mode, you can limit the number of entries by using the SetOption("MaxOpenPositions", n) function, where n is the maximum number of open positions allowed at any given time.

Regarding your second question, in backtestRegular mode, you can limit the number of long/short open positions using the SetOption("MaxOpenLong") and SetOption("MaxOpenShort") functions.

Everything is described in great detail there

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