![]() Pos_peak2 = np.argmax(xs) # start of period Xs)/np.maximum.accumulate(xs)) # end of the period Pos_min2 = np.argmax((np.maximum.accumulate(xs). Pos_peak1 = np.argmax(xs) # start of period ![]() Pos_min1 = np.argmax(np.maximum.accumulate(xs) - xs) # end of the period ( np.maximum.accumulate(xs) - xs ) / np.maximum.accumulate(xs)Ī short example for prooving that formula given by behzad.nouri can produce wrong result. You just need to divide this drop in nominal value by the maximum accumulated amount to get the relative ( % ) drawdown. I = np.argmax(np.maximum.accumulate(xs) - xs) # end of the period Related code (from behzad.nouri) below: n = 1000
0 Comments
Leave a Reply. |