AI 原生量化投研平台AI-native quantitative research platform
正在加载…Loading…
页面仍在加载,可以继续等待,或重新加载。The page is still loading. You can keep waiting or reload.
部分页面资源未能加载,请重新加载。Some page resources could not load. Please reload.
设备当前处于离线状态,恢复连接后可以继续等待或重新加载。Your device is offline. Once connected, you can keep waiting or reload.
平台计算了申万和中信两大行业分类中一二级行业的估值指标,包括市盈率(PE)和市净率(PB),具体公式可参见数据文档。
本表提供申万和中信行业分类下一级、二级行业的估值指标,包括静态市盈率 pe_trailing、滚动市盈率 pe_ttm 和市净率 pb。每个行业分类标准下的每个行业、每个交易日一行。行业成分取自 cn_stock_industry_component,计算公式和成分股筛选规则见下文。
注:若起止时间为None,则表示当前没取到数据,请咨询客服
| 关键字 | 释意 |
|---|---|
| date | 交易日 |
| instrument | 行业代码,与 industry_code 相同 |
| industry | 行业分类标准,取值为 sw2021(申万 2021 版)、sw2014(申万 2014 版)、cs(中信) |
| 字段 | 释意 |
|---|---|
| industry_level | 行业等级:1 为一级行业,2 为二级行业。本表没有三级行业 |
| industry_code | 行业代码 |
| industry_name | 行业简称 |
| component_nums | 参与计算的成分股数量,是经过下文筛选后的数量,不是行业的全部成分股数量 |
| pe_trailing | 静态市盈率,公式见下文 |
| pe_ttm | 滚动市盈率,公式见下文 |
| pb | 市净率,公式见下文 |
以下公式中,求和范围是行业在交易日 date 通过筛选的成分股,字段均取自该交易日。
free_float_size = free_float_shares * close 自由流通市值,free_float_shares 来自 cn_stock_shares,close 来自 cn_stock_real_bar1d(未复权)total_size = total_shares * close 总市值,total_shares 来自 cn_stock_sharesratio = free_float_size / total_size 自由流通比例pe_trailing = sum(free_float_size) / sum(FE)FE = net_profit_lf * rationet_profit_lf 取自 cn_stock_financial_lf_shift,按交易日所在月份选择报告期:
pe_ttm = sum(free_float_size) / sum(FE_TTM)FE_TTM = net_profit_ttm * rationet_profit_ttm 取自 cn_stock_financial_ttm_shift,为最近 4 个季度的净利润。
pb = sum(free_float_size) / sum(total_owner_equity_lf)total_owner_equity_lf 取自 cn_stock_financial_lf_shift,为最新的所有者权益。分母直接求和,没有像市盈率那样乘以自由流通比例 ratio。
三个指标均保留 2 位小数。
cn_stock_industry_component 中该交易日、该行业分类标准下的一级、二级行业代码确定。net_profit_to_parent_shareholders_lf 和 net_profit_to_parent_shareholders_ttm 不大于 0 的股票被剔除,缺失值同样被剔除。total_owner_equity_lf 不大于 0 的股票被剔除。pe_trailing、pe_ttm、pb 在表中存为 0,不是空值。net_profit_lf 和 net_profit_ttm,两者口径不同,所以 pe_ttm 在样本数量大于 5 时仍可能为负数,已观察到的最小值为 -2063.92。pb 的分子是自由流通市值,分母是全部所有者权益,分母没有按自由流通比例折算,数值低于以总市值计算的市净率,例如 2026-10-16 中信石油石化(100000)的 pb 为 0.14。使用时请注意这一口径。component_nums 的数据类型是 int8,取值范围 -128 至 127,表中出现了大量负数取值,例如 2026-10-22 申万 2021 版电力设备(630000)为 -3、计算机(710000)为 -122,负数取值不能当作成分股数量使用。sw2021 从 2006-04-13 开始,cs 和 sw2014 从 2024-10-24 开始。sw2021 平均每个交易日的行数,2006 年约 63 行,2007 年约 17 行,2008 年起超过 150 行。component_nums,并注意上一条所述的负数问题,或者直接过滤 pb > 0。import dai
dai.query("""SELECT *FROM cn_stock_industry_valuationWHERE industry='sw2021' AND industry_level=1 AND pb > 0""", filters={"date": ["2024-01-01", "2024-10-01"]}).pl()取 2026-10-28 至 2026-11-04,按交易日、行业代码、行业分类标准排序,展示前 5 行和后 5 行。
| date | instrument | industry | industry_level | industry_code | industry_name | component_nums | pe_trailing | pe_ttm | pb |
|---|---|---|---|---|---|---|---|---|---|
| 2026-10-28 00:00:00 | 100000 | cs | 1 | 100000 | 石油石化 | 34 | 9.72 | 12.65 | 0.14 |
| 2026-10-28 00:00:00 | 101000 | cs | 2 | 101000 | 石油开采Ⅱ | 6 | 11.03 | 13.07 | 0.11 |
| 2026-10-28 00:00:00 | 102000 | cs | 2 | 102000 | 石油化工 | 20 | 7.65 | 11.18 | 0.18 |
| 2026-10-28 00:00:00 | 103000 | cs | 2 | 103000 | 油服工程 | 8 | 18.44 | 19.45 | 0.38 |
| 2026-10-28 00:00:00 | 110000 | cs | 1 | 110000 | 煤炭 | 21 | 12.13 | 13.5 | 0.3 |
| 2026-11-04 00:00:00 | 760200 | sw2021 | 2 | 760200 | 环保设备Ⅱ | 16 | 21.78 | 23.68 | 0.86 |
| 2026-11-04 00:00:00 | 770000 | sw2021 | 1 | 770000 | 美容护理 | 22 | 19.65 | 24.47 | 0.89 |
| 2026-11-04 00:00:00 | 770100 | sw2021 | 2 | 770100 | 个护用品 | 10 | 21.61 | 28.28 | 0.74 |
| 2026-11-04 00:00:00 | 770200 | sw2021 | 2 | 770200 | 化妆品 | 10 | 16.21 | 19.79 | 0.87 |
| 2026-11-04 00:00:00 | 770300 | sw2021 | 2 | 770300 | 医疗美容 | 2 | 0 | 0 | 0 |
平台已收集 申万(2021)、申万(2014)、中信、恒生 行业分类数据,对应的三级行业代码和名称可去 cn_stock_industry 表中查询: https://bigquant.com/data/datasources/cn_stock_industry。
import dai
dai.query("""SELECT *FROM cn_stock_industry_valuationWHERE industry='sw2021'""", filters={"date": ["2024-10-25", "2024-10-25"]}).df()import dai
dai.query("""SELECT *FROM cn_stock_industry_valuationWHERE industry='sw2021'AND industry_name='农林牧渔'""", filters={"date": ["2024-01-01", "2024-10-25"]}).df()SELECT date, instrument, industry, industry_level, industry_code, industry_name, component_nums FROM cn_stock_industry_valuation WHERE date >= '2026-10-06' ORDER BY date LIMIT 100
SELECT date, instrument, industry, industry_level, industry_code, industry_name, component_nums FROM cn_stock_industry_valuation WHERE date >= '2026-10-06' ORDER BY date LIMIT 100