Post on 21-Jan-2020
transcript
Project MAGI
6/4/2016
Mizuho Artificial Generalized Intelligence
Sales Trading Department
Masahiko Todoriki
Copyright (c) Mizuho Securities Co., Ltd. All Rights Reserved.
Performance Improvement of Algorithmic Trading Strategies Using Deep Learning
1
1. Trading Algorithms
What are Algorithmic Trading Strategies
2
Buy 1500@376
Whenever there is a change in the market, the algorithm checks if the current situation fits the requirements to trigger executions.
Buy 1000@379 Buy 1100@378 Buy 900@379
Buy 1200@369 Buy 1100@363 Buy 900@363
Buy 1200@339 Buy 1100@349
TRADED QUANTITY / ORDER QUANTITY
AVERAGE TRADED PRICE
0/10000
0
1100/10000
349.0
2300/10000
343.8
3200/10000
349.2
4300/10000
352.7
5500/10000
356.3
6400/10000
359.5
7500/10000
362.2
8500/10000
364.2
10000/10000
365.9
9:08 9:36 10:07 10:44 11:22 12:50 13:33 14:16 15:00
DONE!!
An algorithm creates a rough schedule of trades such as “when”, “how many shares” and “at what price” and follow the schedule until all of its order quantity are traded. to buy or sell,
Fig1. A typical case of algorithmic trading
AI and Deep Learning
Machine Learning
Deep Learning Perceptron
Expert System
If Condition “A” Then Do Action “α” If Condition “B” Then Do Action “β” If Condition “C” Then Do Action “γ”
Copies how human “experts” would behave depending on specific condition
Basic
Fig2. Deep Learning on Trading Algorithms
Deep Convolutional Neural Network (CNN)
Advanced
Support Vector Machine (SVM)
Auto Encoders (AE)
Recurrent Neural Network (RNN)
Hidden Markov Model (HMM)
Reinforced Learning (RL)
Deep Belief Network (DBN)
DNN-HMM
Deep RL
DNN-RNN Existing Trading Algorithms
3
4
2. Our study of stock price prediction
What we predict
5
Predict the case when price of stock will have a significant change
+0.5% and above
from -0.5% to +0.5%
less than -0.5%
Prediction Time Spread 1 hour
Current Time 2 pm
Prediction Time 3 pm
Up
Down
Flat ±0.5%
Fig 3. Three Classifications of Stock Price Range at a Future Time
Threshold 0.5%
Dataset
6
Input Data
500 3200
Marketdata of Topix Core 30 constituents
Marketdata of Nikkei 225 futures
Recent 20 OHLC** + Volume • Minutely time series OHLCV*** (5 values) • 5-Minutely OHLCV (5 values) • Hourly OHLCV (5 values) • Daily OHLCV (5 values) • Weekly OHLCV (5 values)
100 most-recent order book data • Price and quantity of ask1 to ask8 (2 x 8
values) • Price and quantity of bid1 to bid 8 (2 x 8
values)
3200
100 most-recent trade data • Exec price from base price in % • Exec quantity vs, previous day total
traded volume in %
500
200
200
Label (Answer)
1 7800 Total
Fig 4. Structure of Input Data Used for Our Prediction
Type of Deep Learning Algorithm We Used
7
Hidden Layer 1
Hidden Layer 2
Hidden Layer 5
Hidden Layer 6
Output Layer
(4000) (3500) (2000) (1500)
Input Layer
(7800)
Fig 5. Structure of Deep Belief Network
Up
Down
Flat
Node 1
Node 2 Node 3
Node 4
Node 3997
Node 3998
Node 3999
Node 4000
Node 1
Node 2 Node 3
Node 3498
Node 3499
Node 3500
Node 1 Node 2 Node 3
Node 1998
Node 1999
Node 2000
Node 1
Node 2
Node 1499
Node 1500
Parameter 1
Parameter 2 Parameter 3
Parameter 4
Parameter 7797
Parameter 7798
Parameter 7799
Parameter 7800
Our Application
8
Throwing away the idea of creating one omnipotent AI
Ex. DBN1 is specifically trained to answer at 9 am predicting 10 am whether it’s in range between ±0.3% from current price or higher than that or lower than that DBN1
DBN2
DBN3 ・・・・・・
Fig 6. Create and Train Different DBN at Different Condition
Ex. DBN2 is specifically trained to answer at 1 pm predicting 1:30 pm whether it’s in range between ±0.15% from current price or higher than that or lower than that
Create many different DBNs for each specific conditions. (Current Time, Threshold and Prediction Time Spread)
Result
9
50%
55%
60%
65%
70%
75%
80%
85%
90%
95%
100%
900
910
920
930
940
950
1000
1010
1020
1030
1040
1050
1100
1110
1120
1230
1240
1250
1300
1310
1320
1330
1340
1350
1400
1410
1420
1430
1440
1450
DBN FREQAccuracy of our AI based prediction
Accuracy of prediction based on historical probability
Fig 7. Prediction Accuracy of Our AI Approach Time of day
+2.48% with low σ
Expected improvement of algorithmic trading strategy performance is 1 bps
10
3. Our business application
11
MAGI Platform Overview
What’s in MAGI
Ever evolving R&D platform to generate the best deep learning model which is specifically designed for market prediction!
Heterogeneous data sources are ready for training such as Historical Data( Stock, FX, Commodities), Financial Statements, News, and more…
1. Choice of AI
Provides common deep learning models such as DBN, RNN(LSTM), RNN(RBM), DNN-HMM.
2. Heterogeneous Data Sources 3. Easy to Train
Data preprocessing tasks and training tasks are schedules and run on multiple servers and on GPUs without programming!
Production Hardware of MAGI
12
Fig 8. Servers and Network
Infiniband Switch
Task Scheduler
Calculation Servers
224TFlops(NVIDIA Tesla M40 x 32)
Spec
Distributed Computing
Parallel File System + Raid50 Direct Memory Access
Low latency Infiniband 56Gbs network
System flow of MAGI
13
Set up training data
Schedule Server
CPU CPU GPGPU
Set up training purpose
Training
Prediction Result Database Prediction
Validation
Trained Networks
Preprocessing Progress Report
Training Progress Report
Algo/Trader/ Analyst/Quants
Performance Report
GPGPU Servers
Fig 9. System flow of MAGI
User Interface (GUI)
DB/Storage Users
Preprocessing distributed over CPUs on both Schedule and GPGPU Servers
Distribute training jobs to GPGPU
servers
Dispatches CUDA program
Refer
Set up training logic
14
Thank you for Listening!