groups
Get company data grouped by sector, industry or country and display either performance or valuation metrics.
Valuation metrics include price to earnings, price to book, price to sales ratios and price to cash flow. Performance metrics include the stock price change for different time periods.
Parameters
- standard
- finviz
group: Literal['sector', 'industry', 'country', 'capitalization', 'energy', 'materials', 'industrials', 'consumer_cyclical', 'consumer_defensive', 'healthcare', 'financial', 'technology', 'communication_services', 'utilities', 'real_estate'] | None
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'] | None
Default: performance
Statistical metric to return. Select from: ['performance', 'valuation', 'overview'] The default is 'performance'.
Returns
results: CompareGroups
Serializable results.
provider: Optional[Literal['finviz']]
Provider name.
warnings: Optional[list[Warning_]]
list of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- standard
- finviz
name: str
Name or label of the group.
stocks: int | None
The number of stocks in the group.
market_cap: int | None
The market cap of the group.
performance_1d: float | None
The performance in the last day, as a normalized percent.
performance_1w: float | None
The performance in the last week, as a normalized percent.
performance_1m: float | None
The performance in the last month, as a normalized percent.
performance_3m: float | None
The performance in the last quarter, as a normalized percent.
performance_6m: float | None
The performance in the last half year, as a normalized percent.
performance_1y: float | None
The performance in the last year, as a normalized percent.
performance_ytd: float | None
The performance in the year to date, as a normalized percent.
dividend_yield: float | None
The dividend yield of the group, as a normalized percent.
pe: float | None
The P/E ratio of the group.
forward_pe: float | None
The forward P/E ratio of the group.
peg: float | None
The PEG ratio of the group.
eps_growth_past_5y: float | None
The EPS growth of the group for the past 5 years, as a normalized percent.
eps_growth_next_5y: float | None
The estimated EPS growth of the groupo for the next 5 years, as a normalized percent.
sales_growth_past_5y: float | None
The sales growth of the group for the past 5 years, as a normalized percent.
float_short: float | None
The percent of the float shorted for the group, as a normalized value.
analyst_recommendation: float | None
The analyst consensus, on a scale of 1-5 where 1 is a buy and 5 is a sell.
volume: int | None
The trading volume.
volume_average: int | None
The 3-month average volume of the group.
volume_relative: float | None
The relative volume compared to the 3-month average volume.