Given a 1-D array of periodic simple returns, return
(max_dd, peak_idx, trough_idx):
cumprod(1 + r)max_dd is the most negative value of equity / running_max - 1peak_idx and trough_idx locate that drawdown's peak and troughInput
[ 0.1 -0.2 -0.1 0.05 0.3 ]
Output
(-0.2799999999999999, 0, 2)