数据采集之指数估值四:部分指数估值

#指数估值
kjzhishu=DataAPI.MktIdxdEvalGet(secID=u””,ticker=u”000001,000016,000300,000905,000922,399001,399005,399006″,beginDate=u”20181225″,endDate=u”20181225″,field=u”ticker,secShortName,tradeDate,PEType,PEValue,PB,ROE”,pandas=”1″)
zjzhishu=DataAPI.MktIdxdEvalGet(secID=u””,ticker=u”000986,000987,000988,000989,000990,000991,000992,000993,000807″,beginDate=u”20181225″,endDate=u”20181225″,field=u”ticker,secShortName,tradeDate,PEType,PEValue,PB,ROE”,pandas=”1″)
kjzhishu=kjzhishu[kjzhishu.PEType==1]#1为TTM,2为动态
zjzhishu=zjzhishu[zjzhishu.PEType==1]
kjzhishu=np.transpose(kjzhishu)
zjzhishu=np.transpose(zjzhishu)
kjzhishu

0 2 4 6 8 10 12 14
ticker 000001 000016 000300 000905 000922 399001 399005 399006
secShortName 上证综指 上证50 沪深300 中证500 中证红利 深证成指 深证中小板指 深证创业板指
tradeDate 2018-12-25 2018-12-25 2018-12-25 2018-12-25 2018-12-25 2018-12-25 2018-12-25 2018-12-25
PEType 1 1 1 1 1 1 1 1
PEValue 10.58 8.53 10.1 15.45 7.22 15.09 18.39 27.01
PB 1.2 1.04 1.21 1.56 0.94 1.91 2.55 3.31
ROE 0.11117 0.12144 0.11861 0.0974 0.12955 0.12177 0.13586 0.11854

zjzhishu

0 2 4 6 8 10 12 14 16
ticker 000807 000986 000987 000988 000989 000990 000991 000992 000993
secShortName 中证食品饮料 中证全指能源 中证全指材料 中证全指工业 中证全指可选 中证全指消费 中证全指医药 中证全指金融 中证全指信息
tradeDate 2018-12-25 2018-12-25 2018-12-25 2018-12-25 2018-12-25 2018-12-25 2018-12-25 2018-12-25 2018-12-25
PEType 1 1 1 1 1 1 1 1 1
PEValue 21.78 12.87 11.38 16.35 14.03 22.64 23.81 7.53 26.63
PB 4.61 1.05 1.52 1.51 1.7 3.6 2.93 0.92 2.66
ROE 0.21073 0.08007 0.12936 0.08997 0.11486 0.15696 0.11961 0.12119 0.09612

数据采集自网络

Leave a Reply

邮箱地址不会被公开。 必填项已用*标注