siat 3.10.125__py3-none-any.whl → 3.10.127__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.127.dist-info}/METADATA +235 -226
- siat-3.10.127.dist-info/RECORD +76 -0
- {siat-3.10.125.dist-info → siat-3.10.127.dist-info}/WHEEL +1 -1
- {siat-3.10.125.dist-info → siat-3.10.127.dist-info/licenses}/LICENSE +0 -0
- {siat-3.10.125.dist-info → siat-3.10.127.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/transaction_test.py
DELETED
@@ -1,436 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
|
3
|
-
import sys
|
4
|
-
sys.path.insert(0,r'S:\siat')
|
5
|
-
from siat import *
|
6
|
-
|
7
|
-
if __name__=='__main__':
|
8
|
-
df=market_profile_china('SSE')
|
9
|
-
df=market_profile_china('SZSE')
|
10
|
-
|
11
|
-
|
12
|
-
import os; os.chdir("S:/siat")
|
13
|
-
|
14
|
-
from siat import *
|
15
|
-
|
16
|
-
from siat.allin import *
|
17
|
-
|
18
|
-
from siat.bond import *
|
19
|
-
#==============================================================================
|
20
|
-
compare_security(['SPSK','^DJI'],"Close","2020-1-1","2021-5-31")
|
21
|
-
#==============================================================================
|
22
|
-
compare_security(['^IRX','^TYX'],"Close","2019-1-1","2021-5-31")
|
23
|
-
compare_security(['^IRX','^FYX'],"Close","2019-8-1","2019-8-31")
|
24
|
-
compare_security(['^IRX','^TYX'],"Close","2021-3-1","2021-5-31")
|
25
|
-
|
26
|
-
compare_security(['^IRX','^TYX'],"Close","2010-1-1","2021-5-25")
|
27
|
-
#==============================================================================
|
28
|
-
compare_security(['000001.SS','^HSI'],"Annual Ret%","2016-1-1","2020-12-31")
|
29
|
-
compare_security(['000001.SS','^HSI'],"Annual Ret%","2020-1-1","2021-3-31")
|
30
|
-
compare_security(['000001.SS','^HSI'],"Annual Ret%","2019-1-1","2021-3-31")
|
31
|
-
|
32
|
-
compare_security(['000001.SS','^DJI'],"Annual Ret%","2019-1-1","2021-3-31")
|
33
|
-
compare_security(['000001.SS','^N225'],"Annual Ret%","2019-1-1","2021-3-31")
|
34
|
-
|
35
|
-
compare_security(['000001.SS','399001.SZ'],"Exp Ret%","2019-1-1","2021-3-31")
|
36
|
-
|
37
|
-
compare_security(['000012.SS','000001.SS'],"Exp Ret%","2019-1-1","2021-3-31")
|
38
|
-
|
39
|
-
compare_security(['000001.SS','399106.SZ'],"Annual Ret Volatility%","2019-1-1","2021-3-31")
|
40
|
-
|
41
|
-
# 获得中债-综合指数行情:
|
42
|
-
from siat.bond import *
|
43
|
-
df1=bond_index_china('中债-综合指数',"2017-1-1","2021-3-31",graph=False)
|
44
|
-
# 获得上证综合指数行情:
|
45
|
-
from siat.security_prices import *
|
46
|
-
df2=get_prices('000001.SS',"2017-1-1","2021-3-31")
|
47
|
-
#比较两种指数的收益率波动风险:
|
48
|
-
from siat.transaction import *
|
49
|
-
compare_indicator(df1,df2,'Annual Ret Volatility%',"2019-1-1","2021-3-31")
|
50
|
-
compare_indicator(df1,df2,'Annual Ret Volatility%',"2019-1-1","2021-3-31",twinx=True)
|
51
|
-
|
52
|
-
compare_security(['000001.SS','399106.SZ'],"Exp Ret Volatility%","2019-1-1","2021-3-31")
|
53
|
-
|
54
|
-
# 获得中债-综合指数行情:
|
55
|
-
from siat.bond import *
|
56
|
-
df1=bond_index_china('中债-综合指数',"2017-1-1","2021-3-31",graph=False)
|
57
|
-
# 获得上证综合指数行情:
|
58
|
-
from siat.security_prices import *
|
59
|
-
df2=get_prices('000001.SS',"2017-1-1","2021-3-31")
|
60
|
-
#比较两种指数的持有收益率波动风险:
|
61
|
-
from siat.transaction import *
|
62
|
-
compare_indicator(df1,df2,'Exp Ret Volatility%',"2019-1-1","2021-3-31")
|
63
|
-
|
64
|
-
compare_security(['000001.SS','399001.SZ'],"Annual Ret LPSD%","2019-1-1","2021-3-31")
|
65
|
-
|
66
|
-
# 获得中债-综合指数行情:
|
67
|
-
from siat.bond import *
|
68
|
-
df1=bond_index_china('中债-综合指数',"2017-1-1","2021-3-31",graph=False)
|
69
|
-
# 获得上证综合指数行情:
|
70
|
-
from siat.security_prices import *
|
71
|
-
df2=get_prices('000001.SS',"2017-1-1","2021-3-31")
|
72
|
-
#比较两种指数的持有损失波动风险:
|
73
|
-
from siat.transaction import *
|
74
|
-
compare_indicator(df1,df2,'Exp Ret LPSD%',"2019-1-1","2021-3-31")
|
75
|
-
结果显示,这两种指数的持有损失风险(使用下偏标准差)指数走势图与前述案例中的持有收益率风险(使用标准差)走势图差异较小,十分相似,说明两种指数的持有损失风险分布形状与持有收益率风险分布比较接近。
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
#==============================================================================
|
80
|
-
df=security_price('000300.SS','2004-1-1','2020-12-31',power=6)
|
81
|
-
|
82
|
-
#==============================================================================
|
83
|
-
compare_security(["SX23.CBT","SX22.CBT"],"Close","2020-1-1","2020-6-30")
|
84
|
-
compare_security(["GCZ25.CMX","GCZ24.CMX"],"Close","2020-1-1","2020-6-30")
|
85
|
-
|
86
|
-
compare_security(["ZT=F","ZF=F"],"Close","2010-1-1","2020-6-30")
|
87
|
-
|
88
|
-
df=security_price('6BH22.CME','2020-10-1','2021-1-31',power=4)
|
89
|
-
|
90
|
-
compare_security(["GEM23.CME","GEM24.CME"],"Close","2020-1-1","2020-12-31")
|
91
|
-
#==============================================================================
|
92
|
-
compare_security(["FRI","^RUT"],"Exp Ret%","2010-1-1","2020-6-30")
|
93
|
-
compare_security(["FRI","^RUT"],"Exp Ret Volatility%","2010-1-1","2020-6-30")
|
94
|
-
|
95
|
-
compare_security(["FRI","^RUT"],"Exp Ret%","2010-1-1","2019-12-31")
|
96
|
-
compare_security(["FRI","^RUT"],"Exp Ret Volatility%","2010-1-1","2019-12-31")
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
#==============================================================================
|
101
|
-
compare_security(["SPY","^GSPC"],"Exp Ret%","2010-1-1","2020-6-30")
|
102
|
-
compare_security(["IVV","^GSPC"],"Exp Ret%","2010-1-1","2020-6-30")
|
103
|
-
|
104
|
-
compare_security(["SPY","^GSPC"],"Exp Ret Volatility%","2010-1-1","2020-6-30")
|
105
|
-
compare_security(["IVV","^GSPC"],"Exp Ret Volatility%","2010-1-1","2020-6-30")
|
106
|
-
|
107
|
-
compare_security(["SPY","SPYD"],"Exp Ret%","2019-1-1","2020-6-30")
|
108
|
-
compare_security(["SPY","SPYG"],"Exp Ret%","2019-1-1","2020-6-30")
|
109
|
-
compare_security(["SPY","SPYV"],"Exp Ret%","2019-1-1","2020-6-30")
|
110
|
-
compare_security(["SPY","SPYD"],"Exp Ret Volatility%","2019-1-1","2020-6-30")
|
111
|
-
compare_security(["SPY","SPYG"],"Exp Ret Volatility%","2019-1-1","2020-6-30")
|
112
|
-
compare_security(["SPY","SPYV"],"Exp Ret Volatility%","2019-1-1","2020-6-30")
|
113
|
-
|
114
|
-
compare_security(["FRI","^GSPC"],"Exp Adj Ret%","2010-1-1","2020-6-30")
|
115
|
-
compare_security(["FRI","^GSPC"],"Exp Adj Ret Volatility%","2010-1-1","2020-6-30")
|
116
|
-
|
117
|
-
compare_security(["ICF","^DJI"],"Exp Adj Ret%","2010-1-1","2020-6-30")
|
118
|
-
compare_security(["ICF","^DJI"],"Exp Adj Ret Volatility%","2010-1-1","2020-6-30")
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
#==============================================================================
|
124
|
-
info=security_price("ZSF22.CBT","2021-1-1","2021-3-31")
|
125
|
-
|
126
|
-
info=security_price("510210.SS","2020-4-1","2020-6-30")
|
127
|
-
|
128
|
-
info=security_price("510210.SS","2020-4-1","2020-6-30")
|
129
|
-
compare_security(["510210.SS","000001.SS"],"Close","2020-4-1","2020-6-30",twinx=True)
|
130
|
-
compare_security(["510210.SS","000001.SS"],"Close","2019-1-1","2020-12-31",twinx=True)
|
131
|
-
compare_security(["SPY","^GSPC"],"Close","2010-1-1","2020-6-30",twinx=True)
|
132
|
-
compare_security(["IVV","^GSPC"],"Close","2010-1-1","2020-6-30",twinx=True)
|
133
|
-
|
134
|
-
compare_security(["SPY","^GSPC"],"Close","2010-1-1","2020-6-30",twinx=True)
|
135
|
-
|
136
|
-
|
137
|
-
compare_security(['^DJI','000001.SS'],"Close","1991-1-1","2021-3-2",twinx=True)
|
138
|
-
compare_security(['^DJI','000001.SS'],"Close","2020-12-1","2021-3-2",twinx=True)
|
139
|
-
|
140
|
-
|
141
|
-
compare_security(['^TNX','^DJI'],"Close","1991-1-1","2021-3-2",twinx=True)
|
142
|
-
compare_security(['^TNX','^DJI'],"Close","2020-12-1","2021-3-2",twinx=True)
|
143
|
-
|
144
|
-
compare_security(['^TNX','000001.SS'],"Close","1991-1-1","2021-3-2",twinx=True)
|
145
|
-
compare_security(['000001.SS','^DJI'],"Close","1992-1-1","2021-3-2",twinx=True)
|
146
|
-
|
147
|
-
|
148
|
-
compare_security(['000001.SS','399001.SZ'],"Annual Ret%","1991-1-1","2021-2-28")
|
149
|
-
compare_security(['000002.SS','399107.SZ'],"Annual Ret%","2000-1-1","2020-12-31")
|
150
|
-
compare_security(['000003.SS','399108.SZ'],"Annual Ret%","2000-1-1","2020-12-31")
|
151
|
-
|
152
|
-
compare_security(['000002.SS','000003.SS'],"Annual Ret%","2000-1-1","2020-12-31")
|
153
|
-
compare_security(['399107.SZ','399108.SZ'],"Annual Ret%","2000-1-1","2020-12-31")
|
154
|
-
|
155
|
-
compare_security(['^HSI','000001.SS'],"Annual Ret%","2000-1-1","2020-12-31")
|
156
|
-
compare_security(['^DJI','000001.SS'],"Annual Ret%","2000-1-1","2020-12-31")
|
157
|
-
compare_security(['^N225','000001.SS'],"Annual Ret%","2000-1-1","2020-12-31")
|
158
|
-
compare_security(['^N225','^DJI'],"Annual Ret%","2000-1-1","2020-12-31")
|
159
|
-
|
160
|
-
|
161
|
-
compare_security(['000001.SS','399001.SZ'],"Exp Ret%","2010-1-1","2020-12-31")
|
162
|
-
compare_security(['000012.SS','000001.SS'],"Exp Ret%","2010-1-1","2020-12-31")
|
163
|
-
|
164
|
-
compare_security(['159926.SS','000012.SS'],"Exp Ret%","2010-1-1","2020-12-31")
|
165
|
-
import akshare as ak
|
166
|
-
fund_etf_hist_sina_df = ak.fund_etf_hist_sina(symbol="sz169103")
|
167
|
-
print(fund_etf_hist_sina_df)
|
168
|
-
|
169
|
-
compare_security(['^HSI','000001.SS'],"Exp Ret%","2010-1-1","2020-12-31")
|
170
|
-
compare_security(['^DJI','000001.SS'],"Exp Ret%","2010-1-1","2020-12-31")
|
171
|
-
compare_security(['^N225','000001.SS'],"Exp Ret%","2010-1-1","2020-12-31")
|
172
|
-
compare_security(['^N225','^DJI'],"Exp Ret%","2010-1-1","2020-12-31")
|
173
|
-
|
174
|
-
|
175
|
-
compare_security(['000001.SS','399106.SZ'],"Annual Ret Volatility%","2010-1-1","2020-12-31")
|
176
|
-
compare_security(['399001.SZ','399012.SZ'],"Annual Ret Volatility%","2015-1-1","2020-12-31")
|
177
|
-
compare_security(['^HSI','000001.SS'],"Annual Ret Volatility%","2010-1-1","2020-12-31")
|
178
|
-
compare_security(['^HSI','399001.SZ'],"Annual Ret Volatility%","2010-1-1","2020-12-31")
|
179
|
-
compare_security(['^DJI','000001.SS'],"Annual Ret Volatility%","2010-1-1","2020-12-31")
|
180
|
-
|
181
|
-
|
182
|
-
compare_security(['000001.SS','399106.SZ'],"Exp Ret Volatility%","2010-1-1","2020-12-31")
|
183
|
-
compare_security(['000001.SS','^HSI'],"Exp Ret Volatility%","2010-1-1","2020-12-31")
|
184
|
-
compare_security(['000001.SS','^DJI'],"Exp Ret Volatility%","2010-1-1","2020-12-31")
|
185
|
-
compare_security(['000001.SS','^N225'],"Exp Ret Volatility%","2010-1-1","2020-12-31")
|
186
|
-
|
187
|
-
|
188
|
-
compare_security(['000001.SS','^DJI'],"Annual Ret LPSD%","2010-1-1","2020-12-31")
|
189
|
-
compare_security(['000001.SS','^GSPC'],"Exp Ret LPSD%","2010-1-1","2020-12-31")
|
190
|
-
compare_security(['000001.SS','^KS11'],"Exp Ret LPSD%","2010-1-1","2020-12-31")
|
191
|
-
compare_security(['000001.SS','^BSESN'],"Exp Ret LPSD%","2010-1-1","2020-12-31")
|
192
|
-
compare_security(['^N225','^KS11'],"Exp Ret LPSD%","2010-1-1","2020-12-31")
|
193
|
-
|
194
|
-
|
195
|
-
compare_security(['000012.SS','000001.SS'],"Annual Ret Volatility%","2010-1-1","2020-12-31")
|
196
|
-
compare_security(['000012.SS','000001.SS'],"Exp Ret Volatility%","2010-1-1","2020-12-31")
|
197
|
-
compare_security(['000012.SS','000001.SS'],"Exp Ret LPSD%","2010-1-1","2020-12-31")
|
198
|
-
|
199
|
-
#==============================================================================
|
200
|
-
from siat.transaction import *
|
201
|
-
df1=security_price('000300.SS','2004-1-1','2020-12-31',power=6)
|
202
|
-
df2=security_price('000906.SS','2004-1-1','2020-12-31',power=6)
|
203
|
-
|
204
|
-
compare_security(['000906.SS','000300.SS'],"Close","2004-1-1","2020-12-31")
|
205
|
-
compare_security(['000938.SS','000300.SS'],"Close","2004-1-1","2020-12-31")
|
206
|
-
compare_security(['000016.SS','000300.SS'],"Close","2004-1-1","2021-2-28",twinx=True)
|
207
|
-
compare_security(['000688.SS','000300.SS'],"Close","2020-1-1","2021-2-28",twinx=True)
|
208
|
-
|
209
|
-
df=security_price('000001.SS','1990-12-1','2021-2-28',power=6)
|
210
|
-
|
211
|
-
df=security_price('300401.SZ','2018-5-1','2018-5-5')
|
212
|
-
|
213
|
-
compare_security(['000043.SS','000045.SS'],"Close","2010-1-1","2021-2-28",twinx=True)
|
214
|
-
compare_security(['399001.SZ','000001.SS'],"Close","1994-1-1","2021-2-28",twinx=True)
|
215
|
-
|
216
|
-
compare_security(['^HSI','000001.SS'],"Close","1991-1-1","2021-2-28",twinx=True)
|
217
|
-
|
218
|
-
compare_security(['^HSCE','^HSI'],"Close","1991-1-1","2021-2-28",twinx=True)
|
219
|
-
|
220
|
-
compare_security(['^HSNU','^HSI'],"Close","1991-1-1","2021-2-28",twinx=True)
|
221
|
-
|
222
|
-
compare_security(['^TWII','000001.SS'],"Close","1997-1-1","2021-2-28",twinx=True)
|
223
|
-
|
224
|
-
compare_security(['^N225','000001.SS'],"Close","1991-1-1","2021-2-28",twinx=True)
|
225
|
-
|
226
|
-
compare_security(['^KS11','000001.SS'],"Close","1997-1-1","2021-2-28",twinx=True)
|
227
|
-
|
228
|
-
compare_security(['^BSESN','000001.SS'],"Close","1997-1-1","2021-2-28",twinx=True)
|
229
|
-
|
230
|
-
compare_security(['245710.KS','000001.SS'],"Close","2016-7-1","2021-2-28",twinx=True)
|
231
|
-
|
232
|
-
compare_security(['^VNIPR','000001.SS'],"Close","2016-1-1","2021-2-28",twinx=True)
|
233
|
-
|
234
|
-
compare_security(['^DJI','000001.SS'],"Close","1991-1-1","2021-2-28",twinx=True)
|
235
|
-
|
236
|
-
compare_security(['^GSPC','^DJI'],"Close","1990-1-1","2021-2-28",twinx=True)
|
237
|
-
|
238
|
-
compare_security(['^IXIC','^DJI'],"Close","1990-1-1","2021-2-28",twinx=True)
|
239
|
-
|
240
|
-
compare_security(['^FTSE','000001.SS'],"Close","1991-1-1","2021-2-28",twinx=True)
|
241
|
-
|
242
|
-
compare_security(['^GDAXI','^FTSE'],"Close","1991-1-1","2021-2-28",twinx=True)
|
243
|
-
|
244
|
-
compare_security(['^FCHI','^GDAXI'],"Close","1991-1-1","2021-2-28",twinx=True)
|
245
|
-
|
246
|
-
compare_security(['IMOEX.ME','000001.SS'],"Close","2013-1-1","2021-2-28",twinx=True)
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
compare_security(['000012.SS','000001.SS'],"Close","2002-1-1","2021-2-28",twinx=True)
|
251
|
-
compare_security(['000013.SS','000012.SS'],"Close","2003-1-1","2021-2-28",twinx=True)
|
252
|
-
compare_security(['000022.SS','000013.SS'],"Close","2008-1-1","2021-2-28",twinx=True)
|
253
|
-
compare_security(['000116.SS','000022.SS'],"Close","2013-1-1","2021-2-28",twinx=True)
|
254
|
-
|
255
|
-
#==============================================================================
|
256
|
-
|
257
|
-
|
258
|
-
from siat.bond import *
|
259
|
-
df1=bond_index_china('中债-综合指数','2002-1-1','2020-12-31',graph=False)
|
260
|
-
draw_indicator(df1,'Close','2002-1-1','2020-12-31')
|
261
|
-
|
262
|
-
from siat.security_prices import *
|
263
|
-
df2=get_prices('000001.SS','2002-1-1','2020-12-31')
|
264
|
-
|
265
|
-
from siat.transaction import *
|
266
|
-
compare_indicator(df1,df2,'Close','2002-1-1','2020-12-31',twinx=True)
|
267
|
-
compare_indicator(df1,df2,'Annual Ret%','2002-1-1','2020-12-31')
|
268
|
-
compare_indicator(df1,df2,'Annual Ret Volatility%','2002-1-1','2020-12-31')
|
269
|
-
draw_indicator(df1,'Annual Ret Volatility%','2002-1-1','2020-12-31',power=5)
|
270
|
-
|
271
|
-
compare_indicator(df1,df2,'Exp Ret Volatility%','2002-1-1','2020-12-31')
|
272
|
-
compare_indicator(df1,df2,'Exp Ret LPSD%','2002-1-1','2020-12-31')
|
273
|
-
compare_indicator(df1,'Exp Ret LPSD%','2002-1-1','2020-12-31')
|
274
|
-
|
275
|
-
hlj=bond_index_china('中债-黑龙江省地方政府债指数','2016-1-1','2020-12-31',graph=False)
|
276
|
-
gd=bond_index_china('中债-广东省地方政府债指数','2016-1-1','2020-12-31',graph=False)
|
277
|
-
compare_indicator(hlj,gd,'Close','2016-1-1','2020-12-31',twinx=True)
|
278
|
-
|
279
|
-
|
280
|
-
if __name__=='__main__':
|
281
|
-
market_profile_china('SSE')
|
282
|
-
market_profile_china('SZSE')
|
283
|
-
|
284
|
-
if __name__=='__main__':
|
285
|
-
draw_indicator(df2,'Annual Ret%','2010-1-1','2020-12-31')
|
286
|
-
compare_indicator(df1,df2,'Annual Ret%','2010-1-1','2020-12-31')
|
287
|
-
|
288
|
-
compare_indicator(df1,df2,'Annual Ret Volatility%','2010-1-1','2020-12-31')
|
289
|
-
compare_indicator(df1,df2,'Annual Ret LPSD%','2010-1-1','2020-12-31')
|
290
|
-
|
291
|
-
compare_indicator(df1,df2,'Exp Ret%','2010-1-1','2020-12-31')
|
292
|
-
compare_indicator(df1,df2,'Exp Ret LPSD%','2010-1-1','2020-12-31')
|
293
|
-
|
294
|
-
from siat.bond import *
|
295
|
-
search_bond_index_china(keystr='国债',printout=True)
|
296
|
-
df1=bond_index_china('中债-0-1年国债指数','2018-1-1','2020-12-31',graph=False)
|
297
|
-
df2=bond_index_china('中债-10年期国债指数','2018-1-1','2020-12-31',graph=False)
|
298
|
-
compare_indicator(df1,df2,'Annual Ret%','2019-7-1','2020-6-30')
|
299
|
-
compare_indicator(df1,df2,'Annual Ret Volatility%','2019-7-1','2020-6-30')
|
300
|
-
compare_indicator(df1,df2,'Exp Ret%','2010-1-1','2020-12-31')
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
draw_indicator(df1,'Annual Ret%','2019-7-1','2020-6-30')
|
305
|
-
|
306
|
-
|
307
|
-
#==============================================================================
|
308
|
-
import os; os.chdir("S:/siat")
|
309
|
-
from siat.transaction import *
|
310
|
-
|
311
|
-
|
312
|
-
df=security_price('600519.SS','2020-1-1','2020-12-31',power=5)
|
313
|
-
|
314
|
-
compare_security(["AAPL","MSFT"],"Annual Ret Volatility%","2020-1-1","2020-12-31")
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
df=security_price('600519.SS','2020-1-1','2020-12-31',power=5)
|
319
|
-
|
320
|
-
compare_security(["AAPL","MSFT"],"Daily Ret%","2020-1-1","2020-12-31")
|
321
|
-
|
322
|
-
compare_security("MSFT",["Daily Ret%","Annual Ret%"],"2020-1-1","2020-12-31")
|
323
|
-
|
324
|
-
compare_security("AAPL",["Daily Ret%","Annual Ret%"],"2020-1-1","2020-12-31")
|
325
|
-
|
326
|
-
compare_security(["AAPL","MSFT"],"Annual Ret%","2020-1-1","2020-12-31")
|
327
|
-
|
328
|
-
compare_security(["AAPL","MSFT"],"Annual Adj Ret%","2020-1-1","2020-12-31")
|
329
|
-
|
330
|
-
compare_security(["TWTR","FB"],"Annual Ret%","2020-1-1","2020-12-31")
|
331
|
-
|
332
|
-
compare_security(["600519.SS","000858.SZ"],"Annual Adj Ret%","2020-1-1","2020-12-31")
|
333
|
-
|
334
|
-
compare_security(["DAI.DE","BMW.DE"],"Annual Adj Ret%","2020-1-1","2020-12-31")
|
335
|
-
|
336
|
-
compare_security(["7203.T","7201.T"],"Annual Adj Ret%","2020-1-1","2020-12-31")
|
337
|
-
|
338
|
-
compare_security(["4911.T","4452.T"],"Annual Adj Ret%","2020-1-1","2020-12-31")
|
339
|
-
|
340
|
-
compare_security(["9983.T","7453.T"],"Annual Adj Ret%","2020-1-1","2020-12-31")
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
compare_security(["000001.SS","399001.SZ"],"Close","2020-1-1","2020-12-31", twinx=True)
|
349
|
-
|
350
|
-
df=security_price('000001.SS','2020-1-1','2020-12-31',power=5)
|
351
|
-
|
352
|
-
compare_security(["000001.SS","^HSI"],"Close","2020-1-1","2020-12-31", twinx=True)
|
353
|
-
|
354
|
-
compare_security(["000001.SS","^N225"],"Close","2020-1-1","2020-12-31", twinx=True)
|
355
|
-
|
356
|
-
compare_security(["000001.SS","^KS11"],"Close","2020-1-1","2020-12-31", twinx=True)
|
357
|
-
|
358
|
-
compare_security(["^KS11","^N225"],"Close","2020-1-1","2020-12-31", twinx=True)
|
359
|
-
|
360
|
-
compare_security(["000001.SS","^DJI"],"Close","2020-1-1","2020-12-31", twinx=True)
|
361
|
-
|
362
|
-
compare_security(["^DJI","^GSPC"],"Close","2020-1-1","2020-12-31", twinx=True)
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
df=security_price('6BH22.CME','2020-10-1','2021-1-31',power=4)
|
367
|
-
|
368
|
-
compare_security(["ZT=F","ZF=F"],"Exp Ret%","2010-1-1","2020-6-30")
|
369
|
-
compare_security(["ZN=F","ZB=F"],"Exp Ret%","2010-1-1","2020-6-30")
|
370
|
-
|
371
|
-
compare_security(["ZT=F","ZF=F"],"Exp Ret Volatility%","2010-1-1","2020-6-30")
|
372
|
-
compare_security(["ZN=F","ZB=F"],"Exp Ret Volatility%","2010-1-1","2020-6-30")
|
373
|
-
|
374
|
-
|
375
|
-
compare_security(["ES=F","^GSPC"],"Close","2020-1-1","2020-12-31")
|
376
|
-
|
377
|
-
compare_security(["ES=F","^GSPC"],"Close","2020-10-1","2020-12-31")
|
378
|
-
|
379
|
-
compare_security(["ES=F","^GSPC"],"Close","2020-12-1","2020-12-31")
|
380
|
-
|
381
|
-
compare_security(["ES=F","^GSPC"],"Close","2020-11-1","2020-12-31")
|
382
|
-
|
383
|
-
|
384
|
-
compare_security(["ES=F","^GSPC"],"Close","2020-12-1","2021-1-15")
|
385
|
-
compare_security(["ES=F","^GSPC"],"Annual Price Volatility","2020-12-1","2021-1-15")
|
386
|
-
compare_security(["ES=F","^GSPC"],"Exp Ret%","2020-12-1","2021-1-15")
|
387
|
-
compare_security(["ES=F","^GSPC"],"Exp Ret Volatility","2020-12-1","2021-1-15")
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
df=security_price('MSFT','2021-1-1','2021-1-31',datatag=True,power=4)
|
392
|
-
|
393
|
-
info=get_stock_profile("AAPL")
|
394
|
-
info=get_stock_profile("MSFT",info_type='officers')
|
395
|
-
info=get_stock_profile("AAPL",info_type='officers')
|
396
|
-
info=stock_info('AAPL')
|
397
|
-
sub_info=stock_officers(info)
|
398
|
-
|
399
|
-
div=stock_dividend('600519.SS','2011-1-1','2020-12-31')
|
400
|
-
split=stock_split('600519.SS','2000-1-1','2020-12-31')
|
401
|
-
|
402
|
-
ticker='AAPL'
|
403
|
-
info=stock_info(ticker)
|
404
|
-
info=get_stock_profile("AAPL",info_type='officers')
|
405
|
-
|
406
|
-
info=get_stock_profile("AAPL")
|
407
|
-
|
408
|
-
info=get_stock_profile("MSFT",info_type='officers')
|
409
|
-
info=get_stock_profile("GS",info_type='officers')
|
410
|
-
|
411
|
-
info=stock_info('JD')
|
412
|
-
sub_info=stock_officers(info)
|
413
|
-
info=get_stock_profile("JD",info_type='officers')
|
414
|
-
|
415
|
-
info=stock_info('BABA')
|
416
|
-
sub_info=stock_officers(info)
|
417
|
-
info=get_stock_profile("BABA",info_type='officers')
|
418
|
-
|
419
|
-
info=stock_info('0700.HK')
|
420
|
-
sub_info=stock_officers(info)
|
421
|
-
info=get_stock_profile("0700.HK",info_type='officers')
|
422
|
-
|
423
|
-
info=stock_info('600519.SS')
|
424
|
-
sub_info=stock_officers(info)
|
425
|
-
info=get_stock_profile("600519.SS",info_type='officers')
|
426
|
-
|
427
|
-
info=get_stock_profile("0939.HK",info_type='risk_esg')
|
428
|
-
|
429
|
-
|
430
|
-
market={'Market':('China','^HSI')}
|
431
|
-
stocks={'0700.HK':3,'9618.HK':2,'9988.HK':1}
|
432
|
-
portfolio=dict(market,**stocks)
|
433
|
-
esg=portfolio_esg2(portfolio)
|
434
|
-
|
435
|
-
|
436
|
-
|