maxDrawdown function

caclulate the maximum drawdown from peak equity