SlideShare a Scribd company logo
1 of 21
Download to read offline
Machine learning in stock
    market analysis
Agenda
• Economic concepts
• Can we predict the future price of a
  stock?
• Hidden Markov Models
• Building a virtual investor
• Experimental results
• Demo: Ben Investment Assistant
• Conclusions and future work
Economic concepts
• Stock Markets
• Stock price and volume
• Other indicators
Prediction of stock prices
• Random walk and the Efficient Market
  Hypothesis
• Dow Theory
• Conclusions
Hidden Markov Models
• Intuitive description
• Example:
Building a virtual investor
     • He learns from historical financial data



     • Based on what he learned he makes
       decisions (Buy/Sell/Hold)
     • What data do we provide?
Preparing data
• We apply the EWMA financial technique
  to eliminate noise by smoothing the
  series.

• We consider for each the day the rate of
  growth by applying the natural
  logarithm for the daily return

• How do we make use of this data?
Computations
• Modeling observations: Multivariate
  Gaussian mixtures
• Re-estimations:
  – What is the probability of being at state 2
    at time 4?
  – What is the probability of being at state 2
    at time 4 at mixture 3?
  – How do we re-estimate the model?
Computations
Forward procedure:




                     Backward procedure:
Computations
Computations
The algorithm
Experimental results
• Tests conducted for 14 randomly
  selected companies from different
  sectors: financial, utilities, technology,
  services and healthcare.
• We obtained to over 100% in revenues,
  and we suffered losses only when a
  company suffered a huge depreciation
  in its stock price.
• A few examples...
Goldman Sachs (NYSE:GS)



       Above is the Goldman Sachs stock price evolution (June 07 – June 08)




       Above is the account evolution for investing in Goldman Sachs during
       June 07 – June 08 (After a year it generated a 53.3% revenue)
Royal Gold (NYSE:RGLD)



       Above is the Royal Gold stock price evolution for the testing period




       Above is the account evolution for investing in Royal Gold (It
       generated a 50.3% revenue in 97 days)
An extreme case I (NYSE:MBI)



        Above is the MBIA stock price evolution for June 07 – June 08




        Above is the account evolution for investing in MBIA. The system does
        a good job at minimizing losses (only 26.2% loss)
An extreme case II (NYSE:MBI)




       Above is the MBIA stock price evolution for June 07 – June 08




       Using Auto-regression trees. A 74.2% loss
Demo: Investing in Google

      • Ben Investment Assistant was done
      using:
         • Windows Presentation
         Foundation, Sql Server, Analysis
         Services, ADOMD.NET, AMO, .NET
         3.5, C# 3.0, Linq to SQL on
         Windows Vista Business.
         • 3-tier architecture, highly scalable
Conclusions
• Due to our results we can invalidate the
  assumption that past data has no use.

• Because the algorithm behaves like an
  investor we can have losses if the
  company suffers a severe depreciation
  of value.
Future work
• If we let Ben make decisions on a
  diversified portfolio we might almost be
  certain of a profitable outcome.

• We can expand the vector of
  observations to include more data (for
  example a news index calculated with
  text mining and Google search API)
Thank you!

More Related Content

What's hot

QUANTITATIVE METHODS FOR CHOOSING PROJECTS - Internal Rate Of Return (IRR)
QUANTITATIVE METHODS FOR CHOOSING PROJECTS - Internal RateOf Return (IRR)QUANTITATIVE METHODS FOR CHOOSING PROJECTS - Internal RateOf Return (IRR)
QUANTITATIVE METHODS FOR CHOOSING PROJECTS - Internal Rate Of Return (IRR)
Nadya Safitri Dongoran
 
Jiaxin-resume
Jiaxin-resumeJiaxin-resume
Jiaxin-resume
Jiaxin Xu
 
Stock Market Trends Prediction after Earning Release.pptx
Stock Market Trends Prediction after Earning Release.pptxStock Market Trends Prediction after Earning Release.pptx
Stock Market Trends Prediction after Earning Release.pptx
Chen Qian
 

What's hot (20)

Quantitative methods for choosing projects net present
Quantitative methods for choosing projects   net presentQuantitative methods for choosing projects   net present
Quantitative methods for choosing projects net present
 
QUANTITATIVE METHODS FOR CHOOSING PROJECTS - Internal Rate Of Return (IRR)
QUANTITATIVE METHODS FOR CHOOSING PROJECTS - Internal RateOf Return (IRR)QUANTITATIVE METHODS FOR CHOOSING PROJECTS - Internal RateOf Return (IRR)
QUANTITATIVE METHODS FOR CHOOSING PROJECTS - Internal Rate Of Return (IRR)
 
"Fundamental Forecasts: Methods and Timing" by Vinesh Jha, CEO of ExtractAlpha
"Fundamental Forecasts: Methods and Timing" by Vinesh Jha, CEO of ExtractAlpha"Fundamental Forecasts: Methods and Timing" by Vinesh Jha, CEO of ExtractAlpha
"Fundamental Forecasts: Methods and Timing" by Vinesh Jha, CEO of ExtractAlpha
 
Being open (source) in the traditionally secretive field of quant finance.
Being open (source) in the traditionally secretive field of quant finance.Being open (source) in the traditionally secretive field of quant finance.
Being open (source) in the traditionally secretive field of quant finance.
 
Beware of Low Frequency Data by Ernie Chan, Managing Member, QTS Capital Mana...
Beware of Low Frequency Data by Ernie Chan, Managing Member, QTS Capital Mana...Beware of Low Frequency Data by Ernie Chan, Managing Member, QTS Capital Mana...
Beware of Low Frequency Data by Ernie Chan, Managing Member, QTS Capital Mana...
 
Forecasting shivam
Forecasting shivamForecasting shivam
Forecasting shivam
 
Sentiment-Driven Financial Intelligence
Sentiment-Driven Financial IntelligenceSentiment-Driven Financial Intelligence
Sentiment-Driven Financial Intelligence
 
Jiaxin-resume
Jiaxin-resumeJiaxin-resume
Jiaxin-resume
 
Market Timing, Big Data, and Machine Learning by Xiao Qiao at QuantCon 2016
Market Timing, Big Data, and Machine Learning by Xiao Qiao at QuantCon 2016Market Timing, Big Data, and Machine Learning by Xiao Qiao at QuantCon 2016
Market Timing, Big Data, and Machine Learning by Xiao Qiao at QuantCon 2016
 
Stock Market Trends Prediction after Earning Release.pptx
Stock Market Trends Prediction after Earning Release.pptxStock Market Trends Prediction after Earning Release.pptx
Stock Market Trends Prediction after Earning Release.pptx
 
Week3 day5slide
Week3 day5slideWeek3 day5slide
Week3 day5slide
 
"Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C...
"Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C..."Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C...
"Deep Q-Learning for Trading" by Dr. Tucker Balch, Professor of Interactive C...
 
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
 
Ch 8
Ch 8Ch 8
Ch 8
 
"Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ...
"Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ..."Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ...
"Quantum Hierarchical Risk Parity - A Quantum-Inspired Approach to Portfolio ...
 
"Trading Without Regret" by Dr. Michael Kearns, Professor at the Computer and...
"Trading Without Regret" by Dr. Michael Kearns, Professor at the Computer and..."Trading Without Regret" by Dr. Michael Kearns, Professor at the Computer and...
"Trading Without Regret" by Dr. Michael Kearns, Professor at the Computer and...
 
Beyond Semantic Analysis Utilizing Social Finance Data Sets to Improve Quanti...
Beyond Semantic Analysis Utilizing Social Finance Data Sets to Improve Quanti...Beyond Semantic Analysis Utilizing Social Finance Data Sets to Improve Quanti...
Beyond Semantic Analysis Utilizing Social Finance Data Sets to Improve Quanti...
 
"Enhancing Statistical Significance of Backtests" by Dr. Ernest Chan, Managin...
"Enhancing Statistical Significance of Backtests" by Dr. Ernest Chan, Managin..."Enhancing Statistical Significance of Backtests" by Dr. Ernest Chan, Managin...
"Enhancing Statistical Significance of Backtests" by Dr. Ernest Chan, Managin...
 
Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...
Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...
Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...
 
Mutual funds-products- f
Mutual funds-products- fMutual funds-products- f
Mutual funds-products- f
 

Similar to Stock Market Analysis Markov Models

Marketing Analytics at IBM - export
Marketing Analytics at IBM - exportMarketing Analytics at IBM - export
Marketing Analytics at IBM - export
Spyros Kontogiorgis
 

Similar to Stock Market Analysis Markov Models (20)

Stock Market Analysis
Stock Market AnalysisStock Market Analysis
Stock Market Analysis
 
Using the ISBSG data to improve your organization success - van Heeringen (Me...
Using the ISBSG data to improve your organization success - van Heeringen (Me...Using the ISBSG data to improve your organization success - van Heeringen (Me...
Using the ISBSG data to improve your organization success - van Heeringen (Me...
 
Quant Foundry Labs - Low Probability Defaults
Quant Foundry Labs - Low Probability DefaultsQuant Foundry Labs - Low Probability Defaults
Quant Foundry Labs - Low Probability Defaults
 
Step by Step Guide to Revenue Growth
Step by Step Guide to Revenue GrowthStep by Step Guide to Revenue Growth
Step by Step Guide to Revenue Growth
 
2008 Investment Symposium Zhang 3 24 08
2008 Investment Symposium Zhang 3 24 082008 Investment Symposium Zhang 3 24 08
2008 Investment Symposium Zhang 3 24 08
 
Marketing Analytics at IBM - export
Marketing Analytics at IBM - exportMarketing Analytics at IBM - export
Marketing Analytics at IBM - export
 
Using Machine Learning to Accelerate Revenue
Using Machine Learning to Accelerate Revenue Using Machine Learning to Accelerate Revenue
Using Machine Learning to Accelerate Revenue
 
Maximize Efficiency with Minitab Workspace and Minitab Statistical Software -...
Maximize Efficiency with Minitab Workspace and Minitab Statistical Software -...Maximize Efficiency with Minitab Workspace and Minitab Statistical Software -...
Maximize Efficiency with Minitab Workspace and Minitab Statistical Software -...
 
AI paper in IIM conference
AI paper in IIM conference AI paper in IIM conference
AI paper in IIM conference
 
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUESSTOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
 
IRJET- Finding Optimal Skyline Product Combinations Under Price Promotion
IRJET- Finding Optimal Skyline Product Combinations Under Price PromotionIRJET- Finding Optimal Skyline Product Combinations Under Price Promotion
IRJET- Finding Optimal Skyline Product Combinations Under Price Promotion
 
Empowering Innovation Portfolio Decision-Making through Simulation
Empowering Innovation Portfolio Decision-Making through SimulationEmpowering Innovation Portfolio Decision-Making through Simulation
Empowering Innovation Portfolio Decision-Making through Simulation
 
Stop Flying Blind! Quantifying Risk with Monte Carlo Simulation
Stop Flying Blind! Quantifying Risk with Monte Carlo SimulationStop Flying Blind! Quantifying Risk with Monte Carlo Simulation
Stop Flying Blind! Quantifying Risk with Monte Carlo Simulation
 
Strategic approachppg v02
Strategic approachppg v02Strategic approachppg v02
Strategic approachppg v02
 
GrowUP - A Modern way of Trading
GrowUP - A Modern way of TradingGrowUP - A Modern way of Trading
GrowUP - A Modern way of Trading
 
Smart solutions for productivity gain IQA conference 2017
Smart solutions for productivity gain   IQA conference 2017Smart solutions for productivity gain   IQA conference 2017
Smart solutions for productivity gain IQA conference 2017
 
Leveraging Data Analysis for Sales
Leveraging Data Analysis for SalesLeveraging Data Analysis for Sales
Leveraging Data Analysis for Sales
 
I Know First Presentation (May 2016)
I Know First Presentation (May 2016)I Know First Presentation (May 2016)
I Know First Presentation (May 2016)
 
IRJET - Stock Recommendation System using Machine Learning Approache
IRJET - Stock Recommendation System using Machine Learning ApproacheIRJET - Stock Recommendation System using Machine Learning Approache
IRJET - Stock Recommendation System using Machine Learning Approache
 
ISMA 9 - van Heeringen - Using IFPUG and ISBSG to improve organization success
ISMA 9 - van Heeringen - Using IFPUG and ISBSG to improve organization successISMA 9 - van Heeringen - Using IFPUG and ISBSG to improve organization success
ISMA 9 - van Heeringen - Using IFPUG and ISBSG to improve organization success
 

Recently uploaded

Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
allensay1
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
daisycvs
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
ZurliaSoop
 

Recently uploaded (20)

Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
 
HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Buy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail AccountsBuy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail Accounts
 
joint cost.pptx COST ACCOUNTING Sixteenth Edition ...
joint cost.pptx  COST ACCOUNTING  Sixteenth Edition                          ...joint cost.pptx  COST ACCOUNTING  Sixteenth Edition                          ...
joint cost.pptx COST ACCOUNTING Sixteenth Edition ...
 
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
 
PHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation FinalPHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation Final
 
Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024
 
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service AvailableNashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
 
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 MonthsSEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
 
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
 
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
 
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptxQSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
 
WheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond InsightsWheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond Insights
 
Cannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 UpdatedCannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 Updated
 
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book nowPARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book now
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
 

Stock Market Analysis Markov Models

  • 1. Machine learning in stock market analysis
  • 2. Agenda • Economic concepts • Can we predict the future price of a stock? • Hidden Markov Models • Building a virtual investor • Experimental results • Demo: Ben Investment Assistant • Conclusions and future work
  • 3. Economic concepts • Stock Markets • Stock price and volume • Other indicators
  • 4. Prediction of stock prices • Random walk and the Efficient Market Hypothesis • Dow Theory • Conclusions
  • 5. Hidden Markov Models • Intuitive description • Example:
  • 6. Building a virtual investor • He learns from historical financial data • Based on what he learned he makes decisions (Buy/Sell/Hold) • What data do we provide?
  • 7. Preparing data • We apply the EWMA financial technique to eliminate noise by smoothing the series. • We consider for each the day the rate of growth by applying the natural logarithm for the daily return • How do we make use of this data?
  • 8. Computations • Modeling observations: Multivariate Gaussian mixtures • Re-estimations: – What is the probability of being at state 2 at time 4? – What is the probability of being at state 2 at time 4 at mixture 3? – How do we re-estimate the model?
  • 9. Computations Forward procedure: Backward procedure:
  • 13. Experimental results • Tests conducted for 14 randomly selected companies from different sectors: financial, utilities, technology, services and healthcare. • We obtained to over 100% in revenues, and we suffered losses only when a company suffered a huge depreciation in its stock price. • A few examples...
  • 14. Goldman Sachs (NYSE:GS) Above is the Goldman Sachs stock price evolution (June 07 – June 08) Above is the account evolution for investing in Goldman Sachs during June 07 – June 08 (After a year it generated a 53.3% revenue)
  • 15. Royal Gold (NYSE:RGLD) Above is the Royal Gold stock price evolution for the testing period Above is the account evolution for investing in Royal Gold (It generated a 50.3% revenue in 97 days)
  • 16. An extreme case I (NYSE:MBI) Above is the MBIA stock price evolution for June 07 – June 08 Above is the account evolution for investing in MBIA. The system does a good job at minimizing losses (only 26.2% loss)
  • 17. An extreme case II (NYSE:MBI) Above is the MBIA stock price evolution for June 07 – June 08 Using Auto-regression trees. A 74.2% loss
  • 18. Demo: Investing in Google • Ben Investment Assistant was done using: • Windows Presentation Foundation, Sql Server, Analysis Services, ADOMD.NET, AMO, .NET 3.5, C# 3.0, Linq to SQL on Windows Vista Business. • 3-tier architecture, highly scalable
  • 19. Conclusions • Due to our results we can invalidate the assumption that past data has no use. • Because the algorithm behaves like an investor we can have losses if the company suffers a severe depreciation of value.
  • 20. Future work • If we let Ben make decisions on a diversified portfolio we might almost be certain of a profitable outcome. • We can expand the vector of observations to include more data (for example a news index calculated with text mining and Google search API)