siat 3.10.132__py3-none-any.whl → 3.11.1__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/__init__.py +0 -0
- siat/allin.py +8 -0
- siat/assets_liquidity.py +0 -0
- siat/beta_adjustment.py +0 -0
- siat/beta_adjustment_china.py +0 -0
- siat/blockchain.py +0 -0
- siat/bond.py +0 -0
- siat/bond_base.py +0 -0
- siat/bond_china.py +0 -0
- siat/bond_zh_sina.py +0 -0
- siat/capm_beta.py +0 -0
- siat/capm_beta2.py +4 -4
- siat/common.py +9 -6
- siat/compare_cross.py +0 -0
- siat/copyrights.py +0 -0
- siat/cryptocurrency.py +0 -0
- siat/economy.py +0 -0
- siat/economy2.py +0 -0
- siat/esg.py +0 -0
- siat/event_study.py +0 -0
- siat/exchange_bond_china.pickle +0 -0
- siat/fama_french.py +0 -0
- siat/fin_stmt2_yahoo.py +0 -0
- siat/financial_base.py +0 -0
- siat/financial_statements.py +0 -0
- siat/financials.py +0 -0
- siat/financials2.py +0 -0
- siat/financials_china.py +0 -0
- siat/financials_china2.py +0 -0
- siat/fund.py +0 -0
- siat/fund_china.pickle +0 -0
- siat/fund_china.py +0 -0
- siat/future_china.py +0 -0
- siat/google_authenticator.py +0 -0
- siat/grafix.py +55 -4
- siat/holding_risk.py +0 -0
- siat/luchy_draw.py +0 -0
- siat/market_china.py +0 -0
- siat/markowitz.py +0 -0
- siat/markowitz2.py +1 -0
- siat/markowitz2_20250704.py +0 -0
- siat/markowitz2_20250705.py +0 -0
- siat/markowitz_simple.py +0 -0
- siat/ml_cases.py +0 -0
- siat/ml_cases_example.py +0 -0
- siat/option_china.py +0 -0
- siat/option_pricing.py +0 -0
- siat/other_indexes.py +0 -0
- siat/risk_adjusted_return.py +0 -0
- siat/risk_adjusted_return2.py +8 -4
- siat/risk_evaluation.py +0 -0
- siat/risk_free_rate.py +0 -0
- siat/save2docx.py +345 -0
- siat/save2pdf.py +145 -0
- siat/sector_china.py +0 -0
- siat/security_price2.py +0 -0
- siat/security_prices.py +168 -6
- siat/security_trend.py +0 -0
- siat/security_trend2.py +2 -2
- siat/stock.py +11 -1
- siat/stock_advice_linear.py +0 -0
- siat/stock_base.py +0 -0
- siat/stock_china.py +0 -0
- siat/stock_info.pickle +0 -0
- siat/stock_prices_kneighbors.py +0 -0
- siat/stock_prices_linear.py +0 -0
- siat/stock_profile.py +0 -0
- siat/stock_technical.py +0 -0
- siat/stooq.py +0 -0
- siat/transaction.py +0 -0
- siat/translate.py +0 -0
- siat/valuation.py +0 -0
- siat/valuation_china.py +0 -0
- siat/var_model_validation.py +0 -0
- siat/yf_name.py +0 -0
- {siat-3.10.132.dist-info/licenses → siat-3.11.1.dist-info}/LICENSE +0 -0
- {siat-3.10.132.dist-info → siat-3.11.1.dist-info}/METADATA +234 -235
- siat-3.11.1.dist-info/RECORD +80 -0
- {siat-3.10.132.dist-info → siat-3.11.1.dist-info}/WHEEL +1 -1
- {siat-3.10.132.dist-info → siat-3.11.1.dist-info}/top_level.txt +0 -1
- build/lib/build/lib/siat/__init__.py +0 -75
- build/lib/build/lib/siat/allin.py +0 -137
- build/lib/build/lib/siat/assets_liquidity.py +0 -915
- build/lib/build/lib/siat/beta_adjustment.py +0 -1058
- build/lib/build/lib/siat/beta_adjustment_china.py +0 -548
- build/lib/build/lib/siat/blockchain.py +0 -143
- build/lib/build/lib/siat/bond.py +0 -2900
- build/lib/build/lib/siat/bond_base.py +0 -992
- build/lib/build/lib/siat/bond_china.py +0 -100
- build/lib/build/lib/siat/bond_zh_sina.py +0 -143
- build/lib/build/lib/siat/capm_beta.py +0 -783
- build/lib/build/lib/siat/capm_beta2.py +0 -887
- build/lib/build/lib/siat/common.py +0 -5360
- build/lib/build/lib/siat/compare_cross.py +0 -642
- build/lib/build/lib/siat/copyrights.py +0 -18
- build/lib/build/lib/siat/cryptocurrency.py +0 -667
- build/lib/build/lib/siat/economy.py +0 -1471
- build/lib/build/lib/siat/economy2.py +0 -1853
- build/lib/build/lib/siat/esg.py +0 -536
- build/lib/build/lib/siat/event_study.py +0 -815
- build/lib/build/lib/siat/fama_french.py +0 -1521
- build/lib/build/lib/siat/fin_stmt2_yahoo.py +0 -982
- build/lib/build/lib/siat/financial_base.py +0 -1160
- build/lib/build/lib/siat/financial_statements.py +0 -598
- build/lib/build/lib/siat/financials.py +0 -2339
- build/lib/build/lib/siat/financials2.py +0 -1278
- build/lib/build/lib/siat/financials_china.py +0 -4433
- build/lib/build/lib/siat/financials_china2.py +0 -2212
- build/lib/build/lib/siat/fund.py +0 -629
- build/lib/build/lib/siat/fund_china.py +0 -3307
- build/lib/build/lib/siat/future_china.py +0 -551
- build/lib/build/lib/siat/google_authenticator.py +0 -47
- build/lib/build/lib/siat/grafix.py +0 -3636
- build/lib/build/lib/siat/holding_risk.py +0 -867
- build/lib/build/lib/siat/luchy_draw.py +0 -638
- build/lib/build/lib/siat/market_china.py +0 -1168
- build/lib/build/lib/siat/markowitz.py +0 -2363
- build/lib/build/lib/siat/markowitz2.py +0 -3150
- build/lib/build/lib/siat/markowitz2_20250704.py +0 -2969
- build/lib/build/lib/siat/markowitz2_20250705.py +0 -3158
- build/lib/build/lib/siat/markowitz_simple.py +0 -373
- build/lib/build/lib/siat/ml_cases.py +0 -2291
- build/lib/build/lib/siat/ml_cases_example.py +0 -60
- build/lib/build/lib/siat/option_china.py +0 -3069
- build/lib/build/lib/siat/option_pricing.py +0 -1925
- build/lib/build/lib/siat/other_indexes.py +0 -409
- build/lib/build/lib/siat/risk_adjusted_return.py +0 -1576
- build/lib/build/lib/siat/risk_adjusted_return2.py +0 -1900
- build/lib/build/lib/siat/risk_evaluation.py +0 -2218
- build/lib/build/lib/siat/risk_free_rate.py +0 -351
- build/lib/build/lib/siat/sector_china.py +0 -4140
- build/lib/build/lib/siat/security_price2.py +0 -727
- build/lib/build/lib/siat/security_prices.py +0 -3408
- build/lib/build/lib/siat/security_trend.py +0 -402
- build/lib/build/lib/siat/security_trend2.py +0 -646
- build/lib/build/lib/siat/stock.py +0 -4284
- build/lib/build/lib/siat/stock_advice_linear.py +0 -934
- build/lib/build/lib/siat/stock_base.py +0 -26
- build/lib/build/lib/siat/stock_china.py +0 -2095
- build/lib/build/lib/siat/stock_prices_kneighbors.py +0 -910
- build/lib/build/lib/siat/stock_prices_linear.py +0 -386
- build/lib/build/lib/siat/stock_profile.py +0 -707
- build/lib/build/lib/siat/stock_technical.py +0 -3305
- build/lib/build/lib/siat/stooq.py +0 -74
- build/lib/build/lib/siat/transaction.py +0 -347
- build/lib/build/lib/siat/translate.py +0 -5183
- build/lib/build/lib/siat/valuation.py +0 -1378
- build/lib/build/lib/siat/valuation_china.py +0 -2076
- build/lib/build/lib/siat/var_model_validation.py +0 -444
- build/lib/build/lib/siat/yf_name.py +0 -811
- build/lib/siat/__init__.py +0 -75
- build/lib/siat/allin.py +0 -137
- build/lib/siat/assets_liquidity.py +0 -915
- build/lib/siat/beta_adjustment.py +0 -1058
- build/lib/siat/beta_adjustment_china.py +0 -548
- build/lib/siat/blockchain.py +0 -143
- build/lib/siat/bond.py +0 -2900
- build/lib/siat/bond_base.py +0 -992
- build/lib/siat/bond_china.py +0 -100
- build/lib/siat/bond_zh_sina.py +0 -143
- build/lib/siat/capm_beta.py +0 -783
- build/lib/siat/capm_beta2.py +0 -887
- build/lib/siat/common.py +0 -5360
- build/lib/siat/compare_cross.py +0 -642
- build/lib/siat/copyrights.py +0 -18
- build/lib/siat/cryptocurrency.py +0 -667
- build/lib/siat/economy.py +0 -1471
- build/lib/siat/economy2.py +0 -1853
- build/lib/siat/esg.py +0 -536
- build/lib/siat/event_study.py +0 -815
- build/lib/siat/fama_french.py +0 -1521
- build/lib/siat/fin_stmt2_yahoo.py +0 -982
- build/lib/siat/financial_base.py +0 -1160
- build/lib/siat/financial_statements.py +0 -598
- build/lib/siat/financials.py +0 -2339
- build/lib/siat/financials2.py +0 -1278
- build/lib/siat/financials_china.py +0 -4433
- build/lib/siat/financials_china2.py +0 -2212
- build/lib/siat/fund.py +0 -629
- build/lib/siat/fund_china.py +0 -3307
- build/lib/siat/future_china.py +0 -551
- build/lib/siat/google_authenticator.py +0 -47
- build/lib/siat/grafix.py +0 -3636
- build/lib/siat/holding_risk.py +0 -867
- build/lib/siat/luchy_draw.py +0 -638
- build/lib/siat/market_china.py +0 -1168
- build/lib/siat/markowitz.py +0 -2363
- build/lib/siat/markowitz2.py +0 -3150
- build/lib/siat/markowitz2_20250704.py +0 -2969
- build/lib/siat/markowitz2_20250705.py +0 -3158
- build/lib/siat/markowitz_simple.py +0 -373
- build/lib/siat/ml_cases.py +0 -2291
- build/lib/siat/ml_cases_example.py +0 -60
- build/lib/siat/option_china.py +0 -3069
- build/lib/siat/option_pricing.py +0 -1925
- build/lib/siat/other_indexes.py +0 -409
- build/lib/siat/risk_adjusted_return.py +0 -1576
- build/lib/siat/risk_adjusted_return2.py +0 -1900
- build/lib/siat/risk_evaluation.py +0 -2218
- build/lib/siat/risk_free_rate.py +0 -351
- build/lib/siat/sector_china.py +0 -4140
- build/lib/siat/security_price2.py +0 -727
- build/lib/siat/security_prices.py +0 -3408
- build/lib/siat/security_trend.py +0 -402
- build/lib/siat/security_trend2.py +0 -646
- build/lib/siat/stock.py +0 -4284
- build/lib/siat/stock_advice_linear.py +0 -934
- build/lib/siat/stock_base.py +0 -26
- build/lib/siat/stock_china.py +0 -2095
- build/lib/siat/stock_prices_kneighbors.py +0 -910
- build/lib/siat/stock_prices_linear.py +0 -386
- build/lib/siat/stock_profile.py +0 -707
- build/lib/siat/stock_technical.py +0 -3305
- build/lib/siat/stooq.py +0 -74
- build/lib/siat/transaction.py +0 -347
- build/lib/siat/translate.py +0 -5183
- build/lib/siat/valuation.py +0 -1378
- build/lib/siat/valuation_china.py +0 -2076
- build/lib/siat/var_model_validation.py +0 -444
- build/lib/siat/yf_name.py +0 -811
- siat-3.10.132.dist-info/RECORD +0 -218
@@ -1,235 +1,234 @@
|
|
1
|
-
Metadata-Version: 2.
|
2
|
-
Name: siat
|
3
|
-
Version: 3.
|
4
|
-
Summary: Securities Investment Analysis Tools (siat)
|
5
|
-
Home-page: https://pypi.org/project/siat/
|
6
|
-
Author: Prof. WANG Dehong, International Business School, Beijing Foreign Studies University
|
7
|
-
Author-email: "Prof. WANG Dehong" <wdehong2000@163.com>
|
8
|
-
Maintainer-email: "Prof. WANG Dehong" <wdehong2000@163.com>
|
9
|
-
License: Copyright (C) WANG Dehong, 2025. For educational purpose only!
|
10
|
-
Project-URL: Homepage, https://pypi.org/project/siat/
|
11
|
-
Keywords: investment,finance,technical analysis,siat
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
13
|
-
Classifier: Operating System :: OS Independent
|
14
|
-
Requires-Python: <3.13,>=3.
|
15
|
-
Description-Content-Type: text/markdown
|
16
|
-
License-File: LICENSE
|
17
|
-
Requires-Dist:
|
18
|
-
Requires-Dist: yfinance
|
19
|
-
Requires-Dist: tqdm
|
20
|
-
Requires-Dist:
|
21
|
-
Requires-Dist: akshare
|
22
|
-
Requires-Dist: urllib3
|
23
|
-
Requires-Dist: mplfinance
|
24
|
-
Requires-Dist: statsmodels
|
25
|
-
Requires-Dist:
|
26
|
-
Requires-Dist: pypinyin
|
27
|
-
Requires-Dist: seaborn
|
28
|
-
Requires-Dist: scipy
|
29
|
-
Requires-Dist: pandas
|
30
|
-
Requires-Dist: scikit-learn
|
31
|
-
Requires-Dist: baostock
|
32
|
-
Requires-Dist: pathlib
|
33
|
-
Requires-Dist: ruamel-yaml
|
34
|
-
Requires-Dist: prettytable
|
35
|
-
Requires-Dist: graphviz
|
36
|
-
Requires-Dist: luddite
|
37
|
-
Requires-Dist: pendulum
|
38
|
-
Requires-Dist: itables
|
39
|
-
Requires-Dist:
|
40
|
-
Requires-Dist: bottleneck
|
41
|
-
Requires-Dist: translate
|
42
|
-
Requires-Dist: translators
|
43
|
-
Requires-Dist: nbconvert
|
44
|
-
Requires-Dist: ipywidgets==8.1.6
|
45
|
-
Requires-Dist: yahooquery==2.3.7
|
46
|
-
Requires-Dist:
|
47
|
-
Requires-Dist: tiingo[pandas]
|
48
|
-
Requires-Dist: numpy<2
|
49
|
-
Requires-Dist: playwright
|
50
|
-
Requires-Dist: lxml==4.9.4
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
# security_technical2
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
Write to the author, Prof. WANG Dehong, wdehong2000@163.com
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: siat
|
3
|
+
Version: 3.11.1
|
4
|
+
Summary: Securities Investment Analysis Tools (siat)
|
5
|
+
Home-page: https://pypi.org/project/siat/
|
6
|
+
Author: Prof. WANG Dehong, International Business School, Beijing Foreign Studies University
|
7
|
+
Author-email: "Prof. WANG Dehong" <wdehong2000@163.com>
|
8
|
+
Maintainer-email: "Prof. WANG Dehong" <wdehong2000@163.com>
|
9
|
+
License: Copyright (C) WANG Dehong, 2025. For educational purpose only!
|
10
|
+
Project-URL: Homepage, https://pypi.org/project/siat/
|
11
|
+
Keywords: investment,finance,technical analysis,siat
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
13
|
+
Classifier: Operating System :: OS Independent
|
14
|
+
Requires-Python: <3.13,>=3.7
|
15
|
+
Description-Content-Type: text/markdown
|
16
|
+
License-File: LICENSE
|
17
|
+
Requires-Dist: pandas-datareader
|
18
|
+
Requires-Dist: yfinance
|
19
|
+
Requires-Dist: tqdm
|
20
|
+
Requires-Dist: plotly-express
|
21
|
+
Requires-Dist: akshare
|
22
|
+
Requires-Dist: urllib3
|
23
|
+
Requires-Dist: mplfinance
|
24
|
+
Requires-Dist: statsmodels
|
25
|
+
Requires-Dist: yahoo-earnings-calendar
|
26
|
+
Requires-Dist: pypinyin
|
27
|
+
Requires-Dist: seaborn
|
28
|
+
Requires-Dist: scipy
|
29
|
+
Requires-Dist: pandas
|
30
|
+
Requires-Dist: scikit-learn
|
31
|
+
Requires-Dist: baostock
|
32
|
+
Requires-Dist: pathlib
|
33
|
+
Requires-Dist: ruamel-yaml
|
34
|
+
Requires-Dist: prettytable
|
35
|
+
Requires-Dist: graphviz
|
36
|
+
Requires-Dist: luddite
|
37
|
+
Requires-Dist: pendulum
|
38
|
+
Requires-Dist: itables
|
39
|
+
Requires-Dist: py-trans
|
40
|
+
Requires-Dist: bottleneck
|
41
|
+
Requires-Dist: translate
|
42
|
+
Requires-Dist: translators
|
43
|
+
Requires-Dist: nbconvert
|
44
|
+
Requires-Dist: ipywidgets ==8.1.6
|
45
|
+
Requires-Dist: yahooquery ==2.3.7
|
46
|
+
Requires-Dist: alpha-vantage
|
47
|
+
Requires-Dist: tiingo[pandas]
|
48
|
+
Requires-Dist: numpy <2
|
49
|
+
Requires-Dist: playwright
|
50
|
+
Requires-Dist: lxml ==4.9.4
|
51
|
+
Requires-Dist: pymupdf
|
52
|
+
Requires-Dist: pypandoc
|
53
|
+
|
54
|
+
|
55
|
+
# What is siat?
|
56
|
+
siat is a Python 3 plug-in for security investment analysis, primarily designed for teaching and learning purposes in universities for undergraduate and postgraduate programs.
|
57
|
+
|
58
|
+
siat is recommended to run in Jupyter Notebook or Jupyter Lab, and most of its results are in the forms of figures and/or tables.
|
59
|
+
# Version naming
|
60
|
+
Version structure: X.Y.Z
|
61
|
+
|
62
|
+
X is the major version for architecture upgrade only.
|
63
|
+
Y is the functional version for functional enhancements.
|
64
|
+
Z is the minor version just for bug fixing.
|
65
|
+
|
66
|
+
# Quick examples of using siat
|
67
|
+
|
68
|
+
|
69
|
+
```python
|
70
|
+
# Enable siat
|
71
|
+
from siat import *
|
72
|
+
```
|
73
|
+
|
74
|
+
|
75
|
+
```python
|
76
|
+
# Set language to English, default is Chinese
|
77
|
+
set_language("English")
|
78
|
+
```
|
79
|
+
|
80
|
+
## Example 1: Apple stock price for the recent month
|
81
|
+
|
82
|
+
|
83
|
+
```python
|
84
|
+
# Simple way: show Apple's stock price in recent month
|
85
|
+
apple=security_trend("AAPL")
|
86
|
+
```
|
87
|
+
You may expect more information, such as price trend in a recent year (MRY), with the high/low point, current price and average price, like below:
|
88
|
+
|
89
|
+
```python
|
90
|
+
apple=security_trend("AAPL", start="MRY",
|
91
|
+
mark_top=True, mark_bottom=True, mark_end=True,
|
92
|
+
average_value=True)
|
93
|
+
```
|
94
|
+
|
95
|
+
## Example 2: Comparing Price changes among Apple, Microsoft and NVidia
|
96
|
+
You may expect compare the price changes for the recent quarter (MRQ) for the three stocks.
|
97
|
+
|
98
|
+
Since there is a major stock split for NVidia in 2024 by 1:10, it is necessary to use adjusted prices (Adj Close) to compare these stock prices.
|
99
|
+
|
100
|
+
```python
|
101
|
+
comp=security_trend(['AAPL','MSFT','NVDA'],
|
102
|
+
start='MRQ',
|
103
|
+
indicator='Adj Close',
|
104
|
+
preprocess='scaling', #use scaling drawing method to avoid loss of details
|
105
|
+
mark_top=True, mark_bottom=True,
|
106
|
+
annotate=True, annotate_value=True)
|
107
|
+
```
|
108
|
+
|
109
|
+
## Example 4: Bollinger band for Apple in the recent quarter
|
110
|
+
|
111
|
+
|
112
|
+
```python
|
113
|
+
# security_technical only supports 4 popular technical indicators: MACD, Bollinger, KDJ and RSI.
|
114
|
+
apple=security_technical("AAPL",
|
115
|
+
technical="Bollinger",
|
116
|
+
start="MRQ",
|
117
|
+
facecolor="white",
|
118
|
+
loc1="upper left", loc2="lower right")
|
119
|
+
```
|
120
|
+
|
121
|
+
## Example 5: CCI for Apple in recent quarter
|
122
|
+
|
123
|
+
|
124
|
+
```python
|
125
|
+
# security_technical2 supports up to 14 popular technical indicators.
|
126
|
+
# security_technical2 uses a simplied drawing method (Dehong graph) to avoid trypophobia [ˌtrɪpəu'fəʊbjə]
|
127
|
+
apple=security_technical2("AAPL",
|
128
|
+
technical="CCI",
|
129
|
+
start="MRM",
|
130
|
+
loc1="upper left", loc2="lower right")
|
131
|
+
```
|
132
|
+
|
133
|
+
# What security products does siat support?
|
134
|
+
1. Public company profile: world-wide
|
135
|
+
2. Stock & stock market index: world-wide
|
136
|
+
3. Stock valuation: primarily in China (mainland and HK) and the U.S.
|
137
|
+
4. Stock option chain: primarily in the U.S.
|
138
|
+
5. Bond: primarily in China and the U.S.
|
139
|
+
6. Markowitz portfolio: with all the supported stocks and bonds
|
140
|
+
7. Fund: primarily in China and the U.S.
|
141
|
+
8. Futures: primarily in China and the U.S.
|
142
|
+
9. Options: primarily in China and the U.S.
|
143
|
+
10. Digital currency: world-wide (some may be restricted by data sources)
|
144
|
+
11. Balance sheet: in China (full function) and world-wide (basic function)
|
145
|
+
12. Income statement: in China mainland (full function) and world-wide (basic function)
|
146
|
+
13. Cash flow statement: in China mainland (full function) and world-wide (basic function)
|
147
|
+
14. DuPont Identity: world-wide
|
148
|
+
15. Sector trend and valuation: primarily in China
|
149
|
+
# What analytical methods does siat support?
|
150
|
+
1. Trend analysis
|
151
|
+
2. Panel comparation
|
152
|
+
3. Return analysis: rolling returns, holding period returns
|
153
|
+
4. Risk analysis: rolling volatility, holding period volatility, LPSD
|
154
|
+
5. Technical analysis: more than 15 indicators
|
155
|
+
6. Risk-adjusted return: Sharpe ratio, Sortino ratio, Treynor ratio, Jensen alpha
|
156
|
+
7. Portfolio optimization: four risk-adjusted returns
|
157
|
+
8. CAPM beta trend
|
158
|
+
9. Beta adjustments: simple adjustment, Scholes-Williams, Dimson
|
159
|
+
10. Beta leverage: Hamada Model
|
160
|
+
11. Fama-French three-factor model
|
161
|
+
12. Fama-French-Carhart four-factor model
|
162
|
+
13. Fama-French five-factor model
|
163
|
+
14. Future pricing
|
164
|
+
15. Option pricing: European style, American style, with/without dividends
|
165
|
+
16. VaR & ES: variance-covariance, historic simulation, Monte Carlo, multiple periods
|
166
|
+
17. Liquidity risk: Roll spread, Amihud, Pastor-Stambaugh
|
167
|
+
18. ESG: basic functions
|
168
|
+
# Do I have to download data first before using siat?
|
169
|
+
NO!
|
170
|
+
siat will search the internet data sources for all the required data during analysis.
|
171
|
+
The main data sources siat uses:
|
172
|
+
1. Yahoo Finance
|
173
|
+
2. Sina Finance
|
174
|
+
3. East Money
|
175
|
+
4. Stooq (Polish)
|
176
|
+
5. FRED
|
177
|
+
6. OECD
|
178
|
+
7. IMF
|
179
|
+
8. Shanghai Stock Exchange
|
180
|
+
9. Shenzhen Stock Exchange
|
181
|
+
10. Hong Kong Stock Exchange
|
182
|
+
11. Beijing Stock Exchange
|
183
|
+
12. Tokyo Stock Exchange
|
184
|
+
13. London Stock Exchange
|
185
|
+
14. New York Stock Exchange
|
186
|
+
15. NASDAQ
|
187
|
+
16. Sustainalytics
|
188
|
+
|
189
|
+
Thanks the above websites for their valuable data!
|
190
|
+
# How to install siat?
|
191
|
+
The author strongly recommends using siat together with Jupyter Notebook or Jupyter Lab in Anaconda.
|
192
|
+
In order to install siat for the very first time, open a Jupyter Notebook, and type in the following command:
|
193
|
+
|
194
|
+
!pip install siat
|
195
|
+
|
196
|
+
If the above method does not work, something might be wrong in your Python path settings. Try to open an Anaconda Prompt in Windows or a Terminal App in Mac or Linux, and type in the following command:
|
197
|
+
|
198
|
+
pip install siat
|
199
|
+
# How to upgrade siat?
|
200
|
+
In Jupyter Notebook or Jupyter Lab:
|
201
|
+
|
202
|
+
upgrade_siat()
|
203
|
+
|
204
|
+
If you suffer from slow internet connection (often in campus classrooms with many students), try to use alternative sources, such as:
|
205
|
+
|
206
|
+
upgrade_siat(alternative="tsinghua")
|
207
|
+
|
208
|
+
upgrade_siat(alternative="alibaba")
|
209
|
+
|
210
|
+
If the above methods do not work for your environment, you have to goto the traditional ways to use command-line script, such as:
|
211
|
+
|
212
|
+
pip install --upgrade siat
|
213
|
+
|
214
|
+
*** For users in China
|
215
|
+
The pypi mirror websites may provide siat installing and upgrading in a much faster speed in the following commands: taking aliyun as an example
|
216
|
+
|
217
|
+
pip install siat -i https://mirrors.aliyun.com/pypi/simple/
|
218
|
+
|
219
|
+
pip install --upgrade siat https://mirrors.aliyun.com/pypi/simple/
|
220
|
+
|
221
|
+
*** Warning
|
222
|
+
1. The pip command itself may need upgrade as well.
|
223
|
+
2. The pip command sometimes may have conflicts with some vpn programs.
|
224
|
+
If in this case, try quit vpn program first, and try again.
|
225
|
+
# Are there more detailed case studies on using siat?
|
226
|
+
YES!
|
227
|
+
|
228
|
+
There are hundreds of video case studies in the author's channel (most in Chinese, some in English).
|
229
|
+
|
230
|
+
https://space.bilibili.com/284812153
|
231
|
+
|
232
|
+
Welcome to follow the channel!
|
233
|
+
# How to report a bug or look for help?
|
234
|
+
Write to the author, Prof. WANG Dehong, wdehong2000@163.com
|
@@ -0,0 +1,80 @@
|
|
1
|
+
siat/__init__.py,sha256=Y21NfAoDxQ3srK1tK-j8EQHzovAA4V_0ntqH8Sa_1E0,2236
|
2
|
+
siat/allin.py,sha256=afvsi6YSXnNUG1cjCqLVS3qfio-NuFNKlu-jVa3h0Rw,3157
|
3
|
+
siat/assets_liquidity.py,sha256=OnE_DyTznIs_m76MtszIvPXFVIjvB4_X2D3Y2-hlVO8,33892
|
4
|
+
siat/beta_adjustment.py,sha256=u_EZt3rEbvXDpqcJp_hUh9637P5vsrRHEfX6uG9Uin8,37292
|
5
|
+
siat/beta_adjustment_china.py,sha256=z17bstK2WtlKKqUl6aCcP3Pv661PWgyWqAqGHGUH7Yk,20807
|
6
|
+
siat/blockchain.py,sha256=awF3GDtlwaJhku0a2kLuXOS8d3IzkjR_RyzlZWvD3L4,6032
|
7
|
+
siat/bond.py,sha256=tSUY9o31_Q8d7TVEsy4b6AeGr1tj9UGV6fl52LXy2hQ,112805
|
8
|
+
siat/bond_base.py,sha256=ClHJ5dzjoO9knGhX65Sbyk0i0uKQpmdKGUblR-wrXTs,37681
|
9
|
+
siat/bond_china.py,sha256=WzUhjYYk8tsr3BDWLQcpuj9DqNxTzBSIi_wuAOZ48kY,3082
|
10
|
+
siat/bond_zh_sina.py,sha256=26BohGcS120utwqg9dJvdGm5OkuNpNu5bco80uOuQpU,4423
|
11
|
+
siat/capm_beta.py,sha256=t8-xr90II0JzbjsTOZNpRze_mKTvBRXjwN2o0N0tgD8,30521
|
12
|
+
siat/capm_beta2.py,sha256=S2x6PrWp_1FyzVmG2MVzCf7LlpfHHEJxroJH2b26DvQ,35989
|
13
|
+
siat/common.py,sha256=GLNRbXP7uDA_pibWXJQ-St0o9ylhvRut0k9KpCQ70bI,193909
|
14
|
+
siat/compare_cross.py,sha256=3iP9TH2h3w27F2ARZc7FjKcErYCzWRc-TPiymOyoVtw,24171
|
15
|
+
siat/copyrights.py,sha256=YMLjZb328YpFMR-s_GUu0HBgeGce3pV7DgRut8S3I7w,690
|
16
|
+
siat/cryptocurrency.py,sha256=QSc4jK9VFlqBWVu-0th1BIMt8wC-5R5sWky3EaNupy0,27940
|
17
|
+
siat/economy.py,sha256=4HxAb44uQKyrYAMcS9RoSVc3xiHn7GSeliQ6ICQKoOc,84197
|
18
|
+
siat/economy2.py,sha256=SVy4PV7a0_4FI2FGNDEyvWxeFNUxci9AMxx8hKmucY8,84356
|
19
|
+
siat/esg.py,sha256=GMhaonIKtvOK83rhpQUH5aJt2OL3HQBSVfD__Yw-0oo,19040
|
20
|
+
siat/event_study.py,sha256=uQojKR5Mg3AC1PCSpx_CBHfUjJr0B4E-iCWxNF0Vif8,37178
|
21
|
+
siat/exchange_bond_china.pickle,sha256=Bbbnbf_jr6D_JCZ5gFf4dqz4XJ5UYIrSB3oRzgGfPIk,92214
|
22
|
+
siat/fama_french.py,sha256=L5_pI8FQa1ZNB15XyKK50Zb-ZWy0h0LSFQMAfCxDrvw,57863
|
23
|
+
siat/fin_stmt2_yahoo.py,sha256=LGmspk0nKyz4X87MtcovZXUfMQkAvrWINuxR4HQ8PI8,41178
|
24
|
+
siat/financial_base.py,sha256=A1rV7XQOVFpCXCV-T6Ge0QeF897hINiu0olN1XWeaFk,41287
|
25
|
+
siat/financial_statements.py,sha256=c5IdzGbOv7wTsve6CFqd7Fo7QTamhl-9v6BPgfNknxA,23331
|
26
|
+
siat/financials.py,sha256=VFdaA3ijDuToM_ASntmbGohFmSUORTe-51AlMFMhmwM,91747
|
27
|
+
siat/financials2.py,sha256=xCxqubwCNdfS7WyIb5IXTFonMZfw8FM9F8TCIkAruhk,58795
|
28
|
+
siat/financials_china.py,sha256=GbjxOHqfHqhXHu_SWSYczTSkoly1m--CzkcfPGzAP0s,192484
|
29
|
+
siat/financials_china2.py,sha256=VvkzkjZeH84zwypR7ReldgJeZ7jnNw0qkzebvWMPm10,94956
|
30
|
+
siat/fund.py,sha256=KS7NgzLLifwUJAQX4HpPi4CjLBamUcTpjsda4KSnfHE,24656
|
31
|
+
siat/fund_china.pickle,sha256=x_nPPdwy7wzIhtZQOplgDyTSyyUdXy9lbNxWysq7N6k,2437771
|
32
|
+
siat/fund_china.py,sha256=U7bN8mOJ_4RBkxRzrR26LSj4YJyMNpRjBtrZNUH8JI4,138286
|
33
|
+
siat/future_china.py,sha256=LORFv7AaaQHq9QBk9ZSVVOjmxY_YWyPVRdpDxfCJvdo,17828
|
34
|
+
siat/google_authenticator.py,sha256=ZUbZR8OW0IAKDbcYtlqGqIpZdERpFor9NccFELxg9yI,1637
|
35
|
+
siat/grafix.py,sha256=ftU220aS5e_kWHH-VxkDGzgXBwEXrndlQBefT5TJ_iM,147167
|
36
|
+
siat/holding_risk.py,sha256=SCHVxRBEhseUrgMpsnvR9Pt6ns-V-voRl3hCuK1p5y4,31114
|
37
|
+
siat/luchy_draw.py,sha256=8Ue-NKnvSVqINPY1eXat0NJat5MR-gex_K62aOYFdmA,20486
|
38
|
+
siat/market_china.py,sha256=Ki9Kpq-fwA9F_uI_-0b2KS0ir1gkOwQfB5Yd_hCWSeg,51758
|
39
|
+
siat/markowitz.py,sha256=PtQ_6rLyh5SEXyO7SCDyYChcgXl6ddcdgQ06HETjDVE,97990
|
40
|
+
siat/markowitz2.py,sha256=XOQwwNRehVyjNO9ff9CIMq9mC2lDz1QZTWroVNBOGzQ,133241
|
41
|
+
siat/markowitz2_20250704.py,sha256=x10MfBaWZ42xcmDAbPU02oOZ4J02QDB1nyVKX8QobiA,126468
|
42
|
+
siat/markowitz2_20250705.py,sha256=jwDhQUvr5fcjA7scYbI8bJo-5zFPE4LyUsnK-hlqz90,133997
|
43
|
+
siat/markowitz_simple.py,sha256=aJVvx669ngcCsqoQtA9kvFOQVjsuipYt2fyTc4yMItE,14286
|
44
|
+
siat/ml_cases.py,sha256=FYDk0O7l9hhHlbrlOVGgbH-h2DA503lhKFi9XugH1f0,86874
|
45
|
+
siat/ml_cases_example.py,sha256=xRGb3YTQEDTOnaWNzZN_myU5umQnA2RdMNiPrxTmn9c,1673
|
46
|
+
siat/option_china.py,sha256=16I9_e7OG0ziHtBgwjp9ss2GEwPZGoCWYd_3KFJ9V5E,123631
|
47
|
+
siat/option_pricing.py,sha256=gB5k-LQ3VOIdyllsW1xUtAT9Me2nTfl_kueysb1JmYE,74278
|
48
|
+
siat/other_indexes.py,sha256=68MDpQOBuiCOC4w0HMqNDihudMOkK7qnvgLbtpeHyt0,14084
|
49
|
+
siat/risk_adjusted_return.py,sha256=Q4ZRdTF57eNt4QCjeQ7uA8nG56Jls8f_QfJasZQEo0M,58748
|
50
|
+
siat/risk_adjusted_return2.py,sha256=gCtHhfGNlV1wHqU9gfHJ_n17wRSyTMxc7lS8jgZ-GQk,87409
|
51
|
+
siat/risk_evaluation.py,sha256=xfgLSKlIWYmRJrIL4kn2k2hp9fyOMAzYGIhi9ImvKOw,88917
|
52
|
+
siat/risk_free_rate.py,sha256=IBuRqA2kppdZsW4D4fapW7vnM5HMEXOn95A5r9Pkwlo,12384
|
53
|
+
siat/save2docx.py,sha256=0JWjE_kQ8ea_NymzfqgVtcb11vrpzOWPsKPhIL9YaxU,12258
|
54
|
+
siat/save2pdf.py,sha256=o6FLEbGX1qjQtSmCuBGUTuzOCi_TH3f6yWGXc2L9knk,5075
|
55
|
+
siat/sector_china.py,sha256=uLsDXdRBDVfgG6tnXWnQOTyDmyZfglVO9DRUYU2e3pk,157914
|
56
|
+
siat/security_price2.py,sha256=DDiZ2dlv_TYPLhA8-gGb9i9xrl88r4rgSMEcxqQ6aU0,28065
|
57
|
+
siat/security_prices.py,sha256=X3ip0q_m3OL3QRNRkr_lYQk-wsXLf6dWkFkyoZijhck,129368
|
58
|
+
siat/security_trend.py,sha256=o0vpWdrJkmODCP94X-Bvn-w7efHhj9HpUYBHtLl55D0,17240
|
59
|
+
siat/security_trend2.py,sha256=Z8AvyYFtZsJcmjkRbAyV7i3suRK3IYlQr6eTB_K_q-4,31786
|
60
|
+
siat/stock.py,sha256=fJzj9zC0eCShsEbYG5H-fFBgmlbRVLwx09vn6uvrYso,161705
|
61
|
+
siat/stock_advice_linear.py,sha256=-twT7IGP-NEplkL1WPSACcNJjggRB2j4mlAQCkzOAuo,31655
|
62
|
+
siat/stock_base.py,sha256=uISvbRyOGy8p9QREA96CVydgflBkn5L3OXOGKl8oanc,1312
|
63
|
+
siat/stock_china.py,sha256=vHIc2UuXIGRkRvyL4fjTaNAoyFaq022p9FxPah6dscI,96399
|
64
|
+
siat/stock_info.pickle,sha256=XqcFwQrXoBXAzZnE6rnfpI7zETXZS2usqzsx2ff7MEg,1319005
|
65
|
+
siat/stock_prices_kneighbors.py,sha256=WfZvo5EyeBsm-T37zDj7Sl9dPSRq5Bx4JxIJ9IUum6s,36738
|
66
|
+
siat/stock_prices_linear.py,sha256=-OUKRr27L2aStQgJSlJOrJ4gay_G7P-m-7t7cU2Yoqk,13991
|
67
|
+
siat/stock_profile.py,sha256=BuvdrQ3bqIAUCaM2GxPR6_rUhigQQa_YMeUov2zY6Y0,26084
|
68
|
+
siat/stock_technical.py,sha256=1P4FkOTPknG2m18NTgwMxN-NgwIAdW3qR09VoFz00Hc,140928
|
69
|
+
siat/stooq.py,sha256=TTLjAAp-TcoEezgCPu6eM_5naI4yCshp1S7V3pyc-og,2519
|
70
|
+
siat/transaction.py,sha256=nZTYYkx1BVBLDovSlZCtcviRuFxrYe9YFXOMZgo6QXo,14563
|
71
|
+
siat/translate.py,sha256=6mHTT6sWo12TNYJMo7CYF9ysFa_tCAQd5ePci9Xv3YI,263531
|
72
|
+
siat/valuation.py,sha256=xGizcKJZ3ADLWWHm2TFQub18FxiDv2doQwBwbEqyqz0,51980
|
73
|
+
siat/valuation_china.py,sha256=eSKIDckyjG8QkENlW_OKkqbQHno8pzDcomBO9iGNJVM,83079
|
74
|
+
siat/var_model_validation.py,sha256=loqziBYO2p0xkeWm3Rb1rJsDhbcgAZ5aR9rBLRwLU5E,17624
|
75
|
+
siat/yf_name.py,sha256=laNKMTZ9hdenGX3IZ7G0a2RLBKEWtUQJFY9CWuk_fp8,24058
|
76
|
+
siat-3.11.1.dist-info/LICENSE,sha256=NTEMMROY9_4U1szoKC3N2BLHcDd_o5uTgqdVH8tbApw,1071
|
77
|
+
siat-3.11.1.dist-info/METADATA,sha256=hCgZFWX7IItZkrypnBYFGwCdBAZt6_DzmdlqWPge8UQ,8584
|
78
|
+
siat-3.11.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
79
|
+
siat-3.11.1.dist-info/top_level.txt,sha256=X5R8wrVviq8agwJFVRVDsufkuOJuit-1qAT_kXeptrY,17
|
80
|
+
siat-3.11.1.dist-info/RECORD,,
|
@@ -1,75 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
"""
|
3
|
-
功能:一次性引入SIAT的所有模块
|
4
|
-
作者:王德宏,北京外国语大学国际商学院
|
5
|
-
版权:2021-2025(C) 仅限教学使用,商业使用需要授权
|
6
|
-
联络:wdehong2000@163.com
|
7
|
-
"""
|
8
|
-
|
9
|
-
#==============================================================================
|
10
|
-
#屏蔽所有警告性信息
|
11
|
-
import warnings; warnings.filterwarnings('ignore')
|
12
|
-
#==============================================================================
|
13
|
-
from siat.allin import *
|
14
|
-
|
15
|
-
import pkg_resources
|
16
|
-
current_version=pkg_resources.get_distribution("siat").version
|
17
|
-
#current_list=current_version.split('.')
|
18
|
-
|
19
|
-
#==============================================================================
|
20
|
-
# 处理stooq.py修复问题
|
21
|
-
restart=False
|
22
|
-
tagfile='fix_package.pkl'
|
23
|
-
|
24
|
-
#判断操作系统
|
25
|
-
import sys; czxt=sys.platform
|
26
|
-
if czxt in ['win32','win64']:
|
27
|
-
os='windows'
|
28
|
-
elif czxt in ['darwin']: #MacOSX
|
29
|
-
os='mac'
|
30
|
-
elif czxt in ['linux']: #linux
|
31
|
-
os='linux'
|
32
|
-
else:
|
33
|
-
os='windows'
|
34
|
-
|
35
|
-
# 确定标记文件存放地址
|
36
|
-
import pandas
|
37
|
-
srcpath=pandas.__path__[0]
|
38
|
-
if os == 'windows':
|
39
|
-
srcpath1=srcpath.replace("\\",'/')
|
40
|
-
srcfile=srcpath1+'/'+tagfile
|
41
|
-
else:
|
42
|
-
srcpath1=srcpath
|
43
|
-
srcfile=srcpath1+'/'+tagfile
|
44
|
-
|
45
|
-
try:
|
46
|
-
with open(srcfile,'rb') as file:
|
47
|
-
siat_ver=pickle.load(file)
|
48
|
-
if siat_ver != current_version:
|
49
|
-
restart=True
|
50
|
-
with open(srcfile,'wb') as file:
|
51
|
-
pickle.dump(current_version,file)
|
52
|
-
except:
|
53
|
-
restart=True
|
54
|
-
with open(srcfile,'wb') as file:
|
55
|
-
pickle.dump(current_version,file)
|
56
|
-
|
57
|
-
#屏蔽函数内print信息输出的类
|
58
|
-
import os, sys
|
59
|
-
class HiddenPrints:
|
60
|
-
def __enter__(self):
|
61
|
-
self._original_stdout = sys.stdout
|
62
|
-
sys.stdout = open(os.devnull, 'w')
|
63
|
-
|
64
|
-
def __exit__(self, exc_type, exc_val, exc_tb):
|
65
|
-
sys.stdout.close()
|
66
|
-
sys.stdout = self._original_stdout
|
67
|
-
|
68
|
-
if not restart:
|
69
|
-
print(" Successfully enabled siat v{}".format(current_version))
|
70
|
-
else:
|
71
|
-
with HiddenPrints():
|
72
|
-
fix_package()
|
73
|
-
print(" A new version of siat installed, please RESTART Python kernel")
|
74
|
-
|
75
|
-
#==============================================================================
|