Bloomberg Interview Question

How would you optimize this line of code?