000651历史股息率

先通过Python采集需要的信息,提取历史上每年的分红数据。包括分红派息、登记日期、公告日期和股息率等。再采集登记当日的收盘价。

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”,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
table1

ticker publishDate endDate cashDiv recordDate profitPnt bonusPnt tradeDate closePrice DividendYield(%)R
10319 000651 2017-04-27 2016-12-31 18.0 2017-07-04 70.025286909162 5.360333531864 2017-07-04 39.87 0.045147
15402 000651 2016-04-29 2015-12-31 15.0 2016-07-06 72.001152018432 7.804370447451 2016-07-06 19.22 0.078044
20479 000651 2015-04-28 2014-12-31 30.0 2015-07-02 63.747051698859 5.320092214932 2015-07-02 58.49 0.051291
25539 000651 2014-04-25 2013-12-31 15.0 2014-06-05 41.506405821965 5.089921954530 2014-06-05 31.12 0.048201
30644 000651 2013-04-27 2012-12-31 10.0 2013-07-10 40.758100672509 3.846153846154 2013-07-10 25.88 0.038640
35725 000651 2012-04-25 2011-12-31 5.0 2012-07-05 26.903416733925 2.322340919647 2012-07-05 21.50 0.023256
40781 000651 2011-03-24 2010-12-31 3.0 2011-05-30 19.771963355961 1.332149200710 2011-05-30 21.40 0.014019
45892 000651 2010-04-27 2009-12-31 5.0 2010-07-12 32.239344896512 2.109704641350 2010-07-12 20.90 0.023923
50944 000651 2009-04-21 2008-12-31 3.0 2009-06-02 19.105846388995 1.007049345418 2009-06-02 30.17 0.009944
56053 000651 2008-04-18 2007-12-31 3.0 2008-07-11 19.726459758022 0.802139037433 2008-07-11 35.79 0.008382
60803 000651 2005-12-23 2006-03-07 NaN 2006-03-07 NaN NaN 2006-03-07 12.81 NaN
66211 000651 2006-04-11 2005-12-31 4.0 2006-07-10 NaN 3.361344537815 2006-07-10 15.21 0.026298
71232 000651 2005-02-24 2004-12-31 3.8 2005-04-07 NaN 3.558052434457 2005-04-07 9.27 0.040992
76367 000651 2004-04-23 2003-12-31 3.3 2004-06-29 NaN 3.273809523810 2004-06-29 10.53 0.031339
81447 000651 2003-04-19 2002-12-31 3.2 2003-06-26 NaN 3.275332650972 2003-06-26 8.81 0.036322
86521 000651 2002-03-16 2001-12-31 3.0 2002-06-12 NaN 3.099173553719 2002-06-12 8.57 0.035006
91601 000651 2001-03-10 2000-12-31 4.0 2001-06-04 NaN 2.276607854297 2001-06-04 18.73 0.021356
96691 000651 2000-03-15 1999-12-31 4.0 2000-06-12 NaN 2.411091018686 2000-06-12 17.11 0.023378
101782 000651 1999-04-24 1998-12-31 4.0 1999-06-18 NaN 2.816901408451 1999-06-18 17.64 0.022676
106922 000651 1998-08-29 1998-06-30 NaN 1998-09-10 NaN NaN 1998-09-10 37.49 NaN
112046 000651 1997-09-22 1996-12-31 10.0 1997-11-17 NaN 2.695417789757 1997-11-17 37.10 0.026954
117156 000651 1996-11-20 1995-12-31 NaN 1996-12-26 NaN NaN 1996-12-26 69.50 NaN

得到除息日股价与当年股息率的关系

除息股价 除息股息
69.50 0.0000
37.10 2.6954
37.49 0.0000
17.64 2.2676
17.11 2.3378
18.73 2.1356
8.57 3.5006
8.81 3.6322
10.53 3.1339
9.27 4.0992
15.21 2.6298
0.00 0.0000
35.79 0.8382
30.17 0.9944
20.90 2.3923
21.40 1.4019
21.50 2.3256
25.88 3.8640
31.12 4.8201
58.49 5.1291
19.22 7.8044
39.87 4.5147

Leave a Reply

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