siat 2.0.17__py3-none-any.whl → 2.0.19__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
siat/stock_china.py CHANGED
@@ -1069,6 +1069,7 @@ def stock_profile_china(ticker,category='profile', \
1069
1069
  print('\n数据来源:益盟-F10,',str(today))
1070
1070
 
1071
1071
  # 历史分红信息查询=============================================================================
1072
+ """
1072
1073
  if category == 'dividend':
1073
1074
  try:
1074
1075
  df3=ak.stock_dividents_cninfo(symbol=ticker1)
@@ -1108,7 +1109,75 @@ def stock_profile_china(ticker,category='profile', \
1108
1109
  print('\n*** '+titletxt+'\n')
1109
1110
  print(dftmp3.to_markdown(tablefmt='Simple',index=False,colalign=['left','center','center','right','center','center','center','left']))
1110
1111
  print('\n数据来源:巨潮资讯,',str(today))
1111
-
1112
+ """
1113
+ if category == 'dividend':
1114
+ # 分红
1115
+ titletxt=codetranslate(ticker)+':分红历史'
1116
+ try:
1117
+ #df3=ak.stock_dividents_cninfo(symbol=ticker1)
1118
+ df3=ak.stock_history_dividend_detail(symbol=ticker1, indicator="分红")
1119
+ except:
1120
+ print('')
1121
+ print(titletxt)
1122
+ print(" #Warning(stock_profile_china): dividend info not found for stock",ticker)
1123
+ return
1124
+
1125
+ if len(df3)==0:
1126
+ print('')
1127
+ print(titletxt)
1128
+ print(" No dividend record found for stock",ticker)
1129
+ return
1130
+
1131
+ # 整理信息
1132
+ dftmp=df3[df3['进度']=='实施']
1133
+ dftmp.drop(['进度','红股上市日'],axis=1,inplace=True)
1134
+ dftmp.replace(0,'-',inplace=True)
1135
+
1136
+ newcols=['公告日期','送股','转增','派息','股权登记日','除权除息日']
1137
+ dftmp3=dftmp[newcols]
1138
+
1139
+ titletxt=codetranslate(ticker)+':分红历史'
1140
+ if prettytab:
1141
+ pandas2prettytable(dftmp3,titletxt,firstColSpecial=False,leftColAlign='l',otherColAlign='c',tabborder=tabborder)
1142
+ print('【注】送股/转增:股数/10股,派息:元(税前)/10股,数据来源:新浪财经,',str(today))
1143
+ else:
1144
+ print('\n*** '+titletxt+'\n')
1145
+ alignlist=['center']+['right']*(len(list(dftmp3))-1)
1146
+ print(dftmp3.to_markdown(tablefmt='Simple',index=False,colalign=alignlist))
1147
+ print('【注】送股/转增:股数/10股,派息:元(税前)/10股,数据来源:新浪财经,',str(today))
1148
+
1149
+ # 配股
1150
+ titletxt=codetranslate(ticker)+':配股历史'
1151
+ try:
1152
+ df3p=ak.stock_history_dividend_detail(symbol=ticker1, indicator="配股")
1153
+ except:
1154
+ print('')
1155
+ print(titletxt)
1156
+ print(" #Warning(stock_profile_china): rights issue info not found for stock",ticker)
1157
+ return
1158
+
1159
+ if len(df3p)==0:
1160
+ print('')
1161
+ print(titletxt)
1162
+ print(" No rights issue record found for stock",ticker)
1163
+ return
1164
+
1165
+ # 整理信息
1166
+ dftmp=df3p[df3p['基准股本']!=0]
1167
+ dftmp.drop(['基准股本','募集资金合计'],axis=1,inplace=True)
1168
+
1169
+ newcols=['公告日期','配股方案','配股价格','股权登记日','除权日','缴款起始日','缴款终止日','配股上市日']
1170
+ dftmp3=dftmp[newcols]
1171
+
1172
+ if prettytab:
1173
+ pandas2prettytable(dftmp3,titletxt,firstColSpecial=False,leftColAlign='l',otherColAlign='c',tabborder=tabborder)
1174
+ print('【注】配股方案:每10股的配股数,配股价格为元。数据来源:新浪财经,',str(today))
1175
+ else:
1176
+ print('\n*** '+titletxt+'\n')
1177
+ alignlist=['center']+['right']*(len(list(dftmp3))-1)
1178
+ print(dftmp3.to_markdown(tablefmt='Simple',index=False,colalign=alignlist))
1179
+ print('【注】配股方案:每10股的配股数,配股价格为元。数据来源:新浪财经,',str(today))
1180
+
1112
1181
 
1113
1182
  # 主要股东信息查询=============================================================================
1114
1183
  if category == 'shareholder':
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: siat
3
- Version: 2.0.17
3
+ Version: 2.0.19
4
4
  Summary: Securities Investment Analysis Tools (siat)
5
5
  Home-page: https://pypi.org/project/siat/
6
6
  Author: Prof. WANG Dehong, Business School, BFSU (北京外国语大学 国际商学院 王德宏 教授)
@@ -91,7 +91,7 @@ siat/shenwan index history test.py,sha256=JCVAzOSEldHalhSFa3pqD8JI_8_djPMQOxpkuY
91
91
  siat/stock.py,sha256=unwmbNTT5vC3v9cg4XtnpPBawPVxtBTgRnevE1i0T00,118039
92
92
  siat/stock_advice_linear.py,sha256=-twT7IGP-NEplkL1WPSACcNJjggRB2j4mlAQCkzOAuo,31655
93
93
  siat/stock_base.py,sha256=uISvbRyOGy8p9QREA96CVydgflBkn5L3OXOGKl8oanc,1312
94
- siat/stock_china.py,sha256=ELE3Agl6eUvA8_Gec6EkxbCvQ53OWzlmy067-hj6Bdo,72808
94
+ siat/stock_china.py,sha256=Hj1El4SxcSc1hrsOcPhya-sLh1Ppmesg9DKkZ-B85Rk,76007
95
95
  siat/stock_china_test.py,sha256=Qc1m19FAUSvBi9E0ZTVcYBveiGYFIlIFvthbidzCe1s,1276
96
96
  siat/stock_info.pickle,sha256=o4M-pcN8Sh8QiwZQAZWY1aelI4xgIGIxors7n2uHSJI,1266744
97
97
  siat/stock_info_test.py,sha256=gfG3DbhDACbtD8wnv_R6zhj0t11XaC8NX8uLD9Qv3Fo,6122
@@ -114,7 +114,7 @@ siat/universal_test.py,sha256=CDAOffW1Rvs-TcNN5giWVvHMlch1w4dp-w5SIV9jXL0,3936
114
114
  siat/valuation_china.py,sha256=gYYXeT9bBPyQ251TCsYlibWcu6JA8x-YOKqLUEeLE7U,51342
115
115
  siat/valuation_market_china_test.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
116
116
  siat/var_model_validation.py,sha256=zB_Skk_tmzIR15l6oAW3am4HBGVIG-eZ8gJhCdXZ8Qw,14859
117
- siat-2.0.17.dist-info/METADATA,sha256=1tuC7Z0c7owUTnXO7zLT2tTncOB1TBIjYDTtEg1oIGU,1411
118
- siat-2.0.17.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
119
- siat-2.0.17.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
120
- siat-2.0.17.dist-info/RECORD,,
117
+ siat-2.0.19.dist-info/METADATA,sha256=Q8Xv8GSOV6dtC4JanrxuJW-B_z2s-3ahPLLa_rx0klw,1411
118
+ siat-2.0.19.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
119
+ siat-2.0.19.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
120
+ siat-2.0.19.dist-info/RECORD,,
File without changes