I am having a puzzling problem when running backtestRorational. It is a simple end of day system with PositionScore based on the metric rcRankand run on a WatchList of 40 symbols. The code is posted below:
mop=Param("MaxOpenPos",3,1,10);
wrh=Param("WorstRankHeld",10,1,30);
SetBacktestMode(backtestRotational);
SetTradeDelays(0,0,0,0);
SetOption("MaxOpenPositions",mop);
SetOption("WorstRankHeld",wrh);
SetPositionSize(100/mop,spsPercentOfEquity);
PositionScore=100+rcRank;
The WatchList consists of mutual funds that can be exchanged with each other so that the funds received upon a sell can be reinvested the same day at the closing price. Common sense tells me that this should result in the system having an exposure of 100% since the portfolio equity will always be invested in the market. The backtest report however typically reports an exposure % in the 70% range, never higher than 80%. When I look at the detailed log of trades there is often a notation that says "symbol not entered because of insufficient funds or wrong position size/value" causing the system for a period of time to be invested in only two open positions instead of my desired three. There must be a setting either in the code or in the backtester settings that is causing the system exposure to be less than 100%. Does anyone have a suggestion as to what might be the problem?
Strangely (to me at least) when I change the MaxOpenPositions from three to one, then the system stays fully invested all the time and the exposure does equal 100%.
Thanks for any help.
Russell
Posted by: russellcowgill@yahoo.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
EmoticonEmoticon