Finance and Quantitative Analysis
2019-05-08
#### Stocks:
Stocks:
- Certificates issued by a joint-stock company to its investors; whoever holds shares is a shareholder of the company
Par Value and Market Value
- Par value is the face amount printed on the certificate
- Market value is the value set by the market
Going Public | IPO:
- A company raises capital by issuing additional shares to the public through a stock exchange
The Role of Stocks:
- Proof of investment, proof of shareholder status, and the right to voice opinions on how the company is run
- Receiving dividends and profiting from trading
Stock Classification
By performance:
- Blue chips: stock of companies with strong capital and an excellent reputation
- Performance stocks: stock of companies with strong earnings
- ST stocks: specially treated stocks — companies with consecutive losses or net assets per share below par value
By listing region:
- A shares: listed in mainland China, bought and sold in RMB (T+1, 10% daily price limit)
- B shares: listed in mainland China, bought and sold in foreign currency (T+1, T+3)
- H shares: listed in Hong Kong, China (T+0, no price limits)
- N shares: listed in New York, USA
- S shares: listed in Singapore
Structure of the Stock Market
- Listed companies
- Investors
- The securities regulator, the securities industry association, and the exchanges
- Securities intermediaries
Exchanges:
- Shanghai Stock Exchange:
- Main board (Shanghai Composite Index)
- Shenzhen Stock Exchange:
- Main board: large, mature companies (Shenzhen Component Index)
- SME board: smaller operating scale
- ChiNext: startups in their growth stage
Factors That Move Stock Prices
- Internal market factors: the balance of buying and selling pressure
- Fundamental factors: the company's revenue and earnings situation
- Policy factors
Trading Stocks (A)
- Placing orders to buy or sell
- Trading days:
- Trading hours:
- 9:15-9:25: opening call auction (sets the opening price)
- 9:30-11:30: morning session, continuous auction trading
- 13:00-15:00: afternoon session, continuous auction trading
- 14:57-15:00: closing call auction on the Shenzhen Stock Exchange
- T+1 trading rule:
- Shares bought today cannot be sold until the next trading day
Financial Analysis
- Fundamental analysis
- Macro analysis: national fiscal and monetary policy
- Industry analysis
- Company analysis: financial data, earnings reports
- Technical analysis
- Candlestick charts
- Moving averages
- KDJ
- MACD
- ....
Quantitative Investing
- Quantitative investing: using computers and mathematical models to put investment ideas into practice
- Advantages of quantitative investing:
- Avoids subjective emotion, human weakness, and cognitive bias, making choices more objective
- Multi-angle observation and multi-level models
- Continuously tracks market changes, discovering new statistical models and hunting for trading opportunities
- Once an investment strategy is decided, its results can be verified through backtesting
Quantitative Strategies
- Analyze, judge, and decide through fixed logic, and trade automatically
- Core elements:
- Stock selection
- Timing
- Position management
- Take-profit and stop-loss
- The strategy lifecycle
- Generate ideas
- Implement the strategy: Julia-Python
- Validate the strategy: backtesting - simulated trading
- Live trading
- Optimize the strategy - adopt new strategies
- Inputs:
- Market data
- Financial data
- Custom data
- Investment experience
- Strategy:
- Stock selection
- Timing
- Position management
- Take-profit and stop-loss
- Output
- Buy signals
- Sell signals
- Transaction costs
- Returns
Quantitative Investing with Python
- Choices: Excel, SAS, R, Python, Julia
- numpy: a foundational package for high-performance scientific computing and data analysis
- ndarray:
- Higher-order functions
- Disk I/O tools
- Linear algebra, random number generation, Fourier transforms
- C/C++ integration
- pandas:
numpy
- Creation: ndarry
- Multi-dimensional arrays
- Common attributes:
- T: transpose of the array
- dtype: element type
- size: number of elements
- ndim: number of dimensions
- shape: dimension sizes
- astype: type conversion