skfolio.descriptor.AccrualsCashFlow#
- class skfolio.descriptor.AccrualsCashFlow[source]#
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].
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
Passthroughif 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(X[, y])Compute accruals scaled by total assets.
Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
partial_fit_transform(X[, y])Stateless class delegation to
fit_transform.set_params(**params)Set the parameters of this estimator.
See also
ReturnOnAssetsNet income-based profitability per unit of assets.
CashFlowToAssetsCash 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
[1]“Do stock prices fully reflect information in accruals and cash flows about future earnings?” The Accounting Review. Sloan, R. G. (1996).
Examples
>>> 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)
- fit_transform(X, y=None, **fit_params)[source]#
Compute accruals scaled by total assets.
- Parameters:
- XAssetPanel
Input panel containing
net_income_ttm,operating_cash_flow_ttm, andtotal_assets.- yNone
Ignored. Present for compatibility with scikit-learn’s API.
- **fit_paramsdict
Additional fit parameters. Ignored.
- Returns:
- accruals_cash_flowndarray of shape (n_observations, n_assets)
Accruals (net income minus operating cash flow) divided by total assets for each observation and asset.
- get_metadata_routing()#
Get metadata routing of this object.
Please check User Guide on how the routing mechanism works.
- Returns:
- routingMetadataRequest
A
MetadataRequestencapsulating routing information.
- get_params(deep=True)#
Get parameters for this estimator.
- Parameters:
- deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators.
- Returns:
- paramsdict
Parameter names mapped to their values.
- partial_fit_transform(X, y=None, **fit_params)#
Stateless class delegation to
fit_transform.
- 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:
- **paramsdict
Estimator parameters.
- Returns:
- selfestimator instance
Estimator instance.