skfolio.descriptor.ShortInterest#
- class skfolio.descriptor.ShortInterest[source]#
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] [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(X[, y])Compute short interest.
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
DaysToCoverEWMA-smoothed days to cover (short interest / volume).
Notes
short_interestis the number of shares held short. Non-missing values must be finite and non-negative.adj_shares_outstandingis common shares outstanding. Non-missing values must be finite and strictly positive.Both fields must use the same split-adjustment basis.
References
[1]“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).
[2]“Short interest and aggregate stock returns” Journal of Financial Economics. Rapach, D. E., Ringgenberg, M. C., & Zhou, G. (2016).
Examples
>>> from skfolio.datasets import make_synthetic_characteristics >>> from skfolio.descriptor import ShortInterest >>> >>> X = make_synthetic_characteristics() >>> >>> descriptor = ShortInterest() >>> short_interest = descriptor.fit_transform(X)
- fit_transform(X, y=None, **fit_params)[source]#
Compute short interest.
- Parameters:
- XAssetPanel
Input panel containing
short_interestandadj_shares_outstanding.- yNone
Ignored. Present for compatibility with scikit-learn’s API.
- **fit_paramsdict
Additional fit parameters. Ignored.
- Returns:
- short_interestndarray of shape (n_observations, n_assets)
Short interest divided by adjusted shares outstanding 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.