siat 3.4.1__py3-none-any.whl → 3.4.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/security_price2.py
CHANGED
@@ -290,7 +290,7 @@ def get_price_mticker(ticker,fromdate,todate, \
|
|
290
290
|
if ticker_num == 1:
|
291
291
|
df,found=get_price_1ticker(ticker=ticker_list[0],fromdate=fromdate,todate=todate, \
|
292
292
|
adjust=adjust_list[0],source=source_list[0], \
|
293
|
-
ticker_type=ticker_type_list[0])
|
293
|
+
ticker_type=ticker_type_list[0],fill=fill)
|
294
294
|
|
295
295
|
#多个普通证券
|
296
296
|
if ticker_num > 1:
|
@@ -301,7 +301,8 @@ def get_price_mticker(ticker,fromdate,todate, \
|
|
301
301
|
tt=ticker_type_list[pos]
|
302
302
|
|
303
303
|
#普通单个证券
|
304
|
-
dft,found=get_price_1ticker(t,fromdate,todate,adjust=at,source=st,
|
304
|
+
dft,found=get_price_1ticker(t,fromdate,todate,adjust=at,source=st, \
|
305
|
+
ticker_type=tt,fill=fill)
|
305
306
|
if found=='Found':
|
306
307
|
columns=create_tuple_for_columns(dft,t)
|
307
308
|
dft.columns=pd.MultiIndex.from_tuples(columns)
|
@@ -653,6 +654,9 @@ def get_price_1ticker_mixed(ticker,fromdate,todate, \
|
|
653
654
|
df,found=get_price_1portfolio(ticker=ticker,fromdate=fromdate,todate=todate, \
|
654
655
|
ticker_type=ticker_type,source=source, \
|
655
656
|
adjust=adjust,fill=fill)
|
657
|
+
#对空缺值填充,以免影响后续计算
|
658
|
+
df=df.fillna(method='ffill')
|
659
|
+
df=df.fillna(method='bfill')
|
656
660
|
|
657
661
|
return df,found
|
658
662
|
|
siat/stock.py
CHANGED
@@ -788,7 +788,7 @@ def stock_ret(ticker,fromdate,todate, \
|
|
788
788
|
return
|
789
789
|
|
790
790
|
import datetime; todaydt = datetime.date.today()
|
791
|
-
footnote=text_lang("
|
791
|
+
footnote=text_lang("数据来源:Sina/EM/Stooq/Yahoo,","Data source: Sina/EM/Stooq/Yahoo, ")+str(todaydt)
|
792
792
|
collabel=ectranslate(rtype)
|
793
793
|
ylabeltxt=ectranslate(rtype)
|
794
794
|
titletxt=text_lang("证券趋势分析:","Security Trend: ")+ticker_name(ticker,ticker_type=ticker_type)+text_lang(",收益率",", Rate of Return")
|
@@ -927,7 +927,7 @@ def security_mindicators(ticker,measures,
|
|
927
927
|
|
928
928
|
y_label=text_lang('证券指标',"Indicator")
|
929
929
|
import datetime; todaydt = datetime.date.today()
|
930
|
-
x_label=text_lang("
|
930
|
+
x_label=text_lang("数据来源:Sina/EM/Stooq/Yahoo,","Data source: Sina/EM/Stooq/Yahoo, ")+str(todaydt)
|
931
931
|
|
932
932
|
axhline_value=0
|
933
933
|
axhline_label=''
|
@@ -1052,7 +1052,7 @@ def price_volatility2(pricedf,ticker,fromdate,todate, \
|
|
1052
1052
|
|
1053
1053
|
titletxt=text_lang("证券趋势分析:","Security Trend: ")+ticker_name(ticker,ticker_type=ticker_type)+text_lang(",价格波动风险",", Price Volatility Risk")
|
1054
1054
|
import datetime; todaydt = datetime.date.today()
|
1055
|
-
footnote=texttranslate("
|
1055
|
+
footnote=texttranslate("数据来源:Sina/EM/Stooq/Yahoo,")+str(todaydt)
|
1056
1056
|
collabel=ectranslate(type)
|
1057
1057
|
ylabeltxt=ectranslate(type)
|
1058
1058
|
pltdf=erdf[erdf.index >= fromdate]
|
@@ -1171,7 +1171,7 @@ def ret_volatility2(retdf,ticker,fromdate,todate, \
|
|
1171
1171
|
|
1172
1172
|
titletxt=text_lang("证券趋势分析:","Security Trend: ")+ticker_name(ticker,ticker_type=ticker_type)+text_lang(",收益率波动风险",", Return Volatility Risk")
|
1173
1173
|
import datetime; todaydt = datetime.date.today()
|
1174
|
-
footnote=text_lang("
|
1174
|
+
footnote=text_lang("数据来源:Sina/EM/Stooq/Yahoo,","Data source: Sina/EM/Stooq/Yahoo, ")+str(todaydt)
|
1175
1175
|
collabel=ectranslate(type)
|
1176
1176
|
ylabeltxt=ectranslate(type)
|
1177
1177
|
pltdf=erdf[erdf.index >= fromdate]
|
@@ -1288,7 +1288,7 @@ def ret_lpsd2(retdf,ticker,fromdate,todate, \
|
|
1288
1288
|
|
1289
1289
|
titletxt=text_lang("证券趋势分析:","Security Trend: ")+ticker_name(ticker,ticker_type=ticker_type)+text_lang("波动损失风险","Volatility Loss Risk")
|
1290
1290
|
import datetime; todaydt = datetime.date.today()
|
1291
|
-
footnote=text_lang("
|
1291
|
+
footnote=text_lang("数据来源:Sina/EM/Stooq/Yahoo,","Data source: Sina/EM/Stooq/Yahoo, ")+str(todaydt)
|
1292
1292
|
collabel=ectranslate(rtype)
|
1293
1293
|
ylabeltxt=ectranslate(rtype)
|
1294
1294
|
pltdf=erdf[erdf.index >= fromdate]
|
@@ -1351,7 +1351,7 @@ def comp_1security_2measures(df,measure1,measure2,twinx=False, \
|
|
1351
1351
|
titletxt=text_lang("证券趋势分析:","Security Trend: ")+tname
|
1352
1352
|
|
1353
1353
|
import datetime; todaydt = datetime.date.today()
|
1354
|
-
footnote1=text_lang("
|
1354
|
+
footnote1=text_lang("数据来源:Sina/EM/Stooq/Yahoo,","Source: Sina/EM/Stooq/Yahoo, ")
|
1355
1355
|
footnote=footnote1+str(todaydt)
|
1356
1356
|
|
1357
1357
|
#绘图
|
@@ -1421,7 +1421,7 @@ def comp_2securities_1measure(df1,df2,measure,twinx=False,loc1='upper left', \
|
|
1421
1421
|
titletxt=titletxt1+tname1+" vs "+tname2
|
1422
1422
|
|
1423
1423
|
import datetime; todaydt = datetime.date.today()
|
1424
|
-
footnote1=text_lang("
|
1424
|
+
footnote1=text_lang("数据来源:Sina/EM/Stooq/Yahoo,","Data source: Sina/EM/Stooq/Yahoo, ")
|
1425
1425
|
footnote=footnote1+str(todaydt)+text_lang("统计","")
|
1426
1426
|
|
1427
1427
|
plot_line2(df1,ticker1,measure,label,df2,ticker2,measure,label, \
|
@@ -1963,7 +1963,7 @@ def compare_msecurity(tickers,measure,start,end, \
|
|
1963
1963
|
#y_label='指标'
|
1964
1964
|
y_label='指标对比'
|
1965
1965
|
|
1966
|
-
x_label1cn="数据来源:
|
1966
|
+
x_label1cn="数据来源: Sina/EM/Stooq/Yahoo,"
|
1967
1967
|
x_label1en="Source: Sina/EM/Stooq/Yahoo, "
|
1968
1968
|
x_label1=text_lang(x_label1cn,x_label1en)
|
1969
1969
|
import datetime; todaydt = datetime.date.today()
|
@@ -2478,7 +2478,7 @@ def candlestick_demo(stkcd,fromdate,todate, \
|
|
2478
2478
|
titletxt0=text_lang("K线图/蜡烛图演示:","Candlestick Chart Demo: ")
|
2479
2479
|
titletxt=titletxt0 + ticker_name(str(stkcd),ticker_type=ticker_type)
|
2480
2480
|
price_txt=text_lang('价格','Price')
|
2481
|
-
source_txt=text_lang("数据来源:
|
2481
|
+
source_txt=text_lang("数据来源: Sina/EM/Stooq/Yahoo","Data source: Sina/Stooq/Yahoo")
|
2482
2482
|
|
2483
2483
|
plt.title(titletxt,fontsize=title_txt_size,fontweight='bold')
|
2484
2484
|
plt.ylabel(price_txt,fontsize=ylabel_txt_size)
|
@@ -3977,7 +3977,7 @@ def compare_mmeasure(ticker,measures,fromdate,todate, \
|
|
3977
3977
|
y_label=''
|
3978
3978
|
import datetime; today = datetime.date.today()
|
3979
3979
|
|
3980
|
-
x_label=text_lang("数据来源:
|
3980
|
+
x_label=text_lang("数据来源: Sina/EM/Stooq/Yahoo,","Data source: Sina/Yahoo/Stooq/EM, ")+str(today)
|
3981
3981
|
title_txt=text_lang("证券趋势分析:","Security Trend: ")+ticker_name(ticker)
|
3982
3982
|
|
3983
3983
|
draw_lines(df3,y_label=y_label,x_label=x_label, \
|
@@ -97,7 +97,7 @@ siat/risk_free_rate_test.py,sha256=CpmhUf8aEAEZeNu4gvWP2Mz2dLoIgBX5bI41vfUBEr8,4
|
|
97
97
|
siat/sector_china.py,sha256=nP6kfYsnaQWZj8dK-zklwSDW8FDS-obZWp_zL0ec2Ig,118603
|
98
98
|
siat/sector_china_test.py,sha256=1wq7ef8Bb_L8F0h0W6FvyBrIcBTEbrTV7hljtpj49U4,5843
|
99
99
|
siat/security_price.py,sha256=2oHskgiw41KMGfqtnA0i2YjNNV6cYgtlUK0j3YeuXWs,29185
|
100
|
-
siat/security_price2.py,sha256=
|
100
|
+
siat/security_price2.py,sha256=65s64L68aRZdVVK3V8UYxdPd_JHMqgJ2FBJJX5MSW-Q,26174
|
101
101
|
siat/security_prices.py,sha256=2aLBSyVRfcZ1-5jqF_r3N02RvlaNNqssJS9GgxGidgM,106235
|
102
102
|
siat/security_prices_test.py,sha256=OEphoJ87NPKoNow1QA8EU_5MUYrJF-qKoWKNapVfZNI,10779
|
103
103
|
siat/security_trend.py,sha256=o0vpWdrJkmODCP94X-Bvn-w7efHhj9HpUYBHtLl55D0,17240
|
@@ -105,7 +105,7 @@ siat/security_trend2-20240620.py,sha256=QVnEcb7AyVbO77jVqfFsJffGXrX8pgJ9xCfoAKmW
|
|
105
105
|
siat/security_trend2.py,sha256=lUMab8HilXIUPo_z9ZkztMiZ5kf3jAbbCwPPkYbQ1TI,25288
|
106
106
|
siat/setup.py,sha256=up65rQGLmTBkhtaMLowjoQXYmIsnycnm4g1SYmeQS6o,1335
|
107
107
|
siat/shenwan index history test.py,sha256=JCVAzOSEldHalhSFa3pqD8JI_8_djPMQOxpkuYU-Esg,1418
|
108
|
-
siat/stock.py,sha256=
|
108
|
+
siat/stock.py,sha256=uubLm3Qd1N02FI6nBnB9CvQrY_rJV8RfQI-_4zxIfog,152436
|
109
109
|
siat/stock_advice_linear.py,sha256=-twT7IGP-NEplkL1WPSACcNJjggRB2j4mlAQCkzOAuo,31655
|
110
110
|
siat/stock_base.py,sha256=uISvbRyOGy8p9QREA96CVydgflBkn5L3OXOGKl8oanc,1312
|
111
111
|
siat/stock_china.py,sha256=zyUyghIrkkkYWlHRRP7Hoblxzfp-jrck60pTJpwMahg,91553
|
@@ -139,7 +139,7 @@ siat/valuation_china.py,sha256=EkZQaVkoBjM0c4MCNbaX-bMnlG0e3FXeaWczZDnkptU,67784
|
|
139
139
|
siat/valuation_market_china_test.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
|
140
140
|
siat/var_model_validation.py,sha256=R0caWnuZarrRg9939hxh3vJIIpIyPfvelYmzFNZtPbo,14910
|
141
141
|
siat/yf_name.py,sha256=H1EM8YYXA8nQHIqsJlso0I3HKPiJLT3QujO4gRVQXWs,13945
|
142
|
-
siat-3.4.
|
143
|
-
siat-3.4.
|
144
|
-
siat-3.4.
|
145
|
-
siat-3.4.
|
142
|
+
siat-3.4.2.dist-info/METADATA,sha256=f_VyzH3bJZHoBhz45fW6KnNGf2wyC6QYP5XKgSEBUQQ,7309
|
143
|
+
siat-3.4.2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
144
|
+
siat-3.4.2.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
|
145
|
+
siat-3.4.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|