Valkyrie Trading Interview Question

Look at this problem and explain to me your code/process.