skfolio.descriptor.DividendToPrice#
- class skfolio.descriptor.DividendToPrice[source]#
Dividend-to-price ratio descriptor.
- Computes the ratio of trailing twelve-month common dividends to market
capitalization:
\[\text{dividend\_to\_price}(t) = \frac{\text{dividends\_ttm}(t)}{\text{market\_cap}(t)}\]Dividend-to-price measures the income yield that shareholders receive relative to the current market price. High-yield stocks tend to be mature, cash-generative businesses, while low-yield stocks are typically growth-oriented or retain earnings for reinvestment [1]. The dividend yield factor captures a distinct dimension of value beyond book or earnings ratios because dividends reflect management’s confidence in sustainable cash flows.
dividends_ttmshould contain positive cash dividends paid on common shares only, excluding preferred dividends. This is consistent withmarket_cap, which reflects common equity.This descriptor uses aggregate quantities (dividends paid divided by market capitalization) rather than per-share quantities (dividends per share divided by split-adjusted close price). The two are mathematically equivalent when the price and per-share dividend use the same split-adjustment basis:
\[\frac{\text{dividends\_ttm}}{\text{market\_cap}} = \frac{\text{dividends\_ttm} / \text{shares\_out}}{\text{adj\_close}} = \frac{\text{dps\_ttm}}{\text{adj\_close}}\]The aggregate form is preferred because it avoids subtle split-adjustment mismatches between numerator and denominator. Aggregate fundamentals are the primary form from data providers and per-share quantities are derived from them.
- 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 trailing dividend-to-price ratios.
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
ForwardDividendToPriceForward (analyst-predicted) dividend yield.
ShareholderYieldDividend yield plus net buybacks.
References
[1]“Common risk factors in the returns on stocks and bonds” Journal of Financial Economics. Fama, E. F., & French, K. R. (1993).
Examples
>>> from skfolio.datasets import make_synthetic_characteristics >>> from skfolio.descriptor import DividendToPrice >>> >>> X = make_synthetic_characteristics() >>> >>> descriptor = DividendToPrice() >>> dividend_to_price = descriptor.fit_transform(X)
- fit_transform(X, y=None, **fit_params)[source]#
Compute trailing dividend-to-price ratios.
- Parameters:
- XAssetPanel
Input panel containing
dividends_ttmandmarket_cap.- yNone
Ignored. Present for compatibility with scikit-learn’s API.
- **fit_paramsdict
Additional fit parameters. Ignored.
- Returns:
- dividend_to_pricendarray of shape (n_observations, n_assets)
Dividend-to-price ratio 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.