Im writing my first full algorithm, replicating the Magic Formula.
Im running into an issue with get_fundamentals() where there are two securities for Microsoft, MSFT and MSFTV. I understand the economics of why there are two securities, but I can't find a good way to systematically filter out these kind of situations from the get_fundamentals() method.
In the example below, Im attempting to always have 5 positions but starting in early 2003 there are consistently 6 positions and one of them is MSFTV.
Does anyone know a good way of dealing with these instances? The goal is to update my universe everyday with a set of unique securities and only have 5 of them into portfolio.