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

# skfolio.descriptor.DividendToPrice

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

### *class* skfolio.descriptor.DividendToPrice

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]](#r65cfbb2a5d62-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_ttm` should contain positive cash dividends paid on common shares only,
excluding preferred dividends. This is consistent with `market_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`](#skfolio.descriptor.DividendToPrice.fit_transform)(X[, y])         | Compute trailing dividend-to-price ratios.     |
|--------------------------------------------------------------------------------|------------------------------------------------|
| [`get_metadata_routing`](#skfolio.descriptor.DividendToPrice.get_metadata_routing)()        | Get metadata routing of this object.           |
| [`get_params`](#skfolio.descriptor.DividendToPrice.get_params)([deep])            | Get parameters for this estimator.             |
| [`partial_fit_transform`](#skfolio.descriptor.DividendToPrice.partial_fit_transform)(X[, y]) | Stateless class delegation to `fit_transform`. |
| [`set_params`](#skfolio.descriptor.DividendToPrice.set_params)(\*\*params)        | Set the parameters of this estimator.          |

#### SEE ALSO
[`ForwardDividendToPrice`](https://skfolio.org/generated/skfolio.descriptor.ForwardDividendToPrice.html.md#skfolio.descriptor.ForwardDividendToPrice)
: Forward (analyst-predicted) dividend yield.

[`ShareholderYield`](https://skfolio.org/generated/skfolio.descriptor.ShareholderYield.html.md#skfolio.descriptor.ShareholderYield)
: Dividend yield plus net buybacks.

### References

* <a id='r65cfbb2a5d62-1'>**[1]**</a> “Common risk factors in the returns on stocks and bonds” Journal of Financial Economics. Fama, E. F., & French, K. R. (1993).

### Examples

```pycon
>>> 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)
```

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

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

Compute trailing dividend-to-price ratios.

* **Parameters:**
  **X** *AssetPanel*
  : Input panel containing `dividends_ttm` and `market_cap`.

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

  **\*\*fit_params** *dict*
  : Additional fit parameters. Ignored.
* **Returns:**
  **dividend_to_price** *ndarray of shape (n_observations, n_assets)*
  : Dividend-to-price ratio for each observation and asset.

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

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

Stateless class delegation to `fit_transform`.

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

