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

# skfolio.descriptor.AccrualsCashFlow

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

### *class* skfolio.descriptor.AccrualsCashFlow

Cash-flow statement accruals descriptor.

Computes the non-cash component of earnings, scaled by total assets:

$$
\text{accruals\_cash\_flow}(t) =
\frac{\text{net\_income\_ttm}(t) - \text{operating\_cash\_flow\_ttm}(t)}
     {\text{total\_assets}(t)}
$$

High accruals indicate that reported earnings substantially exceed cash generated
from operations. Empirically, firms with high accruals tend to have less persistent
earnings and lower future returns, a pattern known as the accrual anomaly [[1]](#ra0753b7fd962-1).

This cash-flow statement version is preferred over the balance-sheet version because
it requires fewer line items and is less sensitive to data-provider mapping
differences. The balance-sheet version (which computes accruals from changes in
working capital items) can be pre-computed and fed via [`Passthrough`](https://skfolio.org/generated/skfolio.descriptor.Passthrough.html.md#skfolio.descriptor.Passthrough) if
needed.

* **Parameters:**
  **None**
* **Attributes:**
  **n_assets_** *int*
  : Number of assets seen during fitting.

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

### Methods

| [`fit_transform`](#skfolio.descriptor.AccrualsCashFlow.fit_transform)(X[, y])         | Compute accruals scaled by total assets.       |
|--------------------------------------------------------------------------------|------------------------------------------------|
| [`get_metadata_routing`](#skfolio.descriptor.AccrualsCashFlow.get_metadata_routing)()        | Get metadata routing of this object.           |
| [`get_params`](#skfolio.descriptor.AccrualsCashFlow.get_params)([deep])            | Get parameters for this estimator.             |
| [`partial_fit_transform`](#skfolio.descriptor.AccrualsCashFlow.partial_fit_transform)(X[, y]) | Stateless class delegation to `fit_transform`. |
| [`set_params`](#skfolio.descriptor.AccrualsCashFlow.set_params)(\*\*params)        | Set the parameters of this estimator.          |

#### SEE ALSO
[`ReturnOnAssets`](https://skfolio.org/generated/skfolio.descriptor.ReturnOnAssets.html.md#skfolio.descriptor.ReturnOnAssets)
: Net income-based profitability per unit of assets.

[`CashFlowToAssets`](https://skfolio.org/generated/skfolio.descriptor.CashFlowToAssets.html.md#skfolio.descriptor.CashFlowToAssets)
: Cash flow-based profitability per unit of assets.

### Notes

The sign convention follows the academic literature: a positive value means earnings
exceed cash flow (high accruals, lower quality), while a negative value means cash
flow exceeds earnings (low accruals, higher quality).

### References

* <a id='ra0753b7fd962-1'>**[1]**</a> “Do stock prices fully reflect information in accruals and cash flows about future earnings?” The Accounting Review. Sloan, R. G. (1996).

### Examples

```pycon
>>> from skfolio.datasets import make_synthetic_characteristics
>>> from skfolio.descriptor import AccrualsCashFlow
>>>
>>> X = make_synthetic_characteristics()
>>>
>>> descriptor = AccrualsCashFlow()
>>> accruals_cash_flow = descriptor.fit_transform(X)
```

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

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

Compute accruals scaled by total assets.

* **Parameters:**
  **X** *AssetPanel*
  : Input panel containing `net_income_ttm`, `operating_cash_flow_ttm`, and
    `total_assets`.

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

  **\*\*fit_params** *dict*
  : Additional fit parameters. Ignored.
* **Returns:**
  **accruals_cash_flow** *ndarray of shape (n_observations, n_assets)*
  : Accruals (net income minus operating cash flow) divided by total assets
    for each observation and asset.

<a id="skfolio.descriptor.AccrualsCashFlow.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.AccrualsCashFlow.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.AccrualsCashFlow.partial_fit_transform"></a>

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

Stateless class delegation to `fit_transform`.

<a id="skfolio.descriptor.AccrualsCashFlow.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.

