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

# skfolio.descriptor.CashFlowToAssets

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

### *class* skfolio.descriptor.CashFlowToAssets

Cash flow to assets descriptor.

Computes the ratio of trailing twelve-month operating cash flow to total assets:

$$
\text{cash\_flow\_to\_assets}(t) =
\frac{\text{operating\_cash\_flow\_ttm}(t)}{\text{total\_assets}(t)}
$$

Cash flow to assets measures cash-based profitability: how much cash a firm
generates from operations per unit of assets. Unlike net income-based measures
([`ReturnOnAssets`](https://skfolio.org/generated/skfolio.descriptor.ReturnOnAssets.html.md#skfolio.descriptor.ReturnOnAssets)), operating cash flow is less directly affected by accrual
accounting choices [[1]](#r7f640f8aad96-1)..

* **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.CashFlowToAssets.fit_transform)(X[, y])         | Compute cash flow to assets.                   |
|--------------------------------------------------------------------------------|------------------------------------------------|
| [`get_metadata_routing`](#skfolio.descriptor.CashFlowToAssets.get_metadata_routing)()        | Get metadata routing of this object.           |
| [`get_params`](#skfolio.descriptor.CashFlowToAssets.get_params)([deep])            | Get parameters for this estimator.             |
| [`partial_fit_transform`](#skfolio.descriptor.CashFlowToAssets.partial_fit_transform)(X[, y]) | Stateless class delegation to `fit_transform`. |
| [`set_params`](#skfolio.descriptor.CashFlowToAssets.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.

[`CashFlowToPrice`](https://skfolio.org/generated/skfolio.descriptor.CashFlowToPrice.html.md#skfolio.descriptor.CashFlowToPrice)
: Cash flow normalized by market cap (value signal).

### Notes

Operating cash flow can be negative, so this descriptor can take negative
values.

### References

* <a id='r7f640f8aad96-1'>**[1]**</a> “Accruals, cash flows, and operating profitability in the cross section of stock returns” Journal of Financial Economics. Ball, Gerakos, Linnainmaa & Nikolaev (2016).

### Examples

```pycon
>>> from skfolio.datasets import make_synthetic_characteristics
>>> from skfolio.descriptor import CashFlowToAssets
>>>
>>> X = make_synthetic_characteristics()
>>>
>>> descriptor = CashFlowToAssets()
>>> cash_flow_to_assets = descriptor.fit_transform(X)
```

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

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

Compute cash flow to assets.

* **Parameters:**
  **X** *AssetPanel*
  : Input panel containing `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:**
  **cash_flow_to_assets** *ndarray of shape (n_observations, n_assets)*
  : Operating cash flow divided by total assets for each observation and asset.

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

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

Stateless class delegation to `fit_transform`.

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

