Sector P/E
Returns sector price-to-earnings (P/E) ratios of the companies listed on an exchange (NASDAQ by default) in each sector. Provide exactly one of date (a snapshot across all sectors on that date) or sector (the historical time series for one sector).
Also known as: sector P/E snapshot, sector P/E history, sector valuation trend.
Sector P/E in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_sector_pe as shown below.
from financetoolkit import Discovery
discovery = Discovery(api_key="FINANCIAL_MODELING_PREP_KEY")
sector_pe = discovery.get_sector_pe(date="2024-02-01")
sector_pe.head()
sector_pe_history = discovery.get_sector_pe(sector="Energy")
sector_pe_history.tail()
Or, after setting up the Finance Toolkit MCP, ask:
What was the P/E ratio of NASDAQ-listed energy stocks on each trading day from 19 to 23 October 2026?
Which returns:
| Date | Sector | Exchange | PE Ratio |
|---|---|---|---|
| 2026-10-19 00:00:00 | Energy | NASDAQ | 14.6685 |
| 2026-10-20 00:00:00 | Energy | NASDAQ | 14.5791 |
| 2026-10-21 00:00:00 | Energy | NASDAQ | 14.6875 |
| 2026-10-22 00:00:00 | Energy | NASDAQ | 14.2938 |
| 2026-10-23 00:00:00 | Energy | NASDAQ | 14.8163 |
Parameters
get_sector_pe accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
date | str | The date to retrieve a snapshot for, e.g. “2024-02-01”. Defaults to None. | "2025-03-31" |
sector | str | The sector to retrieve the history for, e.g. “Energy”. Defaults to None. | "Technology" |
start_date | str | The start of the history of one sector. Defaults to a year ago. | "2025-01-01" |
end_date | str | The end of the history of one sector. Defaults to today. | "2025-12-31" |
exchange | str | The exchange whose companies are averaged, “NASDAQ”, “NYSE” or “AMEX”. Defaults to “NASDAQ”. | "NASDAQ" |