siat 2.10.13__py3-none-any.whl → 2.11.2__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/__init__.py CHANGED
Binary file
siat/allin.py CHANGED
Binary file
siat/common.py CHANGED
@@ -988,6 +988,7 @@ def printlist(longlist,numperline=5,beforehand='',separator=' '):
988
988
  if __name__=='__main__':
989
989
  ticker='600519.SS'
990
990
  ticker='AAPL'
991
+ result,prefix,suffix=split_prefix_suffix(ticker)
991
992
 
992
993
  def split_prefix_suffix(ticker):
993
994
  """
siat/sector_china.py CHANGED
@@ -1032,6 +1032,8 @@ def print_industry_component_sw2(icode,numberPerLine=5,colalign='left'):
1032
1032
  return
1033
1033
 
1034
1034
  #==============================================================================
1035
+
1036
+
1035
1037
  def industry_sw_name(icode):
1036
1038
  """
1037
1039
  功能:将申万指数代码转换为指数名称。
@@ -1053,10 +1055,13 @@ def industry_sw_name(icode):
1053
1055
  return iname
1054
1056
 
1055
1057
  if __name__=='__main__':
1056
- icode='801862'
1058
+ icode='801735'
1057
1059
  industry_sw_name(icode)
1058
1060
 
1059
1061
  #==============================================================================
1062
+ if __name__=='__main__':
1063
+ industry_sw_code('光伏设备')
1064
+
1060
1065
  def industry_sw_code(iname):
1061
1066
  """
1062
1067
  功能:将申万指数名称转换为指数代码。
@@ -2683,7 +2688,7 @@ if __name__=='__main__':
2683
2688
  sw_level='2'
2684
2689
 
2685
2690
 
2686
- def find_peers_china(industry='',top=5,rank=20,sw_level='2'):
2691
+ def find_peers_china(industry='',top=20,rank=20,sw_level='2'):
2687
2692
  """
2688
2693
  功能:
2689
2694
  当industry = '',显示申万二级行业分类
@@ -2691,6 +2696,11 @@ def find_peers_china(industry='',top=5,rank=20,sw_level='2'):
2691
2696
  sw_level:申万一级行业'1',二级行业'2',三级行业'3',其他'F'和'S'
2692
2697
  """
2693
2698
 
2699
+ # 避免混淆
2700
+ if top < rank:
2701
+ rank=top
2702
+
2703
+ # 默认情形处理
2694
2704
  if industry == '':
2695
2705
  itype_list=['I','T','3','F','S']
2696
2706
  sw_level_list=['1','2','3','F','S']