deprecated

Deprecated legacy yoy/qoq/mom DSL functions

We have deprecated these legacy DSL functions for calculating change/relative change: yoy(), yoy_relative(), qoq(), qoq_relative(), mom(), mom_relative().

Users should use the change() and relative_change() functions for temporal change (announcement, reference).

📘

Deprecation date: January 2023 (function still available, with a deprecation warning)
Planned removal date: January 2024 (function will no longer work)

The rationale for this deprecation is to standardize all temporal change calculations to use the same logic now in change() and relative_change(). These legacy functions also resampled the input signal to a quarterly frequency by default, which was unintuitive and made them difficult to use with high-frequency signals.

Migration

  • signal.yoy()signal.change(years=1)
  • signal.yoy_relative()signal.relative_change(years=1)
  • signal.qoq()signal.change(months=3)
  • signal.qoq_relative()signal.relative_change(months=3)
  • signal.mom()signal.change(months=1)
  • signal.mom_relative()signal.relative_change(months=1)

Note that because the legacy functions also include a resampling step, to achieve exactly the same result as before, you would actually change signal.yoy() to signal.resample('QS', 'last').change(years=1). This new expression is now a lot more explicit about what transformations are applied.