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.
Files changed (221) hide show
  1. siat/__init__.py +0 -0
  2. siat/allin.py +8 -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 +4 -4
  13. siat/common.py +9 -6
  14. siat/compare_cross.py +0 -0
  15. siat/copyrights.py +0 -0
  16. siat/cryptocurrency.py +0 -0
  17. siat/economy.py +0 -0
  18. siat/economy2.py +0 -0
  19. siat/esg.py +0 -0
  20. siat/event_study.py +0 -0
  21. siat/exchange_bond_china.pickle +0 -0
  22. siat/fama_french.py +0 -0
  23. siat/fin_stmt2_yahoo.py +0 -0
  24. siat/financial_base.py +0 -0
  25. siat/financial_statements.py +0 -0
  26. siat/financials.py +0 -0
  27. siat/financials2.py +0 -0
  28. siat/financials_china.py +0 -0
  29. siat/financials_china2.py +0 -0
  30. siat/fund.py +0 -0
  31. siat/fund_china.pickle +0 -0
  32. siat/fund_china.py +0 -0
  33. siat/future_china.py +0 -0
  34. siat/google_authenticator.py +0 -0
  35. siat/grafix.py +55 -4
  36. siat/holding_risk.py +0 -0
  37. siat/luchy_draw.py +0 -0
  38. siat/market_china.py +0 -0
  39. siat/markowitz.py +0 -0
  40. siat/markowitz2.py +1 -0
  41. siat/markowitz2_20250704.py +0 -0
  42. siat/markowitz2_20250705.py +0 -0
  43. siat/markowitz_simple.py +0 -0
  44. siat/ml_cases.py +0 -0
  45. siat/ml_cases_example.py +0 -0
  46. siat/option_china.py +0 -0
  47. siat/option_pricing.py +0 -0
  48. siat/other_indexes.py +0 -0
  49. siat/risk_adjusted_return.py +0 -0
  50. siat/risk_adjusted_return2.py +8 -4
  51. siat/risk_evaluation.py +0 -0
  52. siat/risk_free_rate.py +0 -0
  53. siat/save2docx.py +345 -0
  54. siat/save2pdf.py +145 -0
  55. siat/sector_china.py +0 -0
  56. siat/security_price2.py +0 -0
  57. siat/security_prices.py +168 -6
  58. siat/security_trend.py +0 -0
  59. siat/security_trend2.py +2 -2
  60. siat/stock.py +11 -1
  61. siat/stock_advice_linear.py +0 -0
  62. siat/stock_base.py +0 -0
  63. siat/stock_china.py +0 -0
  64. siat/stock_info.pickle +0 -0
  65. siat/stock_prices_kneighbors.py +0 -0
  66. siat/stock_prices_linear.py +0 -0
  67. siat/stock_profile.py +0 -0
  68. siat/stock_technical.py +0 -0
  69. siat/stooq.py +0 -0
  70. siat/transaction.py +0 -0
  71. siat/translate.py +0 -0
  72. siat/valuation.py +0 -0
  73. siat/valuation_china.py +0 -0
  74. siat/var_model_validation.py +0 -0
  75. siat/yf_name.py +0 -0
  76. {siat-3.10.132.dist-info/licenses → siat-3.11.1.dist-info}/LICENSE +0 -0
  77. {siat-3.10.132.dist-info → siat-3.11.1.dist-info}/METADATA +234 -235
  78. siat-3.11.1.dist-info/RECORD +80 -0
  79. {siat-3.10.132.dist-info → siat-3.11.1.dist-info}/WHEEL +1 -1
  80. {siat-3.10.132.dist-info → siat-3.11.1.dist-info}/top_level.txt +0 -1
  81. build/lib/build/lib/siat/__init__.py +0 -75
  82. build/lib/build/lib/siat/allin.py +0 -137
  83. build/lib/build/lib/siat/assets_liquidity.py +0 -915
  84. build/lib/build/lib/siat/beta_adjustment.py +0 -1058
  85. build/lib/build/lib/siat/beta_adjustment_china.py +0 -548
  86. build/lib/build/lib/siat/blockchain.py +0 -143
  87. build/lib/build/lib/siat/bond.py +0 -2900
  88. build/lib/build/lib/siat/bond_base.py +0 -992
  89. build/lib/build/lib/siat/bond_china.py +0 -100
  90. build/lib/build/lib/siat/bond_zh_sina.py +0 -143
  91. build/lib/build/lib/siat/capm_beta.py +0 -783
  92. build/lib/build/lib/siat/capm_beta2.py +0 -887
  93. build/lib/build/lib/siat/common.py +0 -5360
  94. build/lib/build/lib/siat/compare_cross.py +0 -642
  95. build/lib/build/lib/siat/copyrights.py +0 -18
  96. build/lib/build/lib/siat/cryptocurrency.py +0 -667
  97. build/lib/build/lib/siat/economy.py +0 -1471
  98. build/lib/build/lib/siat/economy2.py +0 -1853
  99. build/lib/build/lib/siat/esg.py +0 -536
  100. build/lib/build/lib/siat/event_study.py +0 -815
  101. build/lib/build/lib/siat/fama_french.py +0 -1521
  102. build/lib/build/lib/siat/fin_stmt2_yahoo.py +0 -982
  103. build/lib/build/lib/siat/financial_base.py +0 -1160
  104. build/lib/build/lib/siat/financial_statements.py +0 -598
  105. build/lib/build/lib/siat/financials.py +0 -2339
  106. build/lib/build/lib/siat/financials2.py +0 -1278
  107. build/lib/build/lib/siat/financials_china.py +0 -4433
  108. build/lib/build/lib/siat/financials_china2.py +0 -2212
  109. build/lib/build/lib/siat/fund.py +0 -629
  110. build/lib/build/lib/siat/fund_china.py +0 -3307
  111. build/lib/build/lib/siat/future_china.py +0 -551
  112. build/lib/build/lib/siat/google_authenticator.py +0 -47
  113. build/lib/build/lib/siat/grafix.py +0 -3636
  114. build/lib/build/lib/siat/holding_risk.py +0 -867
  115. build/lib/build/lib/siat/luchy_draw.py +0 -638
  116. build/lib/build/lib/siat/market_china.py +0 -1168
  117. build/lib/build/lib/siat/markowitz.py +0 -2363
  118. build/lib/build/lib/siat/markowitz2.py +0 -3150
  119. build/lib/build/lib/siat/markowitz2_20250704.py +0 -2969
  120. build/lib/build/lib/siat/markowitz2_20250705.py +0 -3158
  121. build/lib/build/lib/siat/markowitz_simple.py +0 -373
  122. build/lib/build/lib/siat/ml_cases.py +0 -2291
  123. build/lib/build/lib/siat/ml_cases_example.py +0 -60
  124. build/lib/build/lib/siat/option_china.py +0 -3069
  125. build/lib/build/lib/siat/option_pricing.py +0 -1925
  126. build/lib/build/lib/siat/other_indexes.py +0 -409
  127. build/lib/build/lib/siat/risk_adjusted_return.py +0 -1576
  128. build/lib/build/lib/siat/risk_adjusted_return2.py +0 -1900
  129. build/lib/build/lib/siat/risk_evaluation.py +0 -2218
  130. build/lib/build/lib/siat/risk_free_rate.py +0 -351
  131. build/lib/build/lib/siat/sector_china.py +0 -4140
  132. build/lib/build/lib/siat/security_price2.py +0 -727
  133. build/lib/build/lib/siat/security_prices.py +0 -3408
  134. build/lib/build/lib/siat/security_trend.py +0 -402
  135. build/lib/build/lib/siat/security_trend2.py +0 -646
  136. build/lib/build/lib/siat/stock.py +0 -4284
  137. build/lib/build/lib/siat/stock_advice_linear.py +0 -934
  138. build/lib/build/lib/siat/stock_base.py +0 -26
  139. build/lib/build/lib/siat/stock_china.py +0 -2095
  140. build/lib/build/lib/siat/stock_prices_kneighbors.py +0 -910
  141. build/lib/build/lib/siat/stock_prices_linear.py +0 -386
  142. build/lib/build/lib/siat/stock_profile.py +0 -707
  143. build/lib/build/lib/siat/stock_technical.py +0 -3305
  144. build/lib/build/lib/siat/stooq.py +0 -74
  145. build/lib/build/lib/siat/transaction.py +0 -347
  146. build/lib/build/lib/siat/translate.py +0 -5183
  147. build/lib/build/lib/siat/valuation.py +0 -1378
  148. build/lib/build/lib/siat/valuation_china.py +0 -2076
  149. build/lib/build/lib/siat/var_model_validation.py +0 -444
  150. build/lib/build/lib/siat/yf_name.py +0 -811
  151. build/lib/siat/__init__.py +0 -75
  152. build/lib/siat/allin.py +0 -137
  153. build/lib/siat/assets_liquidity.py +0 -915
  154. build/lib/siat/beta_adjustment.py +0 -1058
  155. build/lib/siat/beta_adjustment_china.py +0 -548
  156. build/lib/siat/blockchain.py +0 -143
  157. build/lib/siat/bond.py +0 -2900
  158. build/lib/siat/bond_base.py +0 -992
  159. build/lib/siat/bond_china.py +0 -100
  160. build/lib/siat/bond_zh_sina.py +0 -143
  161. build/lib/siat/capm_beta.py +0 -783
  162. build/lib/siat/capm_beta2.py +0 -887
  163. build/lib/siat/common.py +0 -5360
  164. build/lib/siat/compare_cross.py +0 -642
  165. build/lib/siat/copyrights.py +0 -18
  166. build/lib/siat/cryptocurrency.py +0 -667
  167. build/lib/siat/economy.py +0 -1471
  168. build/lib/siat/economy2.py +0 -1853
  169. build/lib/siat/esg.py +0 -536
  170. build/lib/siat/event_study.py +0 -815
  171. build/lib/siat/fama_french.py +0 -1521
  172. build/lib/siat/fin_stmt2_yahoo.py +0 -982
  173. build/lib/siat/financial_base.py +0 -1160
  174. build/lib/siat/financial_statements.py +0 -598
  175. build/lib/siat/financials.py +0 -2339
  176. build/lib/siat/financials2.py +0 -1278
  177. build/lib/siat/financials_china.py +0 -4433
  178. build/lib/siat/financials_china2.py +0 -2212
  179. build/lib/siat/fund.py +0 -629
  180. build/lib/siat/fund_china.py +0 -3307
  181. build/lib/siat/future_china.py +0 -551
  182. build/lib/siat/google_authenticator.py +0 -47
  183. build/lib/siat/grafix.py +0 -3636
  184. build/lib/siat/holding_risk.py +0 -867
  185. build/lib/siat/luchy_draw.py +0 -638
  186. build/lib/siat/market_china.py +0 -1168
  187. build/lib/siat/markowitz.py +0 -2363
  188. build/lib/siat/markowitz2.py +0 -3150
  189. build/lib/siat/markowitz2_20250704.py +0 -2969
  190. build/lib/siat/markowitz2_20250705.py +0 -3158
  191. build/lib/siat/markowitz_simple.py +0 -373
  192. build/lib/siat/ml_cases.py +0 -2291
  193. build/lib/siat/ml_cases_example.py +0 -60
  194. build/lib/siat/option_china.py +0 -3069
  195. build/lib/siat/option_pricing.py +0 -1925
  196. build/lib/siat/other_indexes.py +0 -409
  197. build/lib/siat/risk_adjusted_return.py +0 -1576
  198. build/lib/siat/risk_adjusted_return2.py +0 -1900
  199. build/lib/siat/risk_evaluation.py +0 -2218
  200. build/lib/siat/risk_free_rate.py +0 -351
  201. build/lib/siat/sector_china.py +0 -4140
  202. build/lib/siat/security_price2.py +0 -727
  203. build/lib/siat/security_prices.py +0 -3408
  204. build/lib/siat/security_trend.py +0 -402
  205. build/lib/siat/security_trend2.py +0 -646
  206. build/lib/siat/stock.py +0 -4284
  207. build/lib/siat/stock_advice_linear.py +0 -934
  208. build/lib/siat/stock_base.py +0 -26
  209. build/lib/siat/stock_china.py +0 -2095
  210. build/lib/siat/stock_prices_kneighbors.py +0 -910
  211. build/lib/siat/stock_prices_linear.py +0 -386
  212. build/lib/siat/stock_profile.py +0 -707
  213. build/lib/siat/stock_technical.py +0 -3305
  214. build/lib/siat/stooq.py +0 -74
  215. build/lib/siat/transaction.py +0 -347
  216. build/lib/siat/translate.py +0 -5183
  217. build/lib/siat/valuation.py +0 -1378
  218. build/lib/siat/valuation_china.py +0 -2076
  219. build/lib/siat/var_model_validation.py +0 -444
  220. build/lib/siat/yf_name.py +0 -811
  221. siat-3.10.132.dist-info/RECORD +0 -218
@@ -1,235 +1,234 @@
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.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,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
- #==============================================================================