请 [注册] 或 [登录]  | 返回主站

量化交易吧 /  量化平台 帖子:3365793 新帖:0

获取业绩快报数据

耶伦发表于:5 月 9 日 22:39回复(1)

通过聚源读取上市公司的业绩快报列表数据,根据自己的需要调整筛选股票

from jqdata import jyimport pandas as pdfrom sqlalchemy import or_pd.options.display.max_rows = 500pd.options.display.max_columns = 200pd.options.display.width = 1000pd.options.display.max_colwidth = 500q =  query(jy.LC_PerformanceLetters.CompanyCode,jy.LC_PerformanceLetters.NetProfitCut,#扣除非经常性损益后净利润(元)jy.LC_PerformanceLetters.TotalAssets,#总资产(元)jy.LC_PerformanceLetters.BasicEPS,#每股收益jy.LC_PerformanceLetters.ROE,#净资产收益率(摊薄)(%)jy.LC_PerformanceLetters.OperatingProfitYOY.label('营业利润同比'),#	营业利润同比(%)	数字		6.900000	Nonejy.LC_PerformanceLetters.TotalProfitYOY,#	利润总额同比(%)jy.LC_PerformanceLetters.NetProfitCutYOY.label('扣非净利同比'),#	扣除非经常性损益后净利润同比(%)	数字		6.600000	Nonejy.LC_PerformanceLetters.NetAssetPSToOpening.label('每股净资同比增长'),#	每股净资产较期初比(%)).filter(jy.LC_PerformanceLetters.EndDate >= '2018-12-31',jy.LC_PerformanceLetters.ROE >= 6).limit(5000)df  = jy.run_query(q)df.drop_duplicates(subset=['CompanyCode'], keep='last', inplace=True)df.index =   df['CompanyCode']df2 = jy.run_query(query(jy.SecuMain.CompanyCode,jy.SecuMain.SecuAbbr,).filter(#or_(jy.SecuMain.SecuCategory== 1,jy.SecuMain.SecuCategory == 2)jy.SecuMain.SecuCategory== 1,jy.SecuMain.CompanyCode.in_(df['CompanyCode'])).limit(5000))df2.drop_duplicates(subset=['CompanyCode'], keep='last', inplace=True)df2.index =  df2['CompanyCode']df.drop([ 'CompanyCode'],axis=1,inplace=True)df2.drop([ 'CompanyCode'],axis=1,inplace=True)df_all = pd.concat([df2, df],axis =1)df_all = df_all[df_all['ROE'].notnull() ]df_all = df_all[(df_all['ROE']>= 7) & (df_all['营业利润同比'] >=20) & (df_all['每股净资同比增长'] > 5) ]print(len(df_all))#df_all = df_all.sort_values(by='扣非净利同比', ascending=False) df_all = df_all.sort_values(by='营业利润同比', ascending=False) df_all
40

.dataframe thead tr:only-child th {        text-align: right;    }    .dataframe thead th {        text-align: left;    }    .dataframe tbody tr th {        vertical-align: top;    }


SecuAbbrNetProfitCutTotalAssetsBasicEPSROE营业利润同比TotalProfitYOY扣非净利同比每股净资同比增长
CompanyCode








368中百集团NaN8.125474e+090.630012.662366163.03327.65NaN12.940000
77061久立特材NaN5.201310e+090.36009.615635155.86156.32NaN9.590000
170671艾 比 森NaN2.116509e+090.773419.252173151.28139.01NaN22.390000
50405云海金属NaN4.520293e+090.514818.184666148.08113.79NaN17.920000
79035欧菲科技NaN4.012391e+100.690016.74022897.98109.19NaN20.900000
176056千禾味业NaN1.930225e+090.736218.37062168.0366.43NaN22.820000
170005克明面业NaN3.964450e+090.57208.38115963.2755.39NaN5.280000
1408涪陵电力NaN4.732110e+091.560023.82688959.1159.39NaN29.450000
81910汉得信息2.703877e+083.846546e+090.450012.67190750.6640.058.3021.880000
78841凯撒文化NaN4.806750e+090.36007.51278048.7548.96NaN5.910000
74788利尔化学NaN6.582370e+091.113018.45079147.5746.86NaN32.820000
76758中国国旅3.198991e+092.709596e+101.612319.31568142.3340.5930.0416.130000
50001荣盛发展NaN2.275812e+111.760022.54643242.1736.12NaN23.380000
73279海亮股份NaN1.925825e+100.517811.24558740.2740.99NaN34.750000
1401片 仔 癀1.108852e+096.584917e+091.870022.89156640.1341.1543.0319.100000
170717健帆生物NaN2.049427e+090.970023.65324938.9739.12NaN21.560000
3711保利地产1.809813e+108.522384e+111.580015.19374338.4138.2917.2215.300000
78612长青股份3.228477e+084.072534e+090.89069.82255838.3738.8840.436.960000
177092多伦科技1.232263e+082.102354e+090.21228.95646138.2538.0228.746.360000
1390现代制药3.501771e+081.649490e+100.640010.48885537.5736.05-17.7915.340000
158482维格娜丝2.160000e+086.745000e+091.590011.33636737.2636.5815.2424.330000
159226永高股份NaN5.429564e+090.22008.44082333.9623.74NaN7.920000
158551博雅生物NaN5.100053e+091.110012.65475533.5435.06NaN52.470000
1348红星发展NaN1.897674e+090.40009.13702131.6927.59NaN9.770000
220212智能自控5.086258e+079.946554e+080.30009.84603530.7230.299.149.230000
1805中炬高新5.733508e+085.940291e+090.761016.83055030.6230.2238.2214.750000
230352大博医疗NaN1.676576e+090.960026.53373130.5130.56NaN17.920000
177444欧普照明6.001550e+087.363906e+091.200020.79655730.4830.293.1919.090000
398酒 鬼 酒NaN2.864568e+090.693410.32394330.1332.09NaN8.800000
177511国检集团1.522480e+081.568742e+090.865516.29249028.8531.1824.5713.461538
191485绝味食品NaN3.836587e+091.560021.22077027.0426.92NaN17.540000
175260桃李面包6.180225e+083.906920e+091.370018.77886926.7425.3322.198.350000
423东莞控股NaN1.100796e+101.010416.17412023.2423.12NaN14.890000
4097中国海诚NaN4.258295e+090.500014.62543723.211.02NaN8.230000
1539绿地控股NaN1.003703e+120.960017.15407022.8725.60NaN8.750000
191295万兴科技NaN7.041489e+081.060013.09267022.4829.94NaN71.430000
1196伊 力 特4.046211e+083.405555e+091.001117.66324521.5521.2618.8015.280000
365新华制药NaN5.904579e+090.40009.33999421.2921.92NaN8.270000
1463中天科技1.944250e+093.212987e+100.702011.13301821.1721.5338.938.290000
202200寿 仙 谷NaN1.193327e+090.760010.90348321.0823.63NaN10.390000
 
 

全部回复

0/140

量化课程

    移动端课程