Hello! First post so go easy.
I’m not sure if this post should go here or in the ‘.afl programming’ section but here goes.
In my backtest report I am getting the the following error:
‘xxx not entered because the requested size is less than MinShares/MinPosValue’.
I have set MinShares to 1 and MinPosValue to 500. I don’t know what the requested size is but I’ve setup some backtesting parameters as follows:
InitEquity = Param("Initial Capital", 25000, 10000, 1000000, 5000);
MaxPos = 20;
Tradesize = InitEquity/MaxPos;
PosType = -1;
PosType = ParamToggle("Compounded?", "Not Compounded|Compounded", 1);
if( PosType == 0)
if (PosType == 1)
This happens several times throughout the detailed backtest report. In fact, often the system does not open any more positions. I would understand if the cash available was low (less than $500 if most positions are open). However, I’ve seen times when, while the cash amount is less than the initial equity, it is still large enough to handle the requested entry. For example, I’ve seen this error happen when there is 22K in cash/equity (init equity = 25K). Position sizing is based on 5% of equity. Allowing Position size shrinking doesn’t make a difference.
The only pattern I can see is that it happens when the account is much less than the initial equity. How does this effect position sizing?
I feel like I’m missing something simple. I’ll have to give myself a smack on the back of the head when I find out.