Performance Improvement of Algorithmic Trading Strategies Using Deep Learning

Mizuho Artificial Generalized Intelligence Project MAGI Performance Improvement of Algorithmic Trading Strategies Using Deep Learning 6/4/2016 Sale...
Author: Ami Summers
1 downloads 0 Views 1MB Size
Mizuho Artificial Generalized Intelligence

Project MAGI

Performance Improvement of Algorithmic Trading Strategies Using Deep Learning 6/4/2016

Sales Trading Department

Masahiko Todoriki

Copyright (c) Mizuho Securities Co., Ltd. All Rights Reserved.

1. Trading Algorithms

1

What are Algorithmic Trading Strategies An algorithm creates a rough schedule of trades such as “when”, “how many shares” and “at what price” to buy or sell, and follow the schedule until all of its order quantity are traded. Whenever there is a change in the market, the algorithm checks if the current situation fits the requirements to trigger executions.

TRADED QUANTITY / ORDER QUANTITY AVERAGE TRADED PRICE

10000/10000 7500/10000 8500/10000 6400/10000 5500/10000 4300/10000 3200/10000 0/10000 2300/10000 1100/10000

Buy 900@379

Buy 900@363

Buy 1100@363

10:07

10:44

DONE!!

364.2 365.9 356.3 359.5 362.2 352.7 349.2 343.8 0 349.0 Buy 1100@378

Buy 1000@379

Buy 1500@376

Buy 1200@369

Buy 1100@349 Buy 1200@339

9:08

9:36

11:22

12:50 13:33 14:16 15:00 Fig1. A typical case of algorithmic trading 2

AI and Deep Learning

Expert System

Machine Learning Basic

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 Existing Trading Algorithms

Advanced

Perceptron

Deep Learning

Support Vector Machine (SVM)

Deep Belief Network (DBN)

Auto Encoders (AE)

Deep Convolutional Neural Network (CNN)

Recurrent Neural Network (RNN)

DNN-HMM

Hidden Markov Model (HMM)

Deep RL

Reinforced Learning (RL)

DNN-RNN

Fig2. Deep Learning on Trading Algorithms 3

2. Our study of stock price prediction

4

What we predict Predict the case when price of stock will have a significant change Threshold 0.5%

±0.5%

Up

+0.5% and above

Flat

from -0.5% to +0.5%

Down

less than -0.5%

Prediction Time Spread 1 hour Prediction Time Current Time 3 pm 2 pm

Fig 3. Three Classifications of Stock Price Range at a Future Time 5

Dataset Input Data

3200

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)

500

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

200

500

Marketdata of Nikkei 225 futures

200

7800 Total

Marketdata of Topix Core 30 constituents

Label (Answer) 1

100 most-recent trade data • Exec price from base price in % • Exec quantity vs, previous day total traded volume in %

Fig 4. Structure of Input Data Used for Our Prediction 6

Type of Deep Learning Algorithm We Used

Input Layer

(7800)

Hidden Layer 1

Hidden Layer 2

(4000) (3500)

Hidden Layer 5

Hidden Layer 6

Output Layer

(2000) (1500)

Parameter 1 Parameter 2

Node 1

Parameter 3

Node 2

Parameter 4

Node 3

Node 1 Node 2 Node 3

Node 4

Node 1 Node 2 Node 3

Node 1 Node 2

Up Flat

Node 3997 Parameter 7797 Parameter 7798 Parameter 7799

Node 3998 Node 3999

Down

Node 1998 Node 3498

Node 1499

Node 1999

Node 3499

Node 1500

Node 2000

Node 3500

Node 4000

Parameter 7800

Fig 5. Structure of Deep Belief Network 7

Our Application Throwing away the idea of creating one omnipotent AI

DBN1

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

DBN2

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

・・・・・・ DBN3

Create many different DBNs for each specific conditions. (Current Time, Threshold and Prediction Time Spread)

Fig 6. Create and Train Different DBN at Different Condition 8

Result 100% 95% 90% 85% 80% 75%

+2.48% with low σ

70% 65% 60% 55% 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

50%

Time of day

Accuracy of our AI DBN based prediction

Accuracy of prediction based on FREQ historical probability

Fig 7. Prediction Accuracy of Our AI Approach

Expected improvement of algorithmic trading strategy performance is 1 bps 9

3. Our business application

10

MAGI Platform Overview What’s in MAGI

1. Choice of AI Provides common deep learning models such as DBN, RNN(LSTM), RNN(RBM), DNN-HMM.

2. Heterogeneous Data Sources Heterogeneous data sources are ready for training such as Historical Data( Stock, FX, Commodities), Financial Statements, News, and more…

3. Easy to Train Data preprocessing tasks and training tasks are schedules and run on multiple servers and on GPUs without programming!

Ever evolving R&D platform to generate the best deep learning model which is specifically designed for market prediction!

11

Production Hardware of MAGI Spec

Task Scheduler

 224TFlops(NVIDIA Tesla M40 x 32)  Low latency Infiniband 56Gbs network  Distributed Computing  Direct Memory Access  Parallel File System + Raid50

Infiniband Switch

Calculation Servers

Fig 8. Servers and Network 12

System flow of MAGI User Interface (GUI) Users

Schedule Server DB/Storage

CPU

GPGPU Servers CPU

GPGPU

Set up training data Set up training purpose

Preprocessing distributed over CPUs on both Schedule and GPGPU Servers

Preprocessing Progress Report

Dispatches CUDA program

Training Progress Report Distribute training jobs to GPGPU servers

Set up training logic

Validation

Performance Report

Algo/Trader/ Analyst/Quants

Refer

Training

Prediction Result Database

Trained Networks

Prediction

Fig 9. System flow of MAGI 13

Thank you for Listening! 14

Suggest Documents