added calcMaxDrawdown.