ulcerindex(): number
Ulcer Index.
Ulcer Index of Peter G. Martin (1987). The impact of long, deep drawdowns will have significant impact because the underperformance since the last peak is squared. The formula is: sqrt(sum(dd^2) / n), where dd is the drawdown and n is the number of observations.
Single array of returns
Single array of returns
import { assertEquals } from "jsr:@std/assert"; const x = [0.003, 0.026, 0.015, -0.009, 0.014, 0.024, 0.015, 0.066, -0.014, 0.039]; assertEquals(ulcerindex(x), 0.005263078946776312);
x: array
Asset/portfolio returns
Drawdown calculation mode: 'return' or 'geometric' (defaults to 'return')
ulcerindex(): array | matrix
Ulcer Index.
Ulcer Index of Peter G. Martin (1987). The impact of long, deep drawdowns will have significant impact because the underperformance since the last peak is squared. The formula is: sqrt(sum(dd^2) / n), where dd is the drawdown and n is the number of observations.
Single array of returns
Single array of returns
import { assertEquals } from "jsr:@std/assert"; const x = [0.003, 0.026, 0.015, -0.009, 0.014, 0.024, 0.015, 0.066, -0.014, 0.039]; assertEquals(ulcerindex(x), 0.005263078946776312);
x: matrix
Asset/portfolio returns
Drawdown calculation mode: 'return' or 'geometric' (defaults to 'return')