siat 3.6.1__py3-none-any.whl → 3.6.6__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/capm_beta2.py +40 -43
- siat/grafix.py +249 -26
- siat/risk_adjusted_return2.py +79 -88
- siat/security_trend2.py +21 -21
- siat/stock.py +41 -48
- siat/valuation.py +14 -15
- {siat-3.6.1.dist-info → siat-3.6.6.dist-info}/METADATA +1 -1
- {siat-3.6.1.dist-info → siat-3.6.6.dist-info}/RECORD +11 -11
- {siat-3.6.1.dist-info → siat-3.6.6.dist-info}/LICENSE +0 -0
- {siat-3.6.1.dist-info → siat-3.6.6.dist-info}/WHEEL +0 -0
- {siat-3.6.1.dist-info → siat-3.6.6.dist-info}/top_level.txt +0 -0
siat/capm_beta2.py
CHANGED
@@ -331,12 +331,12 @@ if __name__=='__main__':
|
|
331
331
|
betas=compare_mticker_1beta(ticker,start,end)
|
332
332
|
|
333
333
|
def compare_mticker_1beta(ticker,start,end, \
|
334
|
-
|
334
|
+
adjust='', \
|
335
335
|
RF=0,regression_period=365, \
|
336
|
-
|
337
|
-
|
336
|
+
attention_value='',attention_value_area='', \
|
337
|
+
attention_point='',attention_point_area='', \
|
338
338
|
axhline_value=1,axhline_label='', \
|
339
|
-
|
339
|
+
graph=True,facecolor='whitesmoke',loc='best', \
|
340
340
|
annotate=False,annotate_value=False, \
|
341
341
|
mark_top=False,mark_bottom=False,mark_end=False, \
|
342
342
|
mktidx='auto',source='auto',ticker_type='auto'):
|
@@ -430,8 +430,8 @@ def compare_mticker_1beta(ticker,start,end, \
|
|
430
430
|
draw_lines(df1,y_label,x_label=footnotex, \
|
431
431
|
axhline_value=axhline_value,axhline_label=axhline_label, \
|
432
432
|
title_txt=title_txt,data_label=False, \
|
433
|
-
|
434
|
-
|
433
|
+
attention_value=attention_value,attention_value_area=attention_value_area, \
|
434
|
+
attention_point=attention_point,attention_point_area=attention_point_area, \
|
435
435
|
annotate=annotate,annotate_value=annotate, \
|
436
436
|
mark_top=mark_top,mark_bottom=mark_bottom,mark_end=mark_end,
|
437
437
|
facecolor=facecolor,loc=loc)
|
@@ -459,16 +459,16 @@ if __name__=='__main__':
|
|
459
459
|
|
460
460
|
def compare_1ticker_mRF(ticker,start,end, \
|
461
461
|
adjust='', \
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
462
|
+
RF=[0,0.02,0.05], \
|
463
|
+
regression_period=365, \
|
464
|
+
attention_value='',attention_value_area='', \
|
465
|
+
attention_point='',attention_point_area='', \
|
466
|
+
axhline_value=1,axhline_label='', \
|
467
|
+
graph=True,facecolor='whitesmoke',loc='best', \
|
468
|
+
annotate=False,annotate_value=False, \
|
469
|
+
mark_top=False,mark_bottom=False,mark_end=False, \
|
470
|
+
mktidx='auto',source='auto', \
|
471
|
+
ticker_type='auto'):
|
472
472
|
"""
|
473
473
|
功能:一只股票,不同的无风险收益率
|
474
474
|
"""
|
@@ -556,8 +556,8 @@ def compare_1ticker_mRF(ticker,start,end, \
|
|
556
556
|
draw_lines(df1,y_label,x_label=footnotex, \
|
557
557
|
axhline_value=axhline_value,axhline_label=axhline_label, \
|
558
558
|
title_txt=title_txt,data_label=False, \
|
559
|
-
|
560
|
-
|
559
|
+
attention_value=attention_value,attention_value_area=attention_value_area, \
|
560
|
+
attention_point=attention_point,attention_point_area=attention_point_area, \
|
561
561
|
annotate=annotate,annotate_value=annotate, \
|
562
562
|
mark_top=mark_top,mark_bottom=mark_bottom,mark_end=mark_end, \
|
563
563
|
facecolor=facecolor,loc=loc)
|
@@ -582,13 +582,13 @@ if __name__=='__main__':
|
|
582
582
|
betas=compare_1ticker_mregression_period(ticker,start,end,RF,regression_period)
|
583
583
|
|
584
584
|
def compare_1ticker_mregression_period(ticker,start,end, \
|
585
|
-
|
585
|
+
adjust='', \
|
586
586
|
RF=0, \
|
587
587
|
regression_period=[183,365,730], \
|
588
|
-
|
589
|
-
|
588
|
+
attention_value='',attention_value_area='', \
|
589
|
+
attention_point='',attention_point_area='', \
|
590
590
|
axhline_value=1,axhline_label='', \
|
591
|
-
|
591
|
+
graph=True,facecolor='whitesmoke',loc='best', \
|
592
592
|
annotate=False,annotate_value=False, \
|
593
593
|
mark_top=False,mark_bottom=False,mark_end=False, \
|
594
594
|
mktidx='auto',source='auto', \
|
@@ -675,8 +675,8 @@ def compare_1ticker_mregression_period(ticker,start,end, \
|
|
675
675
|
draw_lines(df1,y_label,x_label=footnotex, \
|
676
676
|
axhline_value=axhline_value,axhline_label=axhline_label, \
|
677
677
|
title_txt=title_txt,data_label=False, \
|
678
|
-
|
679
|
-
|
678
|
+
attention_value=attention_value,attention_value_area=attention_value_area, \
|
679
|
+
attention_point=attention_point,attention_point_area=attention_point_area, \
|
680
680
|
annotate=annotate,annotate_value=annotate, \
|
681
681
|
mark_top=mark_top,mark_bottom=mark_bottom,mark_end=mark_end, \
|
682
682
|
facecolor=facecolor,loc=loc)
|
@@ -708,8 +708,8 @@ if __name__=='__main__':
|
|
708
708
|
def compare_beta_security(ticker,start,end, \
|
709
709
|
adjust='', \
|
710
710
|
RF=0,regression_period=365, \
|
711
|
-
|
712
|
-
|
711
|
+
attention_value='',attention_value_area='', \
|
712
|
+
attention_point='',attention_point_area='', \
|
713
713
|
graph=True,facecolor='whitesmoke', \
|
714
714
|
annotate=False,annotate_value=False, \
|
715
715
|
mark_top=False,mark_bottom=False,mark_end=False, \
|
@@ -729,8 +729,8 @@ def compare_beta_security(ticker,start,end, \
|
|
729
729
|
df=compare_mticker_1beta(ticker,start,end, \
|
730
730
|
adjust=adjust, \
|
731
731
|
RF=RF,regression_period=regression_period, \
|
732
|
-
|
733
|
-
|
732
|
+
attention_value=attention_value,attention_value_area=attention_value_area, \
|
733
|
+
attention_point=attention_point,attention_point_area=attention_point_area, \
|
734
734
|
graph=graph,facecolor=facecolor,loc=loc, \
|
735
735
|
annotate=annotate,annotate_value=annotate, \
|
736
736
|
mark_top=mark_top,mark_bottom=mark_bottom,mark_end=mark_end, \
|
@@ -747,14 +747,13 @@ def compare_beta_security(ticker,start,end, \
|
|
747
747
|
df=compare_1ticker_mRF(ticker,start,end, \
|
748
748
|
adjust=adjust, \
|
749
749
|
RF=RF,regression_period=regression_period, \
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
ticker_type=ticker_type)
|
750
|
+
attention_value=attention_value,attention_value_area=attention_value_area, \
|
751
|
+
attention_point=attention_point,attention_point_area=attention_point_area, \
|
752
|
+
graph=graph,facecolor=facecolor,loc=loc, \
|
753
|
+
annotate=annotate,annotate_value=annotate, \
|
754
|
+
mark_top=mark_top,mark_bottom=mark_bottom,mark_end=mark_end, \
|
755
|
+
mktidx=mktidx,source=source, \
|
756
|
+
ticker_type=ticker_type)
|
758
757
|
return df
|
759
758
|
else:
|
760
759
|
#实际上是单个RF
|
@@ -764,11 +763,10 @@ def compare_beta_security(ticker,start,end, \
|
|
764
763
|
if isinstance(regression_period,list):
|
765
764
|
if len(regression_period) > 1:
|
766
765
|
df=compare_1ticker_mregression_period(ticker,start,end, \
|
767
|
-
|
766
|
+
adjust=adjust, \
|
768
767
|
RF=RF,regression_period=regression_period, \
|
769
|
-
|
770
|
-
|
771
|
-
|
768
|
+
attention_value=attention_value,attention_value_area=attention_value_area, \
|
769
|
+
attention_point=attention_point,attention_point_area=attention_point_area, \
|
772
770
|
graph=graph,facecolor=facecolor,loc=loc, \
|
773
771
|
annotate=annotate,annotate_value=annotate, \
|
774
772
|
mark_top=mark_top,mark_bottom=mark_bottom,mark_end=mark_end, \
|
@@ -783,9 +781,8 @@ def compare_beta_security(ticker,start,end, \
|
|
783
781
|
df=compare_mticker_1beta(ticker,start,end, \
|
784
782
|
adjust=adjust, \
|
785
783
|
RF=RF,regression_period=regression_period, \
|
786
|
-
|
787
|
-
|
788
|
-
|
784
|
+
attention_value=attention_value,attention_value_area=attention_value_area, \
|
785
|
+
attention_point=attention_point,attention_point_area=attention_point_area, \
|
789
786
|
graph=graph,facecolor=facecolor,loc=loc, \
|
790
787
|
annotate=annotate,annotate_value=annotate, \
|
791
788
|
mark_top=mark_top,mark_bottom=mark_bottom,mark_end=mark_end, \
|