Backtesting OVER 500 stocks using VECTORIZATION [Do NOT skip this]

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ธ.ค. 2024

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

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

    Very inspiring to see we can do in seconds what the iterative method took hours. Thanks a ton. More power to you

    • @Algovibes
      @Algovibes  18 วันที่ผ่านมา

      Thank you mate! appreciate the comment

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

    Excellent one.speed results are astonishing. I will try to follow this vectorized approach in future 😊

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

      Thanks Anil for watching and leaving a comment!

  • @Asparuh.Emilov
    @Asparuh.Emilov ปีที่แล้ว +4

    Your code is always so straight to the point, the easiest, and most efficient solutions, which is great sign of professionalism and experience! Absolutely lovely to watch your videos bro! You are just the best! 🙌♥️

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

      Thank you very much ❤️ Appreciate your comment and having you on board!

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

    can we applied reinforcement learning

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

      I wouldn't see the application in this specific case. But RL could learn the best parameters in a realtime trade scenario.

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

    great tutorial as always, can you explain why we need to find the first signal separately instead of using the diff() function to get all the signals.

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

      Thanks mate! Sure: If you do not do it your first signal could be a selling signal. With that you are blowing up your backtest and the profit calculation.

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

      @@Algovibes thanks for the explanation.

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

      Can you solve this by using 1 for buys and -1 for sells, instead of True or False.
      Btw thank you for the great content!!

  • @Niko-ie6dh
    @Niko-ie6dh ปีที่แล้ว +1

    would it be possible to use this approach to backtest a portfolio of say 5-10 stocks at a time, where you always spend like 10% of your current balance?

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

      Sure, that's definetly possible!

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

    my brain is sizzling from this one

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

      It's an advanced topic and perfectly fine to use the iterative approach as well! I tried my best to explain it in detail 😛

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

    Amazing speed, but for more sophisticated logic(Take Profit, Stop Loss, etc.) I doubt there's any way around iterative approach.
    Unfortunately

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

      It actually is possible. The thing with vectorization is: There more complex the trading logic, the harder it get's to design it using a vectorized approach.

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

      @@Algovibes Wow! I would love to see that!
      This got to be some master wizzard pandas coding +logic

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

    AlgoKing

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

    🙋‍♂

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

    great! marginal gains like in cycling :-) lol

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

      🚴🏽‍♂️

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

    Loop through the df is much easier to understand 😂

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

      And perfectly fine to use! Don't worry about it - Vectorization is an advanced topic.

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

    Great video, as always! I have a request, can you create a video to explain walk-forward backtesting in Python. The topic explained by Kevin J. Davey in "Building Winning Algorithmic Trading System" , also you can find it here en.wikipedia.org/wiki/Walk_forward_optimization

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

      Sure! Noted and will be covered somewhen in the upcoming months. Thanks a lot