数据采集20200628(指数取值)

#指数取值

EDate=”20200624″

calendar=DataAPI.TradeCalGet(exchangeCD=u”XSHG”,beginDate=u”20010101″,endDate=EDate,field=u”calendarDate,isOpen,isMonthEnd”,pandas=”1″)

calendar=calendar[calendar.isMonthEnd==1][calendar.isOpen==1]#[calendar.isQuarterEnd==1]#只取季末日期

calendar[“tradeDate”]=calendar.calendarDate

index=DataAPI.MktIdxdGet(indexID=u””,ticker=u”000852″,tradeDate=u””,beginDate=u”20010101″,endDate=EDate,exchangeCD=u””,

field=u”secShortName,tradeDate,closeIndex,turnoverVol”,pandas=”1″)

putout=calendar.merge(index)

putout=putout.sort_values(by=[‘calendarDate’], ascending=[False])

putout.head(60)

calendarDateisOpenisMonthEndtradeDatesecShortNamecloseIndexturnoverVol1842020-05-29112020-05-29中证10005816.4003146234702001832020-04-30112020-04-30中证10005678.1658160186056001822020-03-31112020-03-31中证10005427.1324141809524001812020-02-28112020-02-28中证10005870.9664284615928001802020-01-23112020-01-23中证10005699.0083184762621001792019-12-31112019-12-31中证10005567.0330132870124001782019-11-29112019-11-29中证10005126.614680181680001772019-10-31112019-10-31中证10005253.8811119979824001762019-09-30112019-09-30中证10005232.386577537916001752019-08-30112019-08-30中证10005182.9555146306831001742019-07-31112019-07-31中证10005200.094582306375001732019-06-28112019-06-28中证10005321.4331119527294001722019-05-31112019-05-31中证10005334.2477127940457001712019-04-30112019-04-30中证10005682.2357134502043001702019-03-29112019-03-29中证10005911.2119192594810001692019-02-28112019-02-28中证10005330.3392200466406001682019-01-31112019-01-31中证10004355.735994572194001672018-12-28112018-12-28中证10004430.023871528889001662018-11-30112018-11-30中证10004648.183795931847001652018-10-31112018-10-31中证10004400.613286162530001642018-09-28112018-09-28中证10004987.272769992383001632018-08-31112018-08-31中证10005057.984859257132001622018-07-31112018-07-31中证10005542.543472123960001612018-06-29112018-06-29中证10005608.535883741650001602018-05-31112018-05-31中证10006315.172179566855001592018-04-27112018-04-27中证10006517.054175737816001582018-03-30112018-03-30中证10006798.6684102091949001572018-02-28112018-02-28中证10006563.807688031590001562018-01-31112018-01-31中证10006791.009493717953001552017-12-29112017-12-29中证10007017.351266690097001542017-11-30112017-11-30中证10007153.572571253522001532017-10-31112017-10-31中证10007631.533469384453001522017-09-29112017-09-29中证10007842.586185523200001512017-08-31112017-08-31中证10007679.8710102046479001502017-07-31112017-07-31中证10007444.9572119850688001492017-06-30112017-06-30中证10007465.762364150203001482017-05-31112017-05-31中证10007212.695868088164001472017-04-28112017-04-28中证10007842.082373216270001462017-03-31112017-03-31中证10008339.146289185469001452017-02-28112017-02-28中证10008508.085981385427001442017-01-26112017-01-26中证10008205.870650228165001432016-12-30112016-12-30中证10008490.861168994180001422016-11-30112016-11-30中证10009014.913093976147001412016-10-31112016-10-31中证10008910.5081101155494001402016-09-30112016-09-30中证10008661.019071987186001392016-08-31112016-08-31中证10008838.380289379217001382016-07-29112016-07-29中证10008501.090293736940001372016-06-30112016-06-30中证10008741.0992134709876001362016-05-31112016-05-31中证10008197.5567137392339001352016-04-29112016-04-29中证10008291.698581485851001342016-03-31112016-03-31中证10008447.1793150139445001332016-02-29112016-02-29中证10007183.6763115344403001322016-01-29112016-01-29中证10007385.7587102285179001312015-12-31112015-12-31中证100010614.3785129979474001302015-11-30112015-11-30中证100010001.1878197454471001292015-10-30112015-10-30中证10009188.2657184262793001282015-09-30112015-09-30中证10007727.509295677235001272015-08-31112015-08-31中证10007950.4591161855872001262015-07-31112015-07-31中证10009223.6361149505420001252015-06-30112015-06-30中证100011381.472921688094700

Leave a Reply

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