SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
PyData
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
Lukas Masuch
 

La actualidad más candente (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...
 

Destacado

エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~
エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~
エヌビディアが加速するディープラーニング~進化するニューラルネットワークとその開発方法について~
NVIDIA Japan
 

Destacado (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
 

Similar a Capitalico / Chart Pattern Matching in Financial Trading Using RNN

Similar a Capitalico / 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
 

Último

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

Capitalico / 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