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

# skfolio.descriptor.ShortInterest

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

### *class* skfolio.descriptor.ShortInterest

Short interest descriptor.

Computes the ratio of shares sold short to common shares outstanding:

$$
\text{short\_interest}(t) =
\frac{\text{short\_interest}(t)}
     {\text{adj\_shares\_outstanding}(t)}
$$

Short interest measures the fraction of common shares outstanding that have been
borrowed and sold short. High values indicate stronger bearish positioning and may
proxy for informed negative sentiment [[1]](#r3408170d7b7b-1) [[2]](#r3408170d7b7b-2).

* **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.ShortInterest.fit_transform)(X[, y])         | Compute short interest.                        |
|--------------------------------------------------------------------------------|------------------------------------------------|
| [`get_metadata_routing`](#skfolio.descriptor.ShortInterest.get_metadata_routing)()        | Get metadata routing of this object.           |
| [`get_params`](#skfolio.descriptor.ShortInterest.get_params)([deep])            | Get parameters for this estimator.             |
| [`partial_fit_transform`](#skfolio.descriptor.ShortInterest.partial_fit_transform)(X[, y]) | Stateless class delegation to `fit_transform`. |
| [`set_params`](#skfolio.descriptor.ShortInterest.set_params)(\*\*params)        | Set the parameters of this estimator.          |

#### SEE ALSO
[`DaysToCover`](https://skfolio.org/generated/skfolio.descriptor.DaysToCover.html.md#skfolio.descriptor.DaysToCover)
: EWMA-smoothed days to cover (short interest / volume).

### Notes

`short_interest` is the number of shares held short. Non-missing values must be
finite and non-negative.

`adj_shares_outstanding` is common shares outstanding. Non-missing values must be
finite and strictly positive.

Both fields must use the same split-adjustment basis.

### References

* <a id='r3408170d7b7b-1'>**[1]**</a> “An investigation of the informational role of short interest in the Nasdaq market” The Journal of Finance. Desai, H., Ramesh, K., Thiagarajan, S. R., & Balachandran, B. V. (2002).
* <a id='r3408170d7b7b-2'>**[2]**</a> “Short interest and aggregate stock returns” Journal of Financial Economics. Rapach, D. E., Ringgenberg, M. C., & Zhou, G. (2016).

### Examples

```pycon
>>> from skfolio.datasets import make_synthetic_characteristics
>>> from skfolio.descriptor import ShortInterest
>>>
>>> X = make_synthetic_characteristics()
>>>
>>> descriptor = ShortInterest()
>>> short_interest = descriptor.fit_transform(X)
```

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

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

Compute short interest.

* **Parameters:**
  **X** *AssetPanel*
  : Input panel containing `short_interest` and `adj_shares_outstanding`.

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

  **\*\*fit_params** *dict*
  : Additional fit parameters. Ignored.
* **Returns:**
  **short_interest** *ndarray of shape (n_observations, n_assets)*
  : Short interest divided by adjusted shares outstanding for each
    observation and asset.

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

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

Stateless class delegation to `fit_transform`.

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

