Rotational backtester - how to create a weighted porftolio

Hi, I how would I use the rotational backtester to create a weighted portfolio, such as below?

40% QQQ (only if ROC(C, 125) >=0), else stay in cash
30% AAPL (only if ROC(C, 125 >= 0), else stay in cash
15% MSFT (only if ROC(C, 125 >= 0), else stay in cash
15% BIDU (only if ROC(C, 125 >= 0), else stay in cash

Thank you :slight_smile:

Please review the forum and knowledgebase more carefully, there are many discussions and examples about rotational strategies. Try keyword searches for words like “rotational,” “rebalance” and “position size.”
For your specific question, I suggest starting with Position size with multiple conditions for ideas.

You don’t need rotational to implement this. The system is regular and uses constant allocation. Super easy.

r = ROC( C, 125 );
Buy = r >= 0;
Sell = r < 0;

pct = IIF( Name() == "QQQ", 40, 
         IIF( Name() == "AAPL", 30, 
         IIF( Name() == "MSFT", 15, 
         15 ) ) ); // default

SetPositionSize( pct, spsPercentOfEquity );
1 Like

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