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! 🙌♥️
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.
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?
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.
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
Very inspiring to see we can do in seconds what the iterative method took hours. Thanks a ton. More power to you
Thank you mate! appreciate the comment
Excellent one.speed results are astonishing. I will try to follow this vectorized approach in future 😊
Thanks Anil for watching and leaving a comment!
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! 🙌♥️
Thank you very much ❤️ Appreciate your comment and having you on board!
can we applied reinforcement learning
I wouldn't see the application in this specific case. But RL could learn the best parameters in a realtime trade scenario.
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.
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.
@@Algovibes thanks for the explanation.
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!!
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?
Sure, that's definetly possible!
my brain is sizzling from this one
It's an advanced topic and perfectly fine to use the iterative approach as well! I tried my best to explain it in detail 😛
Amazing speed, but for more sophisticated logic(Take Profit, Stop Loss, etc.) I doubt there's any way around iterative approach.
Unfortunately
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.
@@Algovibes Wow! I would love to see that!
This got to be some master wizzard pandas coding +logic
AlgoKing
:-)
🙋♂
🙋🏻 😁
great! marginal gains like in cycling :-) lol
🚴🏽♂️
Loop through the df is much easier to understand 😂
And perfectly fine to use! Don't worry about it - Vectorization is an advanced topic.
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
Sure! Noted and will be covered somewhen in the upcoming months. Thanks a lot