-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Description
Noticed an issue in the DrawdownPeak private function when trying to calculate a Ulcer Index myself using the Drawdowns function.
Seems to me DrawdownPeak may be an old implementation of Drawdowns that never got swapped in some older functions.
Issue is returns are divided by 100 at one point, compounded and then multiplied back by 100. So it seems to assumes percent returns are passed in as integers instead of decimals. It seems to me in the rest of the package decimal returns are always expected so seems to fall out of place.
The fix is simple, just remove the divide by 100 and multiply by 100. That makes drawdown results match those returned by the Drawdowns function.
val = val * (1 + R[j]/100)
drawdownpeak[i] = (val - 1) * 100
Metadata
Metadata
Assignees
Labels
No labels