Stock Market

Stock Market Models – Stock Price Prediction Using Python & Machine Learning

stock-market-models-stock-price-prediction-using-python-machine-learning

Stock Market Models – Best Deal Right Now?

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.

Disclaimer: The material in this video is purely educational and should not be taken as professional investment advice. Invest at your own discretion.

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 !

▶️ Get 4 FREE stocks (valued up to $1600) on WeBull when you use the link below and deposit $100 or more:
https://act.webull.com/kol-us/share.html?hl=en&inviteCode=LR6VIpFiAkPe

▶️ Earn $10 in Bitcoin by signing up with BlockFi and depositing $100 or more:
https://blockfi.com/?ref=e5b523e0

⭐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

Thanks for watching the Stock Market Models video!

Watch the Stock Market Models video on Youtube

20 Comments
Share

20 Comments

  1. yh Huang
    July 27, 2021 at 7:07 am

    will there be a transformer version of this XDD

  2. shu pui Tik
    July 27, 2021 at 7:07 am

    how to print the further prediction in real time?

  3. Mmr Bulbul
    July 27, 2021 at 7:07 am

    Rule No 1: Never fit scaler with test data. That might leak data distribution of the test data.

  4. Frank M
    July 27, 2021 at 7:07 am

    Sorry i figured out the BS. He is using the last 60 days of stock prices to predict the next day. But in Cell 16, you make test_data = scaled_data[etc], in this cell, you are basically saying you are using the 20% training portion of the data as input values. What is the point of this? In reality, you do not have this 20% of values which you are using to "test" here. The correct "test" here would be to put the predictions back into the input array. Otherwise, an improvement of this module is simply make prediction = stock price on the day before…

  5. Frank M
    July 27, 2021 at 7:07 am

    Wait wtf, sorry i skipped to the results, but it seems that he is nicely able to predict. What BS is this? Is he can really do this, he is already the riches person in the world.

  6. Pavlo Seimskyi
    July 27, 2021 at 7:07 am

    You shouldn't fit the scaler to the validation/test data [13:18], it is data leakage. You should only fit the scaler to training data and then transform both the training and validation sets.

  7. CHETHAN RAVI
    July 27, 2021 at 7:07 am

    I understood the model part but can you create a website for this model where we can show the future values and the graph

  8. Sani Satpati
    July 27, 2021 at 7:07 am

    sir i am facing shape related issue though i have followed your steps.
    #creation the test dataset
    #creating a new array containing scalled values
    test_data=scaled_data[train_data_len-60:,:]
    #create the dataset X_test, Y_test
    X_test=[]
    Y_test=dataset[train_data_len:,:]
    for i in range(60,len(test_data)):
    X_test.append(test_data[i-60,i:0])

    #converting the data into three dimensionl dataset becouse LSTM only take three dimensional data model
    X_test=np.reshape(X_test,(X_test.shape[0],X_test.shape[1],1))

    #get the model predicted price values
    prediction=model.predict(X_test)
    prediction=scaler.inverse_transform(prediction)

    WARNING:tensorflow:Model was constructed with shape (None, 60, 1) for input KerasTensor(type_spec=TensorSpec(shape=(None, 60, 1), dtype=tf.float32, name='lstm_2_input'), name='lstm_2_input', description="created by layer 'lstm_2_input'"), but it was called on an input with incompatible shape (None, 0, 1).

  9. Leslie Muniz
    July 27, 2021 at 7:07 am

    l recommended a professional broker to you guys sometime ago, can I get person who invested with her
    comment below
    let's gooooo

  10. Mystery Hogs
    July 27, 2021 at 7:07 am

    good ML prediction demonstration but the result is very inaccurate 🙂 predicted price is always higher than the actual lol its like adding +2 its either 2 USD or 200 USD lol depending on the stock price

  11. Mahdi Zamani
    July 27, 2021 at 7:07 am

    A naive model would do better than LSTM here 🙂

  12. natbusa
    July 27, 2021 at 7:07 am

    Congratulation, you have trained a naive 1day predictor. Duh. 🙄

  13. Vivek Kumar
    July 27, 2021 at 7:07 am

    After training the model.. and converting data to numpy array…
    when reshaping the data .. it is showing error tuple index out of range…

    Any solutions plz

  14. Nick's Stuff
    July 27, 2021 at 7:07 am

    Whaaaaaaaaaaaaaaaaaaat?

  15. James Lee
    July 27, 2021 at 7:07 am

    Most newbies usually undermine and neglect the importance of technical analysis with regards to trading. Technical analysis overly predicts the movement of assets prices regardless of what is happening in the wider or broader market. Essentially, the education involves studying the paths of a particular asset movement in this past so as to establish a sustainable pattern that can be used to predict future movement of an asset. Doing technical analysis can be quite different which is why most newbies / traders neglect day trading their stocks/ coins and stick to holding which is very dangerous as when the market goes bearish, advise any newbies / traders to buy the dip for traders who are still wondering to enter the market or old time traders who are holders to seek help from not just any trader but an established trading expert with at least 96% trade accuracy .I underwent series of trading loses l'd best not talk about before I was introduced to trading analyst Mr Elvis Hercules My contact with him has been the Pinnacle of this year for me, under his careful guide and his signal service I've been able to recover my losses and even grow my trading portfolio massively from 1.6 BTC to 7 BTC and also from 10k to 67k in stocks ,in just 5 weeks. I orientation of trading will advice traders and newbies to before they involve in it. Mr Elvis Hercules,makes you learn daily while you make profit with his signals. he can be contacted via mail (elvishercules48@gmail.com)

  16. kunal dhadse
    July 27, 2021 at 7:07 am

    Assuming that all that is shown in the video is true and without any con: If this guy is so accurate in predicting the future prices of stocks, then what is he doing here on YouTube Click-Baiting people into watching his videos and buying his Hoodies/T-shirts/Nerd mugs?

  17. Andrey R
    July 27, 2021 at 7:07 am

    Model is overfitted

  18. Mateusz
    July 27, 2021 at 7:07 am

    It would be super useful if you could provide the raw code as well

  19. Drathez
    July 27, 2021 at 7:07 am

    How do you make it to predict the next 30 days?
    Like an extension to the actual value in the graph?

  20. Kumpi Panda
    July 27, 2021 at 7:07 am

    i guess i am little late here but m glad had this recommendation. Grt stuff and what exactly i was looking