siat 3.4.13__py3-none-any.whl → 3.4.14__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/sector_china.py
CHANGED
@@ -3499,5 +3499,65 @@ def concept_stocks_em(concept='',ticker='',indicator="市盈率",rank=10, \
|
|
3499
3499
|
|
3500
3500
|
|
3501
3501
|
#==============================================================================
|
3502
|
+
if __name__ == '__main__':
|
3503
|
+
ticker='600519.SS'
|
3504
|
+
ticker='600305.SS'
|
3505
|
+
|
3506
|
+
get_stock_industry_sw(ticker)
|
3507
|
+
|
3508
|
+
def get_stock_industry_sw(ticker):
|
3509
|
+
"""
|
3510
|
+
功能:抓取股票的申万行业分类名称
|
3511
|
+
"""
|
3512
|
+
|
3513
|
+
import requests
|
3514
|
+
from bs4 import BeautifulSoup
|
3515
|
+
|
3516
|
+
ticker6=ticker[:6]
|
3517
|
+
url=f"https://vip.stock.finance.sina.com.cn/corp/go.php/vCI_CorpOtherInfo/stockid/{ticker6}/menu_num/2.phtml"
|
3518
|
+
response = requests.get(url)
|
3519
|
+
|
3520
|
+
if response.status_code == 200:
|
3521
|
+
soup = BeautifulSoup(response.text, 'html.parser')
|
3522
|
+
|
3523
|
+
t = soup.find('table',class_="comInfo1")
|
3524
|
+
industry = t.find_all("tr")[2].find("td").text
|
3525
|
+
|
3526
|
+
return industry
|
3527
|
+
|
3528
|
+
#==============================================================================
|
3529
|
+
if __name__ == '__main__':
|
3530
|
+
ticker='600519.SS'
|
3531
|
+
ticker='600305.SS'
|
3532
|
+
|
3533
|
+
stock_peers_sw(ticker)
|
3534
|
+
|
3535
|
+
def stock_peers_sw(ticker):
|
3536
|
+
"""
|
3537
|
+
功能:找出股票的申万行业分类及其同行
|
3538
|
+
"""
|
3539
|
+
|
3540
|
+
try:
|
3541
|
+
hangye=get_stock_industry_sw(ticker)
|
3542
|
+
except:
|
3543
|
+
print(" #Warning(stock_peers_sw): stock not found for",ticker)
|
3544
|
+
return
|
3545
|
+
|
3546
|
+
#三级行业优先
|
3547
|
+
hangye3=hangye+'Ⅲ'
|
3548
|
+
try:
|
3549
|
+
print_industry_component_sw(iname=hangye3)
|
3550
|
+
except:
|
3551
|
+
#二级行业次优先
|
3552
|
+
hangye2=hangye+'Ⅱ'
|
3553
|
+
try:
|
3554
|
+
print_industry_component_sw(iname=hangye2)
|
3555
|
+
except:
|
3556
|
+
try:
|
3557
|
+
print_industry_component_sw(iname=hangye)
|
3558
|
+
except:
|
3559
|
+
print(" #Warning(stock_peers_sw): failed to search peers for",ticker)
|
3502
3560
|
|
3561
|
+
return
|
3562
|
+
|
3503
3563
|
|
siat/stock.py
CHANGED
@@ -2288,9 +2288,11 @@ def candlestick(stkcd,fromdate,todate,volume=True,style='China',mav=[5,10], \
|
|
2288
2288
|
|
2289
2289
|
#设置图例,注意前两个为图中期间开始日期的线和柱子
|
2290
2290
|
mav_labels=[text_lang('期间首日线','Day 1(line)'),text_lang('期间首日柱','Day 1(bar)')]
|
2291
|
+
#mav_labels=[None,None]
|
2291
2292
|
for d in mav:
|
2292
2293
|
mav_labels=mav_labels+[str(d)+text_lang("日移动均线","-day MAV line")]
|
2293
|
-
axlist[0].legend(mav_labels,loc=loc)
|
2294
|
+
axlist[0].legend(labels=mav_labels,loc=loc)
|
2295
|
+
#axlist[0].legend(mav_labels[2:],loc=loc)
|
2294
2296
|
"""
|
2295
2297
|
#去掉前两个无用的图例
|
2296
2298
|
handles, labels = axlist[0].get_legend_handles_labels()
|
@@ -94,7 +94,7 @@ siat/risk_evaluation.py,sha256=I6B3gty-t--AkDCO0tKF-291YfpnF-IkXcFjqNKCt9I,76286
|
|
94
94
|
siat/risk_evaluation_test.py,sha256=YEXM96gKzTfwN4U61AS4Rr1tV7KgUvn4rRC6f3iMw9s,3731
|
95
95
|
siat/risk_free_rate.py,sha256=ZMr4cHikPvXvywr54gGqiI3Nvb69am6tq3zj2hwzANE,12384
|
96
96
|
siat/risk_free_rate_test.py,sha256=CpmhUf8aEAEZeNu4gvWP2Mz2dLoIgBX5bI41vfUBEr8,4285
|
97
|
-
siat/sector_china.py,sha256
|
97
|
+
siat/sector_china.py,sha256=-3Z13BOwTlNzRLlB2-Pt1xEVu4R7PY6OTuW9BxvXVVw,132299
|
98
98
|
siat/sector_china_test.py,sha256=1wq7ef8Bb_L8F0h0W6FvyBrIcBTEbrTV7hljtpj49U4,5843
|
99
99
|
siat/security_price.py,sha256=2oHskgiw41KMGfqtnA0i2YjNNV6cYgtlUK0j3YeuXWs,29185
|
100
100
|
siat/security_price2.py,sha256=65s64L68aRZdVVK3V8UYxdPd_JHMqgJ2FBJJX5MSW-Q,26174
|
@@ -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=IY4-RC8jztjFEN4FFdc6YP299IRyIOwIcPRObswg588,152527
|
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.14.dist-info/METADATA,sha256=Bb5sc9tqZHXC_O1LOe7LRT9-OK8FKscIj8QzMRcUCqg,7683
|
143
|
+
siat-3.4.14.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
144
|
+
siat-3.4.14.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
|
145
|
+
siat-3.4.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|