how to calculate max drawdown for historical returns in