siat 3.10.125__py3-none-any.whl → 3.10.126__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/common.py +106 -2
- siat/exchange_bond_china.pickle +0 -0
- siat/fund_china.pickle +0 -0
- siat/stock.py +10 -2
- siat/stock_info.pickle +0 -0
- {siat-3.10.125.dist-info → siat-3.10.126.dist-info}/METADATA +234 -226
- siat-3.10.126.dist-info/RECORD +76 -0
- {siat-3.10.125.dist-info → siat-3.10.126.dist-info}/WHEEL +1 -1
- {siat-3.10.125.dist-info → siat-3.10.126.dist-info/licenses}/LICENSE +0 -0
- {siat-3.10.125.dist-info → siat-3.10.126.dist-info}/top_level.txt +0 -0
- siat/__init__ -20240701.py +0 -65
- siat/__init__.py.backup_20250214.py +0 -73
- siat/alpha_vantage_test.py +0 -24
- siat/assets_liquidity_test.py +0 -44
- siat/barrons_scraping_test.py +0 -276
- siat/beta_adjustment_test.py +0 -77
- siat/bond_test.py +0 -142
- siat/capm_beta_test.py +0 -49
- siat/cmat_commons.py +0 -961
- siat/compare_cross_test.py +0 -117
- siat/concepts_iwencai.py +0 -86
- siat/concepts_kpl.py +0 -93
- siat/cryptocurrency_test.py +0 -71
- siat/derivative.py +0 -1111
- siat/economy-20230125.py +0 -1206
- siat/economy_test.py +0 -360
- siat/esg_test.py +0 -63
- siat/fama_french_test.py +0 -115
- siat/financial_statements_test.py +0 -31
- siat/financials2 - /321/205/320/231/320/277/321/206/320/254/320/274.py" +0 -341
- siat/financials_china2_test.py +0 -67
- siat/financials_china2_test2.py +0 -88
- siat/financials_china2_test3.py +0 -87
- siat/financials_china_test.py +0 -475
- siat/financials_china_test2.py +0 -197
- siat/financials_china_test2_fin_indicator.py +0 -197
- siat/financials_test.py +0 -713
- siat/fred_test.py +0 -40
- siat/fund_china_test.py +0 -175
- siat/fund_test.py +0 -40
- siat/future_china_test.py +0 -37
- siat/global_index_test.py +0 -66
- siat/grafix_test.py +0 -112
- siat/holding_risk_test.py +0 -13
- siat/local_debug_test.py +0 -100
- siat/markowitz2-20240620.py +0 -2614
- siat/markowitz_ccb_test.py +0 -37
- siat/markowitz_ef_test.py +0 -136
- siat/markowitz_old.py +0 -871
- siat/markowitz_simple-20230709.py +0 -370
- siat/markowitz_test.py +0 -164
- siat/markowitz_test2.py +0 -69
- siat/ml_cases_example1.py +0 -60
- siat/option_china_test.py +0 -447
- siat/option_pricing_test.py +0 -81
- siat/option_sina_api_test.py +0 -112
- siat/proxy_test.py +0 -84
- siat/quandl_test.py +0 -39
- siat/risk_adjusted_return_test.py +0 -81
- siat/risk_evaluation_test.py +0 -96
- siat/risk_free_rate_test.py +0 -127
- siat/sector_china_test.py +0 -203
- siat/security_price.py +0 -831
- siat/security_prices_test.py +0 -310
- siat/security_trend2-20240620.py +0 -493
- siat/setup.py +0 -41
- siat/shenwan index history test.py +0 -41
- siat/stock_china_test.py +0 -38
- siat/stock_info_test.py +0 -189
- siat/stock_list_china_test.py +0 -33
- siat/stock_technical-20240620.py +0 -2736
- siat/stock_test.py +0 -487
- siat/temp.py +0 -36
- siat/test2_graphviz.py +0 -484
- siat/test_graphviz.py +0 -411
- siat/test_markowitz_simple.py +0 -198
- siat/test_markowitz_simple_revised.py +0 -215
- siat/test_markowitz_simple_revised2.py +0 -218
- siat/transaction_test.py +0 -436
- siat/translate-20230125.py +0 -2107
- siat/translate-20230206.py +0 -2109
- siat/translate-20230215.py +0 -2158
- siat/translate_20240606.py +0 -4206
- siat/translate_241003_keep.py +0 -4300
- siat/universal_test.py +0 -100
- siat/valuation_market_china_test.py +0 -36
- siat-3.10.125.dist-info/RECORD +0 -152
siat/bond_test.py
DELETED
@@ -1,142 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
|
3
|
-
import os; os.chdir("S:/siat")
|
4
|
-
from siat import *
|
5
|
-
|
6
|
-
#==============================================================================
|
7
|
-
ytmchanges = [-100, -50, -20, -10, -5, 5, 10, 20, 50, 100]
|
8
|
-
bond_malkiel1(0.06, 8, 0.07, 100, 2, ytmchanges)
|
9
|
-
|
10
|
-
maturitylist = [1, 2, 3, 5, 10, 15, 20, 30]
|
11
|
-
bond_malkiel2(0.06, 8, 0.07, 100, 2, maturitylist)
|
12
|
-
|
13
|
-
|
14
|
-
bond_malkiel3(0.06, 8, 0.07, 100, 2)
|
15
|
-
|
16
|
-
bond_malkiel4(0.06, 8, 0.07, 100, 2)
|
17
|
-
|
18
|
-
bond_malkiel5(0.06, 8, 0.075, 100, 2)
|
19
|
-
|
20
|
-
|
21
|
-
#==============================================================================
|
22
|
-
md(0.08,0.1,3,2,100)
|
23
|
-
MD(0.08,0.1,3,2,100)
|
24
|
-
convexity(0.08,0.1,3,2,100)
|
25
|
-
#==============================================================================
|
26
|
-
ibbd=interbank_bond_deal(10)
|
27
|
-
|
28
|
-
ebp=exchange_bond_price('sh019521', '2021-3-1', '2021-5-25',power=0)
|
29
|
-
ebp=exchange_bond_price('sh122001', '2021-3-1', '2021-5-25',power=0)
|
30
|
-
#==============================================================================
|
31
|
-
def abcefg():
|
32
|
-
"""
|
33
|
-
功能:获取当前函数名
|
34
|
-
"""
|
35
|
-
import sys
|
36
|
-
curfunc=sys._getframe().f_code.co_name #获取当前函数名
|
37
|
-
print(curfunc)
|
38
|
-
|
39
|
-
uplfunc=sys._getframe(1).f_code.co_name #调用该函数的函数的名字,如果没有被调用,则返回<module>
|
40
|
-
print(uplfunc)
|
41
|
-
return
|
42
|
-
|
43
|
-
#==============================================================================
|
44
|
-
ibbq=interbank_bond_deal(10)
|
45
|
-
ibbq=interbank_bond_deal(10, option='5')
|
46
|
-
|
47
|
-
#==============================================================================
|
48
|
-
ebd=exchange_bond_deal(10, option='6')
|
49
|
-
|
50
|
-
|
51
|
-
ebp=exchange_bond_price('sh019521', '2019-7-1', '2020-3-31')
|
52
|
-
ebp=exchange_covbond_price('sz128086','2020-1-1','2020-4-30')
|
53
|
-
|
54
|
-
cbp=country_bond_price('中国','中国1年期国债','2020-1-1','2020-4-30')
|
55
|
-
cbp=country_bond_price('美国','美国10年期国债','2020-1-1','2020-4-30')
|
56
|
-
cbp=country_bond_price('意大利','意大利30年期国债','2020-1-1','2020-4-30')
|
57
|
-
|
58
|
-
|
59
|
-
#==============================================================================
|
60
|
-
ibbi=interbank_bond_issue_detail('2012-1-1', '2020-12-31')
|
61
|
-
ibbim=interbank_bond_issue_monthly(ibbi,'2019-1-1', '2020-12-31')
|
62
|
-
|
63
|
-
|
64
|
-
#==============================================================================
|
65
|
-
if __name__=='__main__':
|
66
|
-
search_bond_index_china(keystr='债')
|
67
|
-
search_bond_index_china(keystr='国债')
|
68
|
-
search_bond_index_china(keystr='综合')
|
69
|
-
search_bond_index_china(keystr='金融')
|
70
|
-
search_bond_index_china(keystr='企业')
|
71
|
-
search_bond_index_china(keystr='公司')
|
72
|
-
search_bond_index_china(keystr='地方政府债')
|
73
|
-
|
74
|
-
bond_index_china('中债-综合指数','2020-1-1','2021-2-8')
|
75
|
-
bond_index_china('中债-国债总指数','2020-1-1','2021-2-8')
|
76
|
-
bond_index_china('中债-交易所国债指数','2020-1-1','2021-2-8')
|
77
|
-
bond_index_china('中债-银行间国债指数','2010-1-1','2021-2-8')
|
78
|
-
bond_index_china('中债-银行间债券总指数','2020-1-1','2021-2-8')
|
79
|
-
|
80
|
-
bond_index_china('中债-5年期国债指数','2020-1-1','2021-2-8')
|
81
|
-
bond_index_china('中债-0-3个月国债指数','2020-1-1','2021-2-8')
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
#==============================================================================
|
87
|
-
import os; os.chdir("S:/siat")
|
88
|
-
from siat.stock import *
|
89
|
-
|
90
|
-
compare_security(["300148.SZ","000001.SS"],"Close","2000-1-1","2020-6-30",twinx=True)
|
91
|
-
|
92
|
-
compare_security(["FRI","^GSPC"],"Exp Adj Ret%","2010-1-1","2020-6-30")
|
93
|
-
|
94
|
-
compare_security(["FRI","^GSPC"],"Exp Adj Ret Volatility%","2010-1-1","2020-6-30")
|
95
|
-
|
96
|
-
compare_security(["ICF","^DJI"],"Exp Adj Ret%","2010-1-1","2020-6-30")
|
97
|
-
|
98
|
-
compare_security(["ICF","^DJI"],"Exp Adj Ret Volatility%","2010-1-1","2020-6-30")
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
info=stock_price("510050.SS","2020-4-1","2020-6-30")
|
103
|
-
info=stock_price("510210.SS","2020-4-1","2020-6-30")
|
104
|
-
|
105
|
-
compare_security(["510210.SS","000001.SS"],"Close","2020-4-1","2020-6-30",twinx=True)
|
106
|
-
|
107
|
-
compare_security(["510210.SS","000001.SS"],"Close","2015-7-1","2020-6-30",twinx=True)
|
108
|
-
|
109
|
-
compare_security(["SPY","^GSPC"],"Exp Ret%","2010-1-1","2020-6-30")
|
110
|
-
|
111
|
-
compare_security(["VOO","^GSPC"],"Exp Ret%","2010-1-1","2020-6-30")
|
112
|
-
|
113
|
-
compare_security(["IVV","^GSPC"],"Exp Ret%","2010-1-1","2020-6-30")
|
114
|
-
|
115
|
-
compare_security(["SPY","^GSPC"],"Exp Ret Volatility%","2010-1-1","2020-6-30")
|
116
|
-
|
117
|
-
compare_security(["VOO","^GSPC"],"Exp Ret Volatility%","2010-1-1","2020-6-30")
|
118
|
-
|
119
|
-
compare_security(["IVV","^GSPC"],"Exp Ret Volatility%","2010-1-1","2020-6-30")
|
120
|
-
|
121
|
-
compare_security(["SPY","SPYD"],"Exp Ret%","2019-1-1","2020-6-30")
|
122
|
-
|
123
|
-
compare_security(["SPY","SPYG"],"Exp Ret%","2019-1-1","2020-6-30")
|
124
|
-
|
125
|
-
compare_security(["SPY","SPYV"],"Exp Ret%","2019-1-1","2020-6-30")
|
126
|
-
|
127
|
-
|
128
|
-
compare_security(["SPY","SPYD"],"Exp Ret Volatility%","2019-1-1","2020-6-30")
|
129
|
-
|
130
|
-
compare_security(["SPY","SPYG"],"Exp Ret Volatility%","2019-1-1","2020-6-30")
|
131
|
-
|
132
|
-
compare_security(["SPY","SPYV"],"Exp Ret Volatility%","2019-1-1","2020-6-30")
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
fsym = "ETH"; tsym = "USD"
|
137
|
-
begdate="2020-03-01"; enddate="2020-05-31"
|
138
|
-
markets=fetchCrypto_Exchange(fsym,tsym)
|
139
|
-
cp=fetchCrypto_Price_byExchList(fsym,tsym,markets,begdate,enddate)
|
140
|
-
dist1,dist2=calcSpread_in2Markets(cp)
|
141
|
-
print("Average inter-market spread:", dist1)
|
142
|
-
print("Inter-market spread volatility:", dist2)
|
siat/capm_beta_test.py
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
|
3
|
-
import os; os.chdir("S:/siat")
|
4
|
-
from siat import *
|
5
|
-
#==============================================================================
|
6
|
-
beta=capm_beta('600519.SS','000001.SS','2011-1-1','2021-12-31')
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
#==============================================================================
|
11
|
-
beta=capm_beta('AAPL','^GSPC','2016-1-1','2020-12-31')
|
12
|
-
|
13
|
-
yearlist=gen_yearlist('2016','2020')
|
14
|
-
betas=capm_beta_yearly('AAPL','^GSPC',yearlist)
|
15
|
-
betas=capm_beta_yearly('600000.SS','000001.SS',yearlist)
|
16
|
-
|
17
|
-
#==============================================================================
|
18
|
-
portfolio=['IBM','AAPL','MSFT']
|
19
|
-
holdings=[1, 1, 3]
|
20
|
-
yearlist=gen_yearlist('2010','2020')
|
21
|
-
df=capm_beta_portfolio_yearly(portfolio,holdings,'^GSPC',yearlist)
|
22
|
-
|
23
|
-
#==============================================================================
|
24
|
-
beta=capm_beta('600000.SS','000001.SS','2011-1-1','2020-12-31')
|
25
|
-
|
26
|
-
portfolio=['IBM','AAPL','MSFT']
|
27
|
-
holdings=[1, 1, 3]
|
28
|
-
yearlist=gen_yearlist('2010','2020')
|
29
|
-
df=capm_beta_portfolio_yearly(portfolio,holdings,'^GSPC',yearlist)
|
30
|
-
|
31
|
-
from siat.beta_adjustment import *
|
32
|
-
yearlist=gen_yearlist('2011','2020')
|
33
|
-
betas=betas_dji=get_beta_ML('EDU','^DJI',yearlist)
|
34
|
-
|
35
|
-
#==============================================================================
|
36
|
-
beta=capm_beta('AAPL','^GSPC','2011-1-1','2020-12-31')
|
37
|
-
|
38
|
-
yearlist=gen_yearlist('2011','2020')
|
39
|
-
betas=capm_beta_yearly('AAPL','^GSPC',yearlist)
|
40
|
-
|
41
|
-
yearlist=gen_yearlist('2010', '2020')
|
42
|
-
betas=capm_beta_yearly('600000.SS', '000001.SS', yearlist)
|
43
|
-
|
44
|
-
yearlist=gen_yearlist('2010','2021')
|
45
|
-
betas=compare2_betas_yearly('600000.SS','600030.SS','000001.SS',yearlist)
|
46
|
-
betas
|
47
|
-
|
48
|
-
yearlist=gen_yearlist('2010','2020')
|
49
|
-
betas=compare2_betas_yearly('AMZN','BAC','^GSPC',yearlist)
|