siat 3.10.132__py3-none-any.whl → 3.10.133__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.
Files changed (218) hide show
  1. siat/__init__.py +0 -0
  2. siat/allin.py +0 -0
  3. siat/assets_liquidity.py +0 -0
  4. siat/beta_adjustment.py +0 -0
  5. siat/beta_adjustment_china.py +0 -0
  6. siat/blockchain.py +0 -0
  7. siat/bond.py +0 -0
  8. siat/bond_base.py +0 -0
  9. siat/bond_china.py +0 -0
  10. siat/bond_zh_sina.py +0 -0
  11. siat/capm_beta.py +0 -0
  12. siat/capm_beta2.py +0 -0
  13. siat/compare_cross.py +0 -0
  14. siat/copyrights.py +0 -0
  15. siat/cryptocurrency.py +0 -0
  16. siat/economy.py +0 -0
  17. siat/economy2.py +0 -0
  18. siat/esg.py +0 -0
  19. siat/event_study.py +0 -0
  20. siat/exchange_bond_china.pickle +0 -0
  21. siat/fama_french.py +0 -0
  22. siat/fin_stmt2_yahoo.py +0 -0
  23. siat/financial_base.py +0 -0
  24. siat/financial_statements.py +0 -0
  25. siat/financials.py +0 -0
  26. siat/financials2.py +0 -0
  27. siat/financials_china.py +0 -0
  28. siat/financials_china2.py +0 -0
  29. siat/fund.py +0 -0
  30. siat/fund_china.pickle +0 -0
  31. siat/fund_china.py +0 -0
  32. siat/future_china.py +0 -0
  33. siat/google_authenticator.py +0 -0
  34. siat/grafix.py +0 -0
  35. siat/holding_risk.py +0 -0
  36. siat/luchy_draw.py +0 -0
  37. siat/market_china.py +0 -0
  38. siat/markowitz.py +0 -0
  39. siat/markowitz2.py +0 -0
  40. siat/markowitz2_20250704.py +0 -0
  41. siat/markowitz2_20250705.py +0 -0
  42. siat/markowitz_simple.py +0 -0
  43. siat/ml_cases.py +0 -0
  44. siat/ml_cases_example.py +0 -0
  45. siat/option_china.py +0 -0
  46. siat/option_pricing.py +0 -0
  47. siat/other_indexes.py +0 -0
  48. siat/risk_adjusted_return.py +0 -0
  49. siat/risk_adjusted_return2.py +0 -0
  50. siat/risk_evaluation.py +0 -0
  51. siat/risk_free_rate.py +0 -0
  52. siat/sector_china.py +0 -0
  53. siat/security_price2.py +0 -0
  54. siat/security_prices.py +40 -2
  55. siat/security_trend.py +0 -0
  56. siat/security_trend2.py +0 -0
  57. siat/stock.py +0 -0
  58. siat/stock_advice_linear.py +0 -0
  59. siat/stock_base.py +0 -0
  60. siat/stock_china.py +0 -0
  61. siat/stock_info.pickle +0 -0
  62. siat/stock_prices_kneighbors.py +0 -0
  63. siat/stock_prices_linear.py +0 -0
  64. siat/stock_profile.py +0 -0
  65. siat/stock_technical.py +0 -0
  66. siat/stooq.py +0 -0
  67. siat/transaction.py +0 -0
  68. siat/translate.py +0 -0
  69. siat/valuation.py +0 -0
  70. siat/valuation_china.py +0 -0
  71. siat/var_model_validation.py +0 -0
  72. siat/yf_name.py +0 -0
  73. {siat-3.10.132.dist-info/licenses → siat-3.10.133.dist-info}/LICENSE +0 -0
  74. {siat-3.10.132.dist-info → siat-3.10.133.dist-info}/METADATA +232 -235
  75. siat-3.10.133.dist-info/RECORD +78 -0
  76. {siat-3.10.132.dist-info → siat-3.10.133.dist-info}/WHEEL +1 -1
  77. {siat-3.10.132.dist-info → siat-3.10.133.dist-info}/top_level.txt +0 -1
  78. build/lib/build/lib/siat/__init__.py +0 -75
  79. build/lib/build/lib/siat/allin.py +0 -137
  80. build/lib/build/lib/siat/assets_liquidity.py +0 -915
  81. build/lib/build/lib/siat/beta_adjustment.py +0 -1058
  82. build/lib/build/lib/siat/beta_adjustment_china.py +0 -548
  83. build/lib/build/lib/siat/blockchain.py +0 -143
  84. build/lib/build/lib/siat/bond.py +0 -2900
  85. build/lib/build/lib/siat/bond_base.py +0 -992
  86. build/lib/build/lib/siat/bond_china.py +0 -100
  87. build/lib/build/lib/siat/bond_zh_sina.py +0 -143
  88. build/lib/build/lib/siat/capm_beta.py +0 -783
  89. build/lib/build/lib/siat/capm_beta2.py +0 -887
  90. build/lib/build/lib/siat/common.py +0 -5360
  91. build/lib/build/lib/siat/compare_cross.py +0 -642
  92. build/lib/build/lib/siat/copyrights.py +0 -18
  93. build/lib/build/lib/siat/cryptocurrency.py +0 -667
  94. build/lib/build/lib/siat/economy.py +0 -1471
  95. build/lib/build/lib/siat/economy2.py +0 -1853
  96. build/lib/build/lib/siat/esg.py +0 -536
  97. build/lib/build/lib/siat/event_study.py +0 -815
  98. build/lib/build/lib/siat/fama_french.py +0 -1521
  99. build/lib/build/lib/siat/fin_stmt2_yahoo.py +0 -982
  100. build/lib/build/lib/siat/financial_base.py +0 -1160
  101. build/lib/build/lib/siat/financial_statements.py +0 -598
  102. build/lib/build/lib/siat/financials.py +0 -2339
  103. build/lib/build/lib/siat/financials2.py +0 -1278
  104. build/lib/build/lib/siat/financials_china.py +0 -4433
  105. build/lib/build/lib/siat/financials_china2.py +0 -2212
  106. build/lib/build/lib/siat/fund.py +0 -629
  107. build/lib/build/lib/siat/fund_china.py +0 -3307
  108. build/lib/build/lib/siat/future_china.py +0 -551
  109. build/lib/build/lib/siat/google_authenticator.py +0 -47
  110. build/lib/build/lib/siat/grafix.py +0 -3636
  111. build/lib/build/lib/siat/holding_risk.py +0 -867
  112. build/lib/build/lib/siat/luchy_draw.py +0 -638
  113. build/lib/build/lib/siat/market_china.py +0 -1168
  114. build/lib/build/lib/siat/markowitz.py +0 -2363
  115. build/lib/build/lib/siat/markowitz2.py +0 -3150
  116. build/lib/build/lib/siat/markowitz2_20250704.py +0 -2969
  117. build/lib/build/lib/siat/markowitz2_20250705.py +0 -3158
  118. build/lib/build/lib/siat/markowitz_simple.py +0 -373
  119. build/lib/build/lib/siat/ml_cases.py +0 -2291
  120. build/lib/build/lib/siat/ml_cases_example.py +0 -60
  121. build/lib/build/lib/siat/option_china.py +0 -3069
  122. build/lib/build/lib/siat/option_pricing.py +0 -1925
  123. build/lib/build/lib/siat/other_indexes.py +0 -409
  124. build/lib/build/lib/siat/risk_adjusted_return.py +0 -1576
  125. build/lib/build/lib/siat/risk_adjusted_return2.py +0 -1900
  126. build/lib/build/lib/siat/risk_evaluation.py +0 -2218
  127. build/lib/build/lib/siat/risk_free_rate.py +0 -351
  128. build/lib/build/lib/siat/sector_china.py +0 -4140
  129. build/lib/build/lib/siat/security_price2.py +0 -727
  130. build/lib/build/lib/siat/security_prices.py +0 -3408
  131. build/lib/build/lib/siat/security_trend.py +0 -402
  132. build/lib/build/lib/siat/security_trend2.py +0 -646
  133. build/lib/build/lib/siat/stock.py +0 -4284
  134. build/lib/build/lib/siat/stock_advice_linear.py +0 -934
  135. build/lib/build/lib/siat/stock_base.py +0 -26
  136. build/lib/build/lib/siat/stock_china.py +0 -2095
  137. build/lib/build/lib/siat/stock_prices_kneighbors.py +0 -910
  138. build/lib/build/lib/siat/stock_prices_linear.py +0 -386
  139. build/lib/build/lib/siat/stock_profile.py +0 -707
  140. build/lib/build/lib/siat/stock_technical.py +0 -3305
  141. build/lib/build/lib/siat/stooq.py +0 -74
  142. build/lib/build/lib/siat/transaction.py +0 -347
  143. build/lib/build/lib/siat/translate.py +0 -5183
  144. build/lib/build/lib/siat/valuation.py +0 -1378
  145. build/lib/build/lib/siat/valuation_china.py +0 -2076
  146. build/lib/build/lib/siat/var_model_validation.py +0 -444
  147. build/lib/build/lib/siat/yf_name.py +0 -811
  148. build/lib/siat/__init__.py +0 -75
  149. build/lib/siat/allin.py +0 -137
  150. build/lib/siat/assets_liquidity.py +0 -915
  151. build/lib/siat/beta_adjustment.py +0 -1058
  152. build/lib/siat/beta_adjustment_china.py +0 -548
  153. build/lib/siat/blockchain.py +0 -143
  154. build/lib/siat/bond.py +0 -2900
  155. build/lib/siat/bond_base.py +0 -992
  156. build/lib/siat/bond_china.py +0 -100
  157. build/lib/siat/bond_zh_sina.py +0 -143
  158. build/lib/siat/capm_beta.py +0 -783
  159. build/lib/siat/capm_beta2.py +0 -887
  160. build/lib/siat/common.py +0 -5360
  161. build/lib/siat/compare_cross.py +0 -642
  162. build/lib/siat/copyrights.py +0 -18
  163. build/lib/siat/cryptocurrency.py +0 -667
  164. build/lib/siat/economy.py +0 -1471
  165. build/lib/siat/economy2.py +0 -1853
  166. build/lib/siat/esg.py +0 -536
  167. build/lib/siat/event_study.py +0 -815
  168. build/lib/siat/fama_french.py +0 -1521
  169. build/lib/siat/fin_stmt2_yahoo.py +0 -982
  170. build/lib/siat/financial_base.py +0 -1160
  171. build/lib/siat/financial_statements.py +0 -598
  172. build/lib/siat/financials.py +0 -2339
  173. build/lib/siat/financials2.py +0 -1278
  174. build/lib/siat/financials_china.py +0 -4433
  175. build/lib/siat/financials_china2.py +0 -2212
  176. build/lib/siat/fund.py +0 -629
  177. build/lib/siat/fund_china.py +0 -3307
  178. build/lib/siat/future_china.py +0 -551
  179. build/lib/siat/google_authenticator.py +0 -47
  180. build/lib/siat/grafix.py +0 -3636
  181. build/lib/siat/holding_risk.py +0 -867
  182. build/lib/siat/luchy_draw.py +0 -638
  183. build/lib/siat/market_china.py +0 -1168
  184. build/lib/siat/markowitz.py +0 -2363
  185. build/lib/siat/markowitz2.py +0 -3150
  186. build/lib/siat/markowitz2_20250704.py +0 -2969
  187. build/lib/siat/markowitz2_20250705.py +0 -3158
  188. build/lib/siat/markowitz_simple.py +0 -373
  189. build/lib/siat/ml_cases.py +0 -2291
  190. build/lib/siat/ml_cases_example.py +0 -60
  191. build/lib/siat/option_china.py +0 -3069
  192. build/lib/siat/option_pricing.py +0 -1925
  193. build/lib/siat/other_indexes.py +0 -409
  194. build/lib/siat/risk_adjusted_return.py +0 -1576
  195. build/lib/siat/risk_adjusted_return2.py +0 -1900
  196. build/lib/siat/risk_evaluation.py +0 -2218
  197. build/lib/siat/risk_free_rate.py +0 -351
  198. build/lib/siat/sector_china.py +0 -4140
  199. build/lib/siat/security_price2.py +0 -727
  200. build/lib/siat/security_prices.py +0 -3408
  201. build/lib/siat/security_trend.py +0 -402
  202. build/lib/siat/security_trend2.py +0 -646
  203. build/lib/siat/stock.py +0 -4284
  204. build/lib/siat/stock_advice_linear.py +0 -934
  205. build/lib/siat/stock_base.py +0 -26
  206. build/lib/siat/stock_china.py +0 -2095
  207. build/lib/siat/stock_prices_kneighbors.py +0 -910
  208. build/lib/siat/stock_prices_linear.py +0 -386
  209. build/lib/siat/stock_profile.py +0 -707
  210. build/lib/siat/stock_technical.py +0 -3305
  211. build/lib/siat/stooq.py +0 -74
  212. build/lib/siat/transaction.py +0 -347
  213. build/lib/siat/translate.py +0 -5183
  214. build/lib/siat/valuation.py +0 -1378
  215. build/lib/siat/valuation_china.py +0 -2076
  216. build/lib/siat/var_model_validation.py +0 -444
  217. build/lib/siat/yf_name.py +0 -811
  218. siat-3.10.132.dist-info/RECORD +0 -218
@@ -1,235 +1,232 @@
1
- Metadata-Version: 2.4
2
- Name: siat
3
- Version: 3.10.132
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.12
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
- Dynamic: author
52
- Dynamic: home-page
53
- Dynamic: license-file
54
-
55
-
56
- # What is siat?
57
- 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.
58
-
59
- 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.
60
- # Version naming
61
- Version structure: X.Y.Z
62
-
63
- X is the major version for architecture upgrade only.
64
- Y is the functional version for functional enhancements.
65
- Z is the minor version just for bug fixing.
66
-
67
- # Quick examples of using siat
68
-
69
-
70
- ```python
71
- # Enable siat
72
- from siat import *
73
- ```
74
-
75
-
76
- ```python
77
- # Set language to English, default is Chinese
78
- set_language("English")
79
- ```
80
-
81
- ## Example 1: Apple stock price for the recent month
82
-
83
-
84
- ```python
85
- # Simple way: show Apple's stock price in recent month
86
- apple=security_trend("AAPL")
87
- ```
88
- 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:
89
-
90
- ```python
91
- apple=security_trend("AAPL", start="MRY",
92
- mark_top=True, mark_bottom=True, mark_end=True,
93
- average_value=True)
94
- ```
95
-
96
- ## Example 2: Comparing Price changes among Apple, Microsoft and NVidia
97
- You may expect compare the price changes for the recent quarter (MRQ) for the three stocks.
98
-
99
- 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.
100
-
101
- ```python
102
- comp=security_trend(['AAPL','MSFT','NVDA'],
103
- start='MRQ',
104
- indicator='Adj Close',
105
- preprocess='scaling', #use scaling drawing method to avoid loss of details
106
- mark_top=True, mark_bottom=True,
107
- annotate=True, annotate_value=True)
108
- ```
109
-
110
- ## Example 4: Bollinger band for Apple in the recent quarter
111
-
112
-
113
- ```python
114
- # security_technical only supports 4 popular technical indicators: MACD, Bollinger, KDJ and RSI.
115
- apple=security_technical("AAPL",
116
- technical="Bollinger",
117
- start="MRQ",
118
- facecolor="white",
119
- loc1="upper left", loc2="lower right")
120
- ```
121
-
122
- ## Example 5: CCI for Apple in recent quarter
123
-
124
-
125
- ```python
126
- # security_technical2 supports up to 14 popular technical indicators.
127
- # security_technical2 uses a simplied drawing method (Dehong graph) to avoid trypophobia [ˌtrɪpəu'fəʊbjə]
128
- apple=security_technical2("AAPL",
129
- technical="CCI",
130
- start="MRM",
131
- loc1="upper left", loc2="lower right")
132
- ```
133
-
134
- # What security products does siat support?
135
- 1. Public company profile: world-wide
136
- 2. Stock & stock market index: world-wide
137
- 3. Stock valuation: primarily in China (mainland and HK) and the U.S.
138
- 4. Stock option chain: primarily in the U.S.
139
- 5. Bond: primarily in China and the U.S.
140
- 6. Markowitz portfolio: with all the supported stocks and bonds
141
- 7. Fund: primarily in China and the U.S.
142
- 8. Futures: primarily in China and the U.S.
143
- 9. Options: primarily in China and the U.S.
144
- 10. Digital currency: world-wide (some may be restricted by data sources)
145
- 11. Balance sheet: in China (full function) and world-wide (basic function)
146
- 12. Income statement: in China mainland (full function) and world-wide (basic function)
147
- 13. Cash flow statement: in China mainland (full function) and world-wide (basic function)
148
- 14. DuPont Identity: world-wide
149
- 15. Sector trend and valuation: primarily in China
150
- # What analytical methods does siat support?
151
- 1. Trend analysis
152
- 2. Panel comparation
153
- 3. Return analysis: rolling returns, holding period returns
154
- 4. Risk analysis: rolling volatility, holding period volatility, LPSD
155
- 5. Technical analysis: more than 15 indicators
156
- 6. Risk-adjusted return: Sharpe ratio, Sortino ratio, Treynor ratio, Jensen alpha
157
- 7. Portfolio optimization: four risk-adjusted returns
158
- 8. CAPM beta trend
159
- 9. Beta adjustments: simple adjustment, Scholes-Williams, Dimson
160
- 10. Beta leverage: Hamada Model
161
- 11. Fama-French three-factor model
162
- 12. Fama-French-Carhart four-factor model
163
- 13. Fama-French five-factor model
164
- 14. Future pricing
165
- 15. Option pricing: European style, American style, with/without dividends
166
- 16. VaR & ES: variance-covariance, historic simulation, Monte Carlo, multiple periods
167
- 17. Liquidity risk: Roll spread, Amihud, Pastor-Stambaugh
168
- 18. ESG: basic functions
169
- # Do I have to download data first before using siat?
170
- NO!
171
- siat will search the internet data sources for all the required data during analysis.
172
- The main data sources siat uses:
173
- 1. Yahoo Finance
174
- 2. Sina Finance
175
- 3. East Money
176
- 4. Stooq (Polish)
177
- 5. FRED
178
- 6. OECD
179
- 7. IMF
180
- 8. Shanghai Stock Exchange
181
- 9. Shenzhen Stock Exchange
182
- 10. Hong Kong Stock Exchange
183
- 11. Beijing Stock Exchange
184
- 12. Tokyo Stock Exchange
185
- 13. London Stock Exchange
186
- 14. New York Stock Exchange
187
- 15. NASDAQ
188
- 16. Sustainalytics
189
-
190
- Thanks the above websites for their valuable data!
191
- # How to install siat?
192
- The author strongly recommends using siat together with Jupyter Notebook or Jupyter Lab in Anaconda.
193
- In order to install siat for the very first time, open a Jupyter Notebook, and type in the following command:
194
-
195
- !pip install siat
196
-
197
- 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:
198
-
199
- pip install siat
200
- # How to upgrade siat?
201
- In Jupyter Notebook or Jupyter Lab:
202
-
203
- upgrade_siat()
204
-
205
- If you suffer from slow internet connection (often in campus classrooms with many students), try to use alternative sources, such as:
206
-
207
- upgrade_siat(alternative="tsinghua")
208
-
209
- upgrade_siat(alternative="alibaba")
210
-
211
- If the above methods do not work for your environment, you have to goto the traditional ways to use command-line script, such as:
212
-
213
- pip install --upgrade siat
214
-
215
- *** For users in China
216
- The pypi mirror websites may provide siat installing and upgrading in a much faster speed in the following commands: taking aliyun as an example
217
-
218
- pip install siat -i https://mirrors.aliyun.com/pypi/simple/
219
-
220
- pip install --upgrade siat https://mirrors.aliyun.com/pypi/simple/
221
-
222
- *** Warning
223
- 1. The pip command itself may need upgrade as well.
224
- 2. The pip command sometimes may have conflicts with some vpn programs.
225
- If in this case, try quit vpn program first, and try again.
226
- # Are there more detailed case studies on using siat?
227
- YES!
228
-
229
- There are hundreds of video case studies in the author's channel (most in Chinese, some in English).
230
-
231
- https://space.bilibili.com/284812153
232
-
233
- Welcome to follow the channel!
234
- # How to report a bug or look for help?
235
- Write to the author, Prof. WANG Dehong, wdehong2000@163.com
1
+ Metadata-Version: 2.1
2
+ Name: siat
3
+ Version: 3.10.133
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.12
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
+
52
+
53
+ # What is siat?
54
+ 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.
55
+
56
+ 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.
57
+ # Version naming
58
+ Version structure: X.Y.Z
59
+
60
+ X is the major version for architecture upgrade only.
61
+ Y is the functional version for functional enhancements.
62
+ Z is the minor version just for bug fixing.
63
+
64
+ # Quick examples of using siat
65
+
66
+
67
+ ```python
68
+ # Enable siat
69
+ from siat import *
70
+ ```
71
+
72
+
73
+ ```python
74
+ # Set language to English, default is Chinese
75
+ set_language("English")
76
+ ```
77
+
78
+ ## Example 1: Apple stock price for the recent month
79
+
80
+
81
+ ```python
82
+ # Simple way: show Apple's stock price in recent month
83
+ apple=security_trend("AAPL")
84
+ ```
85
+ 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:
86
+
87
+ ```python
88
+ apple=security_trend("AAPL", start="MRY",
89
+ mark_top=True, mark_bottom=True, mark_end=True,
90
+ average_value=True)
91
+ ```
92
+
93
+ ## Example 2: Comparing Price changes among Apple, Microsoft and NVidia
94
+ You may expect compare the price changes for the recent quarter (MRQ) for the three stocks.
95
+
96
+ 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.
97
+
98
+ ```python
99
+ comp=security_trend(['AAPL','MSFT','NVDA'],
100
+ start='MRQ',
101
+ indicator='Adj Close',
102
+ preprocess='scaling', #use scaling drawing method to avoid loss of details
103
+ mark_top=True, mark_bottom=True,
104
+ annotate=True, annotate_value=True)
105
+ ```
106
+
107
+ ## Example 4: Bollinger band for Apple in the recent quarter
108
+
109
+
110
+ ```python
111
+ # security_technical only supports 4 popular technical indicators: MACD, Bollinger, KDJ and RSI.
112
+ apple=security_technical("AAPL",
113
+ technical="Bollinger",
114
+ start="MRQ",
115
+ facecolor="white",
116
+ loc1="upper left", loc2="lower right")
117
+ ```
118
+
119
+ ## Example 5: CCI for Apple in recent quarter
120
+
121
+
122
+ ```python
123
+ # security_technical2 supports up to 14 popular technical indicators.
124
+ # security_technical2 uses a simplied drawing method (Dehong graph) to avoid trypophobia [ˌtrɪpəu'fəʊbjə]
125
+ apple=security_technical2("AAPL",
126
+ technical="CCI",
127
+ start="MRM",
128
+ loc1="upper left", loc2="lower right")
129
+ ```
130
+
131
+ # What security products does siat support?
132
+ 1. Public company profile: world-wide
133
+ 2. Stock & stock market index: world-wide
134
+ 3. Stock valuation: primarily in China (mainland and HK) and the U.S.
135
+ 4. Stock option chain: primarily in the U.S.
136
+ 5. Bond: primarily in China and the U.S.
137
+ 6. Markowitz portfolio: with all the supported stocks and bonds
138
+ 7. Fund: primarily in China and the U.S.
139
+ 8. Futures: primarily in China and the U.S.
140
+ 9. Options: primarily in China and the U.S.
141
+ 10. Digital currency: world-wide (some may be restricted by data sources)
142
+ 11. Balance sheet: in China (full function) and world-wide (basic function)
143
+ 12. Income statement: in China mainland (full function) and world-wide (basic function)
144
+ 13. Cash flow statement: in China mainland (full function) and world-wide (basic function)
145
+ 14. DuPont Identity: world-wide
146
+ 15. Sector trend and valuation: primarily in China
147
+ # What analytical methods does siat support?
148
+ 1. Trend analysis
149
+ 2. Panel comparation
150
+ 3. Return analysis: rolling returns, holding period returns
151
+ 4. Risk analysis: rolling volatility, holding period volatility, LPSD
152
+ 5. Technical analysis: more than 15 indicators
153
+ 6. Risk-adjusted return: Sharpe ratio, Sortino ratio, Treynor ratio, Jensen alpha
154
+ 7. Portfolio optimization: four risk-adjusted returns
155
+ 8. CAPM beta trend
156
+ 9. Beta adjustments: simple adjustment, Scholes-Williams, Dimson
157
+ 10. Beta leverage: Hamada Model
158
+ 11. Fama-French three-factor model
159
+ 12. Fama-French-Carhart four-factor model
160
+ 13. Fama-French five-factor model
161
+ 14. Future pricing
162
+ 15. Option pricing: European style, American style, with/without dividends
163
+ 16. VaR & ES: variance-covariance, historic simulation, Monte Carlo, multiple periods
164
+ 17. Liquidity risk: Roll spread, Amihud, Pastor-Stambaugh
165
+ 18. ESG: basic functions
166
+ # Do I have to download data first before using siat?
167
+ NO!
168
+ siat will search the internet data sources for all the required data during analysis.
169
+ The main data sources siat uses:
170
+ 1. Yahoo Finance
171
+ 2. Sina Finance
172
+ 3. East Money
173
+ 4. Stooq (Polish)
174
+ 5. FRED
175
+ 6. OECD
176
+ 7. IMF
177
+ 8. Shanghai Stock Exchange
178
+ 9. Shenzhen Stock Exchange
179
+ 10. Hong Kong Stock Exchange
180
+ 11. Beijing Stock Exchange
181
+ 12. Tokyo Stock Exchange
182
+ 13. London Stock Exchange
183
+ 14. New York Stock Exchange
184
+ 15. NASDAQ
185
+ 16. Sustainalytics
186
+
187
+ Thanks the above websites for their valuable data!
188
+ # How to install siat?
189
+ The author strongly recommends using siat together with Jupyter Notebook or Jupyter Lab in Anaconda.
190
+ In order to install siat for the very first time, open a Jupyter Notebook, and type in the following command:
191
+
192
+ !pip install siat
193
+
194
+ 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:
195
+
196
+ pip install siat
197
+ # How to upgrade siat?
198
+ In Jupyter Notebook or Jupyter Lab:
199
+
200
+ upgrade_siat()
201
+
202
+ If you suffer from slow internet connection (often in campus classrooms with many students), try to use alternative sources, such as:
203
+
204
+ upgrade_siat(alternative="tsinghua")
205
+
206
+ upgrade_siat(alternative="alibaba")
207
+
208
+ If the above methods do not work for your environment, you have to goto the traditional ways to use command-line script, such as:
209
+
210
+ pip install --upgrade siat
211
+
212
+ *** For users in China
213
+ The pypi mirror websites may provide siat installing and upgrading in a much faster speed in the following commands: taking aliyun as an example
214
+
215
+ pip install siat -i https://mirrors.aliyun.com/pypi/simple/
216
+
217
+ pip install --upgrade siat https://mirrors.aliyun.com/pypi/simple/
218
+
219
+ *** Warning
220
+ 1. The pip command itself may need upgrade as well.
221
+ 2. The pip command sometimes may have conflicts with some vpn programs.
222
+ If in this case, try quit vpn program first, and try again.
223
+ # Are there more detailed case studies on using siat?
224
+ YES!
225
+
226
+ There are hundreds of video case studies in the author's channel (most in Chinese, some in English).
227
+
228
+ https://space.bilibili.com/284812153
229
+
230
+ Welcome to follow the channel!
231
+ # How to report a bug or look for help?
232
+ Write to the author, Prof. WANG Dehong, wdehong2000@163.com
@@ -0,0 +1,78 @@
1
+ siat/__init__.py,sha256=Y21NfAoDxQ3srK1tK-j8EQHzovAA4V_0ntqH8Sa_1E0,2236
2
+ siat/allin.py,sha256=--32Bt2Mfg7l38w7X9cLJCdWtYRB3tTtVHnS9WnqKDI,3035
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=4g8pOFCwFrEpLx2NJbhL2nl_nrWaOwgbPCHx1G6P_tI,35949
13
+ siat/common.py,sha256=PctlUcwb7MheTR-Ync-4hYWjPidsT9LufEsZXNJqbjw,193728
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=TvmbEAsdWKOJA5JK8xcwQz0vnoqq67AtGbRWbw-Vosk,145100
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=elpZr1nsALlrdxbMPT7pBREpA6I5P7TL6qpuLmMKPA8,133215
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=U1iKADTnWjywCkABPtr6tICYY8zmiLZyuENMLV0yMZk,87216
51
+ siat/risk_evaluation.py,sha256=xfgLSKlIWYmRJrIL4kn2k2hp9fyOMAzYGIhi9ImvKOw,88917
52
+ siat/risk_free_rate.py,sha256=IBuRqA2kppdZsW4D4fapW7vnM5HMEXOn95A5r9Pkwlo,12384
53
+ siat/sector_china.py,sha256=uLsDXdRBDVfgG6tnXWnQOTyDmyZfglVO9DRUYU2e3pk,157914
54
+ siat/security_price2.py,sha256=DDiZ2dlv_TYPLhA8-gGb9i9xrl88r4rgSMEcxqQ6aU0,28065
55
+ siat/security_prices.py,sha256=vbz85xjxMBFfipTcmF4ZnpOODnOKuEm4NfTKMi1C3OY,124171
56
+ siat/security_trend.py,sha256=o0vpWdrJkmODCP94X-Bvn-w7efHhj9HpUYBHtLl55D0,17240
57
+ siat/security_trend2.py,sha256=czagiFIU3A3ow_dMn_-xQYnzgSTOP5Ds38PtHC1uyP0,31762
58
+ siat/stock.py,sha256=ufhC3CWfx6KEDgCSTSwplf1EAi8AIlKmy6kdkoBAkbE,161426
59
+ siat/stock_advice_linear.py,sha256=-twT7IGP-NEplkL1WPSACcNJjggRB2j4mlAQCkzOAuo,31655
60
+ siat/stock_base.py,sha256=uISvbRyOGy8p9QREA96CVydgflBkn5L3OXOGKl8oanc,1312
61
+ siat/stock_china.py,sha256=vHIc2UuXIGRkRvyL4fjTaNAoyFaq022p9FxPah6dscI,96399
62
+ siat/stock_info.pickle,sha256=XqcFwQrXoBXAzZnE6rnfpI7zETXZS2usqzsx2ff7MEg,1319005
63
+ siat/stock_prices_kneighbors.py,sha256=WfZvo5EyeBsm-T37zDj7Sl9dPSRq5Bx4JxIJ9IUum6s,36738
64
+ siat/stock_prices_linear.py,sha256=-OUKRr27L2aStQgJSlJOrJ4gay_G7P-m-7t7cU2Yoqk,13991
65
+ siat/stock_profile.py,sha256=BuvdrQ3bqIAUCaM2GxPR6_rUhigQQa_YMeUov2zY6Y0,26084
66
+ siat/stock_technical.py,sha256=1P4FkOTPknG2m18NTgwMxN-NgwIAdW3qR09VoFz00Hc,140928
67
+ siat/stooq.py,sha256=TTLjAAp-TcoEezgCPu6eM_5naI4yCshp1S7V3pyc-og,2519
68
+ siat/transaction.py,sha256=nZTYYkx1BVBLDovSlZCtcviRuFxrYe9YFXOMZgo6QXo,14563
69
+ siat/translate.py,sha256=6mHTT6sWo12TNYJMo7CYF9ysFa_tCAQd5ePci9Xv3YI,263531
70
+ siat/valuation.py,sha256=xGizcKJZ3ADLWWHm2TFQub18FxiDv2doQwBwbEqyqz0,51980
71
+ siat/valuation_china.py,sha256=eSKIDckyjG8QkENlW_OKkqbQHno8pzDcomBO9iGNJVM,83079
72
+ siat/var_model_validation.py,sha256=loqziBYO2p0xkeWm3Rb1rJsDhbcgAZ5aR9rBLRwLU5E,17624
73
+ siat/yf_name.py,sha256=laNKMTZ9hdenGX3IZ7G0a2RLBKEWtUQJFY9CWuk_fp8,24058
74
+ siat-3.10.133.dist-info/LICENSE,sha256=NTEMMROY9_4U1szoKC3N2BLHcDd_o5uTgqdVH8tbApw,1071
75
+ siat-3.10.133.dist-info/METADATA,sha256=9y4HQxe8Jl1vjMqwkIDruTWGU6GMpHI49LDTHSeUW50,8538
76
+ siat-3.10.133.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
77
+ siat-3.10.133.dist-info/top_level.txt,sha256=X5R8wrVviq8agwJFVRVDsufkuOJuit-1qAT_kXeptrY,17
78
+ siat-3.10.133.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,4 +1,3 @@
1
1
  README
2
- build
3
2
  dist
4
3
  siat
@@ -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
- #==============================================================================