Compare Groups
Implementation details
Class names
| Model name | Parameters class | Data class |
|---|---|---|
CompareGroups | CompareGroupsQueryParams | CompareGroupsData |
Import Statement
from openbb_core.provider.standard_models.compare_groups import (
CompareGroupsData,
CompareGroupsQueryParams,
)
Parameters
- standard
- finviz
group: Literal['sector', 'industry', 'country', 'capitalization', 'energy', 'materials', 'industrials', 'consumer_cyclical', 'consumer_defensive', 'healthcare', 'financial', 'technology', 'communication_services', 'utilities', 'real_estate']
Default: sector
US-listed stocks only. When an individual sector is selected, it is broken down by industry. The default is 'sector'.
metric: Literal['performance', 'valuation', 'overview']
Default: performance
Statistical metric to return. Select from: ['performance', 'valuation', 'overview'] The default is 'performance'.
Data
- standard
- finviz
name: str
Name or label of the group.
stocks: int
The number of stocks in the group.
market_cap: int
The market cap of the group.
performance_1d: float
The performance in the last day, as a normalized percent.
performance_1w: float
The performance in the last week, as a normalized percent.
performance_1m: float
The performance in the last month, as a normalized percent.
performance_3m: float
The performance in the last quarter, as a normalized percent.
performance_6m: float
The performance in the last half year, as a normalized percent.
performance_1y: float
The performance in the last year, as a normalized percent.
performance_ytd: float
The performance in the year to date, as a normalized percent.
dividend_yield: float
The dividend yield of the group, as a normalized percent.
pe: float
The P/E ratio of the group.
forward_pe: float
The forward P/E ratio of the group.
peg: float
The PEG ratio of the group.
eps_growth_past_5y: float
The EPS growth of the group for the past 5 years, as a normalized percent.
eps_growth_next_5y: float
The estimated EPS growth of the groupo for the next 5 years, as a normalized percent.
sales_growth_past_5y: float
The sales growth of the group for the past 5 years, as a normalized percent.
float_short: float
The percent of the float shorted for the group, as a normalized value.
analyst_recommendation: float
The analyst consensus, on a scale of 1-5 where 1 is a buy and 5 is a sell.
volume: int
The trading volume.
volume_average: int
The 3-month average volume of the group.
volume_relative: float
The relative volume compared to the 3-month average volume.