IDEN

← Data Explorer

Custom metrics

A series of your own, defined by a formula over stored series: + − × ÷ and brackets. It is computed from its inputs whenever it is read, and can be charted in Chart Studio, Scatter Studio and the Relationship Lab like any series.

Build without a formula

The builder writes the formula below; you can edit it before saving. n is a number of readings (e.g. 20 ≈ a month of daily data, 252 ≈ a year).

Try a formula

Write series by key (ust10y, usdidr, tvm_ID_iryy). A key that starts with a digit or has a hyphen goes in braces: {0700.HK}. Dates: the first series' dates; every other series uses its last reading on or before that date (at most 7 days earlier); nothing is interpolated. Division by zero leaves a gap.

Functions
  • pct(x, n): % change over n readings: (x_t / x_t−n − 1) × 100
  • diff(x, n): change over n readings: x_t − x_t−n
  • yoy(x): % change on a year earlier: x_t / x(last reading on or before the date a year earlier) − 1, × 100
  • yoy_diff(x): change on a year earlier: x_t − x(last reading on or before the date a year earlier)
  • mom(x): % change on a month earlier
  • mom_diff(x): change on a month earlier
  • rebase(x): 100 × x_t / x_first
  • ma(x, n): mean of the last n readings
  • sd(x, n): standard deviation (sample) of the last n readings
  • z(x, n): (x_t − mean of the last n readings) / their standard deviation
  • corr(x, y, n): Pearson correlation of the reading-to-reading changes of x and y over the last n common dates (% for prices, bp for rates, units otherwise)

Example: z(id10y - ust10y, 252) · corr(usdidr, dxy, 60) · yoy(tvm_ID_cpi)

Saved metrics (0)

No custom metric yet. Preview a formula above, then save it.