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