Machine learning in stock
    market analysis
Agenda
• Economic concepts
• Can we predict the future price of a
  stock?
• Hidden Markov Models
• Building a virtual inv...
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
  ...
Preparing data
• We apply the EWMA financial technique
  to eliminate noise by smoothing the
  series.

• We consider for ...
Computations
• Modeling observations: Multivariate
  Gaussian mixtures
• Re-estimations:
  – What is the probability of be...
Computations
Forward procedure:




                     Backward procedure:
Computations
Computations
The algorithm
Experimental results
• Tests conducted for 14 randomly
  selected companies from different
  sectors: financial, utilities...
Goldman Sachs (NYSE:GS)



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




       Above is...
Royal Gold (NYSE:RGLD)



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




       Above is ...
An extreme case I (NYSE:MBI)



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




        Above is...
An extreme case II (NYSE:MBI)




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




       Using Au...
Demo: Investing in Google

      • Ben Investment Assistant was done
      using:
         • Windows Presentation
        ...
Conclusions
• Due to our results we can invalidate the
  assumption that past data has no use.

• Because the algorithm be...
Future work
• If we let Ben make decisions on a
  diversified portfolio we might almost be
  certain of a profitable outco...
Thank you!
Upcoming SlideShare
Loading in …5
×

Stock Market Analysis Markov Models

5,527
-1

Published on

Published in: Business, Economy & Finance
1 Comment
3 Likes
Statistics
Notes
  • Interesting stock market program/model. I've had some success on the ASX of late, trading strategically based on fundamentals, but also applying similar technical analysis. As a part time ESL tutor I have ample time to make good trading decisions. I utilise Stock Market Charting Software to assist in making good decisions.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
5,527
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
237
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide

Stock Market Analysis Markov Models

  1. 1. Machine learning in stock market analysis
  2. 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. 3. Economic concepts • Stock Markets • Stock price and volume • Other indicators
  4. 4. Prediction of stock prices • Random walk and the Efficient Market Hypothesis • Dow Theory • Conclusions
  5. 5. Hidden Markov Models • Intuitive description • Example:
  6. 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. 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. 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. 9. Computations Forward procedure: Backward procedure:
  10. 10. Computations
  11. 11. Computations
  12. 12. The algorithm
  13. 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. 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. 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. 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. 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. 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. 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. 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)
  21. 21. Thank you!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×