siat 3.1.14__py3-none-any.whl → 3.1.20__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/common.py +23 -1
- siat/fund_china.py +249 -9
- siat/stock_technical.py +29 -1
- {siat-3.1.14.dist-info → siat-3.1.20.dist-info}/METADATA +1 -1
- {siat-3.1.14.dist-info → siat-3.1.20.dist-info}/RECORD +7 -7
- {siat-3.1.14.dist-info → siat-3.1.20.dist-info}/WHEEL +0 -0
- {siat-3.1.14.dist-info → siat-3.1.20.dist-info}/top_level.txt +0 -0
siat/common.py
CHANGED
@@ -3722,7 +3722,10 @@ def upgrade_siat(module_list=['siat','akshare','pandas','pandas_datareader', \
|
|
3722
3722
|
"""
|
3723
3723
|
功能:一次性升级siat及其相关插件
|
3724
3724
|
|
3725
|
-
注意:pip的路径问题!
|
3725
|
+
注意:pip的路径问题!
|
3726
|
+
可在Anaconda Prompt下先执行python -m ensurepip再尝试。
|
3727
|
+
或python -m pip install --upgrade pip
|
3728
|
+
如果上述方法不适用,您可能需要重新安装Python,并确保在安装过程中选中了“Add Python to PATH”
|
3726
3729
|
"""
|
3727
3730
|
print(" Try upgrading siat and related modules, please wait ... ...")
|
3728
3731
|
#获取系统目录
|
@@ -3805,3 +3808,22 @@ def df_swap_columns(df, col1, col2):
|
|
3805
3808
|
|
3806
3809
|
return df[cols]
|
3807
3810
|
#==============================================================================
|
3811
|
+
if __name__=='__main__':
|
3812
|
+
adate="2024-6-8"
|
3813
|
+
is_weekend(adate)
|
3814
|
+
|
3815
|
+
def is_weekend(adate):
|
3816
|
+
import pandas as pd
|
3817
|
+
try:
|
3818
|
+
datepd=pd.to_datetime(adate)
|
3819
|
+
except:
|
3820
|
+
return False
|
3821
|
+
|
3822
|
+
weekday = datepd.weekday()
|
3823
|
+
return weekday == 5 or weekday == 6 # 周五和周六的索引值分别为5和6
|
3824
|
+
|
3825
|
+
|
3826
|
+
#==============================================================================
|
3827
|
+
#==============================================================================
|
3828
|
+
#==============================================================================
|
3829
|
+
#==============================================================================
|
siat/fund_china.py
CHANGED
@@ -701,6 +701,226 @@ if __name__=='__main__':
|
|
701
701
|
df=pof_list_china()
|
702
702
|
|
703
703
|
#==============================================================================
|
704
|
+
if __name__=='__main__':
|
705
|
+
df=get_oef_rank_china()
|
706
|
+
|
707
|
+
def get_oef_rank_china():
|
708
|
+
"""
|
709
|
+
功能:中国开放式基金排名,单位净值,累计净值,手续费
|
710
|
+
不分类
|
711
|
+
"""
|
712
|
+
|
713
|
+
print("Searching for open-ended fund (OEF) information in China ...")
|
714
|
+
|
715
|
+
import pandas as pd
|
716
|
+
import akshare as ak
|
717
|
+
|
718
|
+
#获取开放式基金实时信息
|
719
|
+
try:
|
720
|
+
print(" Looking for OEF net value information ...")
|
721
|
+
df1 = ak.fund_open_fund_daily_em()
|
722
|
+
except:
|
723
|
+
print(" #Error(oef_rank_china): data source tentatively busy or unavailable, try later")
|
724
|
+
return None
|
725
|
+
|
726
|
+
collist=list(df1)
|
727
|
+
nvname1=collist[2]
|
728
|
+
nvname1_num_all=len(df1)
|
729
|
+
nvname1_num_eq=len(df1[df1[nvname1]==''])
|
730
|
+
nvname1_ratio_eq=nvname1_num_eq / nvname1_num_all
|
731
|
+
|
732
|
+
nvname2=collist[3]
|
733
|
+
#if df1[nvname1].eq('').all():
|
734
|
+
if nvname1_ratio_eq > 0.5: #空缺率超过50%?
|
735
|
+
nvname1=collist[4]
|
736
|
+
nvname2=collist[5]
|
737
|
+
nvdate=nvname1[:10]
|
738
|
+
|
739
|
+
df1x=df1[df1[nvname1] != '']
|
740
|
+
|
741
|
+
#修改列名
|
742
|
+
df1x.rename(columns={nvname1:'单位净值',nvname2:'累计净值'}, inplace=True)
|
743
|
+
df1c=df1x[['基金代码','基金简称','单位净值','累计净值','日增长率','申购状态','赎回状态','手续费']]
|
744
|
+
|
745
|
+
#获取所有公募基金类型信息
|
746
|
+
print(" Looking for OEF category information ...")
|
747
|
+
df2 = ak.fund_name_em()
|
748
|
+
|
749
|
+
print(" Analyzing OEF query requests ...")
|
750
|
+
df2a=df2[['基金代码','基金类型']]
|
751
|
+
|
752
|
+
#合成基金类型信息
|
753
|
+
df3 = pd.merge(df1c,df2a,on = ['基金代码'],how='left')
|
754
|
+
|
755
|
+
df3.fillna(0,inplace=True)
|
756
|
+
df3=df3.replace('',0)
|
757
|
+
df3['单位净值']=df3['单位净值'].astype('float')
|
758
|
+
df3['累计净值']=df3['累计净值'].astype('float')
|
759
|
+
df3['日增长率']=df3['日增长率'].astype('float')
|
760
|
+
|
761
|
+
# 避免该字段出现非字符串类型引起后续出错
|
762
|
+
df3['基金类型']=df3['基金类型'].astype(str)
|
763
|
+
df3['净值日期']=nvdate
|
764
|
+
|
765
|
+
print("Successfully retrieved",len(df3),"Chinese OEF products disclosing performance on",nvdate)
|
766
|
+
|
767
|
+
return df3
|
768
|
+
|
769
|
+
#==============================================================================
|
770
|
+
if __name__=='__main__':
|
771
|
+
fund_type='全部类型'
|
772
|
+
fund_type='QDII'
|
773
|
+
fund_type='REIT'
|
774
|
+
fund_type='FOF'
|
775
|
+
fund_type='LOF'
|
776
|
+
fund_type='FOF-LOF'
|
777
|
+
fund_type='MOM'
|
778
|
+
|
779
|
+
rank=5
|
780
|
+
indicator='单位净值'
|
781
|
+
|
782
|
+
qdii=oef_rank_china2(df,fund_type='QDII',rank=5)
|
783
|
+
|
784
|
+
def oef_rank_china2(df,fund_type='全部类型',rank=5,indicator='单位净值'):
|
785
|
+
"""
|
786
|
+
功能:中国开放式基金排名,单位净值,累计净值,手续费
|
787
|
+
仅分类用
|
788
|
+
"""
|
789
|
+
|
790
|
+
typelist=['单位净值','累计净值','手续费','增长率']
|
791
|
+
if indicator not in typelist:
|
792
|
+
print(" #Error(oef_rank_china2): unsupported indicator",indicator)
|
793
|
+
print(" Supported indicators:",typelist)
|
794
|
+
return None
|
795
|
+
|
796
|
+
nvdate=df['净值日期'].values[0]
|
797
|
+
|
798
|
+
#过滤基金类型
|
799
|
+
if fund_type not in ['全部类型','','all']:
|
800
|
+
fundtypelist=list(set(list(df['基金类型'])))
|
801
|
+
try: fundtypelist.remove('0')
|
802
|
+
except: pass
|
803
|
+
|
804
|
+
fundtypelist=fundtypelist+['LOF','FOF-LOF','REITs','REIT','MOM']
|
805
|
+
#检查基金类型是否存在
|
806
|
+
found=False
|
807
|
+
for ft in fundtypelist:
|
808
|
+
if ft==0: continue
|
809
|
+
if fund_type in ft:
|
810
|
+
found=True
|
811
|
+
break
|
812
|
+
|
813
|
+
#未找到基金类型
|
814
|
+
if not found:
|
815
|
+
print(" Notice: unpredefined fund type",fund_type)
|
816
|
+
print(" Predefined fund types:")
|
817
|
+
fundtypelist.sort(reverse=True)
|
818
|
+
printlist(fundtypelist,numperline=5,beforehand=' '*4,separator=' ')
|
819
|
+
print(" Continue to search key word",fund_type,"among fund type and fund name ...")
|
820
|
+
#return None
|
821
|
+
|
822
|
+
df.dropna(inplace=True)
|
823
|
+
|
824
|
+
df['基金类型s']=False
|
825
|
+
df['基金类型s']=df.apply(lambda x: True if fund_type in x['基金类型'] else x['基金类型s'],axis=1)
|
826
|
+
df['基金类型s']=df.apply(lambda x: True if fund_type in x['基金简称'] else x['基金类型s'],axis=1)
|
827
|
+
|
828
|
+
if fund_type == 'QDII':
|
829
|
+
df['基金类型s']=df.apply(lambda x: False if '不含' in x['基金类型'] else x['基金类型s'],axis=1)
|
830
|
+
|
831
|
+
if fund_type == 'FOF':
|
832
|
+
df['基金类型s']=df.apply(lambda x: True if (fund_type in x['基金类型'] or fund_type in x['基金简称']) else x['基金类型s'],axis=1)
|
833
|
+
#df['基金类型s']=df.apply(lambda x: False if ('LOF' in x['基金类型'] or 'LOF' in x['基金简称']) else x['基金类型s'],axis=1)
|
834
|
+
|
835
|
+
if fund_type == 'LOF':
|
836
|
+
df['基金类型s']=df.apply(lambda x: True if (fund_type in x['基金类型'] or fund_type in x['基金简称']) else x['基金类型s'],axis=1)
|
837
|
+
#df['基金类型s']=df.apply(lambda x: False if ('FOF' in x['基金类型'] or 'FOF' in x['基金简称']) else x['基金类型s'],axis=1)
|
838
|
+
|
839
|
+
if fund_type == 'FOF-LOF':
|
840
|
+
df['基金类型s']=df.apply(lambda x: True if (fund_type in x['基金类型'] or fund_type in x['基金简称']) else x['基金类型s'],axis=1)
|
841
|
+
|
842
|
+
|
843
|
+
df=df[df['基金类型s']==True]
|
844
|
+
|
845
|
+
num=len(df)
|
846
|
+
if num==0:
|
847
|
+
print("Sorry, no OEF products found in China with key word",fund_type)
|
848
|
+
return None
|
849
|
+
|
850
|
+
if indicator == '单位净值':
|
851
|
+
df['单位净值']=df['单位净值'].apply(lambda x: round(x,2))
|
852
|
+
df.sort_values(by=['单位净值'],ascending=False,inplace=True)
|
853
|
+
#dfprint=df[['基金简称','基金代码','基金类型','单位净值','申购状态','赎回状态']]
|
854
|
+
dfprint=df[['基金简称','基金代码','基金类型','单位净值','累计净值']]
|
855
|
+
#print(texttranslate("\n===== 中国开放式基金排名:单位净值 ====="))
|
856
|
+
titletxt="中国开放式基金排名:单位净值"
|
857
|
+
|
858
|
+
if indicator == '累计净值':
|
859
|
+
df['累计净值']=df['累计净值'].apply(lambda x: round(x,2))
|
860
|
+
df.sort_values(by=['累计净值'],ascending=False,inplace=True)
|
861
|
+
#dfprint=df[['基金简称','基金代码','基金类型','累计净值','申购状态','赎回状态']]
|
862
|
+
dfprint=df[['基金简称','基金代码','基金类型','累计净值','单位净值']]
|
863
|
+
#print(texttranslate("\n===== 中国开放式基金排名:累计净值 ====="))
|
864
|
+
titletxt="中国开放式基金排名:累计净值"
|
865
|
+
|
866
|
+
if indicator == '手续费':
|
867
|
+
df.sort_values(by=['手续费'],ascending=False,inplace=True)
|
868
|
+
#dfprint=df[['基金简称','基金代码','基金类型','手续费','申购状态','赎回状态']]
|
869
|
+
dfprint=df[['基金简称','基金代码','基金类型','手续费','单位净值']]
|
870
|
+
#print(texttranslate("\n===== 中国开放式基金排名:手续费 ====="))
|
871
|
+
titletxt="中国开放式基金排名:手续费"
|
872
|
+
|
873
|
+
if indicator == '增长率':
|
874
|
+
df.sort_values(by=['日增长率'],ascending=False,inplace=True)
|
875
|
+
#dfprint=df[['基金简称','基金代码','基金类型','日增长率','申购状态','赎回状态']]
|
876
|
+
dfprint=df[['基金简称','基金代码','基金类型','日增长率','单位净值']]
|
877
|
+
#print(texttranslate("\n===== 中国开放式基金排名:增长率% ====="))
|
878
|
+
titletxt="中国开放式基金排名:增长率%"
|
879
|
+
|
880
|
+
df=df.replace(0,'--')
|
881
|
+
|
882
|
+
#重新设置序号
|
883
|
+
dfprint.dropna(inplace=True)
|
884
|
+
dfprint.reset_index(drop=True,inplace=True)
|
885
|
+
dfprint.index=dfprint.index + 1
|
886
|
+
|
887
|
+
collist=list(dfprint)
|
888
|
+
dfprint['序号']=dfprint.index
|
889
|
+
dfprint=dfprint[['序号']+collist]
|
890
|
+
|
891
|
+
if rank >= 0:
|
892
|
+
dfprint10=dfprint.head(rank)
|
893
|
+
order="前"
|
894
|
+
else:
|
895
|
+
dfprint10=dfprint.tail(-rank)
|
896
|
+
order="后"
|
897
|
+
titletxt=titletxt+"("+order+str(abs(rank))+"名,降序排列)"
|
898
|
+
footnote1="披露净值的开放式基金数量:"+str(num)+','
|
899
|
+
footnote2="基金类型:"+str(fund_type)+'\n'
|
900
|
+
|
901
|
+
footnote3="净值日期:"+str(nvdate)+','
|
902
|
+
|
903
|
+
import datetime; todaydt = datetime.date.today()
|
904
|
+
#footnote4="数据来源:东方财富/天天基金,"+str(todaydt)
|
905
|
+
footnote4="数据来源:新浪财经/天天基金\n"
|
906
|
+
|
907
|
+
import time; current_time = time.localtime()
|
908
|
+
formatted_hour = time.strftime("%H", current_time)
|
909
|
+
footnote5=''
|
910
|
+
if (formatted_hour >= '18' or formatted_hour <= '06') and not is_weekend(todaydt):
|
911
|
+
footnote5="注意:此时可能为数据源更新时段,获取的信息可能不全\n"
|
912
|
+
|
913
|
+
footnote=footnote1+footnote2+footnote3+footnote4+footnote5
|
914
|
+
|
915
|
+
df_display_CSS(dfprint10,titletxt=titletxt,footnote=footnote,facecolor='papayawhip',decimals=4, \
|
916
|
+
first_col_align='center',second_col_align='left', \
|
917
|
+
last_col_align='right',other_col_align='right', \
|
918
|
+
titile_font_size='16px',heading_font_size='15px', \
|
919
|
+
data_font_size='15px')
|
920
|
+
|
921
|
+
return df
|
922
|
+
#==============================================================================
|
923
|
+
|
704
924
|
if __name__=='__main__':
|
705
925
|
indicator='单位净值'
|
706
926
|
|
@@ -708,8 +928,9 @@ if __name__=='__main__':
|
|
708
928
|
fund_type='FOF'
|
709
929
|
fund_type='LOF'
|
710
930
|
fund_type='FOF-LOF'
|
931
|
+
fund_type='QDII'
|
711
932
|
|
712
|
-
rank=
|
933
|
+
rank=10
|
713
934
|
|
714
935
|
|
715
936
|
def oef_rank_china(indicator='单位净值',fund_type='全部类型',rank=5):
|
@@ -729,6 +950,7 @@ def oef_rank_china(indicator='单位净值',fund_type='全部类型',rank=5):
|
|
729
950
|
|
730
951
|
#获取开放式基金实时信息
|
731
952
|
try:
|
953
|
+
print(" Looking for OEF net value information ...")
|
732
954
|
df1 = ak.fund_open_fund_daily_em()
|
733
955
|
except:
|
734
956
|
print(" #Error(oef_rank_china): data source tentatively busy or unavailable, try later")
|
@@ -736,8 +958,13 @@ def oef_rank_china(indicator='单位净值',fund_type='全部类型',rank=5):
|
|
736
958
|
|
737
959
|
collist=list(df1)
|
738
960
|
nvname1=collist[2]
|
961
|
+
nvname1_num_all=len(df1)
|
962
|
+
nvname1_num_eq=len(df1[df1[nvname1]==''])
|
963
|
+
nvname1_ratio_eq=nvname1_num_eq / nvname1_num_all
|
964
|
+
|
739
965
|
nvname2=collist[3]
|
740
|
-
if df1[nvname1].
|
966
|
+
#if df1[nvname1].eq('').all():
|
967
|
+
if nvname1_ratio_eq > 0.5: #空缺率超过50%?
|
741
968
|
nvname1=collist[4]
|
742
969
|
nvname2=collist[5]
|
743
970
|
nvdate=nvname1[:10]
|
@@ -753,8 +980,10 @@ def oef_rank_china(indicator='单位净值',fund_type='全部类型',rank=5):
|
|
753
980
|
|
754
981
|
#获取所有公募基金类型信息
|
755
982
|
#df2 = ak.fund_em_fund_name()
|
983
|
+
print(" Looking for OEF category information ...")
|
756
984
|
df2 = ak.fund_name_em()
|
757
985
|
|
986
|
+
print(" Analyzing OEF query requests ...")
|
758
987
|
df2a=df2[['基金代码','基金类型']]
|
759
988
|
|
760
989
|
#合成基金类型信息
|
@@ -781,7 +1010,7 @@ def oef_rank_china(indicator='单位净值',fund_type='全部类型',rank=5):
|
|
781
1010
|
try: fundtypelist.remove('0')
|
782
1011
|
except: pass
|
783
1012
|
|
784
|
-
fundtypelist=fundtypelist+['LOF','FOF-LOF']
|
1013
|
+
fundtypelist=fundtypelist+['LOF','FOF-LOF','REITs','REIT','MOM']
|
785
1014
|
"""
|
786
1015
|
while np.nan in fundtypelist:
|
787
1016
|
fundtypelist.remove(np.nan)
|
@@ -802,20 +1031,21 @@ def oef_rank_china(indicator='单位净值',fund_type='全部类型',rank=5):
|
|
802
1031
|
print(" Supported fund types:",fundtypelist)
|
803
1032
|
return None
|
804
1033
|
|
805
|
-
df.dropna(inplace=True)
|
1034
|
+
#df.dropna(inplace=True)
|
806
1035
|
fund_filter=lambda x: fund_type in x
|
807
1036
|
df['基金类型s']=df['基金类型'].apply(fund_filter)
|
1037
|
+
df['基金类型s']=df['基金简称'].apply(fund_filter)
|
808
1038
|
|
809
1039
|
if fund_type == 'QDII':
|
810
1040
|
df['基金类型s']=df.apply(lambda x: False if '不含' in x['基金类型'] else x['基金类型s'],axis=1)
|
811
1041
|
|
812
1042
|
if fund_type == 'FOF':
|
813
1043
|
df['基金类型s']=df.apply(lambda x: True if (fund_type in x['基金类型'] or fund_type in x['基金简称']) else x['基金类型s'],axis=1)
|
814
|
-
df['基金类型s']=df.apply(lambda x: False if ('LOF' in x['基金类型'] or 'LOF' in x['基金简称']) else x['基金类型s'],axis=1)
|
1044
|
+
#df['基金类型s']=df.apply(lambda x: False if ('LOF' in x['基金类型'] or 'LOF' in x['基金简称']) else x['基金类型s'],axis=1)
|
815
1045
|
|
816
1046
|
if fund_type == 'LOF':
|
817
1047
|
df['基金类型s']=df.apply(lambda x: True if (fund_type in x['基金类型'] or fund_type in x['基金简称']) else x['基金类型s'],axis=1)
|
818
|
-
df['基金类型s']=df.apply(lambda x: False if ('FOF' in x['基金类型'] or 'FOF' in x['基金简称']) else x['基金类型s'],axis=1)
|
1048
|
+
#df['基金类型s']=df.apply(lambda x: False if ('FOF' in x['基金类型'] or 'FOF' in x['基金简称']) else x['基金类型s'],axis=1)
|
819
1049
|
|
820
1050
|
if fund_type == 'FOF-LOF':
|
821
1051
|
df['基金类型s']=df.apply(lambda x: True if (fund_type in x['基金类型'] or fund_type in x['基金简称']) else x['基金类型s'],axis=1)
|
@@ -823,6 +1053,8 @@ def oef_rank_china(indicator='单位净值',fund_type='全部类型',rank=5):
|
|
823
1053
|
|
824
1054
|
df=df[df['基金类型s']==True]
|
825
1055
|
|
1056
|
+
num=len(df)
|
1057
|
+
|
826
1058
|
if info_type == '单位净值':
|
827
1059
|
df['单位净值']=df['单位净值'].apply(lambda x: round(x,2))
|
828
1060
|
df.sort_values(by=['单位净值'],ascending=False,inplace=True)
|
@@ -903,13 +1135,21 @@ def oef_rank_china(indicator='单位净值',fund_type='全部类型',rank=5):
|
|
903
1135
|
today = datetime.date.today()
|
904
1136
|
print(texttranslate("数据来源:东方财富/天天基金,"),today)
|
905
1137
|
"""
|
906
|
-
footnote1="披露净值的开放式基金数量:"+str(
|
1138
|
+
footnote1="披露净值的开放式基金数量:"+str(num)+','
|
907
1139
|
footnote2="基金类型:"+str(fund_type)+'\n'
|
908
1140
|
footnote3="净值日期:"+str(nvdate)+','
|
1141
|
+
|
909
1142
|
import datetime; todaydt = datetime.date.today()
|
910
1143
|
#footnote4="数据来源:东方财富/天天基金,"+str(todaydt)
|
911
|
-
|
912
|
-
|
1144
|
+
|
1145
|
+
import time; current_time = time.localtime()
|
1146
|
+
formatted_hour = time.strftime("%H", current_time)
|
1147
|
+
footnote4=''
|
1148
|
+
if formatted_hour > '17':
|
1149
|
+
footnote4="此时为数据源更新时段,获取的信息可能不全\n"
|
1150
|
+
|
1151
|
+
footnote5="数据来源:新浪财经/天天基金"
|
1152
|
+
footnote=footnote1+footnote2+footnote3+footnote4+footnote5
|
913
1153
|
|
914
1154
|
df_display_CSS(dfprint10,titletxt=titletxt,footnote=footnote,facecolor='papayawhip',decimals=4, \
|
915
1155
|
first_col_align='center',second_col_align='left', \
|
siat/stock_technical.py
CHANGED
@@ -2451,14 +2451,19 @@ def security_technical2(ticker,start='default',end='default', \
|
|
2451
2451
|
loc1='best',loc2='best', \
|
2452
2452
|
ticker_type='auto', \
|
2453
2453
|
|
2454
|
-
facecolor='papayawhip'
|
2454
|
+
facecolor='papayawhip', \
|
2455
|
+
|
2456
|
+
attention_values=[0,30,50,80]):
|
2455
2457
|
"""
|
2456
2458
|
|
2457
2459
|
功能:计算和绘制证券技术分析指标的简易图,仅供进一步探索使用,仅用于单个证券(股债基)
|
2460
|
+
|
2458
2461
|
支持的探索指标:仅供探索使用
|
2459
2462
|
OBV、SAR、VOL、PSY、ARBR、CR、EMV、TRIX、DMA、BIAS、CCI、W%R、ROC、DMI
|
2460
2463
|
支持的其他指标:不如单独的指令功能强
|
2461
2464
|
MACD、RSI、KDJ、BOLL
|
2465
|
+
|
2466
|
+
关注的阈值:默认[0,30,50,80],可以自定义,但0线一般要保留。
|
2462
2467
|
"""
|
2463
2468
|
#检查证券代码
|
2464
2469
|
if not isinstance(ticker,str):
|
@@ -2622,6 +2627,7 @@ def security_technical2(ticker,start='default',end='default', \
|
|
2622
2627
|
#plt.gca().set_facecolor('whitesmoke')
|
2623
2628
|
fig.gca().set_facecolor(facecolor) #放在这里生效,放尾部不生效
|
2624
2629
|
|
2630
|
+
"""
|
2625
2631
|
line0=False; line30=False; line50=False; line80=False
|
2626
2632
|
for l in tech_line_collist:
|
2627
2633
|
lmax=df1[l].max(); lmin=df1[l].min()
|
@@ -2644,6 +2650,28 @@ def security_technical2(ticker,start='default',end='default', \
|
|
2644
2650
|
#绘制50线
|
2645
2651
|
if line80:
|
2646
2652
|
plt.axhline(y=80,ls=":",c="black",linewidth=2)
|
2653
|
+
"""
|
2654
|
+
color_list=['k','g','b','c','m','y','r']
|
2655
|
+
attention_draws=[False] * len(attention_values)
|
2656
|
+
|
2657
|
+
for l in tech_line_collist:
|
2658
|
+
ax.plot(df1.index,df1[l],label=l.upper())
|
2659
|
+
|
2660
|
+
#判断是否绘制关注线
|
2661
|
+
lmax=df1[l].max(); lmin=df1[l].min()
|
2662
|
+
|
2663
|
+
for al in attention_values:
|
2664
|
+
pos=attention_values.index(al)
|
2665
|
+
|
2666
|
+
line_al=False
|
2667
|
+
if lmax >= al >= lmin:
|
2668
|
+
line_al=True
|
2669
|
+
|
2670
|
+
#如果需要绘制关注线,且尚未绘制过,则绘制
|
2671
|
+
if line_al and not attention_draws[pos]:
|
2672
|
+
plt.axhline(y=attention_values[pos],ls=":",c=color_list[pos],linewidth=2)
|
2673
|
+
|
2674
|
+
attention_draws[pos]=True
|
2647
2675
|
|
2648
2676
|
ylabeltxt1=technical1+'指标'
|
2649
2677
|
if mag_label != '':
|
@@ -17,7 +17,7 @@ siat/capm_beta.py,sha256=cxXdRVBQBllhbfz1LeTJAIWvyRYhW54nhtNUXv4HwS0,29063
|
|
17
17
|
siat/capm_beta2.py,sha256=UOI4sCz3ld7yezlARqPHvgHzfduDiGeRqNa82dDTCZ8,25849
|
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=
|
20
|
+
siat/common.py,sha256=OtdgMsJUTGPuxEvZ6dm0V5V9Vfa2W3fEn22m1vRNfS8,141419
|
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
|
@@ -52,7 +52,7 @@ siat/financials_test.py,sha256=HJ3CPo_Xckz2wXi3AEP6ZNWCF1Duc1pLi0Y10USiImc,23829
|
|
52
52
|
siat/fred_test.py,sha256=KF50ssSbsfpa_kT6iuomD0vG4eXztAcOasZxg1OGX5w,1201
|
53
53
|
siat/fund.py,sha256=wMDORsCBV8ZXfgwbtq-0bu3qqWY66dHnbqgllW0gWCo,24637
|
54
54
|
siat/fund_china.pickle,sha256=wJIIvEjWuZylcaQ3c5kvIdKedpFF5T53cJlG-1LVoms,2410657
|
55
|
-
siat/fund_china.py,sha256=
|
55
|
+
siat/fund_china.py,sha256=igo49Cyy46wUM6D1vl3uKCQgdJ0KX07mQHkbNDg_Q4M,111833
|
56
56
|
siat/fund_china_test.py,sha256=-Bh6m0J0GPpIbYXx-H2vpzJoNFI6pE2C2jVPa8DazgE,6649
|
57
57
|
siat/fund_test.py,sha256=V4ADb8Gsp8gyeFTwcgRsJBpnUih_O-Q2V1ILc5oKjK8,1116
|
58
58
|
siat/future_china.py,sha256=F-HsIf2Op8Z22RzTjet1g8COzldgnMjFNSXsAkeGyWo,17595
|
@@ -112,7 +112,7 @@ siat/stock_list_china_test.py,sha256=gv14UwMMvkZqtb6G7DCTSuehIwVHuVwu7w60p6gyHoo
|
|
112
112
|
siat/stock_prices_kneighbors.py,sha256=WfZvo5EyeBsm-T37zDj7Sl9dPSRq5Bx4JxIJ9IUum6s,36738
|
113
113
|
siat/stock_prices_linear.py,sha256=-OUKRr27L2aStQgJSlJOrJ4gay_G7P-m-7t7cU2Yoqk,13991
|
114
114
|
siat/stock_profile.py,sha256=B3eIwzEmiCqiCaxIlhfdEPsQBoW1PFOe1hkiY3mVF6Y,26038
|
115
|
-
siat/stock_technical.py,sha256=
|
115
|
+
siat/stock_technical.py,sha256=ufFjRt9XplGXYhodGs2EgczCjRucOnNcdZqROCIntYo,113806
|
116
116
|
siat/stock_test.py,sha256=E9YJAvOw1VEGJSDI4IZuEjl0tGoisOIlN-g9UqA_IZE,19475
|
117
117
|
siat/stooq.py,sha256=dOc_S5HLrYg48YAKTCs1eX8UTJOOkPM8qLL2KupqlLY,2470
|
118
118
|
siat/temp.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
|
@@ -133,7 +133,7 @@ siat/valuation.py,sha256=NKfeZMdDJOW42oLVHob6eSVBXUqlN1OCnnzwyGAst8c,48855
|
|
133
133
|
siat/valuation_china.py,sha256=Tde2LzPDQy3Z7xOQQDw4ckQMPdROp_z0-GjFE6Z5_lI,67639
|
134
134
|
siat/valuation_market_china_test.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
|
135
135
|
siat/var_model_validation.py,sha256=f-oDewg7bPzyNanz_Y_jLH68NowAA3gXFehW_weKGG0,14898
|
136
|
-
siat-3.1.
|
137
|
-
siat-3.1.
|
138
|
-
siat-3.1.
|
139
|
-
siat-3.1.
|
136
|
+
siat-3.1.20.dist-info/METADATA,sha256=AA6DPN51RIA-Y4EWWDnHFvi8koH_7k7lhZbypMCX98U,1448
|
137
|
+
siat-3.1.20.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
138
|
+
siat-3.1.20.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
|
139
|
+
siat-3.1.20.dist-info/RECORD,,
|
File without changes
|
File without changes
|