siat 3.4.16__py3-none-any.whl → 3.4.17__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
@@ -37,8 +37,11 @@ if __name__=='__main__':
37
37
  ticker='sz159998' #基金
38
38
 
39
39
  ticker='801010.SW' #申万
40
+ ticker='851242.SW' #申万
40
41
 
41
42
  ticker='AAPL'
43
+
44
+
42
45
  fromdate='2024-5-1'; todate='2024-5-20'
43
46
 
44
47
  ticker_type='auto'
@@ -49,7 +52,7 @@ if __name__=='__main__':
49
52
  ticker_type='fund'
50
53
 
51
54
  source='auto'
52
- source='yahoo'
55
+ #source='yahoo'
53
56
 
54
57
  adjust='qfq'
55
58
  fill=True
@@ -84,6 +87,7 @@ def get_price_1ticker(ticker,fromdate,todate, \
84
87
  #检查日期期间合理性
85
88
  valid_period,fromdatepd,todatepd=check_period(fromdate,todate)
86
89
  if not valid_period:
90
+ pass
87
91
  #print(" #Warning(get_price_1ticker): invalid date period from",fromdate,"to",todate)
88
92
  return df,found
89
93
 
@@ -612,6 +616,9 @@ if __name__=='__main__':
612
616
  ticker='180202.SZ'
613
617
  ticker_type='fund'
614
618
 
619
+ ticker='851242.SW'
620
+ ticker_type='auto'
621
+
615
622
  fromdate='2021-1-1'
616
623
  todate='2024-5-30'
617
624
  adjust=''
siat/security_prices.py CHANGED
@@ -2805,10 +2805,10 @@ def china_security_identify(ticker6):
2805
2805
 
2806
2806
  #==============================================================================
2807
2807
  if __name__=='__main__':
2808
- ticker='850831'
2808
+ ticker='850831.SW'
2809
2809
 
2810
- start='2023-1-1'
2811
- end='2023-4-4'
2810
+ start='2024-1-1'
2811
+ end='2024-4-4'
2812
2812
  info_types=['Close','Volume']
2813
2813
 
2814
2814
  df3=fetch_price_swindex(ticker,start,end)
@@ -2834,12 +2834,17 @@ def fetch_price_swindex(ticker,start,end,info_types=['Close','Volume'],adjust=-2
2834
2834
  _,start1pd,_=check_period(start1,end)
2835
2835
 
2836
2836
  import akshare as ak
2837
+ if len(ticker)==6:
2838
+ ticker=ticker+'.SW'
2839
+ ticker6=ticker[:6]
2837
2840
  try:
2838
- prices= ak.index_hist_sw(symbol=ticker,period="day")
2841
+ prices= ak.index_hist_sw(symbol=ticker6,period="day")
2839
2842
  except: pass
2840
2843
 
2841
2844
  found=df_have_data(prices)
2842
- if found not in ['Found','Empty']: return df
2845
+ if found not in ['Found','Empty']:
2846
+ pass
2847
+ return df
2843
2848
 
2844
2849
  prices.columns=['Code','Date','Close','Open','High','Low','Volume','Amount']
2845
2850
  million=1000000
siat/security_trend2.py CHANGED
@@ -76,6 +76,7 @@ if __name__=='__main__':
76
76
  indicator='Close'
77
77
  start="2020-1-1"
78
78
  end="2020-6-30"
79
+ ticker_type='auto'
79
80
 
80
81
 
81
82
  #测试组5
@@ -85,6 +86,29 @@ if __name__=='__main__':
85
86
  end="2024-5-30"
86
87
  ticker_type='fund'
87
88
 
89
+ #测试组6
90
+ ticker="851242.SW"
91
+ indicator='Close'
92
+ start="2024-1-1"
93
+ end="2024-6-30"
94
+ ticker_type='auto'
95
+
96
+ attention_value=''; average_value=False
97
+ kline=False; kline_demo=False; mav=[5,10,20]
98
+ dividend=False; split=False
99
+ ret_type='Annual Adj Ret%'; RF=0; regression_period=365; market_index="auto"
100
+ sortby='tpw_mean'; trailing=7; trend_threshhold=0.05
101
+ band_area=''
102
+ graph=True; twinx=False; loc1='best'; loc2='best'
103
+ datatag=False; power=0
104
+ smooth=True; date_range=False; date_freq=False
105
+ preprocess='none'; scaling_option='change%'
106
+ annotate=False; annotate_value=False
107
+ mark_top=False; mark_bottom=False; mark_end=False
108
+ printout=False; source='auto'
109
+ ticker_type='auto'
110
+ facecolor='papayawhip'
111
+
88
112
  df=security_trend(ticker,indicator,start,end,ticker_type=ticker_type)
89
113
 
90
114
 
siat/stock.py CHANGED
@@ -613,6 +613,16 @@ if __name__ =="__main__":
613
613
  ticker_type='auto'
614
614
  facecolor='whitesmoke'
615
615
 
616
+ # 测试组5
617
+ ticker='851242.SW'
618
+ indicator='Close'
619
+ fromdate='2024-5-1'; todate='2024-5-20'
620
+ adjust=''
621
+ zeroline=False; average_value=False; datatag=False; power=0; graph=True
622
+ source='auto'
623
+ mark_top=True; mark_bottom=True; mark_end=True
624
+ ticker_type='auto'
625
+ facecolor='whitesmoke'
616
626
 
617
627
  df=security_indicator(ticker,indicator,fromdate,todate,ticker_type=ticker_type)
618
628
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: siat
3
- Version: 3.4.16
3
+ Version: 3.4.17
4
4
  Summary: Securities Investment Analysis Tools (siat)
5
5
  Home-page: https://pypi.org/project/siat/
6
6
  Author: Prof. WANG Dehong, International Business School, Beijing Foreign Studies University
@@ -97,15 +97,15 @@ siat/risk_free_rate_test.py,sha256=CpmhUf8aEAEZeNu4gvWP2Mz2dLoIgBX5bI41vfUBEr8,4
97
97
  siat/sector_china.py,sha256=_-NgVSI2AMRCZw3U85ov6CgU5riii4Y9oY-rfUrfVSk,132551
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=65s64L68aRZdVVK3V8UYxdPd_JHMqgJ2FBJJX5MSW-Q,26174
101
- siat/security_prices.py,sha256=ZEnuKgLnkw1O41BpR44Mpq53N69mW3UdSzEnI_4LuPc,106387
100
+ siat/security_price2.py,sha256=Y4suVC-4koUSI_n8kY0l0y4lo_CTcoeM_kwTHiIFzyM,26291
101
+ siat/security_prices.py,sha256=lh4G7Q20HoC3Iph8hOuACFcIc33xKyWBgMqhTykh8Qo,106492
102
102
  siat/security_prices_test.py,sha256=OEphoJ87NPKoNow1QA8EU_5MUYrJF-qKoWKNapVfZNI,10779
103
103
  siat/security_trend.py,sha256=o0vpWdrJkmODCP94X-Bvn-w7efHhj9HpUYBHtLl55D0,17240
104
104
  siat/security_trend2-20240620.py,sha256=QVnEcb7AyVbO77jVqfFsJffGXrX8pgJ9xCfoAKmWBPk,24854
105
- siat/security_trend2.py,sha256=lUMab8HilXIUPo_z9ZkztMiZ5kf3jAbbCwPPkYbQ1TI,25288
105
+ siat/security_trend2.py,sha256=za9vUgWUsfG_xCjwjtCdo3kpQKWjzw8pDNAJZuDwXl0,26115
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=IY4-RC8jztjFEN4FFdc6YP299IRyIOwIcPRObswg588,152527
108
+ siat/stock.py,sha256=o8Mowq8qKYnRUczYdjV4Q_HSSMfbShylLUowDyYkXQ8,152856
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=9U_XfEeMlS3TrCrO3Bww21nuFgghbnO-cqDJMhQWqew,16193
142
- siat-3.4.16.dist-info/METADATA,sha256=6jn_hf0WErGP2RdyweWl-65rvA-ypaJ2y-UumDF2fyU,7683
143
- siat-3.4.16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
144
- siat-3.4.16.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
145
- siat-3.4.16.dist-info/RECORD,,
142
+ siat-3.4.17.dist-info/METADATA,sha256=M2n9lbqaF_FGunS14PxHCmi43xlZqE_vb2_xiWomdvk,7683
143
+ siat-3.4.17.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
144
+ siat-3.4.17.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
145
+ siat-3.4.17.dist-info/RECORD,,
File without changes