siat 2.10.11__py3-none-any.whl → 2.10.12__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 +2 -1
- siat/financials_china.py +43 -12
- {siat-2.10.11.dist-info → siat-2.10.12.dist-info}/METADATA +1 -1
- {siat-2.10.11.dist-info → siat-2.10.12.dist-info}/RECORD +6 -6
- {siat-2.10.11.dist-info → siat-2.10.12.dist-info}/WHEEL +0 -0
- {siat-2.10.11.dist-info → siat-2.10.12.dist-info}/top_level.txt +0 -0
siat/__init__.py
CHANGED
@@ -16,13 +16,14 @@ from siat.allin import *
|
|
16
16
|
from IPython.core.interactiveshell import InteractiveShell
|
17
17
|
InteractiveShell.ast_node_interactivity='all'
|
18
18
|
#==============================================================================
|
19
|
+
# 检查是否存在新版本
|
19
20
|
import pkg_resources
|
20
21
|
current_version=pkg_resources.get_distribution("siat").version
|
21
22
|
import luddite
|
22
23
|
latest_version=luddite.get_version_pypi("siat")
|
23
24
|
|
24
25
|
if latest_version != current_version:
|
25
|
-
print("
|
26
|
+
print("Welcome to Security Investment Analysis Toolkit (siat)")
|
26
27
|
print("The siat version in your computer is",current_version,"\b, latest version is",latest_version,'\n')
|
27
28
|
print("*** If you expect to upgrade siat, use the instruction below in a command window:")
|
28
29
|
print(" pip install siat --upgrade")
|
siat/financials_china.py
CHANGED
@@ -3704,34 +3704,44 @@ def get_fin_indicator_1ticker_china(ticker,fsdates):
|
|
3704
3704
|
for index,row in dft5.iterrows():
|
3705
3705
|
# 改变顺序要谨慎
|
3706
3706
|
if ('每股' in row['指标']) and (row['选项'] == ''):
|
3707
|
-
row['选项']='每股指标'
|
3707
|
+
#row['选项']='每股指标'
|
3708
|
+
dft5.loc[index,'选项']='每股指标'
|
3708
3709
|
|
3709
3710
|
if ('周转' in row['指标']) and (row['选项'] == ''):
|
3710
|
-
row['选项']='营运能力'
|
3711
|
+
#row['选项']='营运能力'
|
3712
|
+
dft5.loc[index,'选项']='营运能力'
|
3711
3713
|
|
3712
3714
|
if ('应收' in row['指标']) and (row['选项'] == ''):
|
3713
|
-
row['选项']='应收账款'
|
3715
|
+
#row['选项']='应收账款'
|
3716
|
+
dft5.loc[index,'选项']='应收账款'
|
3714
3717
|
|
3715
3718
|
if ('预付' in row['指标']) and (row['选项'] == ''):
|
3716
|
-
row['选项']='预付账款'
|
3719
|
+
#row['选项']='预付账款'
|
3720
|
+
dft5.loc[index,'选项']='预付账款'
|
3717
3721
|
|
3718
3722
|
if str_contain_any_substr(row['指标'],debtstrlist) and (row['选项'] == ''):
|
3719
|
-
row['选项']='偿债能力'
|
3723
|
+
#row['选项']='偿债能力'
|
3724
|
+
dft5.loc[index,'选项']='偿债能力'
|
3720
3725
|
|
3721
3726
|
if ('现金' in row['指标']) and (row['选项'] == ''):
|
3722
|
-
row['选项']='现金指标'
|
3727
|
+
#row['选项']='现金指标'
|
3728
|
+
dft5.loc[index,'选项']='现金指标'
|
3723
3729
|
|
3724
3730
|
if ('亿元' in row['指标']) and (row['选项'] == ''):
|
3725
|
-
row['选项']='规模指标'
|
3726
|
-
|
3731
|
+
#row['选项']='规模指标'
|
3732
|
+
dft5.loc[index,'选项']='规模指标'
|
3733
|
+
"""
|
3727
3734
|
if ('亿元' in row['指标']) and (row['选项'] == ''):
|
3728
|
-
row['选项']='规模指标'
|
3729
|
-
|
3735
|
+
#row['选项']='规模指标'
|
3736
|
+
dft5.loc[index,'选项']='规模指标'
|
3737
|
+
"""
|
3730
3738
|
if str_contain_any_substr(row['指标'],retstrlist) and (row['选项'] == ''):
|
3731
|
-
row['选项']='利润回报'
|
3739
|
+
#row['选项']='利润回报'
|
3740
|
+
dft5.loc[index,'选项']='利润回报'
|
3732
3741
|
|
3733
3742
|
if (row['选项'] == ''):
|
3734
|
-
row['选项']='其他指标'
|
3743
|
+
#row['选项']='其他指标'
|
3744
|
+
dft5.loc[index,'选项']='其他指标'
|
3735
3745
|
|
3736
3746
|
return dft5
|
3737
3747
|
|
@@ -3784,6 +3794,14 @@ if __name__=='__main__':
|
|
3784
3794
|
tickers=['000002.SZ','600048.SS','001979.SZ','600325.SS','000069.SZ','600383.SS','600895.SS','601155.SS']
|
3785
3795
|
fidf=compare_fin_indicator_china(tickers,fsdates)
|
3786
3796
|
|
3797
|
+
tickers='601615.SS'
|
3798
|
+
fsdates=['2022-12-31',
|
3799
|
+
'2021-12-31',
|
3800
|
+
'2020-12-31',
|
3801
|
+
'2019-12-31',
|
3802
|
+
'2018-12-31',
|
3803
|
+
]
|
3804
|
+
|
3787
3805
|
def compare_fin_indicator_china(tickers,fsdates):
|
3788
3806
|
"""
|
3789
3807
|
功能:分类别显示财报摘要中的指标
|
@@ -3994,6 +4012,13 @@ def compare_fin_indicator_china(tickers,fsdates):
|
|
3994
4012
|
'3. 固定资产净值率=(固定资产原值-累计折旧)/固定资产原值*100%,反映企业全部固定资产平均新旧程度 \n'+ \
|
3995
4013
|
'4. 资本固定化比率=非流动资产/净资产*100%,若超过100%,说明固定资产资金投入超过自身能力,易造成财务状况恶化。 \n',
|
3996
4014
|
}
|
4015
|
+
|
4016
|
+
# 标记选项类型
|
4017
|
+
typedict_keys=list(typedict.keys())
|
4018
|
+
for index,row in fsdf.iterrows():
|
4019
|
+
for k in typedict_keys:
|
4020
|
+
if row['指标'] in typedict[k]:
|
4021
|
+
fsdf.loc[index,'选项']=k
|
3997
4022
|
|
3998
4023
|
# 一只股票情形:多日期
|
3999
4024
|
if len(tickers_found) == 1:
|
@@ -4004,6 +4029,7 @@ def compare_fin_indicator_china(tickers,fsdates):
|
|
4004
4029
|
fsdf1=fsdf[fsdf['ticker']==ticker1]
|
4005
4030
|
for ty in typelist:
|
4006
4031
|
dft=fsdf1[fsdf1['选项']==ty]
|
4032
|
+
#dft=fsdf1[fsdf1['选项'].apply(lambda x: x in typedict[ty])]
|
4007
4033
|
#print(list(dft['指标']))
|
4008
4034
|
|
4009
4035
|
# 自定义排序
|
@@ -4027,6 +4053,11 @@ def compare_fin_indicator_china(tickers,fsdates):
|
|
4027
4053
|
print("\n***",ty+':')
|
4028
4054
|
colalign=['center','left']+['right']*(len(list(dft3)) - 1)
|
4029
4055
|
print(dft3.to_markdown(tablefmt='Simple',index=True,colalign=colalign))
|
4056
|
+
"""
|
4057
|
+
注意:若dft3为空,则会出现错误:list assignment index out of range
|
4058
|
+
无论如何修改colalign都没用
|
4059
|
+
"""
|
4060
|
+
|
4030
4061
|
print(notesdict[ty])
|
4031
4062
|
|
4032
4063
|
return dft3
|
@@ -1,4 +1,4 @@
|
|
1
|
-
siat/__init__.py,sha256=
|
1
|
+
siat/__init__.py,sha256=WcOl_oq7p3eXhWXoRc82MO-QS5DVjXn8J-c5TFrPdrc,2112
|
2
2
|
siat/allin.py,sha256=Myw0PYPpD-MPkinxj532RTJBZhqvp1KsvJS8s5EeO30,2390
|
3
3
|
siat/alpha_vantage_test.py,sha256=tKr-vmuFH3CZAqwmISz6jzjPHzV1JJl3sPfZdz8aTfM,747
|
4
4
|
siat/assets_liquidity.py,sha256=WEdxeENumZZZ7sFmwjDeX9rClHXGGHbnlrL2NMkgqnw,28808
|
@@ -38,7 +38,7 @@ siat/financial_statements_test.py,sha256=FLhx8JD-tVVWSBGux6AMz1jioXX4U4bp9DmgFHY
|
|
38
38
|
siat/financials.py,sha256=6gSwc2VzJy_cAbK2imXEl3Kldw3mmT2Gm54JbK7x35I,78743
|
39
39
|
siat/financials2 - 副本.py,sha256=dKlNjIfKeoSy055fQ6E6TUj9HEoO5Ney9grD84J5kfk,14389
|
40
40
|
siat/financials2.py,sha256=sEfa_JTwIp0SsJLtOsTTxiJZXwArfr9hYlaIsBRxc8E,35965
|
41
|
-
siat/financials_china.py,sha256=
|
41
|
+
siat/financials_china.py,sha256=nUSPS4SDLP1RaOZF6uIvel8pFl3X_aBO_I0Opl1O8RI,177685
|
42
42
|
siat/financials_china2.py,sha256=EWDuSHQc6TMeU8mXV_LyLLI3URBU8WQYLEZ3obXyB6E,71864
|
43
43
|
siat/financials_china2_test.py,sha256=Erz5k4LyOplBBvYls2MypuqHpVNJ3daiLdyeJezNPu0,2722
|
44
44
|
siat/financials_china2_test2.py,sha256=C8CuYTMHN4Mhp-sTu-Bmg0zMXRCaYV6ezGDoYartRYQ,3507
|
@@ -123,7 +123,7 @@ siat/universal_test.py,sha256=CDAOffW1Rvs-TcNN5giWVvHMlch1w4dp-w5SIV9jXL0,3936
|
|
123
123
|
siat/valuation_china.py,sha256=SPJFU9J8WJhz_HOXgIAjoG8dZs1zSPS1BZxkjhA-D1w,52241
|
124
124
|
siat/valuation_market_china_test.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
|
125
125
|
siat/var_model_validation.py,sha256=zB_Skk_tmzIR15l6oAW3am4HBGVIG-eZ8gJhCdXZ8Qw,14859
|
126
|
-
siat-2.10.
|
127
|
-
siat-2.10.
|
128
|
-
siat-2.10.
|
129
|
-
siat-2.10.
|
126
|
+
siat-2.10.12.dist-info/METADATA,sha256=xmg78Xpf6IGBh5nuupO7-HCebsFLEPPf82OjjipMu7U,1354
|
127
|
+
siat-2.10.12.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
128
|
+
siat-2.10.12.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
|
129
|
+
siat-2.10.12.dist-info/RECORD,,
|
File without changes
|
File without changes
|