CICC interview question

write a code to calculate the maxdrawdown