sortino(): number
Sortino Ratio.
Calculates the Sortino ratio, a risk-adjusted performance measure that uses downside risk instead of standard deviation. It measures the return of an investment relative to the risk of negative returns.
Sortino ratio for a single asset
Sortino ratio for a single asset
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(sortino(x), 5.062884553295679);
x: array
Asset/portfolio returns
sortino(): array | matrix
Sortino Ratio.
Calculates the Sortino ratio, a risk-adjusted performance measure that uses downside risk instead of standard deviation. It measures the return of an investment relative to the risk of negative returns.
Sortino ratio for a single asset
Sortino ratio for a single asset
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(sortino(x), 5.062884553295679);
x: matrix
Asset/portfolio returns