Morgan Stanley Interview Question

Pseudo-code, knowledge of librairies, Python