siat 2.13.42__py3-none-any.whl → 2.13.43__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/grafix.py +8 -4
- siat/security_trend.py +15 -1
- siat/stock.py +5 -1
- siat/stock_technical.py +7 -1
- {siat-2.13.42.dist-info → siat-2.13.43.dist-info}/METADATA +1 -1
- {siat-2.13.42.dist-info → siat-2.13.43.dist-info}/RECORD +8 -8
- {siat-2.13.42.dist-info → siat-2.13.43.dist-info}/WHEEL +0 -0
- {siat-2.13.42.dist-info → siat-2.13.43.dist-info}/top_level.txt +0 -0
siat/grafix.py
CHANGED
@@ -33,6 +33,7 @@ title_txt_size=16
|
|
33
33
|
ylabel_txt_size=14
|
34
34
|
xlabel_txt_size=14
|
35
35
|
legend_txt_size=14
|
36
|
+
annotate_size=9
|
36
37
|
|
37
38
|
#设置绘图风格:网格虚线
|
38
39
|
plt.rcParams['axes.grid']=False
|
@@ -1090,12 +1091,12 @@ def draw_lines(df0,y_label,x_label,axhline_value,axhline_label,title_txt, \
|
|
1090
1091
|
if annotate_value: #在标记曲线名称的同时标记其末端数值
|
1091
1092
|
plt.annotate(text=c+':'+str(round(y_end,2)),
|
1092
1093
|
xy=(x_end, y_end),
|
1093
|
-
xytext=(x_end, y_end),fontsize=
|
1094
|
+
xytext=(x_end, y_end),fontsize=annotate_size)
|
1094
1095
|
else:
|
1095
1096
|
plt.annotate(text=c,
|
1096
1097
|
xy=(x_end, y_end),
|
1097
1098
|
#xytext=(x_end, y_end),fontsize=9)
|
1098
|
-
xytext=(x_end, y_end),fontsize=
|
1099
|
+
xytext=(x_end, y_end),fontsize=annotate_size)
|
1099
1100
|
|
1100
1101
|
#plt.plot(df[c],label=c,linewidth=1.5,marker=mkc,markersize=3)
|
1101
1102
|
#为折线加数据标签
|
@@ -1228,11 +1229,11 @@ def draw_lines2(df0,y_label,x_label,axhline_value,axhline_label,title_txt, \
|
|
1228
1229
|
if annotate_value: #在标记曲线名称的同时标记其末端数值
|
1229
1230
|
plt.annotate(text=c+':'+str(round(y_end,2)),
|
1230
1231
|
xy=(x_end, y_end),
|
1231
|
-
xytext=(x_end, y_end),fontsize=
|
1232
|
+
xytext=(x_end, y_end),fontsize=annotate_size)
|
1232
1233
|
else:
|
1233
1234
|
plt.annotate(text=c,
|
1234
1235
|
xy=(x_end, y_end),
|
1235
|
-
xytext=(x_end, y_end),fontsize=
|
1236
|
+
xytext=(x_end, y_end),fontsize=annotate_size)
|
1236
1237
|
|
1237
1238
|
|
1238
1239
|
#绘制带状区域
|
@@ -1257,6 +1258,9 @@ def draw_lines2(df0,y_label,x_label,axhline_value,axhline_label,title_txt, \
|
|
1257
1258
|
if not annotate:
|
1258
1259
|
plt.legend(loc=loc,fontsize=legend_txt_size)
|
1259
1260
|
|
1261
|
+
#设置绘图风格:关闭网格虚线
|
1262
|
+
plt.rcParams['axes.grid']=False
|
1263
|
+
|
1260
1264
|
plt.show()
|
1261
1265
|
|
1262
1266
|
return
|
siat/security_trend.py
CHANGED
@@ -145,9 +145,23 @@ def security_trend(ticker,indicator='Close', \
|
|
145
145
|
else:
|
146
146
|
validdate,fromdate=check_date2(start)
|
147
147
|
if not validdate:
|
148
|
-
print(" #Warning(security_trend): invalid date for",start,"/b,
|
148
|
+
print(" #Warning(security_trend): invalid date for",start,"/b, reset to MRM")
|
149
149
|
fromdate=date_adjust(todate,adjust=-31-16)
|
150
150
|
|
151
|
+
# 检查窗口长度
|
152
|
+
if isinstance(window,str):
|
153
|
+
if window.lower() == "weekly":
|
154
|
+
window=5
|
155
|
+
elif window.lower() == "monthly":
|
156
|
+
window=21
|
157
|
+
elif window.lower() == "quarterly":
|
158
|
+
window=63
|
159
|
+
elif window.lower() == "annual":
|
160
|
+
window=252
|
161
|
+
else:
|
162
|
+
print(" #Warning(security_trend): invalid window size, reset to annual")
|
163
|
+
window=252
|
164
|
+
|
151
165
|
# 处理K线图
|
152
166
|
if kline and not kline_demo:
|
153
167
|
# 跟踪
|
siat/stock.py
CHANGED
@@ -53,6 +53,10 @@ if czxt in ['linux']: #website Jupyter
|
|
53
53
|
|
54
54
|
# 解决保存图像时'-'显示为方块的问题
|
55
55
|
plt.rcParams['axes.unicode_minus'] = False
|
56
|
+
|
57
|
+
#设置绘图风格:关闭网格虚线
|
58
|
+
plt.rcParams['axes.grid']=False
|
59
|
+
|
56
60
|
#==============================================================================
|
57
61
|
def reset_plt():
|
58
62
|
"""
|
@@ -79,7 +83,7 @@ def reset_plt():
|
|
79
83
|
legend_txt_size=14
|
80
84
|
|
81
85
|
#设置绘图风格:网格虚线
|
82
|
-
plt.rcParams['axes.grid']=
|
86
|
+
plt.rcParams['axes.grid']=False
|
83
87
|
#plt.rcParams['grid.color']='steelblue'
|
84
88
|
#plt.rcParams['grid.linestyle']='dashed'
|
85
89
|
#plt.rcParams['grid.linewidth']=0.5
|
siat/stock_technical.py
CHANGED
@@ -54,6 +54,9 @@ if czxt in ['linux']: #website Jupyter
|
|
54
54
|
# 解决保存图像时'-'显示为方块的问题
|
55
55
|
plt.rcParams['axes.unicode_minus'] = False
|
56
56
|
|
57
|
+
#设置绘图风格:关闭网格虚线
|
58
|
+
plt.rcParams['axes.grid']=False
|
59
|
+
|
57
60
|
#==============================================================================
|
58
61
|
#==============================================================================
|
59
62
|
#==============================================================================
|
@@ -796,6 +799,9 @@ def stock_MACD(ticker,start='default',end='default', \
|
|
796
799
|
import datetime as dt; today=dt.date.today()
|
797
800
|
source="数据来源:sina/yahoo/stooq/fred,"+str(today)
|
798
801
|
|
802
|
+
#设置绘图风格:关闭网格虚线
|
803
|
+
plt.rcParams['axes.grid']=False
|
804
|
+
|
799
805
|
# 设置绘图区的背景颜色为黑色
|
800
806
|
fig=plt.figure()
|
801
807
|
ax=fig.add_subplot(111)
|
@@ -2118,7 +2124,7 @@ def security_technical(ticker,start='default',end='default', \
|
|
2118
2124
|
boll_days=20,boll_years=7, \
|
2119
2125
|
resample_freq='6H',smooth=True,linewidth=1.5, \
|
2120
2126
|
loc1='best',loc2='best', \
|
2121
|
-
graph=['ALL'],printout=
|
2127
|
+
graph=['ALL'],printout=False, \
|
2122
2128
|
date_range=False,date_freq=False,annotate=False, \
|
2123
2129
|
technical=['MACD'],indicator='Close'):
|
2124
2130
|
|
@@ -57,7 +57,7 @@ siat/future_china.py,sha256=F-HsIf2Op8Z22RzTjet1g8COzldgnMjFNSXsAkeGyWo,17595
|
|
57
57
|
siat/future_china_test.py,sha256=BrSzmDVaOHki6rntOtosmRn-6dkfOBuLulJNqh7MOpc,1163
|
58
58
|
siat/global_index_test.py,sha256=hnFp3wqqzzL-kAP8mgxDZ54Bd5Ijf6ENi5YJlGBgcXw,2402
|
59
59
|
siat/google_authenticator.py,sha256=ZUbZR8OW0IAKDbcYtlqGqIpZdERpFor9NccFELxg9yI,1637
|
60
|
-
siat/grafix.py,sha256=
|
60
|
+
siat/grafix.py,sha256=sWt4BfCiTfKb5FddcTpfxF-0yNXGi2ftlhryCnZ5MxI,70690
|
61
61
|
siat/grafix_test.py,sha256=kXvcpLgQNO7wd30g_bWljLj5UH7bIVI0_dUtXbfiKR0,3150
|
62
62
|
siat/holding_risk.py,sha256=Dh4zXEw-0hnbMNorbsRS142C8mUzq4NhFjYnauWu5tc,30548
|
63
63
|
siat/holding_risk_test.py,sha256=FRlw_9wFG98BYcg_cSj95HX5WZ1TvkGaOUdXD7-V86s,474
|
@@ -92,10 +92,10 @@ siat/sector_china_test.py,sha256=1wq7ef8Bb_L8F0h0W6FvyBrIcBTEbrTV7hljtpj49U4,584
|
|
92
92
|
siat/security_price.py,sha256=2oHskgiw41KMGfqtnA0i2YjNNV6cYgtlUK0j3YeuXWs,29185
|
93
93
|
siat/security_prices.py,sha256=kGBAqHwmN_iupBZ6v3AUrRHjCSNxP09sz2nlBSVyaHs,76950
|
94
94
|
siat/security_prices_test.py,sha256=OEphoJ87NPKoNow1QA8EU_5MUYrJF-qKoWKNapVfZNI,10779
|
95
|
-
siat/security_trend.py,sha256=
|
95
|
+
siat/security_trend.py,sha256=AjGvcWIzdDzH8gXPOM2wtffFmdzZ-KoWHD7DsdLJRpU,16361
|
96
96
|
siat/setup.py,sha256=up65rQGLmTBkhtaMLowjoQXYmIsnycnm4g1SYmeQS6o,1335
|
97
97
|
siat/shenwan index history test.py,sha256=JCVAzOSEldHalhSFa3pqD8JI_8_djPMQOxpkuYU-Esg,1418
|
98
|
-
siat/stock.py,sha256=
|
98
|
+
siat/stock.py,sha256=ZMr6wiB6pxKOQ-pQhi3goPjqTYKfY15UXBC5Vtud7tM,141590
|
99
99
|
siat/stock_advice_linear.py,sha256=-twT7IGP-NEplkL1WPSACcNJjggRB2j4mlAQCkzOAuo,31655
|
100
100
|
siat/stock_base.py,sha256=uISvbRyOGy8p9QREA96CVydgflBkn5L3OXOGKl8oanc,1312
|
101
101
|
siat/stock_china.py,sha256=B1hbZCxJuE5GVvGGmf_rSmQodYHmEFuyiDrUvxHhg4w,83969
|
@@ -106,7 +106,7 @@ siat/stock_list_china_test.py,sha256=gv14UwMMvkZqtb6G7DCTSuehIwVHuVwu7w60p6gyHoo
|
|
106
106
|
siat/stock_prices_kneighbors.py,sha256=WfZvo5EyeBsm-T37zDj7Sl9dPSRq5Bx4JxIJ9IUum6s,36738
|
107
107
|
siat/stock_prices_linear.py,sha256=-OUKRr27L2aStQgJSlJOrJ4gay_G7P-m-7t7cU2Yoqk,13991
|
108
108
|
siat/stock_profile.py,sha256=npinIwxgfgHeV8tpXrzLBrPUWKMZGL2-xA96ve-H2wM,25329
|
109
|
-
siat/stock_technical.py,sha256=
|
109
|
+
siat/stock_technical.py,sha256=v6MYSrH0jAmBWHOtZw_jl-uln4Ouxcz21jCPSd3MZ_c,96310
|
110
110
|
siat/stock_test.py,sha256=E9YJAvOw1VEGJSDI4IZuEjl0tGoisOIlN-g9UqA_IZE,19475
|
111
111
|
siat/stooq.py,sha256=dOc_S5HLrYg48YAKTCs1eX8UTJOOkPM8qLL2KupqlLY,2470
|
112
112
|
siat/temp.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
|
@@ -126,7 +126,7 @@ siat/valuation.py,sha256=x-3qpu_14SLAPuO2gwmT9ojPYIEZCX8KcnIbezDiFKI,47362
|
|
126
126
|
siat/valuation_china.py,sha256=oEQRrktJNHiOG1mJSQN1aSSQAQrwrg-ppIHyNVjMjNg,67603
|
127
127
|
siat/valuation_market_china_test.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
|
128
128
|
siat/var_model_validation.py,sha256=zB_Skk_tmzIR15l6oAW3am4HBGVIG-eZ8gJhCdXZ8Qw,14859
|
129
|
-
siat-2.13.
|
130
|
-
siat-2.13.
|
131
|
-
siat-2.13.
|
132
|
-
siat-2.13.
|
129
|
+
siat-2.13.43.dist-info/METADATA,sha256=qVwesFD3f42XukMjYxvJbgEqG7YVaGmMbN9CdUKJJGo,1449
|
130
|
+
siat-2.13.43.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
131
|
+
siat-2.13.43.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
|
132
|
+
siat-2.13.43.dist-info/RECORD,,
|
File without changes
|
File without changes
|