<a id="skfolio-descriptor-growthrate"></a>

# skfolio.descriptor.GrowthRate

<a id="skfolio.descriptor.GrowthRate"></a>

### *class* skfolio.descriptor.GrowthRate(field, lag)

Period-over-period growth rate descriptor.

Computes the growth rate of a characteristic over a fixed lag:

$$
\text{growth}(t) = \frac{x(t)}{x(t - \text{lag})} - 1
$$

The first `lag` observations are NaN because no lagged history is available.

This descriptor is intended for non-negative fields such as sales, total assets,
capital expenditure or shares outstanding. NaNs are allowed as missing observations
and propagate when either the current or lagged value is missing. It raises a
`ValueError` for negative or infinite values. Zero values are allowed and a zero
lagged value makes the growth rate undefined and produces NaN.

For fields that can be negative, such as net income or EPS, use
[`EarningsChangeToPrice`](https://skfolio.org/generated/skfolio.descriptor.EarningsChangeToPrice.html.md#skfolio.descriptor.EarningsChangeToPrice) instead. It
normalizes the level change by market capitalization and does not rely on a positive
base value.

This is the standard period-over-period growth rate used in anomaly and
investment-style factors. For trailing-twelve-month (TTM) fields with a one-year
lag, the two observations cover non-overlapping fiscal content, so intermediate
quarterly filings contribute to the comparison.

Other growth definitions exist, including regression-based multi-year trend growth
and compound annual growth rate (CAGR). For positive values, CAGR is monotonic in
simple growth and gives the same cross-sectional ranks.

Common investment-factor descriptors:

* Asset growth (`field="total_assets"`): year-over-year balance-sheet expansion.
  Firms with rapid asset growth tend to earn lower future returns [[1]](#r18d27a2efc06-1).
* Issuance growth (`field="adj_shares_outstanding"`): year-over-year change in
  split-adjusted shares outstanding. Net share issuance is a negative predictor of
  future returns, independent of size, value and momentum [[2]](#r18d27a2efc06-2).
* Capital expenditure growth (`field="capex_ttm"`): year-over-year change in
  trailing capital expenditure. Firms with large capex increases subsequently
  underperform, consistent with investor under-reaction to overinvestment [[3]](#r18d27a2efc06-3).

* **Parameters:**
  **field** *str*
  : Field name in the [`AssetPanel`](https://skfolio.org/generated/skfolio.containers.AssetPanel.html.md#skfolio.containers.AssetPanel) to compute growth
    for. Non-missing values must be finite and non-negative.

  **lag** *int*
  : Number of observations to look back. The interpretation depends on the data
    frequency: `lag=12` means 1 year for monthly data, `lag=252` for daily data,
    `lag=4` for quarterly data.
* **Attributes:**
  **n_assets_** *int*
  : Number of assets seen during fitting.

  **asset_names_** *ndarray of shape (n_assets,)*
  : Asset names seen during fitting.

  **growth_rate_** *ndarray of shape (n_assets,)*
  : Last growth rate value for each asset.

### Methods

| [`fit_transform`](#skfolio.descriptor.GrowthRate.fit_transform)(X[, y])         | Compute simple growth rates of the configured field.   |
|--------------------------------------------------------------------------------|--------------------------------------------------------|
| [`get_metadata_routing`](#skfolio.descriptor.GrowthRate.get_metadata_routing)()        | Get metadata routing of this object.                   |
| [`get_params`](#skfolio.descriptor.GrowthRate.get_params)([deep])            | Get parameters for this estimator.                     |
| [`partial_fit_transform`](#skfolio.descriptor.GrowthRate.partial_fit_transform)(X[, y]) | Compute simple growth rates of the configured field.   |
| [`set_params`](#skfolio.descriptor.GrowthRate.set_params)(\*\*params)        | Set the parameters of this estimator.                  |

### References

* <a id='r18d27a2efc06-1'>**[1]**</a> “Asset growth and the cross-section of stock returns” The Journal of Finance. Cooper, M. J., Gulen, H., & Schill, M. J. (2008).
* <a id='r18d27a2efc06-2'>**[2]**</a> “Share issuance and cross-sectional returns” The Journal of Finance. Pontiff, J., & Woodgate, A. (2008).
* <a id='r18d27a2efc06-3'>**[3]**</a> “Capital investments and stock returns” Journal of Financial and Quantitative Analysis. Titman, Wei & Xie (2004).

### Examples

```pycon
>>> from skfolio.descriptor import GrowthRate
>>>
>>> # 1-year sales growth
>>> sales_growth = GrowthRate("sales_ttm", lag=252)
>>>
>>> # 1-year asset growth
>>> asset_growth = GrowthRate("total_assets", lag=252)
>>>
>>> # 1-year share issuance growth
>>> issuance_growth = GrowthRate("adj_shares_outstanding", lag=252)
```

<a id="skfolio.descriptor.GrowthRate.fit_transform"></a>

#### fit_transform(X, y=None, \*\*fit_params)

Compute simple growth rates of the configured field.

* **Parameters:**
  **X** *AssetPanel*
  : Input panel containing the `field` characteristic configured at
    construction.

  **y** *None*
  : Ignored. Present for compatibility with scikit-learn’s API.

  **\*\*fit_params** *dict*
  : Additional fit parameters. Ignored.
* **Returns:**
  **growth_rate** *ndarray of shape (n_observations, n_assets)*
  : Period-over-period growth rate for each observation and asset.

<a id="skfolio.descriptor.GrowthRate.get_metadata_routing"></a>

#### get_metadata_routing()

Get metadata routing of this object.

Please check [User Guide](https://skfolio.org/user_guide/metadata_routing.html.md#metadata-routing) on how the routing
mechanism works.

* **Returns:**
  **routing** *MetadataRequest*
  : A `MetadataRequest` encapsulating
    routing information.

<a id="skfolio.descriptor.GrowthRate.get_params"></a>

#### get_params(deep=True)

Get parameters for this estimator.

* **Parameters:**
  **deep** *bool, default=True*
  : If True, will return the parameters for this estimator and
    contained subobjects that are estimators.
* **Returns:**
  **params** *dict*
  : Parameter names mapped to their values.

<a id="skfolio.descriptor.GrowthRate.partial_fit_transform"></a>

#### partial_fit_transform(X, y=None, \*\*fit_params)

Compute simple growth rates of the configured field.

This method supports online updates by continuing from the current fitted state.
Use `fit_transform` to start from a clean state.

* **Parameters:**
  **X** *AssetPanel*
  : Input panel containing the `field` characteristic configured at construction.

  **y** *None*
  : Ignored. Present for compatibility with scikit-learn’s API.

  **\*\*fit_params** *dict*
  : Additional fit parameters. Ignored.
* **Returns:**
  **growth_rate** *ndarray of shape (n_observations, n_assets)*
  : Period-over-period growth rate for each observation and asset.

<a id="skfolio.descriptor.GrowthRate.set_params"></a>

#### set_params(\*\*params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects
(such as `Pipeline`). The latter have
parameters of the form `<component>__<parameter>` so that it’s
possible to update each component of a nested object.

* **Parameters:**
  **\*\*params** *dict*
  : Estimator parameters.
* **Returns:**
  **self** *estimator instance*
  : Estimator instance.

