A Machine Learning Stock Trading Strategy Using Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ส.ค. 2024
  • #Programming #Python
    A Machine Learning Trading Strategy Using Python:
    Stock Price Direction Using Machine Learning & Python
    Get the data set:
    / 70720194
    Disclaimer: The material in this video is purely for educational purposes and should not be taken as professional investment advice. Invest at your own discretion.
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    ⭐Please Subscribe !⭐
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    🐦🔥🐤 Support The Channel🐤🔥🐦
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    ⭐Get the code and data sets or just support the channel by becoming a supporter on Patreon:
    ► / computerscience
    ⭐Website:
    ►everythingcompu...
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    📚Helpful Python Programming Books📚
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    ► Hands-Machine-Learning-Scikit-Learn-TensorFlow:
    amzn.to/2AD1axD
    ► Learning Python:
    amzn.to/3dQGrEB
    ►Head First Python:
    amzn.to/3fUxDiO
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    📚Helpful Financial Books📚
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    🌟Stock Market Investing Books:
    ✔️The Bogleheads' Guide to Investing
    amzn.to/3s0icxA
    ✔️The Intelligent Investor
    amzn.to/34Mj7t1
    ✔️A Random Walk Down Wall Street
    amzn.to/3Bv0ghW
    🌟Money Mindset Books
    ✔️Rich Dad Poor Dad:
    amzn.to/3rZW6eE
    ✔️Get Good With Money: Ten Simple Steps To Becoming Financially Whole:
    amzn.to/3I1UXc1

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

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

    Great project! A small tip: For those that did not understand quite well exactly what the strategy consist is basically when he inputs the independent variables to the model, the model predicted zeros and ones, understanding one as a buy signal for the day and zero as a selling signal. In the end, he compares the strategy returns with a simple buy-and-hold strategy. Again as he mentioned a good project, but for investment purposes, it needs more optimization and backtesting.

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

    hey, thank you for this video. It was really helpful. I managed to improve the results by adding a "speed" input to the NN. Where df['Speed'] = df.Close.shift(-1) - df['Close'].

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

    Awesome! Cant wait to start coding this project alongside you!

  • @juan-3350
    @juan-3350 2 ปีที่แล้ว

    Let’s go 🙏

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

    I see your code to calculate Strategy return = strategy return * return ( normal return) I think it must be dependent

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

    i have one question:
    i have output
    The stock gives return of 260.39%
    The strategy gives return of 5920.5% WTF?

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

      you have something from the present day, and you should use lagged data (1 day lag for instance). if you use data from the day you want to predict it becomes unreal results.

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

    Great video! Can you make a video on Chande Momentum Oscillator? Thanks

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

    Sir how to track institutional activity live with python.

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

    what is the model of the strategy really i very much confused ..... May be the coding is good but the strategy is not clearly explained ....

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

    Not bad

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

    Great work, but the way the bot work make me wonder, if the bot says buy today but the market closed, that’s mean I should buy tomorrow with opening price ? How can we follow the recommendations in general

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

      hehe yes. so you could use intraday prices and have a trading strategy that is more practical, trading everyday at the same time for example. however it is an easier model to use daily prices for learning.

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

    Everything's great, but I can't figure out what would be our buy signal according to the strategy?

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

      The model predicting y=1 is the buy signal, while y=0 could be, but is not a sell signal.

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

    Strategy name?

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

    This is absolute trash. You trained the model on 90% of the data from 2020 to 2021 and created a 'trading strategy' which already knows what the price action will do on a specific day. What you should do is show how this strategy performs on data not in the trained set ONLY, i.e. the 10% of data not used. However, around 30 days of the strategy is pretty insignificant so testing on live data would be far more useful.

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

      yes, you are right you can just change the percentage if you want and use different data set, but this is a fun project he did not seem like he was actually planning to trade with it. Obviously live testing is way better and a lot more work and back testing is needed if you actually want to automate something like this and i would use a different module as well. but this is a fun program and I enjoyed it! great video for beginners.

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

    where can i get the csv used in the video?

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

    Great piece ... of garbage. But, honestly, very good demonstration for high school students' learning. Cheers.