Position Question when use RankPos

When I want to spend all cash and keep 20 stocks in my position after rule and rank, I use RankPos and seems something wrong with the position

I use buy rules:
NetIncCFStmtQ > 0 & OperCashFlQ > 0 & PEExclXorTTM > 0
ROE%TTM > 15
RankPos <= 20

sell rules:
RankPos > 20

Result:
Position seems not 20 and some cash not use



Need help indeed. THX anyway

So you don’t need the "RankPos <= 20 " Buy rule. Remove that and I think it’ll work

The simulation is just indicating that some of the top 20 ranked stocks fail to meet the requirements;

NetIncCFStmtQ > 0 & OperCashFlQ > 0 & PEExclXorTTM > 0
ROE%TTM > 15

Relax your requirements to increase the number of holdings.

Walter

Agree with this. Some of the stocks ranked 20 or less do not meet the above criteria and never make into the portfolio and you end up having fewer than 20 to buy.