FactSet interview question

The coding interview includes pseudocode and python implementation