数据采集20200628(指数估值)

#指数估值

BDate=”20200624″

EDate=BDate

kjzhishu=DataAPI.MktIdxdEvalGet(secID=u””,ticker=u”000001,000016,000300,000905,000922,399001,399005,399006″,

beginDate=BDate,endDate=EDate,field=u”ticker,secShortName,tradeDate,PEType,PEValue,PB,ROE”,pandas=”1″)

zjzhishu=DataAPI.MktIdxdEvalGet(secID=u””,ticker=u”000807,000986,000987,000988,000989,000990,000991,000992,000993″,

beginDate=BDate,endDate=EDate,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

#zjzhishu

0 2 4 6 8 10 12 14
ticker 000001 000016 000300 000905 000922 399001 399005 399006
secShortName 上证综指 上证50 沪深300 中证500 中证红利 深证成指 深证中小板指 创业板指
tradeDate 2020-06-24 2020-06-24 2020-06-24 2020-06-24 2020-06-24 2020-06-24 2020-06-24 2020-06-24
PEType 1 1 1 1 1 1 1 1
PEValue 12.27 10.12 12.36 23.31 7.09 26.35 30.7 54.73
PB 1.23 1.06 1.32 1.89 0.79 2.93 3.94 7.4
ROE 0.09581 0.10442 0.10527 0.07474 0.11144 0.10656 0.12462 0.12978

Leave a Reply

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