Hello,
The data is series of positive and negative values in a column from which I need to extract the max drawdown as follows:
Start summing up the values from occurrence of a negative value. The consecutive values are added into the sum until the sum turns positive. The last maximum negative value, before it turns positive, is the drawdown.
After resetting the sum to zero, summing begins again when it finds the next negative number and the result becomes drawdown only if it is lesser than the last calculated drawdown.
After going through the whole row, Max. Drawdown is obtained.
I've tried a lot to find answer but available responses are to reset the operation when a positive value is encountered. I need to reset the value only if the sum itself becomes positive.
Appreciate any help.
Bookmarks