Question d’entretien chez FactSet

How would you simplify this code?