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
