siat 3.7.28__py3-none-any.whl → 3.7.29__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 +27 -5
- siat/sector_china.py +12 -10
- {siat-3.7.28.dist-info → siat-3.7.29.dist-info}/METADATA +1 -1
- {siat-3.7.28.dist-info → siat-3.7.29.dist-info}/RECORD +7 -7
- {siat-3.7.28.dist-info → siat-3.7.29.dist-info}/LICENSE +0 -0
- {siat-3.7.28.dist-info → siat-3.7.29.dist-info}/WHEEL +0 -0
- {siat-3.7.28.dist-info → siat-3.7.29.dist-info}/top_level.txt +0 -0
siat/__init__.py
CHANGED
@@ -19,17 +19,39 @@ current_version=pkg_resources.get_distribution("siat").version
|
|
19
19
|
#==============================================================================
|
20
20
|
# 处理stooq.py修复问题
|
21
21
|
restart=False
|
22
|
+
tagfile='fix_package.pkl'
|
23
|
+
|
24
|
+
#判断操作系统
|
25
|
+
import sys; czxt=sys.platform
|
26
|
+
if czxt in ['win32','win64']:
|
27
|
+
os='windows'
|
28
|
+
elif czxt in ['darwin']: #MacOSX
|
29
|
+
os='mac'
|
30
|
+
elif czxt in ['linux']: #linux
|
31
|
+
os='linux'
|
32
|
+
else:
|
33
|
+
os='windows'
|
34
|
+
|
35
|
+
# 确定标记文件存放地址
|
36
|
+
import pandas
|
37
|
+
srcpath=pandas.__path__[0]
|
38
|
+
if os == 'windows':
|
39
|
+
srcpath1=srcpath.replace("\\",'/')
|
40
|
+
srcfile=srcpath1+'/'+tagfile
|
41
|
+
else:
|
42
|
+
srcpath1=srcpath
|
43
|
+
srcfile=srcpath1+'/'+file
|
44
|
+
|
22
45
|
try:
|
23
|
-
with open(
|
46
|
+
with open(srcfile,'rb') as file:
|
24
47
|
siat_ver=pickle.load(file)
|
25
48
|
if siat_ver != current_version:
|
26
49
|
restart=True
|
27
|
-
with open(
|
50
|
+
with open(srcfile,'wb') as file:
|
28
51
|
pickle.dump(current_version,file)
|
29
|
-
|
30
52
|
except:
|
31
53
|
restart=True
|
32
|
-
with open(
|
54
|
+
with open(srcfile,'wb') as file:
|
33
55
|
pickle.dump(current_version,file)
|
34
56
|
|
35
57
|
#屏蔽函数内print信息输出的类
|
@@ -48,6 +70,6 @@ if not restart:
|
|
48
70
|
else:
|
49
71
|
with HiddenPrints():
|
50
72
|
fix_package()
|
51
|
-
print("Please RESTART Python kernel and run this command again
|
73
|
+
print("Please RESTART Python kernel and run this command again")
|
52
74
|
|
53
75
|
#==============================================================================
|
siat/sector_china.py
CHANGED
@@ -3480,11 +3480,12 @@ def contains_chinese(text):
|
|
3480
3480
|
#==============================================================================
|
3481
3481
|
if __name__=='__main__':
|
3482
3482
|
ticker='600791.SS'
|
3483
|
+
ticker='689009.SS'
|
3483
3484
|
|
3484
3485
|
ticker=['600791.SS','东阿阿胶']
|
3485
3486
|
level='1'
|
3486
3487
|
|
3487
|
-
find_industry_sw(ticker)
|
3488
|
+
find_industry_sw(ticker,level='1')
|
3488
3489
|
|
3489
3490
|
def find_industry_sw(ticker,level='1',ticker_order=True,max_sleep=30):
|
3490
3491
|
"""
|
@@ -3621,7 +3622,7 @@ if __name__=='__main__':
|
|
3621
3622
|
peers=stock_industry_peer_em(ticker,indicator="市盈率",rank=10)
|
3622
3623
|
|
3623
3624
|
def stock_peers_em(ticker='',indicator='',rank=10, \
|
3624
|
-
force_show_stock=
|
3625
|
+
force_show_stock=True, \
|
3625
3626
|
font_size="16px",facecolor="papayawhip", \
|
3626
3627
|
numberPerLine=5):
|
3627
3628
|
"""
|
@@ -3724,7 +3725,7 @@ def stock_peers_em(ticker='',indicator='',rank=10, \
|
|
3724
3725
|
df_disp=cfg[collist].tail(abs(rank))
|
3725
3726
|
|
3726
3727
|
#强制显示所选股票
|
3727
|
-
if force_show_stock:
|
3728
|
+
if force_show_stock and rank != 10:
|
3728
3729
|
#所选股票是否在其中?
|
3729
3730
|
if not ticker[:6] in list(df_disp["代码"]):
|
3730
3731
|
ticker_seq=cfg[cfg["代码"]==ticker[:6]]["序号"].values[0]
|
@@ -4020,9 +4021,10 @@ def stock_peers_sw(ticker):
|
|
4020
4021
|
print("\n #Warning(stock_peers_sw): failed to search peers for",ticker)
|
4021
4022
|
print(" Possible solutions:")
|
4022
4023
|
print(" Try first: upgrade akshare, restart Jupyter and try again")
|
4023
|
-
print(" If not working, uninstall anaconda and reinstall a newer version")
|
4024
|
+
#print(" If not working, uninstall anaconda and reinstall a newer version")
|
4024
4025
|
|
4025
4026
|
#查找股票在行业板块中的位置
|
4027
|
+
ticker_item=''
|
4026
4028
|
if not ilist=='':
|
4027
4029
|
ticker6=ticker[:6]
|
4028
4030
|
for i in ilist:
|
@@ -4030,12 +4032,12 @@ def stock_peers_sw(ticker):
|
|
4030
4032
|
ticker_item=i
|
4031
4033
|
ticker_pos=ilist.index(i)+1
|
4032
4034
|
break
|
4033
|
-
|
4034
|
-
|
4035
|
-
|
4036
|
-
|
4037
|
-
|
4038
|
-
|
4035
|
+
if ticker_item != '':
|
4036
|
+
footnote0="注:"
|
4037
|
+
footnote1=ticker_item+"在申万行业"+hangye_final+"指数中的权重排名为"+str(ticker_pos)+'/'+str(len(ilist))
|
4038
|
+
footnote2="该指数的权重排名依据主要包括公司的市值规模、流动性以及市场代表性"
|
4039
|
+
footnote=footnote0+'\n'+footnote1+'\n'+footnote2
|
4040
|
+
print(footnote)
|
4039
4041
|
return
|
4040
4042
|
|
4041
4043
|
#==============================================================================
|
@@ -1,5 +1,5 @@
|
|
1
1
|
siat/__init__ -20240701.py,sha256=gP5uajXnJesnH5SL0ZPwq_Qhv59AG1bs4qwZv26Fo2Y,2894
|
2
|
-
siat/__init__.py,sha256=
|
2
|
+
siat/__init__.py,sha256=N2D1ydfh_lejim0z6eQR17utNF7-5lk04c1esGO71_E,2223
|
3
3
|
siat/__init__.py.backup_20250214.py,sha256=pIo4CV3lNPKIhitmhIh_6aAfZrmzQWGNDcEnvZ7GXoc,3216
|
4
4
|
siat/allin.py,sha256=x1QC29PUBUYiA6IAbQKbRvtxIEUOBx8dy5k7zh1ABT4,2970
|
5
5
|
siat/alpha_vantage_test.py,sha256=tKr-vmuFH3CZAqwmISz6jzjPHzV1JJl3sPfZdz8aTfM,747
|
@@ -97,7 +97,7 @@ siat/risk_evaluation.py,sha256=I6B3gty-t--AkDCO0tKF-291YfpnF-IkXcFjqNKCt9I,76286
|
|
97
97
|
siat/risk_evaluation_test.py,sha256=YEXM96gKzTfwN4U61AS4Rr1tV7KgUvn4rRC6f3iMw9s,3731
|
98
98
|
siat/risk_free_rate.py,sha256=IBuRqA2kppdZsW4D4fapW7vnM5HMEXOn95A5r9Pkwlo,12384
|
99
99
|
siat/risk_free_rate_test.py,sha256=CpmhUf8aEAEZeNu4gvWP2Mz2dLoIgBX5bI41vfUBEr8,4285
|
100
|
-
siat/sector_china.py,sha256=
|
100
|
+
siat/sector_china.py,sha256=cWa5EiSDX7E7w_XCDNOBgxtim474ayYMDfPkVex8fFA,155257
|
101
101
|
siat/sector_china_test.py,sha256=1wq7ef8Bb_L8F0h0W6FvyBrIcBTEbrTV7hljtpj49U4,5843
|
102
102
|
siat/security_price.py,sha256=2oHskgiw41KMGfqtnA0i2YjNNV6cYgtlUK0j3YeuXWs,29185
|
103
103
|
siat/security_price2.py,sha256=dYwvz9H-uWp-Gyc1g_MId9k8cITS6ZHmjW-Fc2ypp-0,26587
|
@@ -143,8 +143,8 @@ siat/valuation_china.py,sha256=CVp1IwIsF3Om0J29RGkyxZLt4n9Ug-ua_RKhLwL9fUQ,69624
|
|
143
143
|
siat/valuation_market_china_test.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
|
144
144
|
siat/var_model_validation.py,sha256=R0caWnuZarrRg9939hxh3vJIIpIyPfvelYmzFNZtPbo,14910
|
145
145
|
siat/yf_name.py,sha256=laNKMTZ9hdenGX3IZ7G0a2RLBKEWtUQJFY9CWuk_fp8,24058
|
146
|
-
siat-3.7.
|
147
|
-
siat-3.7.
|
148
|
-
siat-3.7.
|
149
|
-
siat-3.7.
|
150
|
-
siat-3.7.
|
146
|
+
siat-3.7.29.dist-info/LICENSE,sha256=NTEMMROY9_4U1szoKC3N2BLHcDd_o5uTgqdVH8tbApw,1071
|
147
|
+
siat-3.7.29.dist-info/METADATA,sha256=fOU35G2D0BocknrWdcxbCMUJcVPpHVV9cEyhfK9H1nk,8321
|
148
|
+
siat-3.7.29.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
149
|
+
siat-3.7.29.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
|
150
|
+
siat-3.7.29.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|