Metadata-Version: 2.1
Name: siat
Version: 3.4.9
Summary: Securities Investment Analysis Tools (siat)
Home-page: https://pypi.org/project/siat/
Author: Prof. WANG Dehong, International Business School, Beijing Foreign Studies University
Author-email: wdehong2000@163.com
License: Copyright (C) WANG Dehong, 2024. For educational purpose only!
Description-Content-Type: text/markdown
Requires-Dist: pandas-datareader
Requires-Dist: yfinance
Requires-Dist: tqdm
Requires-Dist: plotly-express
Requires-Dist: akshare
Requires-Dist: urllib3
Requires-Dist: mplfinance
Requires-Dist: statsmodels
Requires-Dist: yahoo-earnings-calendar
Requires-Dist: yahooquery
Requires-Dist: pypinyin
Requires-Dist: seaborn
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: pandas
Requires-Dist: scikit-learn
Requires-Dist: baostock
Requires-Dist: pyproject.toml
Requires-Dist: pathlib
Requires-Dist: ruamel-yaml
Requires-Dist: prettytable
Requires-Dist: graphviz
Requires-Dist: luddite
Requires-Dist: pendulum
Requires-Dist: itables
Requires-Dist: py-trans
Requires-Dist: bottleneck

<center><font size=6>Welcome to SIAT

# What is siat?
siat is a Python plug-in for security investment analysis, specially designed for teaching and learning purposes in universities for undergraduate and postgraduate programs.

Most of the results by siat are in the form of figures and/or tables.
# Version history
Version structure: X.Y.Z

X is the major version for architecture upgrade only.
Y is the functional version for functional enhancement.
Z is the minor version just for bug fixing.
# Quick examples of using siat


```python
# Enable siat
from siat import *
```


```python
# Set language to English, default is Chinese
set_language("English")
```

## Example 1: Apple stock price for the recent month


```python
# Simple way: show Apple's stock price in recent month
apple=security_trend("AAPL")
```
You may expect to more information, such as price trend in a recent year (MRY), with the high/low point, current price and average price, like below:

```python
apple=security_trend("AAPL", start="MRY",
                     mark_top=True, mark_bottom=True, mark_end=True,
                     average_value=True)
```

## Example 2: Comparing Price changes among Apple, Microsoft and NVidia 
You may expect compare the price changes for the recent quarter (MRQ) for the three stocks.

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.

```python
comp=security_trend(['AAPL','MSFT','NVDA'], 
                    start='MRQ', 
                    indicator='Adj Close', 
                    preprocess='scaling', 
                    mark_top=True, mark_bottom=True, 
                    annotate=True, annotate_value=True)
```

## Example 4: Bollinger band for Apple in the recent quarter


```python
# Script security_technical only supports 4 popular technical indicators: MACD, Bollinger band, KDJ and RSI. 

apple=security_technical("AAPL",
                         technical="Bollinger",
                         start="MRQ",
                         facecolor="white",
                         loc1="upper left", loc2="lower right")
```

## Example 5: CCI for Apple in recent quarter


```python
# Script security_technical2 supports about 20 popular technical methods.

apple=security_technical2("AAPL",
                         technical="CCI",
                         start="MRM",
                         loc1="upper left", loc2="lower right")
```

# What security product does siat support?
1. Public company profile:  world-wide
2. Stock & stock market index: world-wide
3. Stock valuation: primarily in China (mainland and HK) and the U.S.
4. Stock option chain: primarily in the U.S.
5. Bond: primarily in China and the U.S.
6. Markowitz portfolio: with all the supported stocks and bonds
7. Fund: primarily in China and the U.S.
8. Futures: primarily in China and the U.S.
9. Options: primarily in China and the U.S.
10. Digital currency:  world-wide (some may be restricted by data sources)
11. Balance sheet: in China (full function) and world-wide (basic function)
12. Income statement: in China mainland (full function) and world-wide (basic function)
13. Cash flow statement: in China mainland (full function) and world-wide (basic function)
14. DuPont Identity: world-wide
15. Sector trend and valuation: primarily in China
# What analytical methodology does siat support?
1. Trend analysis
2. Panel comparation
3. Return analysis: rolling returns, holding period returns
4. Risk analysis: rolling volatility, holding period volatility, LPSD
5. Technical analysis: more than 15 indicators
6. Risk-adjusted return: sharpe, sortino, treynor, Jensen alpha
7. Portfolio optimization: four risk-adjusted returns
8. CAPM beta trend
9. Beta adjustments: simple adjustment, Scholes-Williams, Dimson
10. Beta leverage: Hamada Model
11. Fama-French three-factor model
12. Fama-French-Carhart four-factor model
13. Fama-French five-factor model
14. Future pricing
15. Option pricing: European style, American style, with/without dividends
16. VaR & ES: variance-covariance, historic simulation, Monte Carlo, multiple periods
17. Liquidity risk: Roll spread, Amihud, Pastor-Stambaugh
18. ESG: basic functions
# Do I have to download data first before using siat?
NO!
siat will search the internet data sources for all the required data during analysis.
The main data sources siat uses:
1. Yahoo Finance
2. Sina Finance
3. East Money
4. Stooq (Polish)
5. FRED
6. OECD
7. IMF
8. Shanghai Stock Exchange
9. Shenzhen Stock Exchange
10. Tokyo Stock Exchange
11. HKEX
12. Sustainalytics

Thanks the above websites for their valuable data supply!
# How to install siat?
The author strongly recommends using siat together with Jupyter Notebook or Jupyter Lab in Anaconda.
In order to install siat for the very first time, open a Jupyter Notebook, and type in the following command:

!pip install siat

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:

pip install siat
# How to upgrade siat?
In Jupyter Notebook or Jupyter Lab:

upgrade_siat()

If you suffer from slow internet connection (often in campus classrooms with many students), try to use alternative sources, such as:

upgrade_siat(alternative="tsinghua")

upgrade_siat(alternative="alibaba")

If the above methods do not work for your environment, you have to goto the traditional ways to use command-line script, such as:

pip install --upgrade siat

*** For users in China
The pypi mirror websites may provide siat installing and upgrading in a much faster speed in the following commands: taking aliyun as an example

pip install siat -i https://mirrors.aliyun.com/pypi/simple/

pip install --upgrade siat https://mirrors.aliyun.com/pypi/simple/

*** Warning
1. The pip command itself may need upgrade as well.
2. The pip command sometimes may have conflicts with some vpn programs.
If in this case, try quit vpn program, and try again. 
# Are there more detailed case studies on using siat?
YES!

There are hundreds of video case studies in the author's channel (most in Chinese, some in English).

https://space.bilibili.com/284812153

Welcome to follow the channel!
# How to report a bug or look for help?
Write to the author, Prof. WANG Dehong, wdehong2000@163.com
