数据采集之基本面(二):历史分红

#历史分红
fenhongxinxi=DataAPI.RbEquDivGet(ticker=u”000651″,publishDate=u””,beginDate=u””,endDate=u””,divDate=u””,cashDate=u””,field=u”ticker,publishDate,endDate,cashDiv,recordDate,profitPnt,bonusPnt”,pandas=”1″)
recordDateprice=DataAPI.MktEqudGet(secID=u””,ticker=u”000651″,tradeDate=u””,beginDate=u””,endDate=u””,isOpen=””,field=u”ticker,tradeDate,closePrice,PB”,pandas=”1″)
table=fenhongxinxi.merge(recordDateprice)
table1=table[table.recordDate==table.tradeDate]
table1[‘cashDiv’]=table1[‘cashDiv’].astype(float)
table1[‘DividendYield(%)R’]=(table1.cashDiv/10)/table1.closePrice
table2=table[table.publishDate==table.tradeDate]
table2[‘cashDiv’]=table2[‘cashDiv’].astype(float)
table2[‘DividendYield(%)P’]=(table2.cashDiv/10)/table2.closePrice
table1
#table2

ticker publishDate endDate cashDiv recordDate profitPnt bonusPnt tradeDate closePrice PB DividendYield(%)R
10354 000651 2017-04-27 2016-12-31 18.0 2017-07-04 70.025286909162 5.360333531864 2017-07-04 39.87 4.1448 0.045147
15472 000651 2016-04-29 2015-12-31 15.0 2016-07-06 72.001152018432 7.804370447451 2016-07-06 19.22 2.2808 0.078044
20584 000651 2015-04-28 2014-12-31 30.0 2015-07-02 63.747051698859 5.320092214932 2015-07-02 58.49 4.2790 0.051291
25679 000651 2014-04-25 2013-12-31 15.0 2014-06-05 41.506405821965 5.089921954530 2014-06-05 31.12 2.5469 0.048201
30819 000651 2013-04-27 2012-12-31 10.0 2013-07-10 40.758100672509 3.846153846154 2013-07-10 25.88 2.8133 0.038640
35935 000651 2012-04-25 2011-12-31 5.0 2012-07-05 26.903416733925 2.322340919647 2012-07-05 21.50 2.9133 0.023256
41026 000651 2011-03-24 2010-12-31 3.0 2011-05-30 19.771963355961 1.332149200710 2011-05-30 21.40 4.2321 0.014019
46172 000651 2010-04-27 2009-12-31 5.0 2010-07-12 32.239344896512 2.109704641350 2010-07-12 20.90 3.7070 0.023923
51259 000651 2009-04-21 2008-12-31 3.0 2009-06-02 19.105846388995 1.007049345418 2009-06-02 30.17 4.7847 0.009944
56403 000651 2008-04-18 2007-12-31 3.0 2008-07-11 19.726459758022 0.802139037433 2008-07-11 35.79 4.6732 0.008382
61188 000651 2005-12-23 2006-03-07 NaN 2006-03-07 NaN NaN 2006-03-07 12.81 1.8743 NaN
66631 000651 2006-04-11 2005-12-31 4.0 2006-07-10 NaN 3.361344537815 2006-07-10 15.21 2.2255 0.026298
71687 000651 2005-02-24 2004-12-31 3.8 2005-04-07 NaN 3.558052434457 2005-04-07 9.27 1.3563 0.040992
76857 000651 2004-04-23 2003-12-31 3.3 2004-06-29 NaN 3.273809523810 2004-06-29 10.53 1.5407 0.031339
81972 000651 2003-04-19 2002-12-31 3.2 2003-06-26 NaN 3.275332650972 2003-06-26 8.81 1.2890 0.036322
87081 000651 2002-03-16 2001-12-31 3.0 2002-06-12 NaN 3.099173553719 2002-06-12 8.57 1.2539 0.035006
92196 000651 2001-03-10 2000-12-31 4.0 2001-06-04 NaN 2.276607854297 2001-06-04 18.73 2.7405 0.021356
97321 000651 2000-03-15 1999-12-31 4.0 2000-06-12 NaN 2.411091018686 2000-06-12 17.11 2.5035 0.023378
102447 000651 1999-04-24 1998-12-31 4.0 1999-06-18 NaN 2.816901408451 1999-06-18 17.64 2.5810 0.022676
107622 000651 1998-08-29 1998-06-30 NaN 1998-09-10 NaN NaN 1998-09-10 37.49 5.4854 NaN
112781 000651 1997-09-22 1996-12-31 10.0 1997-11-17 NaN 2.695417789757 1997-11-17 37.10 5.4283 0.026954
117926 000651 1996-11-20 1995-12-31 NaN 1996-12-26 NaN NaN 1996-12-26 69.50 10.1689 NaN

数据采集自网络

Leave a Reply

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