SlideShare une entreprise Scribd logo
1  sur  13
Quant Machine
Application for Analyzing Financial Time Series
quantmachine.xyz
Problem Statement
Knowing the performance of foreign markets, determine if the US
stock market will be bullish or bearish (up/down)
Forecast the return of a given stock in S&P500 in terms of
historical returns of all stocks in the same set
How much profit can we make trading based on this forecast?
Problem Statement
Universe of stocks: {𝑠𝑖}𝑖=1
𝑁
 Adjusted Close price of stock 𝑠𝑖 at time 𝑡 : 𝑃(𝑠𝑖, 𝑡)
 Return of stock 𝑠𝑖 at time 𝑡: 𝑅 𝑠𝑖, 𝑡 =
𝑃 𝑠 𝑖, 𝑡 − 𝑃(𝑠 𝑖, 𝑡−1)
𝑃(𝑠 𝑖, 𝑡−1)
 Assume 𝑟 is either 𝑅 (continuous) or 𝑠𝑖𝑔𝑛 𝑅 (discrete)
 We want to find 𝐹 (regressor/classifier) if it exists, such that:
𝑟(𝑠𝑖, 𝑡) = 𝐹[ 𝑟 𝑠1, 𝑡 − 1 , 𝑟 𝑠1, 𝑡 − 2 , … , 𝑟(𝑠 𝑛, , 𝑡 − 𝑛𝑙𝑎𝑔𝑠) ]
Motivation
In many trading strategies, additional insight about the
directional moves of stock returns can significantly improve
performance
This application will provide useful analytics for retail
algorithmic traders and day-traders in general
Data
Dates IBM_lag1 IBM_lag2 MSFT_lag1 MSFT_lag2 … IBM_vol_lag1
6/25/2016 - 5.65% +0.03% - 3.99% +1.02% +5.5%
6/24/2016 +0.03% +1.55% +1.02% - 0.52% +2.5%
Samples are
trading days
Table of daily returns (including % change of volume)
IBM is the stock of interest
Number of Lags is 2
Features
Dates IBM_lag1 IBM_lag2 MSFT_lag1 MSFT_lag2 … IBM_vol_lag1
6/25/2016 - 1 +1 - 1 +1 +1
6/24/2016 +1 +1 +1 - 1 +1
Table of daily directional moves
# Features ≤ # Samples
FEATURE EXTRACTION
DATA
MACHINE LEARNING TOOLS
PREDICTIONS
ECONOMETRIC TOOLS
• NYSE, Asian Markets
+ lags
• PCA
• VIF
• Lasso
• ARIMA(p, r, q), GARCH(1, 1) • Regressors
• Classifiers
• Returns
• Pairs
Feature Selection
For Classifiers
• Select features according to k highest scores
• Recursive Feature Elimination
For Regressors
• Lasso
• Multicollinearity Reduction
Game of Markets
Hours Open Nasdaq Frankfurt London Hong Kong Shanghai Japan (Nikkei) Australia
UTC times 14:30-21:00 07:00-19:00 08:00-16:30 01:30-08:00 01:30-07:00 00:00-06:00 00:00-6:00
Validation
Model Validation (get the best hyper parameters)
Time Series require specific type of validation to preserve causality
Moving or cascading window technique is used
Model Selection (get the most predictive model)
Model that performed the best on a validation set is used as a
predictor on a test set
ROC
Example of ROC and AUC for one of the classifiers
ARIMA Model
Forecasting returns using ARIMA(p, r, q) model
ARIMA Model
Checking (partial) autocorrelation and normality of residues
Hidden Markov Model
Simple application of Gaussian HMM

Contenu connexe

En vedette

En vedette (6)

Managing Large Scale Financial Time-Series Data with Graphs
Managing Large Scale Financial Time-Series Data with Graphs Managing Large Scale Financial Time-Series Data with Graphs
Managing Large Scale Financial Time-Series Data with Graphs
 
Support Vector Machine
Support Vector MachineSupport Vector Machine
Support Vector Machine
 
Fast Data Analytics with Spark and Python
Fast Data Analytics with Spark and PythonFast Data Analytics with Spark and Python
Fast Data Analytics with Spark and Python
 
Python and Bigdata - An Introduction to Spark (PySpark)
Python and Bigdata -  An Introduction to Spark (PySpark)Python and Bigdata -  An Introduction to Spark (PySpark)
Python and Bigdata - An Introduction to Spark (PySpark)
 
NYC* Big Tech Day 2013: Financial Time Series
NYC* Big Tech Day 2013: Financial Time SeriesNYC* Big Tech Day 2013: Financial Time Series
NYC* Big Tech Day 2013: Financial Time Series
 
time series analysis
time series analysistime series analysis
time series analysis
 

Similaire à quantmachine

GPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
GPU Accelerated Backtesting and Machine Learning for Quant Trading StrategiesGPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
GPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
Daniel Egloff
 
Scheduling advertisements on a web page to maximize revenue
Scheduling advertisements on a web page to maximize revenueScheduling advertisements on a web page to maximize revenue
Scheduling advertisements on a web page to maximize revenue
Shu-Jeng Hsieh
 
Investigation of Frequent Batch Auctions using Agent Based Model
Investigation of Frequent Batch Auctions using Agent Based ModelInvestigation of Frequent Batch Auctions using Agent Based Model
Investigation of Frequent Batch Auctions using Agent Based Model
Takanobu Mizuta
 
Getting Started with MDX 20140625a
Getting Started with MDX 20140625aGetting Started with MDX 20140625a
Getting Started with MDX 20140625a
Ron Moore
 
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an..."Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
Quantopian
 

Similaire à quantmachine (20)

GPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
GPU Accelerated Backtesting and Machine Learning for Quant Trading StrategiesGPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
GPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
 
RIC-NN: A Robust Transferable Deep Learning Framework for Cross-sectional Inv...
RIC-NN: A Robust Transferable Deep Learning Framework for Cross-sectional Inv...RIC-NN: A Robust Transferable Deep Learning Framework for Cross-sectional Inv...
RIC-NN: A Robust Transferable Deep Learning Framework for Cross-sectional Inv...
 
Abc financial analyticsdemo
Abc financial analyticsdemoAbc financial analyticsdemo
Abc financial analyticsdemo
 
IRJET- Stock Market Prediction using Machine Learning
IRJET- Stock Market Prediction using Machine LearningIRJET- Stock Market Prediction using Machine Learning
IRJET- Stock Market Prediction using Machine Learning
 
IRJET- Analysis of Various Machine Learning Algorithms for Stock Value Predic...
IRJET- Analysis of Various Machine Learning Algorithms for Stock Value Predic...IRJET- Analysis of Various Machine Learning Algorithms for Stock Value Predic...
IRJET- Analysis of Various Machine Learning Algorithms for Stock Value Predic...
 
Tempura: A General Cost-Based Optimizer Framework for Incremental Data Proces...
Tempura: A General Cost-Based Optimizer Framework for Incremental Data Proces...Tempura: A General Cost-Based Optimizer Framework for Incremental Data Proces...
Tempura: A General Cost-Based Optimizer Framework for Incremental Data Proces...
 
Scheduling advertisements on a web page to maximize revenue
Scheduling advertisements on a web page to maximize revenueScheduling advertisements on a web page to maximize revenue
Scheduling advertisements on a web page to maximize revenue
 
Company segmentation - an approach with R
Company segmentation - an approach with RCompany segmentation - an approach with R
Company segmentation - an approach with R
 
Production model lifecycle management 2016 09
Production model lifecycle management 2016 09Production model lifecycle management 2016 09
Production model lifecycle management 2016 09
 
Investigation of Frequent Batch Auctions using Agent Based Model
Investigation of Frequent Batch Auctions using Agent Based ModelInvestigation of Frequent Batch Auctions using Agent Based Model
Investigation of Frequent Batch Auctions using Agent Based Model
 
Quant trading with artificial intelligence
Quant trading with artificial intelligenceQuant trading with artificial intelligence
Quant trading with artificial intelligence
 
A Robust Transferable Deep Learning Framework for Cross-sectional Investment ...
A Robust Transferable Deep Learning Framework for Cross-sectional Investment ...A Robust Transferable Deep Learning Framework for Cross-sectional Investment ...
A Robust Transferable Deep Learning Framework for Cross-sectional Investment ...
 
SMART Seminar Series: "Optimisation of closed loop supply chain decisions usi...
SMART Seminar Series: "Optimisation of closed loop supply chain decisions usi...SMART Seminar Series: "Optimisation of closed loop supply chain decisions usi...
SMART Seminar Series: "Optimisation of closed loop supply chain decisions usi...
 
I Know First Presentation (May 2016)
I Know First Presentation (May 2016)I Know First Presentation (May 2016)
I Know First Presentation (May 2016)
 
Getting Started with MDX 20140625a
Getting Started with MDX 20140625aGetting Started with MDX 20140625a
Getting Started with MDX 20140625a
 
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an..."Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
"Quantitative Trading as a Mathematical Science" by Dr. Haksun Li, Founder an...
 
Using Java & Genetic Algorithms to Beat the Market
Using Java & Genetic Algorithms to Beat the MarketUsing Java & Genetic Algorithms to Beat the Market
Using Java & Genetic Algorithms to Beat the Market
 
How to design quant trading strategies using “R”?
How to design quant trading strategies using “R”?How to design quant trading strategies using “R”?
How to design quant trading strategies using “R”?
 
Analysis of Time Series Data & Pattern Sequencing
Analysis of Time Series Data & Pattern SequencingAnalysis of Time Series Data & Pattern Sequencing
Analysis of Time Series Data & Pattern Sequencing
 
Olap Functions Suport in Informix
Olap Functions Suport in InformixOlap Functions Suport in Informix
Olap Functions Suport in Informix
 

Dernier

VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf
Adnet Communications
 
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
dipikadinghjn ( Why You Choose Us? ) Escorts
 

Dernier (20)

Top Rated Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...
 
The Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfThe Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdf
 
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
 
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
 
The Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfThe Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdf
 
Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )
Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )
Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )
 
The Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfThe Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdf
 
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
 
The Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdfThe Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdf
 
Top Rated Pune Call Girls Dighi ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Dighi ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Dighi ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Dighi ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf
 
Gurley shaw Theory of Monetary Economics.
Gurley shaw Theory of Monetary Economics.Gurley shaw Theory of Monetary Economics.
Gurley shaw Theory of Monetary Economics.
 
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
 
Shrambal_Distributors_Newsletter_Apr-2024 (1).pdf
Shrambal_Distributors_Newsletter_Apr-2024 (1).pdfShrambal_Distributors_Newsletter_Apr-2024 (1).pdf
Shrambal_Distributors_Newsletter_Apr-2024 (1).pdf
 
VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
 
Booking open Available Pune Call Girls Talegaon Dabhade 6297143586 Call Hot ...
Booking open Available Pune Call Girls Talegaon Dabhade  6297143586 Call Hot ...Booking open Available Pune Call Girls Talegaon Dabhade  6297143586 Call Hot ...
Booking open Available Pune Call Girls Talegaon Dabhade 6297143586 Call Hot ...
 
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
 
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
 

quantmachine

  • 1. Quant Machine Application for Analyzing Financial Time Series quantmachine.xyz
  • 2. Problem Statement Knowing the performance of foreign markets, determine if the US stock market will be bullish or bearish (up/down) Forecast the return of a given stock in S&P500 in terms of historical returns of all stocks in the same set How much profit can we make trading based on this forecast?
  • 3. Problem Statement Universe of stocks: {𝑠𝑖}𝑖=1 𝑁  Adjusted Close price of stock 𝑠𝑖 at time 𝑡 : 𝑃(𝑠𝑖, 𝑡)  Return of stock 𝑠𝑖 at time 𝑡: 𝑅 𝑠𝑖, 𝑡 = 𝑃 𝑠 𝑖, 𝑡 − 𝑃(𝑠 𝑖, 𝑡−1) 𝑃(𝑠 𝑖, 𝑡−1)  Assume 𝑟 is either 𝑅 (continuous) or 𝑠𝑖𝑔𝑛 𝑅 (discrete)  We want to find 𝐹 (regressor/classifier) if it exists, such that: 𝑟(𝑠𝑖, 𝑡) = 𝐹[ 𝑟 𝑠1, 𝑡 − 1 , 𝑟 𝑠1, 𝑡 − 2 , … , 𝑟(𝑠 𝑛, , 𝑡 − 𝑛𝑙𝑎𝑔𝑠) ]
  • 4. Motivation In many trading strategies, additional insight about the directional moves of stock returns can significantly improve performance This application will provide useful analytics for retail algorithmic traders and day-traders in general
  • 5. Data Dates IBM_lag1 IBM_lag2 MSFT_lag1 MSFT_lag2 … IBM_vol_lag1 6/25/2016 - 5.65% +0.03% - 3.99% +1.02% +5.5% 6/24/2016 +0.03% +1.55% +1.02% - 0.52% +2.5% Samples are trading days Table of daily returns (including % change of volume) IBM is the stock of interest Number of Lags is 2 Features Dates IBM_lag1 IBM_lag2 MSFT_lag1 MSFT_lag2 … IBM_vol_lag1 6/25/2016 - 1 +1 - 1 +1 +1 6/24/2016 +1 +1 +1 - 1 +1 Table of daily directional moves # Features ≤ # Samples
  • 6. FEATURE EXTRACTION DATA MACHINE LEARNING TOOLS PREDICTIONS ECONOMETRIC TOOLS • NYSE, Asian Markets + lags • PCA • VIF • Lasso • ARIMA(p, r, q), GARCH(1, 1) • Regressors • Classifiers • Returns • Pairs
  • 7. Feature Selection For Classifiers • Select features according to k highest scores • Recursive Feature Elimination For Regressors • Lasso • Multicollinearity Reduction
  • 8. Game of Markets Hours Open Nasdaq Frankfurt London Hong Kong Shanghai Japan (Nikkei) Australia UTC times 14:30-21:00 07:00-19:00 08:00-16:30 01:30-08:00 01:30-07:00 00:00-06:00 00:00-6:00
  • 9. Validation Model Validation (get the best hyper parameters) Time Series require specific type of validation to preserve causality Moving or cascading window technique is used Model Selection (get the most predictive model) Model that performed the best on a validation set is used as a predictor on a test set
  • 10. ROC Example of ROC and AUC for one of the classifiers
  • 11. ARIMA Model Forecasting returns using ARIMA(p, r, q) model
  • 12. ARIMA Model Checking (partial) autocorrelation and normality of residues
  • 13. Hidden Markov Model Simple application of Gaussian HMM