當AI遇上財經-利用Graph Neural Network分析財經市場 When AI Meets Finance: Using Graph Neural Network to Analyze Financial Market - William Chang
歡迎來到 PyCon TW 2023 共筆
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
共筆入口:https://hackmd.io/@pycontw/2023
手機版請點選上方 按鈕展開議程列表。
Welcome to PyCon TW 2023 Collaborative Writing
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Collaborative Writing Workplace:https://hackmd.io/@pycontw/2023
Using mobile please tap to unfold the agenda.
Collaborative writing start from below
從這裡開始共筆
Time Series
X 軸是時間的資料
- Non-stationarity
- Stationarity
- Distribution does not change over time
- First-order stationarity
- Second-order stationarity
- As for analysis of time series data, the data has to be at lease first-order stationarity
Why 財經市場難分析?
- Autocorrelation
- corr over time
- no 2nd stationarity
- Exogeneity
- Big env, industry
- eg. industry chain, global eco
- Volatility
- Unexpected events
除了最後一個外,都有方法解決
Autocorrelation & Volatility
Feature
- 資料取Lag(one-period diff)
- Normalization(Min-max scalar)
Model Selection
- CNN
- LSTM
- Forget Gate: tackles gradient …
Exogeneity
Feature
- Economy indices
- 例如可以從FRED取得額外的一些information
Model Selection
Graph Neural Network (GNN)
Graph
- Objects (Nodes) and ther relation (Edges)
- A node in a graph Gt represents an object's present value
- In our case, a stock's/index's value at time t
GNN Variants
- Aggregation:
- taking mean/max/min of the nodes over a graph
- Combination:
- Weights of the edges
- Homogeneous v.s. Heterogeneous
- 常見變種
- GCN (Graph Convolutional Network):
- GraphSAGE
- weighted mean(Aggregation + Combination)
- GAT(Graph Attention Network)
- Mean-pooling
- self-learning heterogeneous edge weight
Data
data preparation and feature extraction
Train/Test Split
- Rolling window (better)
- Wxpanding window
Metrics
- Mean Percentage Error
- Mean Percentage Absolute Error
Model
Below is the part that speaker updated the talk/tutorial after speech
講者於演講後有更新或勘誤投影片的部份
Slide 連結:
https://docs.google.com/presentation/d/1OK_G9lLmiYelaii3hq35xomRYOiVGJW_SZNuI6DuRx4/edit?usp=sharing