siat 3.0.25__py3-none-any.whl → 3.0.35__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/financials_china2.py CHANGED
@@ -571,8 +571,8 @@ def fs_item_analysis_1(df,ticker,fsdate,items,title_txt='',notes='',facecolor='p
571
571
  """
572
572
 
573
573
  if not math.isnan(i_value):
574
- i_value_yy=round(i_value/yiyuan,2)
575
- i_value_qc_yy=round(i_value_qc/yiyuan,2)
574
+ i_value_yy=round(i_value/yiyuan,4)
575
+ i_value_qc_yy=round(i_value_qc/yiyuan,4)
576
576
  i_value_chg_yy=round(i_value_yy - i_value_qc_yy,2)
577
577
  if not(i_value_qc_yy==0):
578
578
  i_value_chg_pct=round(i_value_chg_yy/i_value_qc_yy*100,2)
@@ -599,9 +599,10 @@ def fs_item_analysis_1(df,ticker,fsdate,items,title_txt='',notes='',facecolor='p
599
599
  if title_txt=='':
600
600
  tname=ticker_name(ticker,'stock').replace("(A股)",'')
601
601
  title_txt=tname+"财报分析:重要项目的变动情况\n(截至"+fsdate+")"
602
- import datetime; today=datetime.date.today()
602
+ import datetime; todaydt=datetime.date.today()
603
603
  #footnote="*单位:亿元,数据来源:新浪财经,"+str(today)
604
- footnote="*单位:亿元,本期报表日期:"+fsdate+',数据来源:新浪财经'
604
+ #footnote="*单位:亿元,本期报表日期:"+fsdate+',数据来源:新浪财经'
605
+ footnote="单位:亿元,数据来源:新浪财经,"+str(todaydt)
605
606
 
606
607
  if notes=='':
607
608
  foottext=footnote
@@ -647,7 +648,7 @@ def fs_item_analysis_2(df,ticker,fsdates,items,title_txt='',notes='',facecolor='
647
648
  row_list=[i]
648
649
  for fd in fsdates1:
649
650
  i_value,_,_=select_item(df,ticker,fd,i)
650
- row_list=row_list+[round(i_value/yiyuan,2)]
651
+ row_list=row_list+[round(i_value/yiyuan,4)]
651
652
  dfp.loc[len(dfp)] = row_list
652
653
 
653
654
  last_row=[items[0]+"占比%"]
@@ -663,8 +664,8 @@ def fs_item_analysis_2(df,ticker,fsdates,items,title_txt='',notes='',facecolor='
663
664
  if title_txt=='':
664
665
  tname=ticker_name(ticker,'stock').replace("(A股)",'')
665
666
  title_txt=tname+"财报分析:重要项目占比的变动趋势"
666
- import datetime; today=datetime.date.today()
667
- footnote="*数据来源:新浪财经,"+str(today)
667
+ import datetime; todaydt=datetime.date.today()
668
+ footnote="数据来源:新浪财经,"+str(todaydt)
668
669
 
669
670
  if notes=='':
670
671
  foottext=footnote
@@ -705,7 +706,7 @@ def fs_item_analysis_3(df,ticker,fsdates,title_txt='',notes='',facecolor='papaya
705
706
  row_list=[i]
706
707
  for fd in fsdates1:
707
708
  i_value,_,_=select_item(df,ticker,fd,i)
708
- row_list=row_list+[round(i_value/yiyuan,2)]
709
+ row_list=row_list+[round(i_value/yiyuan,4)]
709
710
  dfp.loc[len(dfp)] = row_list
710
711
 
711
712
  last_row=["流动比率%"]
@@ -721,8 +722,8 @@ def fs_item_analysis_3(df,ticker,fsdates,title_txt='',notes='',facecolor='papaya
721
722
  if title_txt=='':
722
723
  tname=ticker_name(ticker,'stock').replace("(A股)",'')
723
724
  title_txt=tname+"财报分析:流动比率的变动趋势"
724
- import datetime; today=datetime.date.today()
725
- footnote="*数据来源:新浪财经,"+str(today)
725
+ import datetime; todaydt=datetime.date.today()
726
+ footnote="数据来源:新浪财经,"+str(todaydt)
726
727
 
727
728
  if notes=='':
728
729
  foottext=footnote
@@ -762,14 +763,14 @@ def fs_item_analysis_4(df,ticker,fsdates,title_txt='',notes='',facecolor='papaya
762
763
  row_list=[i]
763
764
  for fd in fsdates1:
764
765
  i_value,_,_=select_item(df,ticker,fd,i)
765
- row_list=row_list+[round(i_value/yiyuan,2)]
766
+ row_list=row_list+[round(i_value/yiyuan,4)]
766
767
  dfp.loc[len(dfp)] = row_list
767
768
 
768
769
  i='存货'
769
770
  row_list=['其中:'+i]
770
771
  for fd in fsdates1:
771
772
  i_value,_,_=select_item(df,ticker,fd,i)
772
- row_list=row_list+[round(i_value/yiyuan,2)]
773
+ row_list=row_list+[round(i_value/yiyuan,4)]
773
774
  dfp.loc[len(dfp)] = row_list
774
775
 
775
776
  i='速动资产合计'
@@ -783,7 +784,7 @@ def fs_item_analysis_4(df,ticker,fsdates,title_txt='',notes='',facecolor='papaya
783
784
  row_list=[i]
784
785
  for fd in fsdates1:
785
786
  i_value,_,_=select_item(df,ticker,fd,i)
786
- row_list=row_list+[round(i_value/yiyuan,2)]
787
+ row_list=row_list+[round(i_value/yiyuan,4)]
787
788
  dfp.loc[len(dfp)] = row_list
788
789
 
789
790
  last_row=["速动比率%"]
@@ -799,8 +800,8 @@ def fs_item_analysis_4(df,ticker,fsdates,title_txt='',notes='',facecolor='papaya
799
800
  if title_txt=='':
800
801
  tname=ticker_name(ticker,'stock').replace("(A股)",'')
801
802
  title_txt=tname+"财报分析:速动比率的变动趋势"
802
- import datetime; today=datetime.date.today()
803
- footnote="*数据来源:新浪财经,"+str(today)
803
+ import datetime; todaydt=datetime.date.today()
804
+ footnote="数据来源:新浪财经,"+str(todaydt)
804
805
 
805
806
  if notes=='':
806
807
  foottext=footnote
@@ -840,7 +841,7 @@ def fs_item_analysis_5(df,ticker,fsdates,title_txt='',notes='',facecolor='papaya
840
841
  row_list=[i]
841
842
  for fd in fsdates1:
842
843
  i_value,_,_=select_item(df,ticker,fd,i)
843
- row_list=row_list+[round(i_value/yiyuan,2)]
844
+ row_list=row_list+[round(i_value/yiyuan,4)]
844
845
  dfp.loc[len(dfp)] = row_list
845
846
 
846
847
  last_row=["资产负债率%"]
@@ -856,8 +857,8 @@ def fs_item_analysis_5(df,ticker,fsdates,title_txt='',notes='',facecolor='papaya
856
857
  if title_txt=='':
857
858
  tname=ticker_name(ticker,'stock').replace("(A股)",'')
858
859
  title_txt=tname+"财报分析:资产负债率的变动趋势"
859
- import datetime; today=datetime.date.today()
860
- footnote="*数据来源:新浪财经,"+str(today)
860
+ import datetime; todaydt=datetime.date.today()
861
+ footnote="数据来源:新浪财经,"+str(todaydt)
861
862
 
862
863
  if notes=='':
863
864
  foottext=footnote
@@ -902,7 +903,7 @@ def fs_item_analysis_6_original(df,ticker,fsdates,items,title_txt='',notes=''):
902
903
  row_list=[fd]
903
904
  for i in items:
904
905
  i_value,_,_=select_item(df,ticker,fd,i)
905
- row_list=row_list+[round(i_value/yiyuan,2)]
906
+ row_list=row_list+[round(i_value/yiyuan,4)]
906
907
  dfp.loc[len(dfp)] = row_list
907
908
 
908
909
  last_row=["增幅%"]
@@ -919,8 +920,8 @@ def fs_item_analysis_6_original(df,ticker,fsdates,items,title_txt='',notes=''):
919
920
  if title_txt=='':
920
921
  tname=ticker_name(ticker,'stock').replace("(A股)",'')
921
922
  title_txt=tname+"财报分析:重要关联项目的增幅对比"
922
- import datetime; today=datetime.date.today()
923
- footnote="*数据来源:新浪财经,"+str(today)
923
+ import datetime; todaydt=datetime.date.today()
924
+ footnote="数据来源:新浪财经,"+str(todaydt)
924
925
 
925
926
  if notes=='':
926
927
  foottext=footnote
@@ -958,7 +959,7 @@ def fs_item_analysis_6(df,ticker,fsdates,items,title_txt='',notes='',facecolor='
958
959
  for i in items:
959
960
  i_value,_,_=select_item(df,ticker,fd,i)
960
961
  if not('%' in i) and not('(元)' in i):
961
- row_list=row_list+[round(i_value/yiyuan,2)]
962
+ row_list=row_list+[round(i_value/yiyuan,4)]
962
963
  yiyuan_foot=True
963
964
  else:
964
965
  row_list=row_list+[i_value]
@@ -978,11 +979,11 @@ def fs_item_analysis_6(df,ticker,fsdates,items,title_txt='',notes='',facecolor='
978
979
  if title_txt=='':
979
980
  tname=ticker_name(ticker,'stock').replace("(A股)",'')
980
981
  title_txt=tname+"财报分析:重要关联项目的增幅对比"
981
- import datetime; today=datetime.date.today()
982
+ import datetime; todaydt=datetime.date.today()
982
983
  if yiyuan_foot:
983
- footnote="*单位:亿元,数据来源:新浪财经,"+str(today)
984
+ footnote="单位:亿元,数据来源:新浪财经,"+str(todaydt)
984
985
  else:
985
- footnote="*数据来源:新浪财经,"+str(today)
986
+ footnote="数据来源:新浪财经,"+str(todaydt)
986
987
 
987
988
  if notes=='':
988
989
  foottext=footnote
@@ -1032,7 +1033,7 @@ def fs_item_analysis_7_original(df,tickers,fsdate,items,title_txt=''):
1032
1033
  for i in items:
1033
1034
  i_value,_,_=select_item(df,t,fsdate,i)
1034
1035
  if not('%' in i) and not('(元)' in i):
1035
- row_list=row_list+[round(i_value/yiyuan,2)]
1036
+ row_list=row_list+[round(i_value/yiyuan,4)]
1036
1037
  yiyuan_foot=True
1037
1038
  else:
1038
1039
  row_list=row_list+[i_value]
@@ -1049,11 +1050,11 @@ def fs_item_analysis_7_original(df,tickers,fsdate,items,title_txt=''):
1049
1050
  ticker=tickers[0]
1050
1051
  tname=ticker_name(ticker,'stock').replace("(A股)",'')
1051
1052
  title_txt=tname+"财报分析:重要指标的同行业对比\n(截至"+fsdate+")"
1052
- import datetime; today=datetime.date.today()
1053
+ import datetime; todaydt=datetime.date.today()
1053
1054
  if yiyuan_foot:
1054
- footnote="*单位:亿元,数据来源:新浪财经,"+str(today)
1055
+ footnote="单位:亿元,数据来源:新浪财经,"+str(todaydt)
1055
1056
  else:
1056
- footnote="*数据来源:新浪财经,"+str(today)
1057
+ footnote="数据来源:新浪财经,"+str(todaydt)
1057
1058
  df_directprint(dfp,title_txt,footnote)
1058
1059
 
1059
1060
  return dfp
@@ -1085,7 +1086,7 @@ def fs_item_analysis_7(df,tickers,fsdate,items,title_txt='',notes='',facecolor='
1085
1086
  for i in items:
1086
1087
  i_value,_,_=select_item(df,t,fsdate,i)
1087
1088
  if not('%' in i) and not('(元)' in i):
1088
- row_list=row_list+[round(i_value/yiyuan,2)]
1089
+ row_list=row_list+[round(i_value/yiyuan,4)]
1089
1090
  yiyuan_foot=True
1090
1091
  else:
1091
1092
  row_list=row_list+[i_value]
@@ -1119,13 +1120,15 @@ def fs_item_analysis_7(df,tickers,fsdate,items,title_txt='',notes='',facecolor='
1119
1120
  ticker=tickers[0]
1120
1121
  tname=ticker_name(ticker,'stock').replace("(A股)",'')
1121
1122
  title_txt=tname+"财报分析:重要指标的同行业对比\n(截至"+fsdate+")"
1122
- import datetime; today=datetime.date.today()
1123
+ import datetime; todaydt=datetime.date.today()
1123
1124
  if yiyuan_foot:
1124
1125
  #footnote="*单位:亿元,数据来源:新浪财经,"+str(today)
1125
- footnote="*单位:亿元,本期报表日期:"+fsdate+',数据来源:新浪财经'
1126
+ #footnote="*单位:亿元,本期报表日期:"+fsdate+',数据来源:新浪财经'
1127
+ footnote="单位:亿元,数据来源:新浪财经,"+str(todaydt)
1126
1128
  else:
1127
1129
  #footnote="*数据来源:新浪财经,"+str(today)
1128
- footnote="*本期报表日期:"+fsdate+',数据来源:新浪财经'
1130
+ #footnote="*本期报表日期:"+fsdate+',数据来源:新浪财经'
1131
+ footnote='数据来源:新浪财经,'+str(todaydt)
1129
1132
 
1130
1133
  if notes=='':
1131
1134
  foottext=footnote
@@ -1167,7 +1170,7 @@ def fs_item_analysis_8(df,tickers,fsdate,items,title_txt='',notes='',facecolor='
1167
1170
  for i in items:
1168
1171
  i_value,_,_=select_item(df,t,fsdate,i)
1169
1172
  if not('%' in i) and not('(元)' in i):
1170
- row_list=row_list+[round(i_value/yiyuan,2)]
1173
+ row_list=row_list+[round(i_value/yiyuan,4)]
1171
1174
  yiyuan_foot=True
1172
1175
  else:
1173
1176
  row_list=row_list+[i_value]
@@ -1201,13 +1204,15 @@ def fs_item_analysis_8(df,tickers,fsdate,items,title_txt='',notes='',facecolor='
1201
1204
  tname=ticker_name(ticker,'stock').replace("(A股)",'')
1202
1205
  title_txt=tname+"财报分析:重要指标的同行业对比\n(截至"+fsdate+")"
1203
1206
 
1204
- import datetime; today=datetime.date.today()
1207
+ import datetime; todaydt=datetime.date.today()
1205
1208
  if yiyuan_foot:
1206
1209
  #footnote="*单位:亿元,数据来源:新浪财经,"+str(today)
1207
- footnote="*单位:亿元,本期报表日期:"+fsdate+',数据来源:新浪财经'
1210
+ #footnote="*单位:亿元,本期报表日期:"+fsdate+',数据来源:新浪财经'
1211
+ footnote="单位:亿元,"+'数据来源:新浪财经,'+str(todaydt)
1208
1212
  else:
1209
1213
  #footnote="*数据来源:新浪财经,"+str(today)
1210
- footnote="*本期报表日期:"+fsdate+',数据来源:新浪财经'
1214
+ #footnote="*本期报表日期:"+fsdate+',数据来源:新浪财经'
1215
+ footnote='数据来源:新浪财经,'+str(todaydt)
1211
1216
 
1212
1217
  if notes=='':
1213
1218
  foottext=footnote
@@ -1268,9 +1273,9 @@ def asset_liab_structure_china(tickers,fsdates,facecolor='papayawhip'):
1268
1273
  comparator=tickers[0]
1269
1274
  comparee=tickers[1:]
1270
1275
  print(" Conducting asset-liability analysis ...")
1271
- print(" Comparator:",ticker_name(comparator,'stock'))
1276
+ print(" Focus on:",ticker_name(comparator,'stock'))
1272
1277
  #print(" Comparee :",ticker_name(comparee))
1273
- print(" Comparee :",end='')
1278
+ print(" Peers :",end='')
1274
1279
  if comparee != []:
1275
1280
  print_list(ticker_name(comparee,'stock'))
1276
1281
  else:
@@ -1308,29 +1313,36 @@ def asset_liab_structure_china(tickers,fsdates,facecolor='papayawhip'):
1308
1313
  print(" Solution: check ticker spelling and try at least 10 minutes later")
1309
1314
  return
1310
1315
 
1311
- title_head=ticker_name(comparator,'stock')+"资产负债分析:"
1316
+ #title_head=ticker_name(comparator,'stock')+"资产负债分析:"
1317
+ title_head=ticker_name(comparator,'stock')+":"
1312
1318
 
1313
1319
  ### 资产负债表的主要项目
1314
1320
  #资产变动趋势2
1315
- title_txt=title_head+"主要资产项目"
1321
+ title_txt=title_head+"主要资产项目,"+fsdate
1316
1322
  items2=["货币资金","应收账款","存货","长期股权投资","固定资产净额","资产总计"]
1317
-
1323
+ """
1318
1324
  notes1="注1:货币资金包括库存现金、银行存款和其他货币资金三个部分"
1319
1325
  notes2="注2:其他货币资金包括银行汇(本)票存款、信用证保证金存款和信用卡存款等"
1320
1326
  notes3="注3:长期股权投资是指企业对其子公司、合营企业及联营企业的权益性投资"
1321
1327
  notes4="注4:固定资产净额 = 固定资产原值 - 累计折旧 - 资产减值准备"
1328
+ """
1329
+ notes1="注:\n货币资金包括库存现金、银行存款和其他货币资金三个部分"
1330
+ notes2="其他货币资金包括银行汇(本)票存款、信用证保证金存款和信用卡存款等"
1331
+ notes3="长期股权投资是指企业对其子公司、合营企业及联营企业的权益性投资"
1332
+ notes4="固定资产净额 = 固定资产原值 - 累计折旧 - 资产减值准备"
1333
+
1322
1334
  notes=notes1+'\n'+notes2+'\n'+notes3+'\n'+notes4
1323
1335
  dfp2=fs_item_analysis_1(df,ticker,fsdate,items2,title_txt,notes,facecolor=facecolor)
1324
1336
 
1325
1337
  #负债变动趋势
1326
- title_txt=title_head+"主要负债项目"
1338
+ title_txt=title_head+"主要负债项目,"+fsdate
1327
1339
  items3=["短期借款","长期借款","应付账款","预收款项","应交税费","应付职工薪酬","负债合计"]
1328
1340
  dfp3=fs_item_analysis_1(df,ticker,fsdate,items3,title_txt,facecolor=facecolor)
1329
1341
 
1330
1342
  #所有者权益变动趋势
1331
- title_txt=title_head+"主要权益项目"
1343
+ title_txt=title_head+"主要权益项目,"+fsdate
1332
1344
  items4=["实收资本(或股本)","资本公积","盈余公积","未分配利润","所有者权益合计"]
1333
-
1345
+ """
1334
1346
  notes1="注1:实收资本(或股本,Paid-in Capital)指企业实际收到的投资人投入的资本"
1335
1347
  notes2="注2:资本公积是由股东投入的因故不能计入实收资本(或股本)中的那部分投入资金"
1336
1348
  notes3=" 资本公积包括资本(股本)溢价、其他资本公积、资产评估增值、资本折算差额"
@@ -1345,6 +1357,22 @@ def asset_liab_structure_china(tickers,fsdates,facecolor='papayawhip'):
1345
1357
  notes12=" 任意盈余公积是指企业内部可自主决定比例提取的盈余公积"
1346
1358
  notes13=" 企业提取的盈余公积可用于弥补亏损、转增资本、发放现金股利或利润等"
1347
1359
  notes14="注4:未分配利润是净利润经弥补亏损、提取盈余公积和向投资者分配利润后的资金"
1360
+ """
1361
+ notes1="注:\n实收资本(或股本,Paid-in Capital)指企业实际收到的投资人投入的资本"
1362
+ notes2="资本公积是由股东投入的因故不能计入实收资本(或股本)中的那部分投入资金"
1363
+ notes3="资本公积包括资本(股本)溢价、其他资本公积、资产评估增值、资本折算差额"
1364
+ notes4="资本(股本)溢价是公司发行权益证券时价格超出票面价值的部分"
1365
+ notes5="其他资本公积包括金融资产公允价值变动、被投资单位净利润以外的变动等"
1366
+ notes6="资产评估增值是重估企业资产时,重估价高于资产的账面净值的部分"
1367
+ notes7="资本折算差额是外币资本因汇率变动产生的差额"
1368
+ notes8="盈余公积是企业按照要求从税后利润中提取的、属于留存收益范畴的资金"
1369
+ notes9="企业从历年利润中提取的留存于企业的内部积累,包括盈余公积和未分配利润"
1370
+ notes10="公司制企业的盈余公积包括法定盈余公积和任意盈余公积"
1371
+ notes11="法定盈余公积是指企业按照规定比例从净利润中必须提取的盈余公积"
1372
+ notes12="任意盈余公积是指企业内部可自主决定比例提取的盈余公积"
1373
+ notes13="企业提取的盈余公积可用于弥补亏损、转增资本、发放现金股利或利润等"
1374
+ notes14="未分配利润是净利润经弥补亏损、提取盈余公积和向投资者分配利润后的资金"
1375
+
1348
1376
  notesA=notes1+'\n'+notes2+'\n'+notes3+'\n'+notes4+'\n'+notes5+'\n'+notes6+'\n'+notes7
1349
1377
  notesB=notes8+'\n'+notes9+'\n'+notes10+'\n'+notes11+'\n'+notes12+'\n'+notes13+'\n'+notes14
1350
1378
 
@@ -1353,7 +1381,7 @@ def asset_liab_structure_china(tickers,fsdates,facecolor='papayawhip'):
1353
1381
 
1354
1382
  ### 货币资金与应收项目
1355
1383
  #资产变动趋势1:"货币资金","应收票据","应收账款"
1356
- title_txt=title_head+"货币资金与应收项目"
1384
+ title_txt=title_head+"货币资金与应收项目,"+fsdate
1357
1385
  items1=["货币资金","应收票据","应收账款"]
1358
1386
  dfp1=fs_item_analysis_1(df,ticker,fsdate,items1,title_txt,facecolor=facecolor)
1359
1387
 
@@ -1371,7 +1399,8 @@ def asset_liab_structure_china(tickers,fsdates,facecolor='papayawhip'):
1371
1399
 
1372
1400
  #应收账款占比同行对比
1373
1401
  items7=['应收账款','资产总计','应收账款占比%']
1374
- title_txt=title_head+"应收账款占比同行对比"
1402
+ #title_txt=title_head+"应收账款占比同行对比"
1403
+ title_txt="应收账款占比同行对比:"+fsdate
1375
1404
  dfp7=fs_item_analysis_7(df,tickers,fsdate,items7,title_txt,facecolor=facecolor)
1376
1405
 
1377
1406
  ### 存货
@@ -1390,7 +1419,8 @@ def asset_liab_structure_china(tickers,fsdates,facecolor='papayawhip'):
1390
1419
 
1391
1420
  #存货占比与行业对比
1392
1421
  items11=['存货','资产总计','存货占比%']
1393
- title_txt=title_head+"存货占比情况同行对比"
1422
+ #title_txt=title_head+"存货占比情况同行对比"
1423
+ title_txt="存货占比情况同行对比:"+fsdate
1394
1424
  dfp11=fs_item_analysis_7(df,tickers,fsdate,items11,title_txt,facecolor=facecolor)
1395
1425
 
1396
1426
  ### 偿债能力
@@ -1407,7 +1437,8 @@ def asset_liab_structure_china(tickers,fsdates,facecolor='papayawhip'):
1407
1437
  dfp14=fs_item_analysis_5(df,ticker,fsdates1,title_txt,facecolor=facecolor)
1408
1438
 
1409
1439
  #资产负债率同行比较
1410
- title_txt=title_head+"资产负债率同行比较"
1440
+ #title_txt=title_head+"资产负债率同行比较"
1441
+ title_txt="资产负债率同行比较:"+fsdate
1411
1442
  items15=['资产总计','资产负债率%','流动比率%','速动比率%']
1412
1443
  dfp15=fs_item_analysis_8(df,tickers,fsdate,items15,title_txt,facecolor=facecolor)
1413
1444
 
@@ -1469,9 +1500,9 @@ def income_cost_structure_china(tickers,fsdates,facecolor='papayawhip'):
1469
1500
  comparator=tickers[0]
1470
1501
  comparee=tickers[1:]
1471
1502
  print(" Conducting income-cost analysis ...")
1472
- print(" Comparator:",ticker_name(comparator,'stock'))
1503
+ print(" Focus on:",ticker_name(comparator,'stock'))
1473
1504
  #print(" Comparee :",ticker_name(comparee))
1474
- print(" Comparee :",end='')
1505
+ print(" Peers :",end='')
1475
1506
  if comparee != []:
1476
1507
  print_list(ticker_name(comparee,'stock'))
1477
1508
  else:
@@ -1490,15 +1521,15 @@ def income_cost_structure_china(tickers,fsdates,facecolor='papayawhip'):
1490
1521
  #print(" Possible reasons: no access to data source or invalid tickers")
1491
1522
  return
1492
1523
 
1493
- title_head=ticker_name(comparator,'stock')+"收入成本分析:"
1524
+ title_head=ticker_name(comparator,'stock')+""
1494
1525
 
1495
1526
  #收入成本总体变动趋势
1496
- title_txt=title_head+"主要项目及其变动趋势"
1527
+ title_txt=title_head+"主要利润表项目,"+fsdate
1497
1528
  items1=["营业总收入","营业总成本","营业成本","毛利润","营业利润","营业外收支","税前利润","所得税费用","净利润","归母净利润"]
1498
1529
  dfp1=fs_item_analysis_1(df,ticker,fsdate,items1,title_txt,facecolor=facecolor)
1499
1530
 
1500
1531
  #成本变动趋势
1501
- title_txt=title_head+"主要成本费用及其变动趋势"
1532
+ title_txt=title_head+"主要成本费用项目,"+fsdate
1502
1533
  print('')
1503
1534
  """
1504
1535
  items2=["营业总成本","营业成本","营业税金及附加","销售费用","管理费用","研发费用",
@@ -1514,18 +1545,27 @@ def income_cost_structure_china(tickers,fsdates,facecolor='papayawhip'):
1514
1545
  title_txt=title_head+"营业总成本占营业总收入比例情况"
1515
1546
  fsdates1=fsdates[:3]
1516
1547
  items3=["营业总成本","营业总收入"]
1517
-
1548
+ """
1518
1549
  notes1="注1:营业总成本包括营业成本、营业税金及附加、三大费用和资产减值损失"
1519
1550
  notes2="注2:营业收入=主营业务收入和其他非主营业务收入"
1520
1551
  notes3="注3:营业总收入=营业收入+非营业收入(投资收益、营业外收入等)"
1552
+ """
1553
+ notes1="注:\n营业总成本包括营业成本、营业税金及附加、三大费用和资产减值损失"
1554
+ notes2="营业收入=主营业务收入和其他非主营业务收入"
1555
+ notes3="营业总收入=营业收入+非营业收入(投资收益、营业外收入等)"
1556
+
1521
1557
  notes=notes1+'\n'+notes2+'\n'+notes3
1522
1558
  dfp3=fs_item_analysis_2(df,ticker,fsdates1,items3,title_txt,notes,facecolor=facecolor)
1523
1559
  #====================================================================
1524
1560
  title_txt=title_head+"营业成本占营业总成本比例情况"
1525
1561
  items4=["营业成本","营业总成本"]
1526
-
1562
+ """
1527
1563
  notes1="注1:营业成本是经营活动中发生的可归属于产品/劳务成本等的费用"
1528
1564
  notes2="注2:营业总成本包括营业成本、营业税金及附加、三大费用和资产减值损失"
1565
+ """
1566
+ notes1="注:\n营业成本是经营活动中发生的可归属于产品/劳务成本等的费用"
1567
+ notes2="营业总成本包括营业成本、营业税金及附加、三大费用和资产减值损失"
1568
+
1529
1569
  notes=notes1+'\n'+notes2
1530
1570
  dfp4=fs_item_analysis_2(df,ticker,fsdates1,items4,title_txt,notes,facecolor=facecolor)
1531
1571
 
@@ -1551,12 +1591,18 @@ def income_cost_structure_china(tickers,fsdates,facecolor='papayawhip'):
1551
1591
  notes="注:管理费用是行政管理部门为组织生产/经营活动发生的各种费用"
1552
1592
  dfp7=fs_item_analysis_2(df,ticker,fsdates1,items7,title_txt,notes,facecolor=facecolor)
1553
1593
 
1554
- title_txt=title_head+"三项费用率同行对比"
1594
+ #title_txt=title_head+"三项费用率同行对比"
1595
+ title_txt="三项费用率同行对比:"+fsdate
1555
1596
  items14=['营业总收入','销售费用率%','管理费用率%','研发费用率%']
1556
-
1597
+ """
1557
1598
  notes1="注1:销售费用率 = 销售费用 / 营业总收入"
1558
1599
  notes2="注2:管理费用率 = 管理费用 / 营业总收入"
1559
1600
  notes3="注3:研发费用率 = 研发费用 / 营业总收入"
1601
+ """
1602
+ notes1="注:\n销售费用率 = 销售费用 / 营业总收入"
1603
+ notes2="管理费用率 = 管理费用 / 营业总收入"
1604
+ notes3="研发费用率 = 研发费用 / 营业总收入"
1605
+
1560
1606
  notes=notes1+'\n'+notes2+'\n'+notes3
1561
1607
 
1562
1608
  dfp12=fs_item_analysis_8(df,tickers,fsdate,items14,title_txt,notes,facecolor=facecolor)
@@ -1583,7 +1629,8 @@ def income_cost_structure_china(tickers,fsdates,facecolor='papayawhip'):
1583
1629
  dfp11=fs_item_analysis_6(df,ticker,fsdates2,items13,title_txt,facecolor=facecolor)
1584
1630
 
1585
1631
  #同行比较
1586
- title_txt=title_head+"利润率同行对比"
1632
+ #title_txt=title_head+"利润率同行对比"
1633
+ title_txt="利润率同行对比:"+fsdate
1587
1634
  #items15=['营业利润','营业利润率%','税前利润率%','实际所得税率%','净利润','净利润率%']
1588
1635
  #items15=['毛利润率%','营业利润率%','税前利润率%','净利润率%']
1589
1636
  items15=['净利润率%','税前利润率%','营业利润率%','毛利润率%']
@@ -1647,8 +1694,8 @@ def cash_flow_structure_china(tickers,fsdates,facecolor='papayawhip'):
1647
1694
  comparator=tickers[0]
1648
1695
  comparee=tickers[1:]
1649
1696
  print(" Conducting cash flow analysis ...")
1650
- print(" Comparator:",ticker_name(comparator,'stock'))
1651
- print(" Comparee :",end='')
1697
+ print(" Focus on:",ticker_name(comparator,'stock'))
1698
+ print(" Peers :",end='')
1652
1699
  if comparee != []:
1653
1700
  print_list(ticker_name(comparee,'stock'))
1654
1701
  else:
@@ -1667,10 +1714,10 @@ def cash_flow_structure_china(tickers,fsdates,facecolor='papayawhip'):
1667
1714
  #print(" Possible reasons: no access to data source or invalid tickers")
1668
1715
  return
1669
1716
 
1670
- title_head=ticker_name(comparator,'stock')+"现金流分析:"
1717
+ title_head=ticker_name(comparator,'stock')+""
1671
1718
 
1672
1719
  #总体变动趋势
1673
- title_txt=title_head+"主要项目及其变动趋势"
1720
+ title_txt=title_head+"主要现金流项目,"+fsdate
1674
1721
  items1=["经营活动现金流净额","经营活动现金流入","经营活动现金流出",
1675
1722
  "投资活动现金流净额","投资活动现金流入","投资活动现金流出",
1676
1723
  "筹资活动现金流净额","筹资活动现金流入","筹资活动现金流出",
@@ -1694,38 +1741,57 @@ def cash_flow_structure_china(tickers,fsdates,facecolor='papayawhip'):
1694
1741
  dfp12=fs_item_analysis_6(df,ticker,fsdates2,items12,title_txt,facecolor=facecolor)
1695
1742
 
1696
1743
  #同行比较
1697
- title_txt=title_head+"现金收入能力同行比较"
1744
+ title_txt=title_head+"现金收入能力同行比较,"+fsdate
1698
1745
  items16=['销售现金比率%','现金购销比率%','营业现金回笼率%']
1699
-
1746
+ """
1700
1747
  notes1="注1:销售现金比率 = 经营活动现金流入 / 营业总收入"
1701
1748
  notes2="注2:现金购销比率 = 经营活动现金流出 / 经营活动现金流入"
1702
1749
  notes3="注3:营业现金回笼率 = 经营活动现金流入 / 营业总收入"
1750
+ """
1751
+ notes1="注:\n销售现金比率 = 经营活动现金流入 / 营业总收入"
1752
+ notes2="现金购销比率 = 经营活动现金流出 / 经营活动现金流入"
1753
+ notes3="营业现金回笼率 = 经营活动现金流入 / 营业总收入"
1754
+
1703
1755
  notes=notes1+'\n'+notes2+'\n'+notes3
1704
1756
  dfp12=fs_item_analysis_8(df,tickers,fsdate,items16,title_txt,notes,facecolor=facecolor)
1705
1757
 
1706
- title_txt=title_head+"现金偿债能力同行比较"
1758
+ title_txt=title_head+"现金偿债能力同行比较,"+fsdate
1707
1759
  items14=['短期现金偿债能力%','长期现金偿债能力%']
1708
-
1760
+ """
1709
1761
  notes1="注1:短期现金偿债能力 = 经营活动现金流净额 / 流动负债合计"
1710
1762
  notes2="注2:长期现金偿债能力 = 经营活动现金流净额 / 负债合计"
1763
+ """
1764
+ notes1="注:\n短期现金偿债能力 = 经营活动现金流净额 / 流动负债合计"
1765
+ notes2="长期现金偿债能力 = 经营活动现金流净额 / 负债合计"
1766
+
1711
1767
  notes=notes1+'\n'+notes2
1712
1768
  dfp12=fs_item_analysis_8(df,tickers,fsdate,items14,title_txt,notes,facecolor=facecolor)
1713
1769
 
1714
- title_txt=title_head+"现金支付能力同行比较"
1770
+ title_txt=title_head+"现金支付能力同行比较,"+fsdate
1715
1771
  items15=['现金支付股利能力(元)','现金综合支付能力%','支付给职工的现金比率%']
1716
-
1772
+ """
1717
1773
  notes1="注1:现金支付股利能力 = 经营活动现金流净额 / 流通股股数"
1718
1774
  notes2="注2:现金综合支付能力 = 经营活动现金流净额 / 所有者权益合计"
1719
1775
  notes3="注3:支付给职工的现金比率 = 支付给(为)职工支付的现金 / 经营活动现金流入"
1776
+ """
1777
+ notes1="注:\n现金支付股利能力 = 经营活动现金流净额 / 流通股股数"
1778
+ notes2="现金综合支付能力 = 经营活动现金流净额 / 所有者权益合计"
1779
+ notes3="支付给职工的现金比率 = 支付给(为)职工支付的现金 / 经营活动现金流入"
1780
+
1720
1781
  notes=notes1+'\n'+notes2+'\n'+notes3
1721
1782
  dfp12=fs_item_analysis_8(df,tickers,fsdate,items15,title_txt,notes,facecolor=facecolor)
1722
1783
 
1723
- title_txt=title_head+"财务指标含金量同行比较"
1784
+ title_txt=title_head+"财务指标含金量同行比较,"+fsdate
1724
1785
  items17=['盈利现金比率%','现金流入流出比率%','资产现金回收率%']
1725
-
1786
+ """
1726
1787
  notes1="注1:盈利现金比率 = 经营活动现金流净额 / 净利润"
1727
1788
  notes2="注2:现金流入流出比率 = 经营活动现金流入 / 经营活动现金流出"
1728
1789
  notes3="注3:资产现金回收率 = 经营活动现金流净额 / 资产总计"
1790
+ """
1791
+ notes1="注:\n盈利现金比率 = 经营活动现金流净额 / 净利润"
1792
+ notes2="现金流入流出比率 = 经营活动现金流入 / 经营活动现金流出"
1793
+ notes3="资产现金回收率 = 经营活动现金流净额 / 资产总计"
1794
+
1729
1795
  notes=notes1+'\n'+notes2+'\n'+notes3
1730
1796
  dfp12=fs_item_analysis_8(df,tickers,fsdate,items17,title_txt,notes,facecolor=facecolor)
1731
1797
 
@@ -1786,7 +1852,7 @@ def fs_analysis_china(tickers,fsdates=[],analysis_type='balance sheet', \
1786
1852
  category='profile',business_period='recent', \
1787
1853
  printout=False,gview=False, \
1788
1854
  loc1='upper left',loc2='upper right', \
1789
- facecolor='whitesmoke'):
1855
+ facecolor='papayawhip'):
1790
1856
  """
1791
1857
  【功能】财务报表分析,仅适用于中国A股,注意不适用于港股和美股(含中概股)
1792
1858
 
siat/sector_china.py CHANGED
@@ -760,9 +760,10 @@ if __name__=='__main__':
760
760
 
761
761
  print_industry_sw(itype='I',numberPerLine=5,colalign='right')
762
762
 
763
- def print_industry_sw(itype='I',numberPerLine=4,colalign='left'):
763
+ def print_industry_sw(itype='I',numberPerLine=5,colalign='left'):
764
764
  """
765
- 按照类别打印申万行业列表,名称(代码),每行5个
765
+ 功能:按照类别打印申万行业列表,名称(代码)
766
+ 行业分级itype:F="市场表征", I="一级行业", T="二级行业", 3="三级行业", S="风格指数"
766
767
  """
767
768
  df=industry_sw_list()
768
769
  df1=df[df['type']==itype]
@@ -776,8 +777,8 @@ def print_industry_sw(itype='I',numberPerLine=4,colalign='left'):
776
777
  ilist=list(df1['name_code'])
777
778
  print("\n*** 申万行业分类:"+iname+",共计"+str(len(ilist))+'个行业(板块)')
778
779
 
779
- if itype=='3':
780
- numberPerLine=4
780
+ if itype=='T': numberPerLine=4
781
+ if itype=='3': numberPerLine=3
781
782
 
782
783
  printInLine_md(ilist,numberPerLine=numberPerLine,colalign=colalign)
783
784
 
@@ -2075,9 +2076,9 @@ def industry_stock_sw(industry='801270.SW',top=5,printout=False):
2075
2076
  clist1=clist1+[c+'.SZ']
2076
2077
  """
2077
2078
  if printout:
2078
- title_txt="申万行业指数成分股排名与权重:"+industry_sw_name(industry)+'('+industry+'.SW)'
2079
+ title_txt="申万行业成分股:"+industry_sw_name(industry)+'('+industry+'.SW)'
2079
2080
  import datetime as dt; today=str(dt.date.today())
2080
- footnote="*** 成分股总数:"+str(cdf_total)+",数据来源:申万宏源,"+str(today)
2081
+ footnote="成分股总数:"+str(cdf_total)+",数据来源:申万宏源,"+str(today)
2081
2082
  df_directprint(cdf1,title_txt,footnote)
2082
2083
 
2083
2084
  #return clist1,cdf1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: siat
3
- Version: 3.0.25
3
+ Version: 3.0.35
4
4
  Summary: Securities Investment Analysis Tools (siat)
5
5
  Home-page: https://pypi.org/project/siat/
6
6
  Author: Prof. WANG Dehong, International Business School, Beijing Foreign Studies University
@@ -17,7 +17,7 @@ siat/capm_beta.py,sha256=cxXdRVBQBllhbfz1LeTJAIWvyRYhW54nhtNUXv4HwS0,29063
17
17
  siat/capm_beta2.py,sha256=hta-X1iWPjNbG1YYIVlQF-YvKA8An3KuEyLmUEZ3hH8,25562
18
18
  siat/capm_beta_test.py,sha256=ImR0c5mc4hIl714XmHztdl7qg8v1E2lycKyiqnFj6qs,1745
19
19
  siat/cmat_commons.py,sha256=Nj9Kf0alywaztVoMVeVVL_EZk5jRERJy8R8kBw88_Tg,38116
20
- siat/common.py,sha256=s9itecI3JgX5dfrodiFHKcjs5HsOihAMVW8yaETlHMQ,140584
20
+ siat/common.py,sha256=LhJQE0aqAWiLtXIcbEBWGW3xIGwTYu3YHe5w5nVNW_o,141547
21
21
  siat/compare_cross.py,sha256=3iP9TH2h3w27F2ARZc7FjKcErYCzWRc-TPiymOyoVtw,24171
22
22
  siat/compare_cross_test.py,sha256=xra5XYmQGEtfIZL2h-GssdH2hLdFIhG3eoCrkDrL3gY,3473
23
23
  siat/concepts_iwencai.py,sha256=m1YEDtECRT6FqtzlKm91pt2I9d3Z_XoP59BtWdRdu8I,3061
@@ -39,9 +39,9 @@ siat/financial_statements.py,sha256=Ek18eKHflxZ01evOIwnfH1KZ_M2g8Vr8SxkL1om-K7U,
39
39
  siat/financial_statements_test.py,sha256=FLhx8JD-tVVWSBGux6AMz1jioXX4U4bp9DmgFHYXb_w,716
40
40
  siat/financials.py,sha256=mbEZSNeHMMFcnPUryQWvdmNlWQvpnOG9eItgS7IVw3k,80458
41
41
  siat/financials2 - 副本.py,sha256=dKlNjIfKeoSy055fQ6E6TUj9HEoO5Ney9grD84J5kfk,14389
42
- siat/financials2.py,sha256=c5-QHu4VJn6f67mzX_t4cJc99rE3PmlChHC9VCNdYwY,42332
43
- siat/financials_china.py,sha256=ffikW5pgL0omDq0C8_7wKih-1nYfcVX1u23UAb1bp4U,188137
44
- siat/financials_china2.py,sha256=fkt9JCLS3nYWGrWFeQa9co1gv1H0PPe2pEw9jdRuoeU,82492
42
+ siat/financials2.py,sha256=CMfvR0zYoNdIE59ruX5AuwNqYil4UNhfRqhyuiC1rl8,44858
43
+ siat/financials_china.py,sha256=eF_vLhjkp5vB29WPSNKstoL-675M7Wp40k16FngBZNo,187808
44
+ siat/financials_china2.py,sha256=yATM_6yKT9IMAUPHXxfhDbldBoJZlGhKAjJOyToIg-A,87012
45
45
  siat/financials_china2_test.py,sha256=Erz5k4LyOplBBvYls2MypuqHpVNJ3daiLdyeJezNPu0,2722
46
46
  siat/financials_china2_test2.py,sha256=C8CuYTMHN4Mhp-sTu-Bmg0zMXRCaYV6ezGDoYartRYQ,3507
47
47
  siat/financials_china2_test3.py,sha256=UXYSA80DNSPRhHpovc2MA9JkpILWMAQaRatbWCHBNPs,3118
@@ -91,7 +91,7 @@ siat/risk_evaluation.py,sha256=I6B3gty-t--AkDCO0tKF-291YfpnF-IkXcFjqNKCt9I,76286
91
91
  siat/risk_evaluation_test.py,sha256=YEXM96gKzTfwN4U61AS4Rr1tV7KgUvn4rRC6f3iMw9s,3731
92
92
  siat/risk_free_rate.py,sha256=ZMr4cHikPvXvywr54gGqiI3Nvb69am6tq3zj2hwzANE,12384
93
93
  siat/risk_free_rate_test.py,sha256=CpmhUf8aEAEZeNu4gvWP2Mz2dLoIgBX5bI41vfUBEr8,4285
94
- siat/sector_china.py,sha256=IMrbgrYgv5y_ZiVK92AbWiup6eFwcC_u_Pib1srk_z0,104462
94
+ siat/sector_china.py,sha256=PBBRd7bajz3lJAcDRVvJGeeEniNUkgHBpfkowIG2ECE,104574
95
95
  siat/sector_china_test.py,sha256=1wq7ef8Bb_L8F0h0W6FvyBrIcBTEbrTV7hljtpj49U4,5843
96
96
  siat/security_price.py,sha256=2oHskgiw41KMGfqtnA0i2YjNNV6cYgtlUK0j3YeuXWs,29185
97
97
  siat/security_price2.py,sha256=kuYh0V5cqclkM6MjZUd-N361fv3oxGVVerYINuTzZrE,24622
@@ -132,7 +132,7 @@ siat/valuation.py,sha256=NKfeZMdDJOW42oLVHob6eSVBXUqlN1OCnnzwyGAst8c,48855
132
132
  siat/valuation_china.py,sha256=Tde2LzPDQy3Z7xOQQDw4ckQMPdROp_z0-GjFE6Z5_lI,67639
133
133
  siat/valuation_market_china_test.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
134
134
  siat/var_model_validation.py,sha256=f-oDewg7bPzyNanz_Y_jLH68NowAA3gXFehW_weKGG0,14898
135
- siat-3.0.25.dist-info/METADATA,sha256=AiUF8-PiZRMcVtJ3k7R-oCgYu9C5Hg1wE5WTNxOZ1qk,1448
136
- siat-3.0.25.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
137
- siat-3.0.25.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
138
- siat-3.0.25.dist-info/RECORD,,
135
+ siat-3.0.35.dist-info/METADATA,sha256=KnjDpqBllQ_mZKHGNVMU3J5zze_dUBpdwktja0l88_A,1448
136
+ siat-3.0.35.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
137
+ siat-3.0.35.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
138
+ siat-3.0.35.dist-info/RECORD,,
File without changes