SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
1
Make you trade ideas into AI.
Start free. On mobile.
Hitoshi Harada
CTO
hitoshi@alpacadb.com
http://alpaca.ai
Chart Pattern Matching in Financial Trading Using RNN
http://www.capitalico.com
Entry Point
What Technical Traders Are Looking For 2
Diversity Of The Pattern - All Downtrend 3
• Fuzzy Pattern Recognition for everyone
• Generalization (no hand crafted features)
• Multiple time series (OHLC price + indicators)
• Time scale, value scale, distortion
James N.K. Liu *, Raymond W.M. Kwong : Automatic extraction and identification of chart patterns towards financial forecast, 2006
Problem And Needs - Fuzzy Pattern Recognition
Zhe Zhang, Jian Jiang, Xiaoyan Liu, Ricky Lau, Huaiqing Wang, Rui Zhang:
A Real Time Hybrid Pattern Matching Scheme for Stock Time Series, 2010
4
How To Solve The Problem? 5
SPEECH RECOGNITION WITH DEEP RECURRENT NEURAL NETWORKS,
Hinton, et al. 2013
Capitalico
“ah” “p” “down trend”
Interactive Training Data Collection & Training 6
• Train by what you see & judge
• No programming nor
conditional setting, but
purely from charts like
traders do

• Multi-dimensional input
• Not only the single time-
series data of price
movement but also various
indicators altogether
Our Approach - Fuzzy Pattern Recognition without Programming 7
• Network
• Input:
• N-dim Fully Connected Layer
• LSTM Layer x 2 or 4 ( x250 units )
• Fully Connected Layer ( x250 units )
• Dropout
• Sigmoid
• Output:
• 1-dim confidence level

• Training
• Align with fixed number of candles
• Mean squared error for loss
• AdaDelta for optimizer
• BPTT through aligned length
• Data
• 1k+ samples collected by experts
• about hundred instances for each strategy
Input
LSTM
LSTM
Fully Connected
Output
Fully Connected
Time
Experiments Deep Learning Based Approach 8
Sigmoid
Input
LSTM
LSTM
Fully Connected
Output
Fully Connected
Sigmoid
Input
LSTM
LSTM
Fully Connected
Output
Fully Connected
Sigmoid
x-axis: time (1.0=entry point)
blue: training data / orange: testing data
Experiments Fitting Reasonably
y-axis:confidence
9
Experiments Framework 10
Dropout
• Dropout vs # of training samples
• Bigger Mini-Batches by looping samples
• Made it Adaptive depending on importance
11
dropout enabled (x: iteration count, y: loss)
dropout w/ bigger mini-batches (x: iteration count, y: loss)
Forget Gate Bias (Learning To Forget: Continual Prediction With Lstm, Felix Et Al.) 12
Trial And Error To Speed Up Training 13
• Dynamic Dropout
• Dynamic Batchsize
• Multi-GPU Training
• Other Frameworks like Keras
• GRU
• IRNN
• Lot more…
14
• Previous studies have limitations to difficulty of feature crafting.
• LSTM based deep neural network fits well with individual patterns.
• LSTM-variant doesn’t make much difference, but forget-gate bias,
normalization, preprocessing, and modeling etc. matter
• Build better base model by pre-training
• Reinforcement Learning using profit and risk preference
• Visualize and rationalize LSTM decision making
• Generative Model
Conclusion & Future Work 14
QUESTIONS AND ANSWERS
http://alpaca.ai / info@alpacadb.com
http://www.capitalico.com
Make you trade ideas into AI.
Start free. On mobile.
• Ken-ichi Kainijo and Tetsuji Tanigawa:

Stock Price Pattern Recognition - A Recurrent Neural Network Approach -, 1990
• S Hochreiter, J Schmidhuber:

Long short-term memory, 1997
• FA Gers, J Schmidhuber, F Cummins:

Learning to forget: Continual prediction with LSTM, 2000
• James N.K. Liu *, Raymond W.M. Kwong:

Automatic extraction and identification of chart patterns towards financial forecast, 2006
• X Guo, X Liang, X Li:

A stock pattern recognition algorithm based on neural networks, 2007
• Z Zhang, J Jiang, X Liu, R Lau, H Wang:

A real time hybrid pattern matching scheme for stock time series, 2010
• A Graves, A Mohamed, G Hinton:

Speech recognition with deep recurrent neural networks, 2013
• A Graves, N Jaitly:

A Mohamed, Hybrid speech recognition with deep bidirectional LSTM, 2013
• Tara N. Sainath, Oriol Vinyals, Andrew Senior, Has¸im Sak:

CONVOLUTIONAL, LONG SHORT-TERM MEMORY, FULLY CONNECTED DEEP NEURAL NETWORKS
References 16
Need For Gpu And Distributed Computation 17
• Model Training
• Takes around 10 minutes on a single GPU core
• Requires 2GB of GPU RAM
• Backtesting
• Calculate various metrics over the historical data
• Livetesting
• Thousands of models need to monitor live candles and update the state of LSTM
Need For Distributed Computation 18
DB
Postgresql
Redis
etcd
Load
Balancer
WEB
Flask
tesla k80
WORKER
Live
Market Watch
Market Data
Historical
Real time
Queue
Celery
Trading
Algos =
~10MB
x1-10K

Contenu connexe

Tendances

Machine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis IntroductionMachine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis IntroductionTe-Yen Liu
 
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakLearn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakPyData
 
Promises of Deep Learning
Promises of Deep LearningPromises of Deep Learning
Promises of Deep LearningDavid Khosid
 
Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...Universitat Politècnica de Catalunya
 
Language translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlowLanguage translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlowS N
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual IntroductionLukas Masuch
 
Diving into Deep Learning (Silicon Valley Code Camp 2017)
Diving into Deep Learning (Silicon Valley Code Camp 2017)Diving into Deep Learning (Silicon Valley Code Camp 2017)
Diving into Deep Learning (Silicon Valley Code Camp 2017)Oswald Campesato
 
Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)Ha Phuong
 
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...Greg Makowski
 
D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)
D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)
D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)Universitat Politècnica de Catalunya
 
Methodology (DLAI D6L2 2017 UPC Deep Learning for Artificial Intelligence)
Methodology (DLAI D6L2 2017 UPC Deep Learning for Artificial Intelligence)Methodology (DLAI D6L2 2017 UPC Deep Learning for Artificial Intelligence)
Methodology (DLAI D6L2 2017 UPC Deep Learning for Artificial Intelligence)Universitat Politècnica de Catalunya
 
Deep Learning for Stock Prediction
Deep Learning for Stock PredictionDeep Learning for Stock Prediction
Deep Learning for Stock PredictionLim Zhi Yuan (Zane)
 
Intro To Convolutional Neural Networks
Intro To Convolutional Neural NetworksIntro To Convolutional Neural Networks
Intro To Convolutional Neural NetworksMark Scully
 
Using Deep Learning to do Real-Time Scoring in Practical Applications
Using Deep Learning to do Real-Time Scoring in Practical ApplicationsUsing Deep Learning to do Real-Time Scoring in Practical Applications
Using Deep Learning to do Real-Time Scoring in Practical ApplicationsGreg Makowski
 
Variants of GANs - Jaejun Yoo
Variants of GANs - Jaejun YooVariants of GANs - Jaejun Yoo
Variants of GANs - Jaejun YooJaeJun Yoo
 
Deep Learning Primer: A First-Principles Approach
Deep Learning Primer: A First-Principles ApproachDeep Learning Primer: A First-Principles Approach
Deep Learning Primer: A First-Principles ApproachMaurizio Calo Caligaris
 
Parallel Recurrent Neural Network Architectures for Feature-rich Session-base...
Parallel Recurrent Neural Network Architectures for Feature-rich Session-base...Parallel Recurrent Neural Network Architectures for Feature-rich Session-base...
Parallel Recurrent Neural Network Architectures for Feature-rich Session-base...Balázs Hidasi
 
Deep Learning for Recommender Systems RecSys2017 Tutorial
Deep Learning for Recommender Systems RecSys2017 Tutorial Deep Learning for Recommender Systems RecSys2017 Tutorial
Deep Learning for Recommender Systems RecSys2017 Tutorial Alexandros Karatzoglou
 
“Introducing Machine Learning and How to Teach Machines to See,” a Presentati...
“Introducing Machine Learning and How to Teach Machines to See,” a Presentati...“Introducing Machine Learning and How to Teach Machines to See,” a Presentati...
“Introducing Machine Learning and How to Teach Machines to See,” a Presentati...Edge AI and Vision Alliance
 

Tendances (20)

Tutorial on Deep Learning
Tutorial on Deep LearningTutorial on Deep Learning
Tutorial on Deep Learning
 
Machine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis IntroductionMachine Learning, Deep Learning and Data Analysis Introduction
Machine Learning, Deep Learning and Data Analysis Introduction
 
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr TeterwakLearn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
Learn to Build an App to Find Similar Images using Deep Learning- Piotr Teterwak
 
Promises of Deep Learning
Promises of Deep LearningPromises of Deep Learning
Promises of Deep Learning
 
Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...
 
Language translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlowLanguage translation with Deep Learning (RNN) with TensorFlow
Language translation with Deep Learning (RNN) with TensorFlow
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
 
Diving into Deep Learning (Silicon Valley Code Camp 2017)
Diving into Deep Learning (Silicon Valley Code Camp 2017)Diving into Deep Learning (Silicon Valley Code Camp 2017)
Diving into Deep Learning (Silicon Valley Code Camp 2017)
 
Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)Deep Learning And Business Models (VNITC 2015-09-13)
Deep Learning And Business Models (VNITC 2015-09-13)
 
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...
Using Deep Learning to do Real-Time Scoring in Practical Applications - 2015-...
 
D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)
D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)
D1L5 Visualization (D1L2 Insight@DCU Machine Learning Workshop 2017)
 
Methodology (DLAI D6L2 2017 UPC Deep Learning for Artificial Intelligence)
Methodology (DLAI D6L2 2017 UPC Deep Learning for Artificial Intelligence)Methodology (DLAI D6L2 2017 UPC Deep Learning for Artificial Intelligence)
Methodology (DLAI D6L2 2017 UPC Deep Learning for Artificial Intelligence)
 
Deep Learning for Stock Prediction
Deep Learning for Stock PredictionDeep Learning for Stock Prediction
Deep Learning for Stock Prediction
 
Intro To Convolutional Neural Networks
Intro To Convolutional Neural NetworksIntro To Convolutional Neural Networks
Intro To Convolutional Neural Networks
 
Using Deep Learning to do Real-Time Scoring in Practical Applications
Using Deep Learning to do Real-Time Scoring in Practical ApplicationsUsing Deep Learning to do Real-Time Scoring in Practical Applications
Using Deep Learning to do Real-Time Scoring in Practical Applications
 
Variants of GANs - Jaejun Yoo
Variants of GANs - Jaejun YooVariants of GANs - Jaejun Yoo
Variants of GANs - Jaejun Yoo
 
Deep Learning Primer: A First-Principles Approach
Deep Learning Primer: A First-Principles ApproachDeep Learning Primer: A First-Principles Approach
Deep Learning Primer: A First-Principles Approach
 
Parallel Recurrent Neural Network Architectures for Feature-rich Session-base...
Parallel Recurrent Neural Network Architectures for Feature-rich Session-base...Parallel Recurrent Neural Network Architectures for Feature-rich Session-base...
Parallel Recurrent Neural Network Architectures for Feature-rich Session-base...
 
Deep Learning for Recommender Systems RecSys2017 Tutorial
Deep Learning for Recommender Systems RecSys2017 Tutorial Deep Learning for Recommender Systems RecSys2017 Tutorial
Deep Learning for Recommender Systems RecSys2017 Tutorial
 
“Introducing Machine Learning and How to Teach Machines to See,” a Presentati...
“Introducing Machine Learning and How to Teach Machines to See,” a Presentati...“Introducing Machine Learning and How to Teach Machines to See,” a Presentati...
“Introducing Machine Learning and How to Teach Machines to See,” a Presentati...
 

En vedette

GTC Japan 2015 - Experiments to apply Deep Learning to Forex time series data
GTC Japan 2015 - Experiments to apply Deep Learning to Forex time series dataGTC Japan 2015 - Experiments to apply Deep Learning to Forex time series data
GTC Japan 2015 - Experiments to apply Deep Learning to Forex time series dataYuki Hayashi
 
Prediction of Exchange Rate Using Deep Neural Network
Prediction of Exchange Rate Using Deep Neural Network  Prediction of Exchange Rate Using Deep Neural Network
Prediction of Exchange Rate Using Deep Neural Network Tomoki Hayashi
 
Stock Market Prediction using Hidden Markov Models and Investor sentiment
Stock Market Prediction using Hidden Markov Models and Investor sentimentStock Market Prediction using Hidden Markov Models and Investor sentiment
Stock Market Prediction using Hidden Markov Models and Investor sentimentPatrick Nicolas
 
Hidden Markov Model & Stock Prediction
Hidden Markov Model & Stock PredictionHidden Markov Model & Stock Prediction
Hidden Markov Model & Stock PredictionDavid Chiu
 
Financial forecastings using neural networks ppt
Financial forecastings using neural networks pptFinancial forecastings using neural networks ppt
Financial forecastings using neural networks pptPuneet Gupta
 
エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~
エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~
エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~NVIDIA Japan
 
Chainer GTC 2016
Chainer GTC 2016Chainer GTC 2016
Chainer GTC 2016Shohei Hido
 
NVIDIA Deep Learning SDK を利用した画像認識
NVIDIA Deep Learning SDK を利用した画像認識NVIDIA Deep Learning SDK を利用した画像認識
NVIDIA Deep Learning SDK を利用した画像認識NVIDIA Japan
 
GTC 2016 ディープラーニング最新情報
GTC 2016 ディープラーニング最新情報GTC 2016 ディープラーニング最新情報
GTC 2016 ディープラーニング最新情報NVIDIA Japan
 
TensorFrames: Google Tensorflow on Apache Spark
TensorFrames: Google Tensorflow on Apache SparkTensorFrames: Google Tensorflow on Apache Spark
TensorFrames: Google Tensorflow on Apache SparkDatabricks
 
Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow Jen Aman
 
Deep Learning Use Cases - Data Science Pop-up Seattle
Deep Learning Use Cases - Data Science Pop-up SeattleDeep Learning Use Cases - Data Science Pop-up Seattle
Deep Learning Use Cases - Data Science Pop-up SeattleDomino Data Lab
 
Dockerを徹底活用したSoftLayer環境にお けるディープラーニング開発環境の構築 - Alpaca Cloud Days発表資料
Dockerを徹底活用したSoftLayer環境にお けるディープラーニング開発環境の構築 - Alpaca Cloud Days発表資料Dockerを徹底活用したSoftLayer環境にお けるディープラーニング開発環境の構築 - Alpaca Cloud Days発表資料
Dockerを徹底活用したSoftLayer環境にお けるディープラーニング開発環境の構築 - Alpaca Cloud Days発表資料Tomoya Kitayama
 
Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks
Applying Deep Learning to Enhance Momentum Trading Strategies in StocksApplying Deep Learning to Enhance Momentum Trading Strategies in Stocks
Applying Deep Learning to Enhance Momentum Trading Strategies in StocksLawrence Takeuchi
 
make x dockerで作るAlpaca流開発環境
make x dockerで作るAlpaca流開発環境make x dockerで作るAlpaca流開発環境
make x dockerで作るAlpaca流開発環境Tomoya Kitayama
 
イベント区間検出統合型 BLSTM-HMMハイブリッドモデルによる 多重音響イベント検出
イベント区間検出統合型 BLSTM-HMMハイブリッドモデルによる 多重音響イベント検出イベント区間検出統合型 BLSTM-HMMハイブリッドモデルによる 多重音響イベント検出
イベント区間検出統合型 BLSTM-HMMハイブリッドモデルによる 多重音響イベント検出Tomoki Hayashi
 

En vedette (20)

GTC Japan 2015 - Experiments to apply Deep Learning to Forex time series data
GTC Japan 2015 - Experiments to apply Deep Learning to Forex time series dataGTC Japan 2015 - Experiments to apply Deep Learning to Forex time series data
GTC Japan 2015 - Experiments to apply Deep Learning to Forex time series data
 
Prediction of Exchange Rate Using Deep Neural Network
Prediction of Exchange Rate Using Deep Neural Network  Prediction of Exchange Rate Using Deep Neural Network
Prediction of Exchange Rate Using Deep Neural Network
 
Stock Market Prediction using Hidden Markov Models and Investor sentiment
Stock Market Prediction using Hidden Markov Models and Investor sentimentStock Market Prediction using Hidden Markov Models and Investor sentiment
Stock Market Prediction using Hidden Markov Models and Investor sentiment
 
Hidden Markov Model & Stock Prediction
Hidden Markov Model & Stock PredictionHidden Markov Model & Stock Prediction
Hidden Markov Model & Stock Prediction
 
Financial forecastings using neural networks ppt
Financial forecastings using neural networks pptFinancial forecastings using neural networks ppt
Financial forecastings using neural networks ppt
 
ALCAPA
ALCAPAALCAPA
ALCAPA
 
Alcapa
AlcapaAlcapa
Alcapa
 
エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~
エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~
エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~
 
Chainer GTC 2016
Chainer GTC 2016Chainer GTC 2016
Chainer GTC 2016
 
NVIDIA Deep Learning SDK を利用した画像認識
NVIDIA Deep Learning SDK を利用した画像認識NVIDIA Deep Learning SDK を利用した画像認識
NVIDIA Deep Learning SDK を利用した画像認識
 
GTC 2016 ディープラーニング最新情報
GTC 2016 ディープラーニング最新情報GTC 2016 ディープラーニング最新情報
GTC 2016 ディープラーニング最新情報
 
TensorFrames: Google Tensorflow on Apache Spark
TensorFrames: Google Tensorflow on Apache SparkTensorFrames: Google Tensorflow on Apache Spark
TensorFrames: Google Tensorflow on Apache Spark
 
Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow
 
Deep Learning Use Cases - Data Science Pop-up Seattle
Deep Learning Use Cases - Data Science Pop-up SeattleDeep Learning Use Cases - Data Science Pop-up Seattle
Deep Learning Use Cases - Data Science Pop-up Seattle
 
Dockerを徹底活用したSoftLayer環境にお けるディープラーニング開発環境の構築 - Alpaca Cloud Days発表資料
Dockerを徹底活用したSoftLayer環境にお けるディープラーニング開発環境の構築 - Alpaca Cloud Days発表資料Dockerを徹底活用したSoftLayer環境にお けるディープラーニング開発環境の構築 - Alpaca Cloud Days発表資料
Dockerを徹底活用したSoftLayer環境にお けるディープラーニング開発環境の構築 - Alpaca Cloud Days発表資料
 
Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks
Applying Deep Learning to Enhance Momentum Trading Strategies in StocksApplying Deep Learning to Enhance Momentum Trading Strategies in Stocks
Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks
 
make x dockerで作るAlpaca流開発環境
make x dockerで作るAlpaca流開発環境make x dockerで作るAlpaca流開発環境
make x dockerで作るAlpaca流開発環境
 
イベント区間検出統合型 BLSTM-HMMハイブリッドモデルによる 多重音響イベント検出
イベント区間検出統合型 BLSTM-HMMハイブリッドモデルによる 多重音響イベント検出イベント区間検出統合型 BLSTM-HMMハイブリッドモデルによる 多重音響イベント検出
イベント区間検出統合型 BLSTM-HMMハイブリッドモデルによる 多重音響イベント検出
 
PPT copy (1)
PPT  copy (1)PPT  copy (1)
PPT copy (1)
 
Pulseless algorithm
Pulseless algorithmPulseless algorithm
Pulseless algorithm
 

Similaire à Chart Pattern Matching in Financial Trading Using RNN

Traditional Machine Learning and Deep Learning on OpenPOWER/POWER systems
Traditional Machine Learning and Deep Learning on OpenPOWER/POWER systemsTraditional Machine Learning and Deep Learning on OpenPOWER/POWER systems
Traditional Machine Learning and Deep Learning on OpenPOWER/POWER systemsGanesan Narayanasamy
 
SP Big Data Meetup - March/16
SP Big Data Meetup - March/16SP Big Data Meetup - March/16
SP Big Data Meetup - March/16Flavio Clesio
 
OpenPOWER Webinar on Machine Learning for Academic Research
OpenPOWER Webinar on Machine Learning for Academic Research OpenPOWER Webinar on Machine Learning for Academic Research
OpenPOWER Webinar on Machine Learning for Academic Research Ganesan Narayanasamy
 
HTM & Apache Flink (2016-06-27)
HTM & Apache Flink (2016-06-27)HTM & Apache Flink (2016-06-27)
HTM & Apache Flink (2016-06-27)Eron Wright
 
How to Use Artificial Intelligence by Microsoft Product Manager
 How to Use Artificial Intelligence by Microsoft Product Manager How to Use Artificial Intelligence by Microsoft Product Manager
How to Use Artificial Intelligence by Microsoft Product ManagerProduct School
 
Real-Time Streaming Data Analysis with HTM
Real-Time Streaming Data Analysis with HTMReal-Time Streaming Data Analysis with HTM
Real-Time Streaming Data Analysis with HTMNumenta
 
AI in the Enterprise: Past, Present & Future - StampedeCon AI Summit 2017
AI in the Enterprise: Past,  Present &  Future - StampedeCon AI Summit 2017AI in the Enterprise: Past,  Present &  Future - StampedeCon AI Summit 2017
AI in the Enterprise: Past, Present & Future - StampedeCon AI Summit 2017StampedeCon
 
AI In Actuarial Science
AI In Actuarial ScienceAI In Actuarial Science
AI In Actuarial ScienceAudrey Britton
 
Machine_Learning_with_MATLAB_Seminar_Latest.pdf
Machine_Learning_with_MATLAB_Seminar_Latest.pdfMachine_Learning_with_MATLAB_Seminar_Latest.pdf
Machine_Learning_with_MATLAB_Seminar_Latest.pdfCarlos Paredes
 
Introduction to Artificial Intelligence
Introduction to Artificial IntelligenceIntroduction to Artificial Intelligence
Introduction to Artificial Intelligenceananth
 
Introduction To Applied Machine Learning
Introduction To Applied Machine LearningIntroduction To Applied Machine Learning
Introduction To Applied Machine Learningananth
 
The Transformation of HPC: Simulation and Cognitive Methods in the Era of Big...
The Transformation of HPC: Simulation and Cognitive Methods in the Era of Big...The Transformation of HPC: Simulation and Cognitive Methods in the Era of Big...
The Transformation of HPC: Simulation and Cognitive Methods in the Era of Big...inside-BigData.com
 
Machine Learning Essentials Demystified part1 | Big Data Demystified
Machine Learning Essentials Demystified part1 | Big Data DemystifiedMachine Learning Essentials Demystified part1 | Big Data Demystified
Machine Learning Essentials Demystified part1 | Big Data DemystifiedOmid Vahdaty
 
Bitcoin Price Predictions and Machine Learning: Some New Ideas and Results
Bitcoin Price Predictions and Machine Learning: Some New Ideas and ResultsBitcoin Price Predictions and Machine Learning: Some New Ideas and Results
Bitcoin Price Predictions and Machine Learning: Some New Ideas and Resultsintotheblock
 
Deep Learning-Based Opinion Mining for Bitcoin Price Prediction with Joyesh ...
 Deep Learning-Based Opinion Mining for Bitcoin Price Prediction with Joyesh ... Deep Learning-Based Opinion Mining for Bitcoin Price Prediction with Joyesh ...
Deep Learning-Based Opinion Mining for Bitcoin Price Prediction with Joyesh ...Databricks
 
Wastian, Brunmeir - Data Analyses in Industrial Applications: From Predictive...
Wastian, Brunmeir - Data Analyses in Industrial Applications: From Predictive...Wastian, Brunmeir - Data Analyses in Industrial Applications: From Predictive...
Wastian, Brunmeir - Data Analyses in Industrial Applications: From Predictive...Vienna Data Science Group
 
Data Stream Algorithms in Storm and R
Data Stream Algorithms in Storm and RData Stream Algorithms in Storm and R
Data Stream Algorithms in Storm and RRadek Maciaszek
 

Similaire à Chart Pattern Matching in Financial Trading Using RNN (20)

Traditional Machine Learning and Deep Learning on OpenPOWER/POWER systems
Traditional Machine Learning and Deep Learning on OpenPOWER/POWER systemsTraditional Machine Learning and Deep Learning on OpenPOWER/POWER systems
Traditional Machine Learning and Deep Learning on OpenPOWER/POWER systems
 
SP Big Data Meetup - March/16
SP Big Data Meetup - March/16SP Big Data Meetup - March/16
SP Big Data Meetup - March/16
 
OpenPOWER Webinar on Machine Learning for Academic Research
OpenPOWER Webinar on Machine Learning for Academic Research OpenPOWER Webinar on Machine Learning for Academic Research
OpenPOWER Webinar on Machine Learning for Academic Research
 
Knowledge Discovery
Knowledge DiscoveryKnowledge Discovery
Knowledge Discovery
 
HTM & Apache Flink (2016-06-27)
HTM & Apache Flink (2016-06-27)HTM & Apache Flink (2016-06-27)
HTM & Apache Flink (2016-06-27)
 
Deep learning in algorithmic trading
Deep learning in algorithmic tradingDeep learning in algorithmic trading
Deep learning in algorithmic trading
 
How to Use Artificial Intelligence by Microsoft Product Manager
 How to Use Artificial Intelligence by Microsoft Product Manager How to Use Artificial Intelligence by Microsoft Product Manager
How to Use Artificial Intelligence by Microsoft Product Manager
 
Real-Time Streaming Data Analysis with HTM
Real-Time Streaming Data Analysis with HTMReal-Time Streaming Data Analysis with HTM
Real-Time Streaming Data Analysis with HTM
 
AI in the Enterprise: Past, Present & Future - StampedeCon AI Summit 2017
AI in the Enterprise: Past,  Present &  Future - StampedeCon AI Summit 2017AI in the Enterprise: Past,  Present &  Future - StampedeCon AI Summit 2017
AI in the Enterprise: Past, Present & Future - StampedeCon AI Summit 2017
 
AI In Actuarial Science
AI In Actuarial ScienceAI In Actuarial Science
AI In Actuarial Science
 
Machine_Learning_with_MATLAB_Seminar_Latest.pdf
Machine_Learning_with_MATLAB_Seminar_Latest.pdfMachine_Learning_with_MATLAB_Seminar_Latest.pdf
Machine_Learning_with_MATLAB_Seminar_Latest.pdf
 
Introduction to Artificial Intelligence
Introduction to Artificial IntelligenceIntroduction to Artificial Intelligence
Introduction to Artificial Intelligence
 
Introduction To Applied Machine Learning
Introduction To Applied Machine LearningIntroduction To Applied Machine Learning
Introduction To Applied Machine Learning
 
The Transformation of HPC: Simulation and Cognitive Methods in the Era of Big...
The Transformation of HPC: Simulation and Cognitive Methods in the Era of Big...The Transformation of HPC: Simulation and Cognitive Methods in the Era of Big...
The Transformation of HPC: Simulation and Cognitive Methods in the Era of Big...
 
AI and Deep Learning
AI and Deep Learning AI and Deep Learning
AI and Deep Learning
 
Machine Learning Essentials Demystified part1 | Big Data Demystified
Machine Learning Essentials Demystified part1 | Big Data DemystifiedMachine Learning Essentials Demystified part1 | Big Data Demystified
Machine Learning Essentials Demystified part1 | Big Data Demystified
 
Bitcoin Price Predictions and Machine Learning: Some New Ideas and Results
Bitcoin Price Predictions and Machine Learning: Some New Ideas and ResultsBitcoin Price Predictions and Machine Learning: Some New Ideas and Results
Bitcoin Price Predictions and Machine Learning: Some New Ideas and Results
 
Deep Learning-Based Opinion Mining for Bitcoin Price Prediction with Joyesh ...
 Deep Learning-Based Opinion Mining for Bitcoin Price Prediction with Joyesh ... Deep Learning-Based Opinion Mining for Bitcoin Price Prediction with Joyesh ...
Deep Learning-Based Opinion Mining for Bitcoin Price Prediction with Joyesh ...
 
Wastian, Brunmeir - Data Analyses in Industrial Applications: From Predictive...
Wastian, Brunmeir - Data Analyses in Industrial Applications: From Predictive...Wastian, Brunmeir - Data Analyses in Industrial Applications: From Predictive...
Wastian, Brunmeir - Data Analyses in Industrial Applications: From Predictive...
 
Data Stream Algorithms in Storm and R
Data Stream Algorithms in Storm and RData Stream Algorithms in Storm and R
Data Stream Algorithms in Storm and R
 

Dernier

Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 

Dernier (20)

Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 

Chart Pattern Matching in Financial Trading Using RNN

  • 1. 1 Make you trade ideas into AI. Start free. On mobile. Hitoshi Harada CTO hitoshi@alpacadb.com http://alpaca.ai Chart Pattern Matching in Financial Trading Using RNN http://www.capitalico.com
  • 2. Entry Point What Technical Traders Are Looking For 2
  • 3. Diversity Of The Pattern - All Downtrend 3
  • 4. • Fuzzy Pattern Recognition for everyone • Generalization (no hand crafted features) • Multiple time series (OHLC price + indicators) • Time scale, value scale, distortion James N.K. Liu *, Raymond W.M. Kwong : Automatic extraction and identification of chart patterns towards financial forecast, 2006 Problem And Needs - Fuzzy Pattern Recognition Zhe Zhang, Jian Jiang, Xiaoyan Liu, Ricky Lau, Huaiqing Wang, Rui Zhang: A Real Time Hybrid Pattern Matching Scheme for Stock Time Series, 2010 4
  • 5. How To Solve The Problem? 5 SPEECH RECOGNITION WITH DEEP RECURRENT NEURAL NETWORKS, Hinton, et al. 2013 Capitalico “ah” “p” “down trend”
  • 6. Interactive Training Data Collection & Training 6
  • 7. • Train by what you see & judge • No programming nor conditional setting, but purely from charts like traders do
 • Multi-dimensional input • Not only the single time- series data of price movement but also various indicators altogether Our Approach - Fuzzy Pattern Recognition without Programming 7
  • 8. • Network • Input: • N-dim Fully Connected Layer • LSTM Layer x 2 or 4 ( x250 units ) • Fully Connected Layer ( x250 units ) • Dropout • Sigmoid • Output: • 1-dim confidence level
 • Training • Align with fixed number of candles • Mean squared error for loss • AdaDelta for optimizer • BPTT through aligned length • Data • 1k+ samples collected by experts • about hundred instances for each strategy Input LSTM LSTM Fully Connected Output Fully Connected Time Experiments Deep Learning Based Approach 8 Sigmoid Input LSTM LSTM Fully Connected Output Fully Connected Sigmoid Input LSTM LSTM Fully Connected Output Fully Connected Sigmoid
  • 9. x-axis: time (1.0=entry point) blue: training data / orange: testing data Experiments Fitting Reasonably y-axis:confidence 9
  • 11. Dropout • Dropout vs # of training samples • Bigger Mini-Batches by looping samples • Made it Adaptive depending on importance 11 dropout enabled (x: iteration count, y: loss) dropout w/ bigger mini-batches (x: iteration count, y: loss)
  • 12. Forget Gate Bias (Learning To Forget: Continual Prediction With Lstm, Felix Et Al.) 12
  • 13. Trial And Error To Speed Up Training 13 • Dynamic Dropout • Dynamic Batchsize • Multi-GPU Training • Other Frameworks like Keras • GRU • IRNN • Lot more…
  • 14. 14 • Previous studies have limitations to difficulty of feature crafting. • LSTM based deep neural network fits well with individual patterns. • LSTM-variant doesn’t make much difference, but forget-gate bias, normalization, preprocessing, and modeling etc. matter • Build better base model by pre-training • Reinforcement Learning using profit and risk preference • Visualize and rationalize LSTM decision making • Generative Model Conclusion & Future Work 14
  • 15. QUESTIONS AND ANSWERS http://alpaca.ai / info@alpacadb.com http://www.capitalico.com Make you trade ideas into AI. Start free. On mobile.
  • 16. • Ken-ichi Kainijo and Tetsuji Tanigawa:
 Stock Price Pattern Recognition - A Recurrent Neural Network Approach -, 1990 • S Hochreiter, J Schmidhuber:
 Long short-term memory, 1997 • FA Gers, J Schmidhuber, F Cummins:
 Learning to forget: Continual prediction with LSTM, 2000 • James N.K. Liu *, Raymond W.M. Kwong:
 Automatic extraction and identification of chart patterns towards financial forecast, 2006 • X Guo, X Liang, X Li:
 A stock pattern recognition algorithm based on neural networks, 2007 • Z Zhang, J Jiang, X Liu, R Lau, H Wang:
 A real time hybrid pattern matching scheme for stock time series, 2010 • A Graves, A Mohamed, G Hinton:
 Speech recognition with deep recurrent neural networks, 2013 • A Graves, N Jaitly:
 A Mohamed, Hybrid speech recognition with deep bidirectional LSTM, 2013 • Tara N. Sainath, Oriol Vinyals, Andrew Senior, Has¸im Sak:
 CONVOLUTIONAL, LONG SHORT-TERM MEMORY, FULLY CONNECTED DEEP NEURAL NETWORKS References 16
  • 17. Need For Gpu And Distributed Computation 17 • Model Training • Takes around 10 minutes on a single GPU core • Requires 2GB of GPU RAM • Backtesting • Calculate various metrics over the historical data • Livetesting • Thousands of models need to monitor live candles and update the state of LSTM
  • 18. Need For Distributed Computation 18 DB Postgresql Redis etcd Load Balancer WEB Flask tesla k80 WORKER Live Market Watch Market Data Historical Real time Queue Celery Trading Algos = ~10MB x1-10K