siat 3.4.10__py3-none-any.whl → 3.4.13__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
@@ -3199,9 +3199,10 @@ if __name__=='__main__':
|
|
3199
3199
|
|
3200
3200
|
peers=stock_industry_peer_em(ticker,indicator="市盈率",rank=10)
|
3201
3201
|
|
3202
|
-
def stock_peers_em(ticker,indicator=
|
3203
|
-
|
3204
|
-
|
3202
|
+
def stock_peers_em(ticker='',indicator='',rank=10, \
|
3203
|
+
force_show_stock=False, \
|
3204
|
+
font_size="16px",facecolor="papayawhip", \
|
3205
|
+
numberPerLine=5):
|
3205
3206
|
"""
|
3206
3207
|
功能:基于东方财富行业分类,查找股票所属的行业以及主要同行
|
3207
3208
|
特点:行业分类较粗糙,略胜于无
|
@@ -3245,8 +3246,9 @@ def stock_peers_em(ticker,indicator="市盈率",rank=10, \
|
|
3245
3246
|
indicator_col=i
|
3246
3247
|
break
|
3247
3248
|
|
3248
|
-
if indicator_col=='':
|
3249
|
-
|
3249
|
+
if indicator_col=='' or indicator=='':
|
3250
|
+
if indicator!='':
|
3251
|
+
print(" #Warning(stock_peer_em): unsupported indicator",indicator)
|
3250
3252
|
|
3251
3253
|
remove_list=["序号","代码","名称"]
|
3252
3254
|
cfg_col_list_tmp = [x for x in cfg_col_list if x not in remove_list]
|
@@ -3282,6 +3284,22 @@ def stock_peers_em(ticker,indicator="市盈率",rank=10, \
|
|
3282
3284
|
rank_flag="后"
|
3283
3285
|
df_disp=cfg[collist].tail(abs(rank))
|
3284
3286
|
|
3287
|
+
#强制显示所选股票
|
3288
|
+
if force_show_stock:
|
3289
|
+
#所选股票是否在其中?
|
3290
|
+
if not ticker[:6] in list(df_disp["代码"]):
|
3291
|
+
ticker_seq=cfg[cfg["代码"]==ticker[:6]]["序号"].values[0]
|
3292
|
+
seq1=ticker_seq-4; seq2=ticker_seq+5
|
3293
|
+
#如果超出开头
|
3294
|
+
if seq1 <=0:
|
3295
|
+
seq1=1; seq2=10
|
3296
|
+
#如果超出结尾
|
3297
|
+
if seq2 > len(cfg):
|
3298
|
+
seq2=len(cfg); seq1=len(cfg)-9
|
3299
|
+
|
3300
|
+
#注意:此处的&不能换为and
|
3301
|
+
df_disp=cfg[(cfg["序号"]>=seq1) & (cfg["序号"]<=seq2)][collist]
|
3302
|
+
|
3285
3303
|
#制表
|
3286
3304
|
tname=ticker_name(ticker)
|
3287
3305
|
titletxt="行业板块及其上市公司排名:"+hangye+","+indicator_col+"("+rank_flag+str(abs(rank))+"名)"
|
@@ -3311,13 +3329,16 @@ if __name__=='__main__':
|
|
3311
3329
|
|
3312
3330
|
ticker="600519.SS"
|
3313
3331
|
indicator="市盈率"
|
3314
|
-
rank=
|
3332
|
+
rank=11
|
3333
|
+
|
3334
|
+
force_show_stock=True
|
3315
3335
|
|
3316
3336
|
font_size="16px"; facecolor="papayawhip"; numberPerLine=7
|
3317
3337
|
|
3318
3338
|
|
3319
3339
|
def concept_stocks_em(concept='',ticker='',indicator="市盈率",rank=10, \
|
3320
|
-
|
3340
|
+
force_show_stock=False, \
|
3341
|
+
font_size="16px",facecolor="papayawhip",numberPerLine=5):
|
3321
3342
|
"""
|
3322
3343
|
功能:基于东方财富概念板块,查找关键字相关概念以及股票业绩
|
3323
3344
|
特点:概念板块划分细致,同一股票可能分属多个板块,与行业分类不同
|
@@ -3428,6 +3449,23 @@ def concept_stocks_em(concept='',ticker='',indicator="市盈率",rank=10, \
|
|
3428
3449
|
rank_flag="后"
|
3429
3450
|
df_disp=cfg[collist].tail(abs(rank))
|
3430
3451
|
|
3452
|
+
#强制显示所选股票
|
3453
|
+
if force_show_stock:
|
3454
|
+
#所选股票是否在其中?
|
3455
|
+
if not ticker[:6] in list(df_disp["代码"]):
|
3456
|
+
ticker_seq=cfg[cfg["代码"]==ticker[:6]]["序号"].values[0]
|
3457
|
+
seq1=ticker_seq-4; seq2=ticker_seq+5
|
3458
|
+
#如果超出开头
|
3459
|
+
if seq1 <=0:
|
3460
|
+
seq1=1; seq2=10
|
3461
|
+
#如果超出结尾
|
3462
|
+
if seq2 > len(cfg):
|
3463
|
+
seq2=len(cfg); seq1=len(cfg)-9
|
3464
|
+
|
3465
|
+
#注意:此处的&不能换为and
|
3466
|
+
df_disp=cfg[(cfg["序号"]>=seq1) & (cfg["序号"]<=seq2)][collist]
|
3467
|
+
|
3468
|
+
|
3431
3469
|
#制表
|
3432
3470
|
titletxt="概念板块及其上市公司排名:"+concept+","+indicator_col+"("+rank_flag+str(abs(rank))+"名)"
|
3433
3471
|
|
@@ -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=Zoyhl7wGhad5npRqIV7bTephv5sqPhJfEHsZBQnzas8,130621
|
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
|
@@ -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.13.dist-info/METADATA,sha256=zBJGx6wFyInqGhFQPbqSvpzzDT0cTo6YOZWUvqHXkoc,7683
|
143
|
+
siat-3.4.13.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
144
|
+
siat-3.4.13.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
|
145
|
+
siat-3.4.13.dist-info/RECORD,,
|
File without changes
|