Predicting Stock Prices - Learn Python for Data Science #4



In this video, we build an Apple Stock Prediction script in 40 lines of Python using the scikit-learn library and plot the graph using the matplotlib library. The challenge for this video is here: https://github.com/llSourcell/predicting_stock_prices Victor's winning recommender code: https://github.com/ciurana2016/recommender_system_py Kevin's runner-up code: https://github.com/Krewn/learner/blob/master/FieldPredictor.py#L62 I created a Slack channel for us, sign up here: https://wizards.herokuapp.com/ Stock prediction with Tensorflow: https://nicholastsmith.wordpress.com/2016/04/20/stock-market-prediction-using-multi-layer-perceptrons-with-tensorflow/ Another great stock prediction tutorial: http://eugenezhulenev.com/blog/2014/11/14/stock-price-prediction-with-big-data-and-machine-learning/ This guy made 500K doing ML stuff with stocks: http://jspauld.com/post/35126549635/how-i-made-500k-with-machine-learning-and-hft Please share this video, like, comment and subscribe! That's what keeps me going. and please support me on Patreon!: https://www.patreon.com/user?u=3191693 Check out this youtube channel for some more cool Python tutorials: https://www.youtube.com/watch?v=RZF17FfRIIo

Comments

  1. If anyone else is having a problem where your terminal crashes every time you run, comment out all the svr_poly lines. The linear/rbf SVMs should show fine. This problem was happening to me even after switching the backend on Mac and Linux
  2. You are amazing!!!! Thanks so much for taking the time to do this
  3. why the fuck it takes so long to give the chart
  4. What's better, R or Python for stock analysis?
  5. bhai, can you make video in Hindi?
  6. I've been in this game for a while and yes, you can create slightly better than random guesses based on historical stock price data alone (I've tested Kalman filters and recurrent neural networks in this case). However, I also analyze news and discussions related to the stock in question and include that data in my model (sentiment analysis is one part of that model). To my experience, the stock market is a very subjective market, i.e. a big portion of valuation is based on the perception of value rather than the actual value.
  7. nice hair
  8. how does it feel to talk with someone who sit 3 tables behind you
  9. I am voting you for nobel price
  10. the dataset you use has already been priced in. if everybody has access to it, it's useless. what the proprietary trading strategies do is to mine for new data, if others dont see it, then you can make money
  11. I got no ouput, no error message running demo.py on Win7/Anaconda even while trying alternative backends. Any suggestions? I'm so disappointed now...deeply depressed.
  12. If it were just that simple...
  13. Play at 0.25 speed.
  14. can you predict when I will go to bed ? :D
  15. So, I'm trying to get my matplotlib to look like Siraj's in this video @ 6:36. But, mine looks way different, and I've triple checked my code to his. Here is my code/jupyter notebook: https://github.com/Bowiemb/demos/blob/master/Predicting%20Stock%20Prices%20Demo.ipynb
    Can anyone help point me in the right direction as to where I'm messing up? Thank you!
  16. I just love this guy.
  17. Hi Siraj! Great tutorial this! However if we just try prediction with one feature, it is bound to get erroneous values like in this case, the predicted price is off by a good 25 points if we consider the day number as the only parameter. Hence I decided to include month and weekday as well and performed one-hot encoding on it as it gives better results this way. So basically my data set now has 17 columns excluding the price column now. The function that we have made here accepts only 2 parameters, so how should we go about tackling this problem? I was thinking we could maybe store the entire test data as an array of arrays and then pass it to the function. If yes, how should I modify the function to adapt to this change. Please let me know if I'm in the right direction and also suggest a way to implement this part in the predict_price function. Thanks!
  18. Thank you for this video. Please make as many as you can!
  19. Your code just freezes on ubuntu...how can i fix it?
  20. How long does it take to come with the result? I have been 20 min waiting


Additional Information:

Visibility: 108349

Duration: 7m 39s

Rating: 1844