Finance and Quantitative Analysis

2019-05-08

#### Stocks:

Stocks:

  1. Certificates issued by a joint-stock company to its investors; whoever holds shares is a shareholder of the company

Par Value and Market Value

  1. Par value is the face amount printed on the certificate
  2. Market value is the value set by the market

Going Public | IPO:

  1. A company raises capital by issuing additional shares to the public through a stock exchange

The Role of Stocks:

  1. Proof of investment, proof of shareholder status, and the right to voice opinions on how the company is run
  2. Receiving dividends and profiting from trading

Stock Classification

By performance:

  1. Blue chips: stock of companies with strong capital and an excellent reputation
  2. Performance stocks: stock of companies with strong earnings
  3. ST stocks: specially treated stocks — companies with consecutive losses or net assets per share below par value

By listing region:

  1. A shares: listed in mainland China, bought and sold in RMB (T+1, 10% daily price limit)
  2. B shares: listed in mainland China, bought and sold in foreign currency (T+1, T+3)
  3. H shares: listed in Hong Kong, China (T+0, no price limits)
  4. N shares: listed in New York, USA
  5. S shares: listed in Singapore

Structure of the Stock Market

  1. Listed companies
  2. Investors
  3. The securities regulator, the securities industry association, and the exchanges
  4. Securities intermediaries

Exchanges:

  1. Shanghai Stock Exchange:
  • Main board (Shanghai Composite Index)
  1. 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

  1. Internal market factors: the balance of buying and selling pressure
  2. Fundamental factors: the company's revenue and earnings situation
  3. Policy factors

Trading Stocks (A)

  1. Placing orders to buy or sell
  2. Trading days:
  3. 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
  1. T+1 trading rule:
  • Shares bought today cannot be sold until the next trading day

Financial Analysis

  1. Fundamental analysis
  • Macro analysis: national fiscal and monetary policy
  • Industry analysis
  • Company analysis: financial data, earnings reports
  1. Technical analysis
  • Candlestick charts
  • Moving averages
  • KDJ
  • MACD
  • ....

Quantitative Investing

  1. Quantitative investing: using computers and mathematical models to put investment ideas into practice
  2. 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

  1. Analyze, judge, and decide through fixed logic, and trade automatically
  2. Core elements:
  • Stock selection
  • Timing
  • Position management
  • Take-profit and stop-loss
  1. 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

  1. Choices: Excel, SAS, R, Python, Julia
  2. 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
  1. pandas:

numpy

  1. Creation: ndarry
  2. Multi-dimensional arrays
  3. Common attributes:
  • T: transpose of the array
  • dtype: element type
  • size: number of elements
  • ndim: number of dimensions
  • shape: dimension sizes
  • astype: type conversion