Stock Price Prediction Using Python & Machine Learning




[ad_1]

Stock Price Prediction Using Python & Machine Learning (LSTM).
In this video you will learn how to create an artificial neural network called Long Short Term Memory to predict the future price of stock.

NOTE: In the video to calculate the RMSE I put the following statement:
rmse=np.sqrt(np.mean((predictions- y_test)**2))

When in fact I meant to put :
rmse=np.sqrt(np.mean(((predictions- y_test)**2)))

You can use the following statements to calculate RMSE:
1. rmse =np.sqrt(np.mean(((predictions- y_test)**2)))
2. rmse = np.sqrt(np.mean(np.power((np.array(y_test)-np.array(predictions)),2)))
3. rmse = np.sqrt(((predictions – y_test) ** 2).mean())

Please Subscribe !

►Article :
https://medium.com/@randerson112358/stock-price-prediction-using-python-machine-learning-e82a039ac2bb

⭐Please Subscribe !⭐

⭐Support the channel and/or get the code by becoming a supporter on Patreon:
https://www.patreon.com/computerscience

⭐Websites:
http://everythingcomputerscience.com/

⭐Helpful Programming Books
► Python (Hands-Machine-Learning-Scikit-Learn-TensorFlow):
https://amzn.to/2AD1axD

► Learning Python:
https://amzn.to/3dQGrEB

►Head First Python:
https://amzn.to/3fUxDiO

► C-Programming :
https://amzn.to/2X0N6Wa

► Head First Java:
https://amzn.to/2LxMlhT

#StockPrediction #Python #MachineLearning

Source


[ad_2]

Comment List

  • Computer Science
    November 26, 2020

    Something gives… I used BTC among other data (equities, commodities, currency prices) and it does a near 1-1 prediction. No way it's THIS accurate. Especially for something as volatile and unpredictable as Bitcoin.

  • Computer Science
    November 26, 2020

    nice one

  • Computer Science
    November 26, 2020

    Can anyone give the code for finding the accuracy and confusion matrix?….
    I'm new to ML🙇 It would be helpful

  • Computer Science
    November 26, 2020

    Low voice …

  • Computer Science
    November 26, 2020

    I have a question. Is it necessary to add 'shuffle=False' in model.fit()? The default setting in model.fit() is shuffle = True, but for time series data, we need to keep the sequence, so we do not need to shuffle the data.

  • Computer Science
    November 26, 2020

    There is a flaw. scaler.fit_transform() should be executed on the training data instead of the entire dataset. If executed on the entire dataset, then the mean and variance are calculated on the entire dataset (with test data included). This will bias the model with information from the test data. The correct step should be execute scaler.fit_transform() on the training data at first, and then execute scaler.transform() on the test data. Similar to the case here: https://scikit-learn.org/stable/modules/preprocessing.html

  • Computer Science
    November 26, 2020

    This is epic but a bit intimidating! If you have TA skills but feel scared by this amount of coding, helping train an esisting AI might be a good first step. Tradeoshi Labs are looking for people to use a GUI to build, backtest and implement strategies for their AI. There are 130 indicators on the current GUI. Top contributors earn crypto as well as free access to the full AI tradebot. There is an open beta coming soon. Hop on the discord for more info and updates from the closed BETA round. https://discord.gg/UHcBgZ9 THERE IS NO BUY IN OR OTHER HIDDEN NONSENSE ALL YOU NEED IS SKILLS AND ANY BALANCE IN A WALLED OFF BINACE ACCOUNT (10$ reommened) FOR LIVE TESTING

  • Computer Science
    November 26, 2020

    Good job but remember to add library versions so people can execute your code.

  • Computer Science
    November 26, 2020

    Hello Guys,

    I have a question.

    can anyone help me to create MACD interactive chart.?

    Top like OHLC chart and

    Bottom, MACD with (Bins) Histo…

    I did

    https://plotly.com/python/ohlc-charts/

    https://plotly.com/python/time-series/

    I need to combine them…

    Thankssss…

  • Computer Science
    November 26, 2020

    Going to vouch for what many have commented here. Highly misleading thumbnail. Newcomers should pay close attention to what data is being used to predict and why this is not the way you would forecast multiple timesteps into the future.

  • Computer Science
    November 26, 2020

    where can i find code

  • Computer Science
    November 26, 2020

    In line
    from sklearn.preprocessing import MinMaxScaler
    Error showing module not found

  • Computer Science
    November 26, 2020

    Very nice video…sir but plz send a data set on mail id,. sandeepmane3038@gmail.com

  • Computer Science
    November 26, 2020

    Good tutorial on simple machine learning, bad tutorial on stock prediction

  • Computer Science
    November 26, 2020

    This is as good as random number indeed. What would LSTM model relate to? Appreciate you putting time but it adds no value to my learning and 40 minutes of investment.

  • Computer Science
    November 26, 2020

    Hi, how do you predict for more than one day? say 14 days?
    Would you change the line X_test = np.reshape(X_test, (X_test.shape[0], X_test.shape[1], 1))
    TO
    X_test = np.reshape(X_test, (X_test.shape[0], X_test.shape[14], 1)) ???

    Which bit of code would you modify? OR can you specify this in the existing code by calling a function that allows you to specify the time steps?

  • Computer Science
    November 26, 2020

    Why is my LSTM model not working?
    it is invalid syntax for "model.add(LSTM(50, return sequences=false))"

  • Computer Science
    November 26, 2020

    Sir can you tell me how can I trained this model on multiple instrument at the same time mean Apple Google Facebook Amazon instrument at the same time.

    And if I trained the model on a particular instrument like Apple, so can I use that same trained model to predict any different instrument like Google.

  • Computer Science
    November 26, 2020

    Thank U.

  • Computer Science
    November 26, 2020

    How to add Yahoo new API link code. Its different from what you used?

  • Computer Science
    November 26, 2020

    can any one from pakistan?

  • Computer Science
    November 26, 2020

    data leak problem

  • Computer Science
    November 26, 2020

    You're model is completely useless

  • Computer Science
    November 26, 2020

    Clicking "oh man, can't wait to see how this modeling blows up"; watching: "so errors do not compound during predictions?" That's a nah from me, dawg.

  • Computer Science
    November 26, 2020

    Can someone replace LSTM with CNN

Write a comment