c_last_twelve_months_revenue#

c_last_twelve_months_revenue(fis_revenues, f_fiscal_year, f_fiscal_period, configuration)[source]

Calculate the last twelve months revenue (LTM revenue).

For quarterly periods this function computes the rolling sum of revenues over the last four quarters.

Parameters:
  • fis_revenues (DataColumn) – The total revenues for each period.

  • f_fiscal_year (DataColumn) – The fiscal year for each period.

  • f_fiscal_period (DataColumn) – The fiscal period (e.g., quarter) within each fiscal year.

  • configuration (Configuration) – Configuration object with attribute period (“quarterly” or “annual”).

Returns:

The last twelve months revenue.

Return type:

DataColumn

Notes

For quarterly data, LTM revenue is the rolling sum of the current and previous three quarters:

\[\mathrm{LTM\ Revenue}_t = \sum_{i=0}^{3} \mathrm{Revenue}_{t-i}\]

For annual data, return the period revenue directly.