Of course, as soon as I posted this, I got the idea to search "rotation" and found EnableRotationalTrading() !
Does anyone know if there's a way to not let this mode buy more of the same stocks one already owns ? Thanks, HB --- In [email protected], "hmab1" <[EMAIL PROTECTED]> wrote: > > Hello, > > It's been a while since I've done some AFL and I'm just getting back > into system building again. So I'm a bit rusty ;) > > I'm trying to build a system that ranks all stocks based on a certain > position score. At the first trading day of every month, I want to > rebalance the portfolio by making sure that I'm holding the top 5 > stocks based on this score. > > How would I accomplish such a thing ? > > I know how to calculate the score and how to determine the beginning > of the month but how do I: > - determine the top 5 for that day > - determine if the stocks I'm currently holding are in these top 5 > - if what I'm holding is not in these top 5 then sell whatever is not > in the top 5 and buy the highest ranking stock(s) from these top 5 to > bring my portfolio size back up to 5 stocks > > I'm drowning in valuewhen, cum, and sum so any tips would be much > appreciated. > > Thanks, > HB >
