trackerr(): number
Tracking Error (ex-post).
Ex-post tracking error, which measures the standard deviation of the difference between portfolio returns and benchmark returns.
Single asset tracking error
Single asset tracking error
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]; const z = [0.04, -0.022, 0.043, 0.028, -0.078, -0.011, 0.033, -0.049, 0.09, 0.087]; assertEquals(trackerr(x, z), 0.06843618276256436);
Different portfolio tracking error
Different portfolio tracking error
import { assertEquals } from "jsr:@std/assert"; const z = [0.04, -0.022, 0.043, 0.028, -0.078, -0.011, 0.033, -0.049, 0.09, 0.087]; const y = [-0.005, 0.081, 0.04, -0.037, -0.061, 0.058, -0.049, -0.021, 0.062, 0.058]; assertEquals(trackerr(y, z), 0.058621668348828156);
trackerr(): array | matrix
Tracking Error (ex-post).
Ex-post tracking error, which measures the standard deviation of the difference between portfolio returns and benchmark returns.
Single asset tracking error
Single asset tracking error
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]; const z = [0.04, -0.022, 0.043, 0.028, -0.078, -0.011, 0.033, -0.049, 0.09, 0.087]; assertEquals(trackerr(x, z), 0.06843618276256436);
Different portfolio tracking error
Different portfolio tracking error
import { assertEquals } from "jsr:@std/assert"; const z = [0.04, -0.022, 0.043, 0.028, -0.078, -0.011, 0.033, -0.049, 0.09, 0.087]; const y = [-0.005, 0.081, 0.04, -0.037, -0.061, 0.058, -0.049, -0.021, 0.062, 0.058]; assertEquals(trackerr(y, z), 0.058621668348828156);