WorldQuant Interview Question

Coding challenge - Moving average