数据采集20200628(指数估值平均数,中位数,标准差)

#指数估值平均数,中位数,标准差

EDate=”20200624″

zhishu=DataAPI.MktIdxdEvalGet(secID=u””,ticker=u”000001″,beginDate=u”19900101″,endDate=EDate,

field=u”ticker,c,tradeDate,PEType,PEValue,PB,ROE”,pandas=”1″)

zhishu=zhishu[zhishu.PEType==1]

zhishu=zhishu.sort_values(by=[‘tradeDate’], ascending=[False])

d={‘APE’:([np.mean(zhishu.PEValue)]),’MPE’:([np.median(zhishu.PEValue)]),’SPE’:([np.std(zhishu.PEValue)]),

‘APB’:([np.mean(zhishu.PB)]),’MPB’:([np.median(zhishu.PB)]),’SPB’:([np.std(zhishu.PB)])}

jg=pd.DataFrame(d)

jg

APB APE MPB MPE SPB SPE
0 1.861323 13.855501 1.62 13.045 0.620727 3.970077

Leave a Reply

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