siat 3.0.2__py3-none-any.whl → 3.0.4__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/assets_liquidity.py +1 -0
- siat/beta_adjustment.py +8 -0
- siat/beta_adjustment_china.py +5 -0
- siat/bond.py +14 -0
- siat/bond_base.py +2 -1
- siat/bond_china.py +1 -0
- siat/capm_beta.py +5 -0
- siat/capm_beta2.py +1 -0
- siat/common.py +2 -0
- siat/compare_cross.py +1 -0
- siat/cryptocurrency.py +4 -0
- siat/fama_french.py +19 -2
- siat/financial_base.py +1 -0
- siat/financials.py +2 -0
- siat/financials2.py +2 -0
- siat/financials_china.py +2 -0
- siat/grafix.py +23 -1
- siat/holding_risk.py +3 -0
- siat/market_china.py +1 -1
- siat/markowitz.py +28 -11
- siat/option_china.py +3 -0
- siat/option_pricing.py +2 -0
- siat/risk_adjusted_return.py +8 -0
- siat/risk_evaluation.py +12 -1
- siat/sector_china.py +2 -0
- siat/security_trend.py +1 -0
- siat/security_trend2.py +1 -0
- siat/stock.py +5 -2
- siat/stock_china.py +1 -1
- siat/stock_profile.py +25 -1
- siat/stock_technical.py +5 -0
- siat/transaction.py +1 -0
- siat/translate.py +1 -0
- siat/valuation.py +1 -0
- siat/valuation_china.py +1 -0
- siat/var_model_validation.py +1 -0
- {siat-3.0.2.dist-info → siat-3.0.4.dist-info}/METADATA +1 -1
- {siat-3.0.2.dist-info → siat-3.0.4.dist-info}/RECORD +40 -40
- {siat-3.0.2.dist-info → siat-3.0.4.dist-info}/WHEEL +0 -0
- {siat-3.0.2.dist-info → siat-3.0.4.dist-info}/top_level.txt +0 -0
siat/assets_liquidity.py
CHANGED
@@ -19,6 +19,7 @@ from siat.common import *
|
|
19
19
|
from siat.translate import *
|
20
20
|
from siat.grafix import *
|
21
21
|
from siat.security_prices import *
|
22
|
+
from siat.security_price2 import *
|
22
23
|
#==============================================================================
|
23
24
|
import matplotlib.pyplot as plt
|
24
25
|
|
siat/beta_adjustment.py
CHANGED
@@ -13,6 +13,7 @@ from siat.common import *
|
|
13
13
|
from siat.translate import *
|
14
14
|
from siat.grafix import *
|
15
15
|
from siat.security_prices import *
|
16
|
+
from siat.security_price2 import *
|
16
17
|
#==============================================================================
|
17
18
|
import matplotlib.pyplot as plt
|
18
19
|
|
@@ -223,6 +224,8 @@ def draw2_betas(model,scope,ticker,betas):
|
|
223
224
|
plt.ylabel("贝塔系数",fontsize=12,fontweight='bold')
|
224
225
|
|
225
226
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
227
|
+
plt.gca().set_facecolor('whitesmoke')
|
228
|
+
|
226
229
|
#plt.xticks(rotation=30)
|
227
230
|
plt.legend(loc='best')
|
228
231
|
|
@@ -700,6 +703,8 @@ def get_beta_hamada(stkcd,mktidx,yearlist,printout=True,graph=True):
|
|
700
703
|
#样式:bmh(好),classic,ggplot(好,图大),tableau-colorblind10,
|
701
704
|
#样式:seaborn-bright,seaborn-poster,seaborn-whitegrid
|
702
705
|
plt.style.use('bmh')
|
706
|
+
|
707
|
+
plt.gca().set_facecolor('whitesmoke')
|
703
708
|
plt.show()
|
704
709
|
|
705
710
|
return betas
|
@@ -743,6 +748,8 @@ def draw_hamada_factors(stkcd,mktidx,betas):
|
|
743
748
|
"\n(Benchmark on Market Index "+mktidx+")"
|
744
749
|
plt.title(title1,fontsize=12,fontweight='bold')
|
745
750
|
plt.style.use('ggplot')
|
751
|
+
|
752
|
+
plt.gca().set_facecolor('whitesmoke')
|
746
753
|
plt.show()
|
747
754
|
|
748
755
|
return
|
@@ -862,6 +869,7 @@ def get_beta_hamada2(stkcd,mktidx,printout=True,graph=True):
|
|
862
869
|
#样式:seaborn-bright,seaborn-poster,seaborn-whitegrid
|
863
870
|
plt.style.use('bmh')
|
864
871
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
872
|
+
plt.gca().set_facecolor('whitesmoke')
|
865
873
|
plt.legend(loc='best')
|
866
874
|
plt.show(); plt.close()
|
867
875
|
|
siat/beta_adjustment_china.py
CHANGED
@@ -13,6 +13,7 @@ from siat.common import *
|
|
13
13
|
from siat.translate import *
|
14
14
|
from siat.grafix import *
|
15
15
|
from siat.security_prices import *
|
16
|
+
from siat.security_price2 import *
|
16
17
|
from siat.beta_adjustment import *
|
17
18
|
#==============================================================================
|
18
19
|
import matplotlib.pyplot as plt
|
@@ -324,6 +325,8 @@ def get_beta_hamada_china_v0(stkcd,mktidx,start,end,printout=True,graph=True):
|
|
324
325
|
plt.style.use('bmh')
|
325
326
|
plt.legend(loc='best')
|
326
327
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
328
|
+
plt.gca().set_facecolor('whitesmoke')
|
329
|
+
|
327
330
|
#plt.xticks(rotation=30)
|
328
331
|
plt.show()
|
329
332
|
|
@@ -363,6 +366,8 @@ def draw_hamada_factors_china(stkcd,mktidx,betas):
|
|
363
366
|
"\n(基于"+ticker_name(mktidx)+")"
|
364
367
|
plt.title(title1,fontsize=12,fontweight='bold')
|
365
368
|
plt.style.use('ggplot')
|
369
|
+
|
370
|
+
plt.gca().set_facecolor('whitesmoke')
|
366
371
|
plt.show()
|
367
372
|
|
368
373
|
return
|
siat/bond.py
CHANGED
@@ -1140,6 +1140,7 @@ def bond_malkiel1(aytm,yper,c,fv=100,mterm=1, \
|
|
1140
1140
|
#plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
1141
1141
|
plt.xticks(rotation=30)
|
1142
1142
|
|
1143
|
+
plt.gca().set_facecolor('whitesmoke')
|
1143
1144
|
plt.show(); plt.close()
|
1144
1145
|
|
1145
1146
|
return
|
@@ -1238,6 +1239,7 @@ def bond_malkiel2(aytm,yper,c,fv=100,mterm=1, \
|
|
1238
1239
|
#plt.tick_params(labelsize=11)
|
1239
1240
|
plt.xticks(rotation=30)
|
1240
1241
|
|
1242
|
+
plt.gca().set_facecolor('whitesmoke')
|
1241
1243
|
plt.show(); plt.close()
|
1242
1244
|
|
1243
1245
|
return
|
@@ -1333,6 +1335,8 @@ def bond_malkiel3(aytm,yper,c,fv=100,mterm=1):
|
|
1333
1335
|
titletxt="Malkiel\'s Law 3: Relationship btw Time to Maturity & Bond Price Change Speed"
|
1334
1336
|
|
1335
1337
|
plt.title(titletxt, fontsize=title_txt_size,fontweight='bold')
|
1338
|
+
|
1339
|
+
plt.gca().set_facecolor('whitesmoke')
|
1336
1340
|
plt.show(); plt.close()
|
1337
1341
|
|
1338
1342
|
return
|
@@ -1446,6 +1450,8 @@ def bond_malkiel4(aytm,yper,c,fv=100,mterm=1, \
|
|
1446
1450
|
#plt.tick_params(labelsize=11)
|
1447
1451
|
plt.xticks(rotation=30)
|
1448
1452
|
plt.title(titletxt,fontsize=title_txt_size,fontweight='bold')
|
1453
|
+
|
1454
|
+
plt.gca().set_facecolor('whitesmoke')
|
1449
1455
|
plt.show(); plt.close()
|
1450
1456
|
|
1451
1457
|
return
|
@@ -1542,6 +1548,8 @@ def bond_malkiel5(aytm,yper,c,fv=100,mterm=1, \
|
|
1542
1548
|
#plt.tick_params(labelsize=11)
|
1543
1549
|
plt.xticks(rotation=30)
|
1544
1550
|
plt.title(titletxt,fontsize=title_txt_size,fontweight='bold')
|
1551
|
+
|
1552
|
+
plt.gca().set_facecolor('whitesmoke')
|
1545
1553
|
plt.show(); plt.close()
|
1546
1554
|
|
1547
1555
|
return
|
@@ -2177,6 +2185,8 @@ def kpmg_rnpm1_cr(k1,theta,i1, \
|
|
2177
2185
|
plt.title(titletxt,fontsize=title_txt_size,fontweight='bold')
|
2178
2186
|
|
2179
2187
|
plt.xticks(rotation=30)
|
2188
|
+
|
2189
|
+
plt.gca().set_facecolor('whitesmoke')
|
2180
2190
|
plt.show(); plt.close()
|
2181
2191
|
|
2182
2192
|
return df
|
@@ -2280,6 +2290,8 @@ def kpmg_rnpm1_rf(k1,theta,i1, \
|
|
2280
2290
|
plt.title(titletxt,fontsize=title_txt_size,fontweight='bold')
|
2281
2291
|
|
2282
2292
|
plt.xticks(rotation=30)
|
2293
|
+
|
2294
|
+
plt.gca().set_facecolor('whitesmoke')
|
2283
2295
|
plt.show(); plt.close()
|
2284
2296
|
|
2285
2297
|
return df
|
@@ -2372,6 +2384,8 @@ def kpmg_rnpm1_rrd(k1,theta,i1, \
|
|
2372
2384
|
plt.title(titletxt,fontsize=title_txt_size,fontweight='bold')
|
2373
2385
|
|
2374
2386
|
plt.xticks(rotation=30)
|
2387
|
+
|
2388
|
+
plt.gca().set_facecolor('whitesmoke')
|
2375
2389
|
plt.show(); plt.close()
|
2376
2390
|
|
2377
2391
|
return df
|
siat/bond_base.py
CHANGED
@@ -976,7 +976,8 @@ def macaulay_theorem(
|
|
976
976
|
plt.title(titletxt,fontsize=title_txt_size,fontweight='bold')
|
977
977
|
plt.xlabel(footnote,fontsize=xlabel_txt_size)
|
978
978
|
plt.xticks(rotation=30)
|
979
|
-
|
979
|
+
|
980
|
+
plt.gca().set_facecolor('whitesmoke')
|
980
981
|
plt.show(); plt.close()
|
981
982
|
|
982
983
|
return df
|
siat/bond_china.py
CHANGED
@@ -25,6 +25,7 @@ from siat.bond_base import *
|
|
25
25
|
from siat.bond import *
|
26
26
|
from siat.stock import *
|
27
27
|
from siat.security_prices import *
|
28
|
+
from siat.security_price2 import *
|
28
29
|
#==============================================================================
|
29
30
|
import matplotlib.pyplot as plt
|
30
31
|
plt.rcParams['figure.figsize']=(12.8,7.2)
|
siat/capm_beta.py
CHANGED
@@ -18,6 +18,7 @@ import warnings; warnings.filterwarnings('ignore')
|
|
18
18
|
from siat.common import *
|
19
19
|
from siat.translate import *
|
20
20
|
from siat.security_prices import *
|
21
|
+
from siat.security_price2 import *
|
21
22
|
#==============================================================================
|
22
23
|
import matplotlib.pyplot as plt
|
23
24
|
|
@@ -249,6 +250,8 @@ def plot_trend(titletxt,footnotetxt,df,power=1,axhline_value=1,axhline_label='')
|
|
249
250
|
plt.legend(loc='best')
|
250
251
|
plt.title(titletxt)
|
251
252
|
plt.xlabel(footnotetxt)
|
253
|
+
|
254
|
+
plt.gca().set_facecolor('whitesmoke')
|
252
255
|
plt.show()
|
253
256
|
|
254
257
|
return
|
@@ -738,6 +741,8 @@ def compare2_betas_yearly(ticker1,ticker2,mktidx,yearlist):
|
|
738
741
|
|
739
742
|
import datetime; today = datetime.date.today()
|
740
743
|
plt.xlabel("数据来源:新浪/stooq/fred,基于"+ticker_name(mktidx)+','+str(today))
|
744
|
+
|
745
|
+
plt.gca().set_facecolor('whitesmoke')
|
741
746
|
plt.show()
|
742
747
|
|
743
748
|
return betas1,betas2
|
siat/capm_beta2.py
CHANGED
siat/common.py
CHANGED
siat/compare_cross.py
CHANGED
@@ -20,6 +20,7 @@ import warnings; warnings.filterwarnings('ignore')
|
|
20
20
|
from siat.common import *
|
21
21
|
from siat.translate import *
|
22
22
|
from siat.security_prices import *
|
23
|
+
from siat.security_price2 import *
|
23
24
|
from siat.transaction import *
|
24
25
|
from siat.risk_adjusted_return import *
|
25
26
|
from siat.sector_china import *
|
siat/cryptocurrency.py
CHANGED
@@ -200,6 +200,8 @@ def compCrypto_Price(product1,product2,days=30):
|
|
200
200
|
plt.ylabel("收盘价")
|
201
201
|
plt.xticks(rotation=30)
|
202
202
|
plt.legend(loc='best')
|
203
|
+
|
204
|
+
plt.gca().set_facecolor('whitesmoke')
|
203
205
|
plt.show()
|
204
206
|
|
205
207
|
return
|
@@ -249,6 +251,8 @@ def compCrypto_Return(product1,product2,days=30):
|
|
249
251
|
plt.ylabel("资本利得%")
|
250
252
|
plt.xticks(rotation=30)
|
251
253
|
plt.legend(loc='best')
|
254
|
+
|
255
|
+
plt.gca().set_facecolor('whitesmoke')
|
252
256
|
plt.show()
|
253
257
|
|
254
258
|
return
|
siat/fama_french.py
CHANGED
@@ -11,6 +11,7 @@ import warnings; warnings.filterwarnings('ignore')
|
|
11
11
|
from siat.common import *
|
12
12
|
from siat.translate import *
|
13
13
|
from siat.security_prices import *
|
14
|
+
from siat.security_price2 import *
|
14
15
|
#==============================================================================
|
15
16
|
import matplotlib.pyplot as plt
|
16
17
|
|
@@ -486,7 +487,9 @@ def draw1_ff_factors(model,scope,factors,factor_type):
|
|
486
487
|
plt.title(title1,fontsize=12,fontweight='bold')
|
487
488
|
plt.ylabel('Mkt-RF',fontsize=12,fontweight='bold')
|
488
489
|
plt.xticks(factors.index,fontsize=8,rotation=30)
|
489
|
-
plt.legend(loc='best')
|
490
|
+
plt.legend(loc='best')
|
491
|
+
|
492
|
+
plt.gca().set_facecolor('whitesmoke')
|
490
493
|
plt.show()
|
491
494
|
|
492
495
|
if factor_type in ['SMB']:
|
@@ -503,6 +506,8 @@ def draw1_ff_factors(model,scope,factors,factor_type):
|
|
503
506
|
plt.ylabel('SMB',fontsize=12,fontweight='bold')
|
504
507
|
plt.xticks(factors.index,fontsize=8,rotation=30)
|
505
508
|
plt.legend(loc='best')
|
509
|
+
|
510
|
+
plt.gca().set_facecolor('whitesmoke')
|
506
511
|
plt.show()
|
507
512
|
|
508
513
|
if factor_type in ['HML']:
|
@@ -519,6 +524,8 @@ def draw1_ff_factors(model,scope,factors,factor_type):
|
|
519
524
|
plt.ylabel('HML',fontsize=12,fontweight='bold')
|
520
525
|
plt.xticks(factors.index,fontsize=8,rotation=30)
|
521
526
|
plt.legend(loc='best')
|
527
|
+
|
528
|
+
plt.gca().set_facecolor('whitesmoke')
|
522
529
|
plt.show()
|
523
530
|
|
524
531
|
if factor_type in ['RF']:
|
@@ -534,6 +541,8 @@ def draw1_ff_factors(model,scope,factors,factor_type):
|
|
534
541
|
plt.ylabel('RF %',fontsize=12,fontweight='bold')
|
535
542
|
plt.xticks(factors.index,fontsize=8,rotation=30)
|
536
543
|
plt.legend(loc='best')
|
544
|
+
|
545
|
+
plt.gca().set_facecolor('whitesmoke')
|
537
546
|
plt.show()
|
538
547
|
|
539
548
|
if factor_type in ['MOM']:
|
@@ -550,6 +559,8 @@ def draw1_ff_factors(model,scope,factors,factor_type):
|
|
550
559
|
plt.ylabel('Mom',fontsize=12,fontweight='bold')
|
551
560
|
plt.xticks(factors.index,fontsize=8)
|
552
561
|
plt.legend(loc='best')
|
562
|
+
|
563
|
+
plt.gca().set_facecolor('whitesmoke')
|
553
564
|
plt.show()
|
554
565
|
|
555
566
|
|
@@ -567,6 +578,8 @@ def draw1_ff_factors(model,scope,factors,factor_type):
|
|
567
578
|
plt.ylabel('RMW',fontsize=12,fontweight='bold')
|
568
579
|
plt.xticks(factors.index,fontsize=8)
|
569
580
|
plt.legend(loc='best')
|
581
|
+
|
582
|
+
plt.gca().set_facecolor('whitesmoke')
|
570
583
|
plt.show()
|
571
584
|
|
572
585
|
if factor_type in ['CMA']:
|
@@ -583,6 +596,8 @@ def draw1_ff_factors(model,scope,factors,factor_type):
|
|
583
596
|
plt.ylabel('CMA',fontsize=12,fontweight='bold')
|
584
597
|
plt.xticks(factors.index,fontsize=8)
|
585
598
|
plt.legend(loc='best')
|
599
|
+
|
600
|
+
plt.gca().set_facecolor('whitesmoke')
|
586
601
|
plt.show()
|
587
602
|
|
588
603
|
return
|
@@ -634,7 +649,9 @@ def draw2_ff_factors(model,scope1,scope2,factors1,factors2,factor_type):
|
|
634
649
|
title1="\n"+model+": "+scope1+" vs. "+scope2+", "+" Factor "+factor_type
|
635
650
|
plt.title(title1,fontsize=12,fontweight='bold')
|
636
651
|
plt.ylabel(factor_type,fontsize=12,fontweight='bold')
|
637
|
-
plt.legend(loc='best')
|
652
|
+
plt.legend(loc='best')
|
653
|
+
|
654
|
+
plt.gca().set_facecolor('whitesmoke')
|
638
655
|
plt.show()
|
639
656
|
|
640
657
|
return
|
siat/financial_base.py
CHANGED
@@ -21,6 +21,7 @@ import warnings; warnings.filterwarnings('ignore')
|
|
21
21
|
from siat.common import *
|
22
22
|
from siat.translate import *
|
23
23
|
from siat.security_prices import *
|
24
|
+
from siat.security_price2 import *
|
24
25
|
#==============================================================================
|
25
26
|
#本模块直接使用爬虫抓取雅虎财经
|
26
27
|
#==============================================================================
|
siat/financials.py
CHANGED
@@ -1990,6 +1990,8 @@ def compare_dupont(tickerlist,fsdate='latest',scale1 = 10,scale2 = 10,hatchlist=
|
|
1990
1990
|
else:
|
1991
1991
|
plt.title(texttranslate("杜邦分析对比图"),fontsize=title_txt_size,fontweight='bold')
|
1992
1992
|
plt.xlim([min(tick_pos)-w,max(tick_pos)+w])
|
1993
|
+
|
1994
|
+
plt.gca().set_facecolor('whitesmoke')
|
1993
1995
|
plt.show()
|
1994
1996
|
|
1995
1997
|
#设置打印对齐
|
siat/financials2.py
CHANGED
@@ -909,6 +909,8 @@ def fs_analysis(tickers,fsdates=[],analysis_type='balance sheet', \
|
|
909
909
|
plt.legend(loc='best',fontsize=10)
|
910
910
|
plt.title("Dupont Identity Analysis")
|
911
911
|
plt.xlim([min(tick_pos)-w,max(tick_pos)+w])
|
912
|
+
|
913
|
+
plt.gca().set_facecolor('whitesmoke')
|
912
914
|
plt.show()
|
913
915
|
|
914
916
|
if printout:
|
siat/financials_china.py
CHANGED
@@ -764,6 +764,8 @@ def compare_dupont_china(tickerlist,fsdate='latest',scale1 = 10,scale2 = 10, \
|
|
764
764
|
plt.legend(loc='best')
|
765
765
|
plt.title("杜邦分析对比图")
|
766
766
|
plt.xlim([min(tick_pos)-w,max(tick_pos)+w])
|
767
|
+
|
768
|
+
plt.gca().set_facecolor('whitesmoke')
|
767
769
|
plt.show()
|
768
770
|
|
769
771
|
if printout:
|
siat/grafix.py
CHANGED
@@ -30,6 +30,11 @@ plt.rcParams['font.size'] = 13
|
|
30
30
|
plt.rcParams['xtick.labelsize']=11 #横轴字体大小
|
31
31
|
plt.rcParams['ytick.labelsize']=11 #纵轴字体大小
|
32
32
|
|
33
|
+
plt.rcParams['figure.facecolor']='whitesmoke' #背景颜色
|
34
|
+
#plt.rcParams['axes.facecolor']='whitesmoke' #背景颜色
|
35
|
+
#plt.figure(facecolor='whitesmoke')
|
36
|
+
|
37
|
+
|
33
38
|
title_txt_size=16
|
34
39
|
ylabel_txt_size=12
|
35
40
|
xlabel_txt_size=12
|
@@ -41,7 +46,7 @@ plt.rcParams['axes.grid']=False
|
|
41
46
|
#plt.rcParams['grid.color']='steelblue'
|
42
47
|
#plt.rcParams['grid.linestyle']='dashed'
|
43
48
|
#plt.rcParams['grid.linewidth']=0.5
|
44
|
-
|
49
|
+
|
45
50
|
|
46
51
|
#设置刻度线风格:in,out,inout
|
47
52
|
plt.rcParams['xtick.direction'] = 'in' # 将x轴的刻度线方向设置向内
|
@@ -262,6 +267,7 @@ def plot_line(df0,colname,collabel,ylabeltxt,titletxt,footnote,datatag=False, \
|
|
262
267
|
plt.legend(loc=loc,fontsize=legend_txt_size)
|
263
268
|
|
264
269
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
270
|
+
plt.gca().set_facecolor('whitesmoke')
|
265
271
|
|
266
272
|
if '基金' in titletxt and '收盘价' in ylabeltxt:
|
267
273
|
ylabeltxt=ylabeltxt.replace('收盘价','单位净值')
|
@@ -520,6 +526,7 @@ def plot_line2_coaxial(df01,ticker1,colname1,label1, \
|
|
520
526
|
# 同轴绘图时,loc1/loc2未用上!
|
521
527
|
plt.legend(loc=loc1,fontsize=legend_txt_size)
|
522
528
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
529
|
+
plt.gca().set_facecolor('whitesmoke')
|
523
530
|
|
524
531
|
plt.ylabel(ylabeltxt,fontsize=ylabel_txt_size)
|
525
532
|
plt.xlabel(footnote,fontsize=xlabel_txt_size)
|
@@ -703,6 +710,7 @@ def plot_line2_coaxial2(df01,ticker1,colname1,label1, \
|
|
703
710
|
# 同轴绘图时,loc1/loc2未用上!
|
704
711
|
plt.legend(loc=loc1,fontsize=legend_txt_size)
|
705
712
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
713
|
+
plt.gca().set_facecolor('whitesmoke')
|
706
714
|
|
707
715
|
plt.ylabel(ylabeltxt,fontsize=ylabel_txt_size)
|
708
716
|
plt.xlabel(footnote,fontsize=xlabel_txt_size)
|
@@ -851,6 +859,7 @@ def plot_line2_twinx(df01,ticker1,colname1,label1, \
|
|
851
859
|
|
852
860
|
#自动优化x轴标签
|
853
861
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
862
|
+
plt.gca().set_facecolor('whitesmoke')
|
854
863
|
|
855
864
|
plt.title(titletxt,fontweight='bold',fontsize=title_txt_size)
|
856
865
|
plt.show()
|
@@ -1040,6 +1049,7 @@ def plot_line2_twinx2(df01,ticker1,colname1,label1, \
|
|
1040
1049
|
#格式化时间轴标注
|
1041
1050
|
#plt.gca().xaxis.set_major_formatter(mdate.DateFormatter('%y-%m-%d'))
|
1042
1051
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
1052
|
+
plt.gca().set_facecolor('whitesmoke')
|
1043
1053
|
|
1044
1054
|
plt.title(titletxt,fontweight='bold',fontsize=title_txt_size)
|
1045
1055
|
plt.show()
|
@@ -1244,6 +1254,7 @@ def draw_lines(df0,y_label,x_label,axhline_value,axhline_label,title_txt, \
|
|
1244
1254
|
#图示标题
|
1245
1255
|
plt.title(title_txt,fontweight='bold',fontsize=title_txt_size)
|
1246
1256
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
1257
|
+
plt.gca().set_facecolor('whitesmoke')
|
1247
1258
|
|
1248
1259
|
# 若不绘制annotate,则绘制图例
|
1249
1260
|
if not annotate:
|
@@ -1436,6 +1447,7 @@ def draw_lines2(df0,y_label,x_label,axhline_value,axhline_label,title_txt, \
|
|
1436
1447
|
#图示标题
|
1437
1448
|
plt.title(title_txt,fontweight='bold',fontsize=title_txt_size)
|
1438
1449
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
1450
|
+
plt.gca().set_facecolor('whitesmoke')
|
1439
1451
|
|
1440
1452
|
if not annotate:
|
1441
1453
|
plt.legend(loc=loc,fontsize=legend_txt_size)
|
@@ -1505,6 +1517,7 @@ def plot_barh(df,colname,titletxt,footnote,datatag=True, \
|
|
1505
1517
|
yticknames=list(df.index)
|
1506
1518
|
plt.yticks(df.index,yticknames)
|
1507
1519
|
|
1520
|
+
plt.gca().set_facecolor('whitesmoke')
|
1508
1521
|
plt.show(); plt.close()
|
1509
1522
|
|
1510
1523
|
return
|
@@ -1658,7 +1671,9 @@ def plot_2lines(df01,colname1,label1, \
|
|
1658
1671
|
plt.ylabel(ylabeltxt,fontsize=ylabel_txt_size)
|
1659
1672
|
plt.xlabel(footnote,fontsize=xlabel_txt_size)
|
1660
1673
|
plt.legend(loc='best',fontsize=legend_txt_size)
|
1674
|
+
|
1661
1675
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
1676
|
+
plt.gca().set_facecolor('whitesmoke')
|
1662
1677
|
|
1663
1678
|
plt.show()
|
1664
1679
|
|
@@ -1898,6 +1913,9 @@ def plot_norm(mu,sd,graph='pdf',obs_num=100):
|
|
1898
1913
|
plt.tight_layout()
|
1899
1914
|
#plt.grid() #网格
|
1900
1915
|
plt.legend(loc='best',fontsize=legend_txt_size)
|
1916
|
+
|
1917
|
+
plt.gca().set_facecolor('whitesmoke')
|
1918
|
+
|
1901
1919
|
plt.show() #显示图形
|
1902
1920
|
|
1903
1921
|
return
|
@@ -2012,6 +2030,8 @@ def pandas2plttable(df,titletxt,firstColSpecial=True,colWidth=0.1,tabScale=2,cel
|
|
2012
2030
|
else:
|
2013
2031
|
plt.title(titletxt,fontweight='bold',fontsize=title_txt_size,x=title_x)
|
2014
2032
|
|
2033
|
+
plt.gca().set_facecolor('whitesmoke')
|
2034
|
+
|
2015
2035
|
plt.show()
|
2016
2036
|
|
2017
2037
|
return
|
@@ -2087,6 +2107,8 @@ def pandas2plttable2(df,titletxt,firstColSpecial=True,cellLoc='right'):
|
|
2087
2107
|
|
2088
2108
|
plt.title(titletxt)
|
2089
2109
|
|
2110
|
+
plt.gca().set_facecolor('whitesmoke')
|
2111
|
+
|
2090
2112
|
plt.show()
|
2091
2113
|
|
2092
2114
|
return
|
siat/holding_risk.py
CHANGED
@@ -18,6 +18,7 @@ import warnings; warnings.filterwarnings("ignore")
|
|
18
18
|
from siat.common import *
|
19
19
|
from siat.translate import *
|
20
20
|
from siat.security_prices import *
|
21
|
+
from siat.security_price2 import *
|
21
22
|
#==============================================================================
|
22
23
|
import matplotlib.pyplot as plt
|
23
24
|
|
@@ -847,6 +848,8 @@ def portfolio_rets_curve(portfolio,fromdate,todate):
|
|
847
848
|
',样本数量'+str(num)+'个'
|
848
849
|
titletxt=titletxt1+titletxt2+titletxt3+titletxt4
|
849
850
|
plt.title(titletxt)
|
851
|
+
|
852
|
+
plt.gca().set_facecolor('whitesmoke')
|
850
853
|
plt.show()
|
851
854
|
|
852
855
|
return
|
siat/market_china.py
CHANGED
@@ -22,7 +22,7 @@ from siat.common import *
|
|
22
22
|
from siat.translate import *
|
23
23
|
from siat.grafix import *
|
24
24
|
from siat.security_prices import *
|
25
|
-
|
25
|
+
from siat.security_price2 import *
|
26
26
|
#==============================================================================
|
27
27
|
import matplotlib.pyplot as plt
|
28
28
|
|
siat/markowitz.py
CHANGED
@@ -20,6 +20,7 @@ import warnings; warnings.filterwarnings("ignore")
|
|
20
20
|
from siat.common import *
|
21
21
|
from siat.translate import *
|
22
22
|
from siat.security_prices import *
|
23
|
+
from siat.security_price2 import *
|
23
24
|
from siat.fama_french import *
|
24
25
|
|
25
26
|
import pandas as pd
|
@@ -187,6 +188,8 @@ def cumulative_returns_plot(retgroup,name_list="",titletxt="投资组合策略
|
|
187
188
|
plt.axhline(y=0,ls=":",c="red")
|
188
189
|
plt.legend(loc='best')
|
189
190
|
plt.title(titletxt); plt.ylabel(ylabeltxt); plt.xlabel(xlabeltxt)
|
191
|
+
|
192
|
+
plt.gca().set_facecolor('whitesmoke')
|
190
193
|
plt.show()
|
191
194
|
|
192
195
|
return
|
@@ -238,7 +241,7 @@ def portfolio_cumret(portfolio,thedate,pastyears=1, \
|
|
238
241
|
rate_period='1Y',rate_type='shibor',RF=False, \
|
239
242
|
printout=True,graph=True):
|
240
243
|
"""
|
241
|
-
|
244
|
+
功能:绘制投资组合的累计收益率趋势图,并与等权和期间内资金量加权组合比较
|
242
245
|
注意:中国部分历史区段的treasury历史可能无法取得;
|
243
246
|
无论是shibor还是treasury的近期利率均可能空缺,只能以最近期的数值填补
|
244
247
|
"""
|
@@ -350,6 +353,8 @@ def portfolio_cumret(portfolio,thedate,pastyears=1, \
|
|
350
353
|
stoday = datetime.date.today()
|
351
354
|
plt.xlabel(source_txt+str(stoday))
|
352
355
|
plt.legend()
|
356
|
+
|
357
|
+
plt.gca().set_facecolor('whitesmoke')
|
353
358
|
plt.show()
|
354
359
|
#..........................................................................
|
355
360
|
|
@@ -379,7 +384,7 @@ def portfolio_cumret(portfolio,thedate,pastyears=1, \
|
|
379
384
|
StockReturns['Portfolio_EW']=stock_return.mul(portfolio_weights_ew,axis=1).sum(axis=1)
|
380
385
|
#..........................................................................
|
381
386
|
|
382
|
-
#
|
387
|
+
# 创建资金量加权组合:按照成交金额计算期间内资金量均值
|
383
388
|
tamount=prices['Close']*prices['Volume']
|
384
389
|
tamountlist=tamount.mean(axis=0) #求列的均值
|
385
390
|
tamountlist_array = np.array(tamountlist)
|
@@ -392,11 +397,11 @@ def portfolio_cumret(portfolio,thedate,pastyears=1, \
|
|
392
397
|
if lang == 'Chinese':
|
393
398
|
title_txt="投资组合策略:业绩对比"
|
394
399
|
Portfolio_EW_txt="等权重策略"
|
395
|
-
Portfolio_LW_txt="
|
400
|
+
Portfolio_LW_txt="资金量加权策略"
|
396
401
|
else:
|
397
402
|
title_txt="Investment Portfolio Strategies: Performance Comparison"
|
398
403
|
Portfolio_EW_txt="Equal-weight"
|
399
|
-
Portfolio_LW_txt="
|
404
|
+
Portfolio_LW_txt="Amount-weight"
|
400
405
|
|
401
406
|
name_list=['Portfolio', 'Portfolio_EW', 'Portfolio_LW']
|
402
407
|
label_list=[pname, Portfolio_EW_txt, Portfolio_LW_txt]
|
@@ -438,7 +443,7 @@ if __name__=='__main__':
|
|
438
443
|
def portfolio_expret(portfolio,today,pastyears=1, \
|
439
444
|
rate_period='1Y',rate_type='shibor',RF=False,printout=True,graph=True):
|
440
445
|
"""
|
441
|
-
|
446
|
+
功能:绘制投资组合的持有期收益率趋势图,并与等权和期间内资金量加权组合比较
|
442
447
|
套壳原来的portfolio_cumret函数,以维持兼容性
|
443
448
|
expret: expanding return,以维持与前述章节名词的一致性
|
444
449
|
hpr: holding period return, 持有(期)收益率
|
@@ -492,6 +497,8 @@ def portfolio_corr(pf_info):
|
|
492
497
|
footnote2="\n来源:Sina/EM/stooq,"+str(stoday)
|
493
498
|
plt.xlabel(footnote1+footnote2)
|
494
499
|
plt.xticks(rotation=90); plt.yticks(rotation=0)
|
500
|
+
|
501
|
+
plt.gca().set_facecolor('whitesmoke')
|
495
502
|
plt.show()
|
496
503
|
|
497
504
|
return
|
@@ -535,6 +542,8 @@ def portfolio_covar(pf_info):
|
|
535
542
|
plt.xlabel(footnote1+footnote2)
|
536
543
|
plt.xticks(rotation=90)
|
537
544
|
plt.yticks(rotation=0)
|
545
|
+
|
546
|
+
plt.gca().set_facecolor('whitesmoke')
|
538
547
|
plt.show()
|
539
548
|
|
540
549
|
return
|
@@ -588,7 +597,7 @@ def portfolio_expectation_universal(pname,member_returns,portfolio_weights,membe
|
|
588
597
|
portfolio_values=member_prices.mul(portfolio_weights_1,axis=1).sum(axis=1)
|
589
598
|
portfolio_value_thedate=portfolio_values[-1:].values[0]
|
590
599
|
|
591
|
-
|
600
|
+
#计算年化收益率:按列求均值,需要有选项:滚动的年化收益率或月度收益率?
|
592
601
|
mean_return=preturns['Portfolio'].mean(axis=0)
|
593
602
|
annual_return = (1 + mean_return)**252 - 1
|
594
603
|
|
@@ -921,7 +930,7 @@ def portfolio_es(pf_info,simulation=50000):
|
|
921
930
|
功能:基于随机数,生成大量可能的投资组合,计算各个投资组合的年均收益率和标准差,绘制投资组合的可行集
|
922
931
|
"""
|
923
932
|
[[portfolio,thedate,stock_return,_,_],_]=pf_info
|
924
|
-
pname=
|
933
|
+
pname=portfolio_name(portfolio)
|
925
934
|
_,_,tickerlist,_=decompose_portfolio(portfolio)
|
926
935
|
|
927
936
|
#取出观察期
|
@@ -931,14 +940,14 @@ def portfolio_es(pf_info,simulation=50000):
|
|
931
940
|
#获得成份股个数
|
932
941
|
numstocks=len(tickerlist)
|
933
942
|
|
934
|
-
# 设置空的numpy
|
943
|
+
# 设置空的numpy数组,用于存储每次模拟得到的成份股权重、投资组合的收益率和标准差
|
935
944
|
import numpy as np
|
936
945
|
random_p = np.empty((simulation,numstocks+2))
|
937
946
|
# 设置随机数种子,这里是为了结果可重复
|
938
947
|
np.random.seed(RANDOM_SEED)
|
939
948
|
|
940
949
|
# 循环模拟n次随机的投资组合
|
941
|
-
print("\n Calculating
|
950
|
+
print("\n Calculating portfolio efficient set, please wait ...")
|
942
951
|
for i in range(simulation):
|
943
952
|
# 生成numstocks个随机数,并归一化,得到一组随机的权重数据
|
944
953
|
random9 = np.random.random(numstocks)
|
@@ -1006,6 +1015,7 @@ def portfolio_es(pf_info,simulation=50000):
|
|
1006
1015
|
|
1007
1016
|
plt.xlabel(footnote1+footnote2+footnote3+footnote4,fontsize=xlabel_txt_size)
|
1008
1017
|
|
1018
|
+
plt.gca().set_facecolor('whitesmoke')
|
1009
1019
|
plt.show()
|
1010
1020
|
|
1011
1021
|
return [pf_info,RandomPortfolios]
|
@@ -1485,6 +1495,8 @@ def RandomPortfolios_plot(RandomPortfolios,col_x,col_y,colorbartxt,title_ext, \
|
|
1485
1495
|
plt.scatter(lorisk_x, lorisk_y, color='red',marker='8',s=150,label=name_lorisk)
|
1486
1496
|
|
1487
1497
|
plt.legend(loc='best')
|
1498
|
+
|
1499
|
+
plt.gca().set_facecolor('whitesmoke')
|
1488
1500
|
plt.show()
|
1489
1501
|
|
1490
1502
|
return
|
@@ -1502,10 +1514,10 @@ def cvt_portfolio_name(pname,portfolio_returns):
|
|
1502
1514
|
|
1503
1515
|
lang=check_language()
|
1504
1516
|
if lang == "Chinese":
|
1505
|
-
pclist=[pname,'等权重组合','
|
1517
|
+
pclist=[pname,'等权重组合','资金量加权组合','MSR组合','GMVS组合','MSO组合','GML组合', \
|
1506
1518
|
'MAR组合','GMBA组合', 'MTR组合','GMBT组合']
|
1507
1519
|
else:
|
1508
|
-
pclist=[pname,'Equal-weight','
|
1520
|
+
pclist=[pname,'Equal-weight','Amount-weight','MSR','GMVS','MSO','GML', \
|
1509
1521
|
'MAR','GMBA', 'MTR','GMBT']
|
1510
1522
|
|
1511
1523
|
pecols=list(portfolio_returns)
|
@@ -2020,6 +2032,8 @@ def portfolio_ef_0(stocks,fromdate,todate):
|
|
2020
2032
|
plt.figtext(x_left,y_left-0.05,' '+str(stocks))
|
2021
2033
|
plt.figtext(x_left,y_left-0.1,'观察期间:'+str(fromdate)+'至'+str(todate))
|
2022
2034
|
plt.plot(out_std,out_mean,color='r',ls=':',lw=4)
|
2035
|
+
|
2036
|
+
plt.gca().set_facecolor('whitesmoke')
|
2023
2037
|
plt.show()
|
2024
2038
|
|
2025
2039
|
return
|
@@ -2103,6 +2117,7 @@ def portfolio_ef(stocks,fromdate,todate):
|
|
2103
2117
|
plt.plot(out_std_min,out_mean_min,'g*-',markersize=16,label='风险最低点')
|
2104
2118
|
|
2105
2119
|
plt.legend(loc='best')
|
2120
|
+
plt.gca().set_facecolor('whitesmoke')
|
2106
2121
|
plt.show()
|
2107
2122
|
|
2108
2123
|
return
|
@@ -2246,6 +2261,8 @@ def security_correlation(tickers,start,end,info_type='Close'):
|
|
2246
2261
|
fontxlabel={'size':6}
|
2247
2262
|
plt.xlabel(footnote1+footnote2+footnote3+footnote4,fontxlabel)
|
2248
2263
|
#plt.xticks(rotation=45)
|
2264
|
+
|
2265
|
+
plt.gca().set_facecolor('whitesmoke')
|
2249
2266
|
plt.show()
|
2250
2267
|
|
2251
2268
|
return df_coor
|
siat/option_china.py
CHANGED
@@ -2316,6 +2316,7 @@ def fin_option_risk_sse2(option,maturity,exercise,trade_date, \
|
|
2316
2316
|
#use font size 14 for the bar labels, percentages, and legend, 图例颜色
|
2317
2317
|
plt.legend(fontsize=16,loc=loc)
|
2318
2318
|
|
2319
|
+
plt.gca().set_facecolor('whitesmoke')
|
2319
2320
|
plt.show
|
2320
2321
|
|
2321
2322
|
return df9
|
@@ -2582,6 +2583,8 @@ def fin_option_exercise_risk_sse(option,maturity,trade_date, \
|
|
2582
2583
|
|
2583
2584
|
titletxt='上交所金融期权风险:'+option+'期权,股指点位对'+ylabeltxt+'的影响'
|
2584
2585
|
plt.title(titletxt,fontweight='bold',fontsize=title_txt_size)
|
2586
|
+
|
2587
|
+
plt.gca().set_facecolor('whitesmoke')
|
2585
2588
|
plt.show()
|
2586
2589
|
plt.close()
|
2587
2590
|
|
siat/option_pricing.py
CHANGED
siat/risk_adjusted_return.py
CHANGED
@@ -20,6 +20,7 @@ import warnings; warnings.filterwarnings('ignore')
|
|
20
20
|
from siat.common import *
|
21
21
|
from siat.translate import *
|
22
22
|
from siat.security_prices import *
|
23
|
+
from siat.security_price2 import *
|
23
24
|
from siat.fama_french import *
|
24
25
|
from siat.grafix import *
|
25
26
|
|
@@ -496,6 +497,7 @@ def draw_rar_ratio(rars,portfolio,ratio_name):
|
|
496
497
|
#plt.ylabel(ylabeltxt,fontsize=12)
|
497
498
|
#plt.xticks(rotation=45,fontsize=9)
|
498
499
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
500
|
+
plt.gca().set_facecolor('whitesmoke')
|
499
501
|
#plt.xticks(rotation=30,fontsize=8)
|
500
502
|
plt.legend(loc='best')
|
501
503
|
|
@@ -945,7 +947,10 @@ def plot_rar_monthly(portfolio,start,end,rar_type):
|
|
945
947
|
titletxt="投资组合的风险调整收益"
|
946
948
|
plt.title(titletxt)
|
947
949
|
plt.ylabel('收益率(%)')
|
950
|
+
|
948
951
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
952
|
+
plt.gca().set_facecolor('whitesmoke')
|
953
|
+
|
949
954
|
#plt.xticks(rotation=30)
|
950
955
|
plt.legend(loc='best')
|
951
956
|
|
@@ -1032,7 +1037,10 @@ def plot_rar_annual(portfolio,start,end,rar_type):
|
|
1032
1037
|
titletxt="投资组合的风险调整收益"
|
1033
1038
|
plt.title(titletxt)
|
1034
1039
|
plt.ylabel('收益率(%)')
|
1040
|
+
|
1035
1041
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
1042
|
+
plt.gca().set_facecolor('whitesmoke')
|
1043
|
+
|
1036
1044
|
#plt.xticks(rotation=45)
|
1037
1045
|
plt.legend(loc='best')
|
1038
1046
|
|
siat/risk_evaluation.py
CHANGED
@@ -18,6 +18,7 @@ import warnings; warnings.filterwarnings("ignore")
|
|
18
18
|
from siat.common import *
|
19
19
|
from siat.translate import *
|
20
20
|
from siat.security_prices import *
|
21
|
+
from siat.security_price2 import *
|
21
22
|
#==============================================================================
|
22
23
|
import matplotlib.pyplot as plt
|
23
24
|
|
@@ -292,6 +293,8 @@ def series_VaR_normal_standard(ticker,shares,datelist, \
|
|
292
293
|
import datetime as dt; today=dt.date.today()
|
293
294
|
footnote="数据来源:新浪/stooq,"+str(today)
|
294
295
|
plt.xlabel(footnote)
|
296
|
+
|
297
|
+
plt.gca().set_facecolor('whitesmoke')
|
295
298
|
plt.show()
|
296
299
|
|
297
300
|
plt.plot(result3['VaR比例%'],c='r',lw=2)
|
@@ -301,6 +304,8 @@ def series_VaR_normal_standard(ticker,shares,datelist, \
|
|
301
304
|
#plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
302
305
|
plt.xticks(rotation=30)
|
303
306
|
plt.xlabel(footnote)
|
307
|
+
|
308
|
+
plt.gca().set_facecolor('whitesmoke')
|
304
309
|
plt.show()
|
305
310
|
|
306
311
|
return result2
|
@@ -403,6 +408,8 @@ def compare_VaR_normal_standard(tickerlist,shares,datelist, \
|
|
403
408
|
source="数据来源:新浪/stooq,"+str(today)
|
404
409
|
footnote=notes+'\n'+source
|
405
410
|
plt.xlabel(footnote)
|
411
|
+
|
412
|
+
plt.gca().set_facecolor('whitesmoke')
|
406
413
|
plt.show()
|
407
414
|
|
408
415
|
for t in tickerlist:
|
@@ -430,6 +437,8 @@ def compare_VaR_normal_standard(tickerlist,shares,datelist, \
|
|
430
437
|
plt.xticks(rotation=30)
|
431
438
|
plt.legend(loc='best')
|
432
439
|
plt.xlabel(footnote)
|
440
|
+
|
441
|
+
plt.gca().set_facecolor('whitesmoke')
|
433
442
|
plt.show()
|
434
443
|
|
435
444
|
return
|
@@ -588,14 +597,16 @@ def series_ES_normal_standard(ticker,shares,datelist, \
|
|
588
597
|
plt.ylabel('ES金额')
|
589
598
|
plt.xticks(rotation=30)
|
590
599
|
|
600
|
+
plt.gca().set_facecolor('whitesmoke')
|
591
601
|
plt.show()
|
592
602
|
|
593
|
-
plt.plot(result3['
|
603
|
+
plt.plot(result3['ES比例%'],c='r',lw=2)
|
594
604
|
title2=ticker_name(ticker)+": ES比例的变化,持有"+str(future_days)+"天"
|
595
605
|
plt.title(title2)
|
596
606
|
plt.ylabel('ES比例%')
|
597
607
|
plt.xticks(rotation=30)
|
598
608
|
|
609
|
+
plt.gca().set_facecolor('whitesmoke')
|
599
610
|
plt.show()
|
600
611
|
|
601
612
|
return result2
|
siat/sector_china.py
CHANGED
@@ -2426,6 +2426,8 @@ def industry_correlation_sw(df,tickers,start,end, \
|
|
2426
2426
|
|
2427
2427
|
fontxlabel={'size':corr_size}
|
2428
2428
|
plt.xlabel(footnote1+footnote2+footnote3+footnote4,fontxlabel)
|
2429
|
+
|
2430
|
+
plt.gca().set_facecolor('whitesmoke')
|
2429
2431
|
plt.show()
|
2430
2432
|
|
2431
2433
|
return df_coor
|
siat/security_trend.py
CHANGED
@@ -21,6 +21,7 @@ from siat.common import *
|
|
21
21
|
from siat.translate import *
|
22
22
|
from siat.stock import *
|
23
23
|
from siat.security_prices import *
|
24
|
+
from siat.security_price2 import *
|
24
25
|
from siat.risk_adjusted_return import *
|
25
26
|
from siat.valuation import *
|
26
27
|
from siat.grafix import *
|
siat/security_trend2.py
CHANGED
@@ -21,6 +21,7 @@ from siat.common import *
|
|
21
21
|
from siat.translate import *
|
22
22
|
from siat.stock import *
|
23
23
|
from siat.security_prices import *
|
24
|
+
from siat.security_price2 import *
|
24
25
|
from siat.capm_beta2 import *
|
25
26
|
from siat.risk_adjusted_return2 import *
|
26
27
|
from siat.valuation import *
|
siat/stock.py
CHANGED
@@ -766,7 +766,8 @@ def security_mindicators(ticker,measures,fromdate,todate, \
|
|
766
766
|
date_range=False,date_freq=False, \
|
767
767
|
annotate=False,annotate_value=False, \
|
768
768
|
source='auto', \
|
769
|
-
mark_top=True,mark_bottom=True,
|
769
|
+
mark_top=True,mark_bottom=True,mark_end=True, \
|
770
|
+
ticker_type='auto'):
|
770
771
|
"""
|
771
772
|
功能:单个证券,多个指标对比
|
772
773
|
date_range=False:指定开始结束日期绘图
|
@@ -836,7 +837,7 @@ def security_mindicators(ticker,measures,fromdate,todate, \
|
|
836
837
|
data_label=False,resample_freq='6H',smooth=smooth, \
|
837
838
|
date_range=date_range,date_freq=date_freq,date_fmt='%Y-%m-%d', \
|
838
839
|
annotate=annotate,annotate_value=annotate_value, \
|
839
|
-
mark_top=mark_top,mark_bottom=mark_bottom)
|
840
|
+
mark_top=mark_top,mark_bottom=mark_bottom,mark_end=mark_end)
|
840
841
|
|
841
842
|
return df1
|
842
843
|
|
@@ -2107,7 +2108,9 @@ def candlestick_demo(stkcd,fromdate,todate, \
|
|
2107
2108
|
|
2108
2109
|
plt.title(titletxt,fontsize=title_txt_size,fontweight='bold')
|
2109
2110
|
plt.ylabel(price_txt,fontsize=ylabel_txt_size)
|
2111
|
+
|
2110
2112
|
plt.gcf().autofmt_xdate() # 优化标注(自动倾斜)
|
2113
|
+
plt.gca().set_facecolor('whitesmoke')
|
2111
2114
|
#plt.xticks(rotation=30)
|
2112
2115
|
plt.legend(loc="best",fontsize=legend_txt_size)
|
2113
2116
|
plt.xlabel(source_txt+"sina/stooq/yahoo",fontsize=xlabel_txt_size)
|
siat/stock_china.py
CHANGED
@@ -14,7 +14,7 @@ from siat.common import *
|
|
14
14
|
from siat.translate import *
|
15
15
|
from siat.grafix import *
|
16
16
|
from siat.security_prices import *
|
17
|
-
|
17
|
+
from siat.security_price2 import *
|
18
18
|
#==============================================================================
|
19
19
|
# 获得个股近一百个交易日的资金净流入数据
|
20
20
|
#==============================================================================
|
siat/stock_profile.py
CHANGED
@@ -341,6 +341,8 @@ def ploth_sustainability(sustainability,option="ESG"):
|
|
341
341
|
graf=plt.barh(s.index,s['ESGscore'],facecolor='b',height=0.6,alpha=0.8)
|
342
342
|
else:
|
343
343
|
graf=plt.barh(s.index,s['ESGscore'],facecolor='b',alpha=0.8)
|
344
|
+
|
345
|
+
plt.gca().set_facecolor('whitesmoke')
|
344
346
|
plt.show()
|
345
347
|
|
346
348
|
if option=="EP":
|
@@ -358,6 +360,8 @@ def ploth_sustainability(sustainability,option="ESG"):
|
|
358
360
|
graf=plt.barh(s.index,s['EPscore'],facecolor='g',height=0.6,alpha=0.8)
|
359
361
|
else:
|
360
362
|
graf=plt.barh(s.index,s['EPscore'],facecolor='g',alpha=0.8)
|
363
|
+
|
364
|
+
plt.gca().set_facecolor('whitesmoke')
|
361
365
|
plt.show()
|
362
366
|
|
363
367
|
if option=="CSR":
|
@@ -375,6 +379,8 @@ def ploth_sustainability(sustainability,option="ESG"):
|
|
375
379
|
graf=plt.barh(s.index,s['CSRscore'],facecolor='tan',height=0.6,alpha=0.8)
|
376
380
|
else:
|
377
381
|
graf=plt.barh(s.index,s['CSRscore'],facecolor='tan',alpha=0.8)
|
382
|
+
|
383
|
+
plt.gca().set_facecolor('whitesmoke')
|
378
384
|
plt.show()
|
379
385
|
|
380
386
|
if option=="CG":
|
@@ -392,6 +398,8 @@ def ploth_sustainability(sustainability,option="ESG"):
|
|
392
398
|
graf=plt.barh(s.index,s['CGscore'],facecolor='y',height=0.6,alpha=0.9)
|
393
399
|
else:
|
394
400
|
graf=plt.barh(s.index,s['CGscore'],facecolor='y',alpha=0.9)
|
401
|
+
|
402
|
+
plt.gca().set_facecolor('whitesmoke')
|
395
403
|
plt.show()
|
396
404
|
|
397
405
|
#绘制分位数图
|
@@ -411,6 +419,8 @@ def ploth_sustainability(sustainability,option="ESG"):
|
|
411
419
|
graf=plt.barh(s.index,s['ESGpercentile'],facecolor='b',height=0.6,alpha=0.8)
|
412
420
|
else:
|
413
421
|
graf=plt.barh(s.index,s['ESGpercentile'],facecolor='b',alpha=0.8)
|
422
|
+
|
423
|
+
plt.gca().set_facecolor('whitesmoke')
|
414
424
|
plt.show()
|
415
425
|
|
416
426
|
if option=="EP":
|
@@ -428,6 +438,8 @@ def ploth_sustainability(sustainability,option="ESG"):
|
|
428
438
|
graf=plt.barh(s.index,s['EPpercentile'],facecolor='g',height=0.6,alpha=0.8)
|
429
439
|
else:
|
430
440
|
graf=plt.barh(s.index,s['EPpercentile'],facecolor='g',alpha=0.8)
|
441
|
+
|
442
|
+
plt.gca().set_facecolor('whitesmoke')
|
431
443
|
plt.show()
|
432
444
|
|
433
445
|
if option=="CSR":
|
@@ -445,6 +457,8 @@ def ploth_sustainability(sustainability,option="ESG"):
|
|
445
457
|
graf=plt.barh(s.index,s['CSRpercentile'],facecolor='tan',height=0.6,alpha=0.8)
|
446
458
|
else:
|
447
459
|
graf=plt.barh(s.index,s['CSRpercentile'],facecolor='tan',alpha=0.8)
|
460
|
+
|
461
|
+
plt.gca().set_facecolor('whitesmoke')
|
448
462
|
plt.show()
|
449
463
|
|
450
464
|
if option=="CG":
|
@@ -461,7 +475,9 @@ def ploth_sustainability(sustainability,option="ESG"):
|
|
461
475
|
if n < 6:
|
462
476
|
graf=plt.barh(s.index,s['CGpercentile'],facecolor='y',height=0.6,alpha=0.9)
|
463
477
|
else:
|
464
|
-
graf=plt.barh(s.index,s['CGpercentile'],facecolor='y',alpha=0.9)
|
478
|
+
graf=plt.barh(s.index,s['CGpercentile'],facecolor='y',alpha=0.9)
|
479
|
+
|
480
|
+
plt.gca().set_facecolor('whitesmoke')
|
465
481
|
plt.show()
|
466
482
|
|
467
483
|
return
|
@@ -523,6 +539,8 @@ def plot_sustainability(sustainability,option="ESG"):
|
|
523
539
|
titletxt="Corporate Sustainability Performance (ESG)"
|
524
540
|
fonttitle={'family':'Times New Roman','weight':'normal','size':24}
|
525
541
|
plt.title(titletxt,fonttitle)
|
542
|
+
|
543
|
+
plt.gca().set_facecolor('whitesmoke')
|
526
544
|
plt.show()
|
527
545
|
|
528
546
|
if option=="EP":
|
@@ -545,6 +563,8 @@ def plot_sustainability(sustainability,option="ESG"):
|
|
545
563
|
titletxt="Corporate Environment Protection Performance (EP)"
|
546
564
|
fonttitle={'family':'Times New Roman','weight':'normal','size':22}
|
547
565
|
plt.title(titletxt,fonttitle)
|
566
|
+
|
567
|
+
plt.gca().set_facecolor('whitesmoke')
|
548
568
|
plt.show()
|
549
569
|
|
550
570
|
if option=="CSR":
|
@@ -567,6 +587,8 @@ def plot_sustainability(sustainability,option="ESG"):
|
|
567
587
|
titletxt="Corporate Social Responsibility Performance (CSR)"
|
568
588
|
fonttitle={'family':'Times New Roman','weight':'normal','size':22}
|
569
589
|
plt.title(titletxt,fonttitle)
|
590
|
+
|
591
|
+
plt.gca().set_facecolor('whitesmoke')
|
570
592
|
plt.show()
|
571
593
|
|
572
594
|
if option=="CG":
|
@@ -589,6 +611,8 @@ def plot_sustainability(sustainability,option="ESG"):
|
|
589
611
|
titletxt="Corporate Governance Performance (CG)"
|
590
612
|
fonttitle={'family':'Times New Roman','weight':'normal','size':24}
|
591
613
|
plt.title(titletxt,fonttitle)
|
614
|
+
|
615
|
+
plt.gca().set_facecolor('whitesmoke')
|
592
616
|
plt.show()
|
593
617
|
|
594
618
|
return
|
siat/stock_technical.py
CHANGED
@@ -20,6 +20,7 @@ from siat.common import *
|
|
20
20
|
from siat.translate import *
|
21
21
|
from siat.grafix import *
|
22
22
|
from siat.security_prices import *
|
23
|
+
from siat.security_price2 import *
|
23
24
|
from siat.stock import *
|
24
25
|
from siat.valuation import *
|
25
26
|
#==============================================================================
|
@@ -2630,7 +2631,11 @@ def security_technical2(ticker,start='default',end='default', \
|
|
2630
2631
|
|
2631
2632
|
titletxt=ticker_name(ticker)+': '+tech_list[technical1]+technical1
|
2632
2633
|
plt.title(titletxt,fontweight='bold',fontsize=title_txt_size)
|
2634
|
+
|
2633
2635
|
plt.gcf().autofmt_xdate()
|
2636
|
+
#plt.gca().set_facecolor('whitesmoke')
|
2637
|
+
#plt.figure(facecolor='whitesmoke')
|
2638
|
+
|
2634
2639
|
plt.show(); plt.close()
|
2635
2640
|
|
2636
2641
|
return df
|
siat/transaction.py
CHANGED
siat/translate.py
CHANGED
siat/valuation.py
CHANGED
@@ -21,6 +21,7 @@ from siat.common import *
|
|
21
21
|
from siat.translate import *
|
22
22
|
from siat.stock import *
|
23
23
|
from siat.security_prices import *
|
24
|
+
from siat.security_price2 import *
|
24
25
|
from siat.sector_china import *
|
25
26
|
from siat.valuation_china import *
|
26
27
|
from siat.grafix import *
|
siat/valuation_china.py
CHANGED
@@ -16,6 +16,7 @@ from siat.common import *
|
|
16
16
|
from siat.translate import *
|
17
17
|
from siat.grafix import *
|
18
18
|
from siat.security_prices import *
|
19
|
+
from siat.security_price2 import *
|
19
20
|
from siat.sector_china import *
|
20
21
|
|
21
22
|
#==============================================================================
|
siat/var_model_validation.py
CHANGED
@@ -19,6 +19,7 @@ import warnings; warnings.filterwarnings("ignore")
|
|
19
19
|
from siat.common import *
|
20
20
|
from siat.translate import *
|
21
21
|
from siat.security_prices import *
|
22
|
+
from siat.security_price2 import *
|
22
23
|
#==============================================================================
|
23
24
|
#==============================================================================
|
24
25
|
def calc_ret(price_series,groupsize=1):
|
@@ -1,29 +1,29 @@
|
|
1
1
|
siat/__init__.py,sha256=2c0GKq4KaxA0vfdvMeyCPiNR6wODmH6CGj8n5UDOywY,2182
|
2
2
|
siat/allin.py,sha256=9fgRnER16lotAxUbiLMiOo0fZaNFLgUDUsUcHbZ3WG0,2676
|
3
3
|
siat/alpha_vantage_test.py,sha256=tKr-vmuFH3CZAqwmISz6jzjPHzV1JJl3sPfZdz8aTfM,747
|
4
|
-
siat/assets_liquidity.py,sha256=
|
4
|
+
siat/assets_liquidity.py,sha256=deAJ60YcqMUgrXY7jy7BfzLutoy4uOEtfXqqMSujCRo,28889
|
5
5
|
siat/assets_liquidity_test.py,sha256=UWk6HIUlizU7LQZ890fGx8LwU1jMMrIZswg8cFUJWZ8,1285
|
6
6
|
siat/barrons_scraping_test.py,sha256=jSRVPxyYylcgG3fAsuqE-9WH3sDfJ3CdZUcU8VBVdoU,10110
|
7
|
-
siat/beta_adjustment.py,sha256=
|
8
|
-
siat/beta_adjustment_china.py,sha256=
|
7
|
+
siat/beta_adjustment.py,sha256=LZWrEWP-yw7spQjeSldLXpmZu7pFqF5jR3EHym7wNys,37286
|
8
|
+
siat/beta_adjustment_china.py,sha256=QAVhTQxfV7NSakNPMfQtGMeRzEHVBC8JZQTqD5Owp2I,20802
|
9
9
|
siat/beta_adjustment_test.py,sha256=nBhvQQfqxooCHjy5hL0a8V0ZC58BjuCZVFpqpWpHeF0,2467
|
10
10
|
siat/blockchain.py,sha256=awF3GDtlwaJhku0a2kLuXOS8d3IzkjR_RyzlZWvD3L4,6032
|
11
|
-
siat/bond.py,sha256=
|
12
|
-
siat/bond_base.py,sha256=
|
13
|
-
siat/bond_china.py,sha256=
|
11
|
+
siat/bond.py,sha256=9dIj2MMGXByxHkqLuBpWhfEkcix9RzAtzQovLRQUCZA,103903
|
12
|
+
siat/bond_base.py,sha256=KBm0hOQSE6fruXd9eJztY9pXCN19iv7aCXZZcnVM4yY,37637
|
13
|
+
siat/bond_china.py,sha256=eYv-nMoWSS5fZ4VxnuJ29QFY9GUS6meGiIc0Xjm1fQI,3038
|
14
14
|
siat/bond_test.py,sha256=yUOFw7ddGU-kb1rJdnsjkJWziDNgUR7OLDA7F7Ub91A,5246
|
15
15
|
siat/bond_zh_sina.py,sha256=26BohGcS120utwqg9dJvdGm5OkuNpNu5bco80uOuQpU,4423
|
16
|
-
siat/capm_beta.py,sha256=
|
17
|
-
siat/capm_beta2.py,sha256=
|
16
|
+
siat/capm_beta.py,sha256=cxXdRVBQBllhbfz1LeTJAIWvyRYhW54nhtNUXv4HwS0,29063
|
17
|
+
siat/capm_beta2.py,sha256=u6CjWoarNyLORIVHlFcFa_r8RrqdWuWn66VDZbZrCzc,23610
|
18
18
|
siat/capm_beta_test.py,sha256=ImR0c5mc4hIl714XmHztdl7qg8v1E2lycKyiqnFj6qs,1745
|
19
19
|
siat/cmat_commons.py,sha256=Nj9Kf0alywaztVoMVeVVL_EZk5jRERJy8R8kBw88_Tg,38116
|
20
|
-
siat/common.py,sha256=
|
21
|
-
siat/compare_cross.py,sha256=
|
20
|
+
siat/common.py,sha256=WXbUoK0p0CM6lX15y2FAcloy_fQCZNpUzqdfGRaXW8U,133687
|
21
|
+
siat/compare_cross.py,sha256=3iP9TH2h3w27F2ARZc7FjKcErYCzWRc-TPiymOyoVtw,24171
|
22
22
|
siat/compare_cross_test.py,sha256=xra5XYmQGEtfIZL2h-GssdH2hLdFIhG3eoCrkDrL3gY,3473
|
23
23
|
siat/concepts_iwencai.py,sha256=m1YEDtECRT6FqtzlKm91pt2I9d3Z_XoP59BtWdRdu8I,3061
|
24
24
|
siat/concepts_kpl.py,sha256=SJ9UaJp5i79EXKZ3dPa_vBEoG_zgl1Ig5rZAm-ubgM4,4941
|
25
25
|
siat/copyrights.py,sha256=YMLjZb328YpFMR-s_GUu0HBgeGce3pV7DgRut8S3I7w,690
|
26
|
-
siat/cryptocurrency.py,sha256=
|
26
|
+
siat/cryptocurrency.py,sha256=IjQTzqTkdp19aS0PrD15nU3-tfCJHyzt0oBd5nWvwk8,27449
|
27
27
|
siat/cryptocurrency_test.py,sha256=3AikTNJ7j-HwLGLIYEfyXZ3bLVuLeru9mwiwHQi2SdA,2669
|
28
28
|
siat/derivative.py,sha256=qV8n09799eqLc26ojR6vN5n_X-xd7rGwdYjgq-wBih8,41483
|
29
29
|
siat/economy-20230125.py,sha256=vxZZlPnLkh7SpGMVEPLwxjt0yYLSVmdZrO-s2NYLyoM,73848
|
@@ -32,15 +32,15 @@ siat/economy_test.py,sha256=6vjNlPz7W125pJb7simCddobSEp3jmLIMvVkLRZ7zW8,13339
|
|
32
32
|
siat/esg.py,sha256=PRgZo6rwlldAG9qNRnFWX0fnLdPHXIPVQOIFOJ2azmQ,19016
|
33
33
|
siat/esg_test.py,sha256=Z9m6GUt8O7oHZSEG9aDYpGdvvrv2AiRJdHTiU6jqmZ0,2944
|
34
34
|
siat/exchange_bond_china.pickle,sha256=mGy55toxgUrNL2rdf8lIVeSDz9wyHk6x7hierKxTklI,1255244
|
35
|
-
siat/fama_french.py,sha256=
|
35
|
+
siat/fama_french.py,sha256=jZNadEB_DoNU3DFxropMtc4Sls_llAHDV45ZlHTQg-4,48012
|
36
36
|
siat/fama_french_test.py,sha256=M4O23lBKsJxhWHRluwCb3l7HSEn3OFTjzGMpehcevRg,4678
|
37
|
-
siat/financial_base.py,sha256=
|
37
|
+
siat/financial_base.py,sha256=5u298_1OSlgLnDmhXxqvo4WgMM0JKSa_4jBYF-Ilx38,41097
|
38
38
|
siat/financial_statements.py,sha256=Ek18eKHflxZ01evOIwnfH1KZ_M2g8Vr8SxkL1om-K7U,25391
|
39
39
|
siat/financial_statements_test.py,sha256=FLhx8JD-tVVWSBGux6AMz1jioXX4U4bp9DmgFHYXb_w,716
|
40
|
-
siat/financials.py,sha256=
|
40
|
+
siat/financials.py,sha256=mbEZSNeHMMFcnPUryQWvdmNlWQvpnOG9eItgS7IVw3k,80458
|
41
41
|
siat/financials2 - 副本.py,sha256=dKlNjIfKeoSy055fQ6E6TUj9HEoO5Ney9grD84J5kfk,14389
|
42
|
-
siat/financials2.py,sha256=
|
43
|
-
siat/financials_china.py,sha256=
|
42
|
+
siat/financials2.py,sha256=c5-QHu4VJn6f67mzX_t4cJc99rE3PmlChHC9VCNdYwY,42332
|
43
|
+
siat/financials_china.py,sha256=pvTDcUJSWAokQXreMygiEgGFQFeypfLC3Antqv-HFqE,186630
|
44
44
|
siat/financials_china2.py,sha256=SP_NtByR7Aew3DkU5mY5XkOCaQTayKdItm0NDrTed1k,74626
|
45
45
|
siat/financials_china2_test.py,sha256=Erz5k4LyOplBBvYls2MypuqHpVNJ3daiLdyeJezNPu0,2722
|
46
46
|
siat/financials_china2_test2.py,sha256=C8CuYTMHN4Mhp-sTu-Bmg0zMXRCaYV6ezGDoYartRYQ,3507
|
@@ -59,13 +59,13 @@ siat/future_china.py,sha256=F-HsIf2Op8Z22RzTjet1g8COzldgnMjFNSXsAkeGyWo,17595
|
|
59
59
|
siat/future_china_test.py,sha256=BrSzmDVaOHki6rntOtosmRn-6dkfOBuLulJNqh7MOpc,1163
|
60
60
|
siat/global_index_test.py,sha256=hnFp3wqqzzL-kAP8mgxDZ54Bd5Ijf6ENi5YJlGBgcXw,2402
|
61
61
|
siat/google_authenticator.py,sha256=ZUbZR8OW0IAKDbcYtlqGqIpZdERpFor9NccFELxg9yI,1637
|
62
|
-
siat/grafix.py,sha256=
|
62
|
+
siat/grafix.py,sha256=WjZkfjWZq6RnpchkfZlHZRvxshPbVCNva2xFNHA2ImA,81916
|
63
63
|
siat/grafix_test.py,sha256=kXvcpLgQNO7wd30g_bWljLj5UH7bIVI0_dUtXbfiKR0,3150
|
64
|
-
siat/holding_risk.py,sha256=
|
64
|
+
siat/holding_risk.py,sha256=X3vL_2rU0zpjiiRtStWxWOXZrAJ323huSsZK3jGgABc,30633
|
65
65
|
siat/holding_risk_test.py,sha256=FRlw_9wFG98BYcg_cSj95HX5WZ1TvkGaOUdXD7-V86s,474
|
66
66
|
siat/local_debug_test.py,sha256=CDAOffW1Rvs-TcNN5giWVvHMlch1w4dp-w5SIV9jXL0,3936
|
67
|
-
siat/market_china.py,sha256=
|
68
|
-
siat/markowitz.py,sha256=
|
67
|
+
siat/market_china.py,sha256=nabx24qm7N51OafTrwUw542pNeFJ3JaQ1wqyv-nLN5I,37883
|
68
|
+
siat/markowitz.py,sha256=7ixvyzrC6beFPGuqMsgvHKBfYBmm57JTID8NctFw_c4,97115
|
69
69
|
siat/markowitz_ccb_test.py,sha256=xBkkoaNHdq9KSUrNuHGgKTdNYUvgi84kNYcf719eoyE,1593
|
70
70
|
siat/markowitz_ef_test.py,sha256=wjNlICkgRIqnonPeSIHo4Mu2GRtb9dr21wDt2kMNEcI,4032
|
71
71
|
siat/markowitz_old.py,sha256=Lf7O_4QWT8RsdkHiUyc_7kKY3eZjKDtFR89Fz3pwYnY,33046
|
@@ -76,42 +76,42 @@ siat/markowitz_test2.py,sha256=FcVZqYU5va4567WGUVUJ7cMQdVbBGxeBAz82Y3BhCTI,2193
|
|
76
76
|
siat/ml_cases.py,sha256=FYDk0O7l9hhHlbrlOVGgbH-h2DA503lhKFi9XugH1f0,86874
|
77
77
|
siat/ml_cases_example.py,sha256=xRGb3YTQEDTOnaWNzZN_myU5umQnA2RdMNiPrxTmn9c,1673
|
78
78
|
siat/ml_cases_example1.py,sha256=xRGb3YTQEDTOnaWNzZN_myU5umQnA2RdMNiPrxTmn9c,1673
|
79
|
-
siat/option_china.py,sha256=
|
79
|
+
siat/option_china.py,sha256=6ucKhcBeWwwB_O7gg-ZtptPNmcXWKCkYK1_6xCyvzPU,112815
|
80
80
|
siat/option_china_test.py,sha256=UQ-YUHUjoGBQyanLcM-yzqeEIUQP_gCQIeT0W6rnUnA,16355
|
81
|
-
siat/option_pricing.py,sha256=
|
81
|
+
siat/option_pricing.py,sha256=KQmdJ5gyOOLTRK4PRT8O8mOOWw3kCJSXAF4YttKCT3k,70268
|
82
82
|
siat/option_pricing_test.py,sha256=eeorV5Ja5vjlRXnP6fWJHetGU5Vb8SnLopkC6RV3GfA,2203
|
83
83
|
siat/option_sina_api_test.py,sha256=dn-k_wrQnAaNKHoROvWJEc7lqlU0bwiV2Aa4usWAFGM,5908
|
84
84
|
siat/proxy_test.py,sha256=erQJrmGs2X46z8Gb1h-7GYQ0rTUcaR8dxHExWoBz2eM,2610
|
85
85
|
siat/quandl_test.py,sha256=EcPoXnLuqzPl5dKyVEZi3j3PJZFpsnU_iNPhLWC9p-A,1552
|
86
|
-
siat/risk_adjusted_return.py,sha256=
|
86
|
+
siat/risk_adjusted_return.py,sha256=L5FoeOFzvItT03gNBTCaIo32hUvncOJkbchtHOveSBM,54929
|
87
87
|
siat/risk_adjusted_return2.py,sha256=MdNrqDaw2IbjitkZrjrqbOQJJkfI2sLvce6gmAAKmrc,56991
|
88
88
|
siat/risk_adjusted_return_test.py,sha256=m_VHL5AtT74cJv5i7taTeTfnkX48y0AFJk5phawyYWg,3416
|
89
|
-
siat/risk_evaluation.py,sha256=
|
89
|
+
siat/risk_evaluation.py,sha256=I6B3gty-t--AkDCO0tKF-291YfpnF-IkXcFjqNKCt9I,76286
|
90
90
|
siat/risk_evaluation_test.py,sha256=YEXM96gKzTfwN4U61AS4Rr1tV7KgUvn4rRC6f3iMw9s,3731
|
91
91
|
siat/risk_free_rate.py,sha256=ZMr4cHikPvXvywr54gGqiI3Nvb69am6tq3zj2hwzANE,12384
|
92
92
|
siat/risk_free_rate_test.py,sha256=CpmhUf8aEAEZeNu4gvWP2Mz2dLoIgBX5bI41vfUBEr8,4285
|
93
|
-
siat/sector_china.py,sha256=
|
93
|
+
siat/sector_china.py,sha256=IMrbgrYgv5y_ZiVK92AbWiup6eFwcC_u_Pib1srk_z0,104462
|
94
94
|
siat/sector_china_test.py,sha256=1wq7ef8Bb_L8F0h0W6FvyBrIcBTEbrTV7hljtpj49U4,5843
|
95
95
|
siat/security_price.py,sha256=2oHskgiw41KMGfqtnA0i2YjNNV6cYgtlUK0j3YeuXWs,29185
|
96
96
|
siat/security_price2.py,sha256=kuYh0V5cqclkM6MjZUd-N361fv3oxGVVerYINuTzZrE,24622
|
97
97
|
siat/security_prices.py,sha256=gSmnXt3EtTxUvETwUVzIC95j8U4Tivr1AU5RwzmKQzo,101601
|
98
98
|
siat/security_prices_test.py,sha256=OEphoJ87NPKoNow1QA8EU_5MUYrJF-qKoWKNapVfZNI,10779
|
99
|
-
siat/security_trend.py,sha256=
|
100
|
-
siat/security_trend2.py,sha256=
|
99
|
+
siat/security_trend.py,sha256=o0vpWdrJkmODCP94X-Bvn-w7efHhj9HpUYBHtLl55D0,17240
|
100
|
+
siat/security_trend2.py,sha256=kgrsTnSpFXjsnDecpRobQzlAwtZlP8_DB0v8KhwaUR4,23655
|
101
101
|
siat/setup.py,sha256=up65rQGLmTBkhtaMLowjoQXYmIsnycnm4g1SYmeQS6o,1335
|
102
102
|
siat/shenwan index history test.py,sha256=JCVAzOSEldHalhSFa3pqD8JI_8_djPMQOxpkuYU-Esg,1418
|
103
|
-
siat/stock.py,sha256=
|
103
|
+
siat/stock.py,sha256=SJDvG4QeKmynAu6KH5JjSsBV-y6oUvy05m8sns7uNm4,134907
|
104
104
|
siat/stock_advice_linear.py,sha256=-twT7IGP-NEplkL1WPSACcNJjggRB2j4mlAQCkzOAuo,31655
|
105
105
|
siat/stock_base.py,sha256=uISvbRyOGy8p9QREA96CVydgflBkn5L3OXOGKl8oanc,1312
|
106
|
-
siat/stock_china.py,sha256=
|
106
|
+
siat/stock_china.py,sha256=zkk6Yu7y4gH8HBPdmZGe5BHnMjjKFpb4ZIDQ2v5kqyg,83965
|
107
107
|
siat/stock_china_test.py,sha256=eO4HWsSvc6qezl0LndjtL24lViEyrBjH_sx2c2Y2Q2M,1294
|
108
108
|
siat/stock_info.pickle,sha256=EUUfZwFS3SMO2f25tOLWcjiJheGRCL3PDt7jII-i_4M,1315662
|
109
109
|
siat/stock_info_test.py,sha256=gfG3DbhDACbtD8wnv_R6zhj0t11XaC8NX8uLD9Qv3Fo,6122
|
110
110
|
siat/stock_list_china_test.py,sha256=gv14UwMMvkZqtb6G7DCTSuehIwVHuVwu7w60p6gyHoo,1014
|
111
111
|
siat/stock_prices_kneighbors.py,sha256=WfZvo5EyeBsm-T37zDj7Sl9dPSRq5Bx4JxIJ9IUum6s,36738
|
112
112
|
siat/stock_prices_linear.py,sha256=-OUKRr27L2aStQgJSlJOrJ4gay_G7P-m-7t7cU2Yoqk,13991
|
113
|
-
siat/stock_profile.py,sha256=
|
114
|
-
siat/stock_technical.py,sha256=
|
113
|
+
siat/stock_profile.py,sha256=B3eIwzEmiCqiCaxIlhfdEPsQBoW1PFOe1hkiY3mVF6Y,26038
|
114
|
+
siat/stock_technical.py,sha256=7F1wQXWkQYM-UrfsYa_Ch1U30mHT1oQjfKfTiPJ8XIo,111826
|
115
115
|
siat/stock_test.py,sha256=E9YJAvOw1VEGJSDI4IZuEjl0tGoisOIlN-g9UqA_IZE,19475
|
116
116
|
siat/stooq.py,sha256=dOc_S5HLrYg48YAKTCs1eX8UTJOOkPM8qLL2KupqlLY,2470
|
117
117
|
siat/temp.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
|
@@ -120,18 +120,18 @@ siat/test_graphviz.py,sha256=CETKpDL8PnysS-PD3fHkeAgagUxjaUl0CsXPiadQySg,16999
|
|
120
120
|
siat/test_markowitz_simple.py,sha256=jAgwpkdMGxvjlfEg0I8qbyLQHDd5rErWqHgiqVvOJlY,6122
|
121
121
|
siat/test_markowitz_simple_revised.py,sha256=Tq44VTIjc75RR4_AMEWmU3-EW7TH4ZNEC6Zcer3fbmk,7407
|
122
122
|
siat/test_markowitz_simple_revised2.py,sha256=r0KzW9zvaP9BTdXyB2M3MhRKtzHDIituAflT9ZTR9bs,7361
|
123
|
-
siat/transaction.py,sha256=
|
123
|
+
siat/transaction.py,sha256=nZTYYkx1BVBLDovSlZCtcviRuFxrYe9YFXOMZgo6QXo,14563
|
124
124
|
siat/transaction_test.py,sha256=Z8g1LJCN4-mnUByXMUMoFmN0t105cbmsz2QmvSuIkbU,18580
|
125
125
|
siat/translate-20230125.py,sha256=NPPSXhT38s5t9fzMvl_fvi4ckSB73ThLmZetVI-xGdU,117953
|
126
126
|
siat/translate-20230206.py,sha256=-vtI125WyaJhmPotOpDAmclt_XnYVaWU9ByLWZ6FyYE,118133
|
127
127
|
siat/translate-20230215.py,sha256=TJgtPE3n8IjljmZ4Pefy8dmHoNdFF-1zpML6BhA9FKE,121657
|
128
|
-
siat/translate.py,sha256=
|
128
|
+
siat/translate.py,sha256=PUCzxVtjVxCTkANlCxo50qRMhqnqSplIjv09HNzbQiw,203356
|
129
129
|
siat/universal_test.py,sha256=CDAOffW1Rvs-TcNN5giWVvHMlch1w4dp-w5SIV9jXL0,3936
|
130
|
-
siat/valuation.py,sha256=
|
131
|
-
siat/valuation_china.py,sha256=
|
130
|
+
siat/valuation.py,sha256=uKjPVD-oOUjUaF5QaQ1WK32kjLTOAPA2SZY2mpZ_aH0,47370
|
131
|
+
siat/valuation_china.py,sha256=Tde2LzPDQy3Z7xOQQDw4ckQMPdROp_z0-GjFE6Z5_lI,67639
|
132
132
|
siat/valuation_market_china_test.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
|
133
|
-
siat/var_model_validation.py,sha256=
|
134
|
-
siat-3.0.
|
135
|
-
siat-3.0.
|
136
|
-
siat-3.0.
|
137
|
-
siat-3.0.
|
133
|
+
siat/var_model_validation.py,sha256=f-oDewg7bPzyNanz_Y_jLH68NowAA3gXFehW_weKGG0,14898
|
134
|
+
siat-3.0.4.dist-info/METADATA,sha256=Uzjt2YU8lGPaWMwIiL-2VuCwf7lM3jnTQyAu3TkUvQw,1447
|
135
|
+
siat-3.0.4.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
136
|
+
siat-3.0.4.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
|
137
|
+
siat-3.0.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|