Trend Line Breakout Machine Learning Algorithmic Trading Strategy in Python

Поділитися
Вставка
  • Опубліковано 5 жов 2024
  • I show a Trend Line breakout trend following strategy and improve the results by meta-labeling the trades. Then train a random forest to predict when a trade will succeed or fail.
    Patreon: / neurotrader
    Code: github.com/neu...
    Links
    en.wikipedia.o...
    en.wikipedia.o...
    The content covered on this channel is NOT to be considered as any financial or investment advice. Past results are not necessarily indicative of future results. This content is purely for education/entertainment.

КОМЕНТАРІ • 38

  • @benbalaj1732
    @benbalaj1732 2 місяці тому +10

    Dude, where did you go. You're not posting anymore? :(

  • @MisterPDR
    @MisterPDR Рік тому +26

    I think you really add value by consistently demonstrating new angles to approaching algo trading. There‘s nothing comparable on youtube, as most content is related to price indicator trading. Thank you for this and keep up the great and inspiring work!

  • @Raekonn
    @Raekonn 5 місяців тому +2

    Your content is STELLAR man. Keep it up!

  • @deviatewithDarrell
    @deviatewithDarrell 9 місяців тому +2

    Wow, awesome video. Very detailed and, even though I'm new to coding and stock investing, I can see how a few more adjustments can zero this algo into a very profitable strategy.

  • @philipbernstein5069
    @philipbernstein5069 Рік тому +4

    love the random state number

  • @noecb9909
    @noecb9909 Місяць тому

    Great video! very educative, especially in the way to analyze the feature importance/correlations.

  • @erikbakker6226
    @erikbakker6226 Рік тому

    Excellent thought process and skilled execution. Ever thought of doing this again but then based on a Liquidity based strategy where price delivery and time determine the movement in price. Include a newsfilter and I think you will have a winner 😊

  • @DeAdBiGeYeFiSh
    @DeAdBiGeYeFiSh Рік тому +2

    Hey neurotrader, just found out your channel. Seems really excellent and unique!
    Question: Is deep learning the ML method that you use the most for the strategies and parts of your system that use ML? Is there a close second? I feel like deep learning is an inefficient overkill for retail traders in most cases, but I don't have much knowledge nor practice in any of that lol

    • @neurotrader888
      @neurotrader888  Рік тому +10

      I have never found deep learning to be effective. Financial datasets extremely noisy and relatively small. A deep learning model has too many weights and will overfit. That isn't to say it is not possible for deep learning to be effective, but it would have to be done on a very high frequency data set.
      I do use non-deep neural networks if the relationship is quite nonlinear. They generally have a single hidden layer, rarely 2 hidden layers, with small numbers of hidden neurons. Most often I use linear models (RSI-PCA video is a good example). Most market relationships are linear, or monotonic nonlinear. For meta-labeling (like this video), I typically use random forests.

  • @mageshkumar4622
    @mageshkumar4622 Рік тому +1

    keep doing the good work, I checked with some real-time data from nse, and the success ratio is not good.

  • @QuantRM
    @QuantRM 4 місяці тому +1

    You didn’t shift your signal column it has look ahead bias

  • @SuperChaoticOne
    @SuperChaoticOne Рік тому +2

    I had a thought regarding the walkforward modelling part. In this setup, since each trade is independent of the others, wouldn't it make more sense to randomly sample a # of trades across all years of the data, and then use the remaining as test data instead of just splitting by year? This way you account for the different market regimes that may be present at different time periods and have a more general model versus a model that might be overfit for a particular market type. What do you think?

    • @neurotrader888
      @neurotrader888  Рік тому +2

      That's a reasonable approach for testing the robustness of the model overall. And that approach is good for setting hyperparameters like max depth of trees, etc.
      Ideally you would do both.
      But walkforward (or expanding window) is how the model will have to be trained if it were to eventually be used in practice. If a model does not work in a walkforward test I would certainly not use it going forward.
      Generally speaking financial markets are not stationary, the assumption of a model is that the relationships it learns will stay the same going into the future (stationary). In reality they will not be exactly the same, but hopefully similar enough.
      Markets evolve and the relationships may change subtly over time. By training on the most recent trades, the hope is that the model is as 'up-to-date' as possible with the way the market currently operates.

    • @SuperChaoticOne
      @SuperChaoticOne Рік тому

      @@neurotrader888 Thanks, that makes sense to want to have the most recent info as the influencing one. There would probably still be small windows of time where our model would fail during a regime change but as long as we are continually training and keeping our model up to date it would catch back up. I wonder if it would make sense to maintain multiple models based on regime which you could then switch out(though this would require being able to identify the change in market regime early).

    • @neurotrader888
      @neurotrader888  Рік тому +4

      ​@@SuperChaoticOne I like that idea.
      I don't want to reveal all of my secrets, but I will tell you, in my experience, financial markets tend to behave quite differently during periods of high volatility vs. low volatility.
      Obviously test for yourself, do your own research, don't take my word for it..

    • @poisonza
      @poisonza 7 місяців тому +1

      regime change detection... how would you go about doing that?
      train hmm or combination of indicators?
      Its total mess to consider all of that
      I would much prefer to optimize portfolio on bunch of assets on 10+ years of data.

  • @shahaffrsshahaffrs5190
    @shahaffrsshahaffrs5190 Рік тому +1

    Great job every time well done

  • @alexandrgrishin7518
    @alexandrgrishin7518 7 місяців тому

    Thank's for your videos!

  • @haithammisape9155
    @haithammisape9155 4 місяці тому

    Nice work I enjoyed the video! I'm new to programming but have a good understanding of trading. Could you assist me in transforming those bots into real-time trading systems

    • @haithammisape9155
      @haithammisape9155 4 місяці тому

      I'm looking for someone who can provide guidance and assistance. Can anyone help me out?

  • @johnddonnet5151
    @johnddonnet5151 8 місяців тому

    Awesome videos!

  • @huihuang-pk3nr
    @huihuang-pk3nr Рік тому

    I owe you one., and A good video that I admire...

  • @santalaszlo6858
    @santalaszlo6858 Рік тому

    awesome, thank you😊

  • @rajd9219
    @rajd9219 Рік тому

    Can you make RLbased or Qlearning based model for Intraday trading?

  • @bombasticiti
    @bombasticiti 9 місяців тому

    Nice may Allah help us use all this money wisely

  • @MisterPDR
    @MisterPDR Рік тому +1

    is there a github repo or should i type what i see :)

    • @neurotrader888
      @neurotrader888  Рік тому +1

      It's all on github. Link in description. I usually mention it in the video but I forgot this time.

  • @haznedarbungalov
    @haznedarbungalov Рік тому +2

    Why you are not rich? I mean why you don’t make a trader ai to predict crypto

    • @benjamindover2483
      @benjamindover2483 8 місяців тому

      Good question

    • @poisonza
      @poisonza 7 місяців тому

      cause it just doesnt gurantee future profitability. backtest is a single realization of cumulative return(of a strategy).

    • @yuzhmash3390
      @yuzhmash3390 3 місяці тому +1

      Maybe he is, it's not like he should show a Ferrari at the start of the video

  • @sinaseifouri3127
    @sinaseifouri3127 Рік тому

    Amazing😍

  • @albertovidalfernandez112
    @albertovidalfernandez112 Рік тому

    Hi, please can u teach me how put orders in futures with ccxt un kucoin. I have a lote of backtestings, and I want to go test but i dont know how put orders. THX man ❤ 0:25 1:26

  • @ciaranmcveigh6926
    @ciaranmcveigh6926 Рік тому

    Hey neurotrader, big fan of your content! I've reached out to your channel via email, keep the videos coming! 🙌

  • @Newbie-dv9gc
    @Newbie-dv9gc 10 місяців тому

    Heyyyyyyyy are you thereee?