Machine Learning Stock Prediction Using Random Forest Regressor

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ม.ค. 2025

ความคิดเห็น •

  • @RasoulMojtahedzadeh
    @RasoulMojtahedzadeh 2 ปีที่แล้ว +65

    At the beginning of each trading day, only Open price is known. The features High, Low and Volume are not yet known, and hence, using them as features is not possible to predict the Close price of the day.

    • @kibs_neville
      @kibs_neville 9 หลายเดือนก่อน

      Exactly, so what is the solution?

    • @Random_work822
      @Random_work822 6 หลายเดือนก่อน

      ​@@kibs_neville using open price to predict

  • @DeejayGabin
    @DeejayGabin 2 ปีที่แล้ว +11

    You entroduced lookahead biais in your model training using high, low and volume as it is unknown at the open time of the candle. What you could do is shift your Close column for your y variable, to try predicting the next canddle close price

  • @vloggetts
    @vloggetts 8 หลายเดือนก่อน +1

    No train test split. This is the equivalent of giving the model the answer sheet to the test so you don’t get an accurate picture of model performance

  • @guicraw99
    @guicraw99 ปีที่แล้ว +2

    The y value should be different from the current open, low, high and volume information row. Should we use other data, rather than open ,low, high and volume to predict the future stock price ?

    • @shalomdosseh5367
      @shalomdosseh5367 ปีที่แล้ว

      You are use indicators value, emas cross, macd, rsi etc..values as feature instead of OHLV values

  • @mint9121
    @mint9121 2 ปีที่แล้ว +2

    Nice work, thanks for sharing.

  • @pranavkhatri9564
    @pranavkhatri9564 ปีที่แล้ว +4

    do you not need to split the dataset?

    • @JamieCrew
      @JamieCrew 6 หลายเดือนก่อน +1

      He did, but without using the split method. He did it by manually assigning X as all the rows excluding the Close column and the last row. He then assigned Y as all the rows close value except the last row, as this is the test set.
      He then trained the model with the above, and then he ran the test on the last row(test data) X values(columns excluding close value) and predicted Y(the close value for the last row). It's not the best algorithm as his set is split at a very unbalanced value. One needs more data to make it more accurate.

  • @rajeshmanjrekar3614
    @rajeshmanjrekar3614 2 ปีที่แล้ว +3

    pls enclose a link for the data.....thanks a lot

  • @christopherheuser622
    @christopherheuser622 2 ปีที่แล้ว

    Why would the model predict 263 only, if the last couple of days are already > 270, values which are included into the prediction of only 263 and not 270-280?

  • @ACSMusicSounds
    @ACSMusicSounds ปีที่แล้ว

    How would you make a graph based on this? Thank you

  • @thevaibhavkaushal
    @thevaibhavkaushal ปีที่แล้ว +5

    Bogus Exercise. Feature already are part of future data thus making prediction using them makes no sense.

    • @guicraw99
      @guicraw99 ปีที่แล้ว +1

      Exactly. The y value should be different from the current open, low, high and volume information row. Should we use other data, rather than open ,low, high and volume to predict the future stock price ?

  • @fleshandbloody-hm3bc
    @fleshandbloody-hm3bc 8 หลายเดือนก่อน

    Thank you!!

  • @aarondelarosa3146
    @aarondelarosa3146 ปีที่แล้ว

    Excellent. Could you make a video on Portfolio Optimization using Black Litterman Model?

  • @thebiggerpicture__
    @thebiggerpicture__ 4 หลายเดือนก่อน

    You are using the High and Low of the hour, but you will only know this information once the hour is finished. These two features dont make sense. Thanks anyways for the video.

  • @Alberto-tv8rg
    @Alberto-tv8rg ปีที่แล้ว

    I am working on a similar project on colab but I cannot import sklearn ensemble RandomForestEnsemble..please help me

  • @heresmypersonalopinion
    @heresmypersonalopinion ปีที่แล้ว

    Man I'm working on a trading bot. How much for your help?

  • @didierleprince6106
    @didierleprince6106 2 ปีที่แล้ว

    Merci (:

  • @ph5915
    @ph5915 2 ปีที่แล้ว +2

    Argh. I get anFileNotFoundError at the line -- df = pd.read_csv('stock_data.csv')

    • @ElectricSH33P
      @ElectricSH33P 2 ปีที่แล้ว +3

      You would need to include the file path to your stock_data.csv file. pd.read_csv('/path/to/file'). That error means that your notebook can't find the CSV file.

    • @ph5915
      @ph5915 2 ปีที่แล้ว +2

      @@ElectricSH33P Ah, thank you (I'm very new to this.)