Hi everyone, If you are interested how to build a more sophisticated Trading Strategy implementing a SMA/BB/RSI Trading Strategy with Buy Limit orders and a holding perios, check out my newest video here: ua-cam.com/video/9RfFKV0c_u8/v-deo.html
Thank you so much for this video. It really gets me started quickly on Backtrader. I have a couple of strategies I wanted to plug in, but did not want to put them in the cloud because I am going to sell them later. Again, thanks for the Backtrader intro.
Hello Algovibes! Thank you so much for providing a backtester solution (that I was asking for in one of my comment to your previous video)! In the meantime, I didn't give up and made a event-driven itertuple iteration back testing code that is working mostly fine. Still very interesting to see how you are doing it and learning everytime a lot from your videos!
Good video. I have been trying to use backtrader. This video cleared few of my questions. I am waiting to see to test your strategies with this library especially STOCH, MACD, RSI
Please looking forward to more videos on Backtrader, specifically some price pattern strategy where distance between consecutive candles is not fixed. For example, "going long only at the second inverted hammer formed after a bullish EMA cross"
Very precise and targetted introduction of the main features with good examples that once can immediately implement. Thanks. I enjoyed your style of nerration, length of content and depth of coverage,
This was amazing, thanks for share and explain it. I was getting crazy thinking in my backtests developments and this tool make it simple. Thank you again! Greatings from Argentina!
Thanks for creating this video. It's been a really helpful intro and has got me into a position where I can understand the code and even create and test some of my own basic strategies.
Happy to see you with BackTrader. Cool stuff as always. Pray to God that you are always healthy & peaceful to release such great contents. Would be great if I can know your name so as to address you correctly
Love the videos, very informative and structured in a way that makes the process easy to follow. I see your focus to date has been primarily in the technical indicator side of things, but I'd be super interested to see your views on value investing automation.
@@Algovibes I'd be interested in seeing something that automates the security analysis of companies. This would provide you with a pool of stock picks which you could then go on to invest in via one of the strategies you have previously outlined, or to create an automated value-based portfolio.
Yes please! automation based on value investing criterions would be super interesting! Maybe start with the most commonly used value investing criteria? That in my opinion would be one of these: PER, EV/EBITDA, PBV Then compare between the valuation ratios vs the industry's average --> the output from this: we get which stocks are undervalued compared to its industry. Last step would be to backtest if we buy undervalued stocks and see what's the returns for this value investing strategy.
Hooooo God Alfovibes, I even get up at night to listen to your divine light, enlightening us all with your investigations and your divine reflections Keep showing us the way We beg you! :-)
I'd like to see you add a Forex currency pair or two into the tests to round out markets the strategies are tested on. Crypto, stock, currencies. EURUSD makes sense.
Great content thanks!!! It would be great if you could backtest your STOCH MACD RSI strategy with Cryptos (BTC and ETH) which I believe is one of the best you have published. Thanks again for sharing.
Hi Algovibe, can you do some option buying strategy with backtrader. If you can do then it will be very helpful. Thanks bro for such kind of awesome content.
Thanks man. There is nothing like a big ask ;-) I am always thankful for suggestions. But in this specific case I don't have enough exposure to make a resourceful video on that (yet).
having spent one month on zipline, i decided to use another friendly backtesting library.. what would be yoru second pick after Zipline? Something with a big community and lots of documentation .. Zipline is just to hard to use .. with gratitude
hi. you are amazing. could you please write a code for kucoin with websocket and RSI STOCH and MACD? i could not implement kucoin websocket to dataframe. i am very new in python thanks bro
Is it possible to plot the trading graph on frontend like Angular or Reacts? I mean if the backtrader can return needed data and for exaple use Plotly to plot it from angular?
is it possible to test multiple symbols plus multiple timeframes? like every time any of the 500 stocks out of the sp500 rsi(Daily) went < 30, we want to open one(only one until the next stocks rsi turns < 30) trade on the m15 timeframe if the sma50(m15) crosses the sma200(m15)?
Sure, also possible. You could e.g. use the Binance API or just take the 1m interval from yfinance. Binance API -> Just check out some videos in my cryptobot playlist
My kernel dies every time at cerebro.plot(). Our codes are totaly the same. I'm using Jupyter Notebook on macbook pro'17. I would really appreciate if you can help/ direct me with the solution. Thanks for the video!
It's basically copy pasted from the Backtrader documentation. For getting my Notebooks you are invited to join as a member: ua-cam.com/users/Algovibesjoin
@@Algovibes probably a bit strongly worded but I would tidy up some of those if else statements and use np.where, it is a lot faster and it is very tidy and requires fewer lines of code. I have been building software that works dynamically with 250 pairs so I was basing my view on that. for example this one line of code hammers through hundreds of pairs in a fraction of a second. np.where(mean.mean() > tempdf5.loc[0,[s for s in symlist]].values, 1, 0) this is an example of what I would do.
Hi everyone,
If you are interested how to build a more sophisticated Trading Strategy implementing a SMA/BB/RSI Trading Strategy with Buy Limit orders and a holding perios, check out my newest video here:
ua-cam.com/video/9RfFKV0c_u8/v-deo.html
Sehr cool. Wollte es mir schon ansehen. Umso cooler, dass Du es hier vorstellst
Nice, danke für deinen Kommentar :-)
Thank you so much for this video. It really gets me started quickly on Backtrader. I have a couple of strategies I wanted to plug in, but did not want to put them in the cloud because I am going to sell them later. Again, thanks for the Backtrader intro.
Very welcome mate, thanks for dropping a comment!
That's the great thing about Python. There are so many libraries out there that make our lives easier. 👍
Agreed. Preferring doing it from scratch tho :-)
@@Algovibes 😅 makes you a better programmer that way.
I'm so happy you made this video! Can't wait to see a more advanced tutorial for this, Maybe a macd stoch rsi strategy?
Happy you like it! Thanks for the suggestion :-)
Hello Algovibes! Thank you so much for providing a backtester solution (that I was asking for in one of my comment to your previous video)! In the meantime, I didn't give up and made a event-driven itertuple iteration back testing code that is working mostly fine. Still very interesting to see how you are doing it and learning everytime a lot from your videos!
Awesome man. Thanks a lot for your kind words.
Good video. I have been trying to use backtrader. This video cleared few of my questions. I am waiting to see to test your strategies with this library especially STOCH, MACD, RSI
Thanks man, happy to read. Also thanks a lot for the suggestion!
Please looking forward to more videos on Backtrader, specifically some price pattern strategy where distance between consecutive candles is not fixed.
For example,
"going long only at the second inverted hammer formed after a bullish EMA cross"
I discovered Backtrader recently , would be happy to have more videos about it with some logics
Thanks for your feedback!
Very precise and targetted introduction of the main features with good examples that once can immediately implement. Thanks. I enjoyed your style of nerration, length of content and depth of coverage,
Thanks a lot Amit for your feedback. Very happy that you enjoyed it!
This was amazing, thanks for share and explain it. I was getting crazy thinking in my backtests developments and this tool make it simple. Thank you again! Greatings from Argentina!
Thanks for watching man and best regards to Argentina 🇦🇷
Thanks for creating this video. It's been a really helpful intro and has got me into a position where I can understand the code and even create and test some of my own basic strategies.
Very well made and explained
thank you mate, appreciate your comment
Happy to see you with BackTrader. Cool stuff as always. Pray to God that you are always healthy & peaceful to release such great contents. Would be great if I can know your name so as to address you correctly
Thanks buddy for your kind words :-)
Love the videos, very informative and structured in a way that makes the process easy to follow. I see your focus to date has been primarily in the technical indicator side of things, but I'd be super interested to see your views on value investing automation.
Thank you my man. Appreciate your feedback! Do you have something specific regarding value investing in mind?
@@Algovibes I'd be interested in seeing something that automates the security analysis of companies. This would provide you with a pool of stock picks which you could then go on to invest in via one of the strategies you have previously outlined, or to create an automated value-based portfolio.
Yes please! automation based on value investing criterions would be super interesting!
Maybe start with the most commonly used value investing criteria? That in my opinion would be one of these: PER, EV/EBITDA, PBV
Then compare between the valuation ratios vs the industry's average --> the output from this: we get which stocks are undervalued compared to its industry.
Last step would be to backtest if we buy undervalued stocks and see what's the returns for this value investing strategy.
Can't wait to watch! Best channel ever
Thanks buddy ❤️
Hooooo God Alfovibes,
I even get up at night to listen to your divine light, enlightening us all with your investigations and your divine reflections
Keep showing us the way
We beg you!
:-)
😀 Thanks for your support man!
So excited video thankful for you buddy
Thanks a ton for your support :-)
Very good video, would love to see some more in depth stuff
Thx a lot Gary!
so happy i found this video. i was thinking of making something similar. maybe i will to cover a few things missed
ill try to add some custom strategies too, i think that will be useful
Sure man, good luck! 🍀
Do you have any videos explaining how to take this one more step to set a broker for live trading? Mostly interested in connecting to Binance.
Yessir!
I'd like to see you add a Forex currency pair or two into the tests to round out markets the strategies are tested on. Crypto, stock, currencies. EURUSD makes sense.
Thanks a lot for your suggestion!
Great video! Thanks for sharing
Thanks for watching man :-)
series on BT would be appreciated!
Cannot promise a series but quite sure I am gonna cover on of "my" previous strategies.
Hi, awesome tutorial big fan of the videos. I'd really like to see you use backtesting your previous stochastic, RSI and MACD strategy
Thanks a lot Luke, great to read!
Great content thanks!!! It would be great if you could backtest your STOCH MACD RSI strategy with Cryptos (BTC and ETH) which I believe is one of the best you have published. Thanks again for sharing.
Thanks for your comment man. That would be indeed interesting to check out! Noted it.
@@Algovibes I'm following! It'd be very useful
Love your work bro
❤️ thanks
Hi Algovibe, can you do some option buying strategy with backtrader. If you can do then it will be very helpful. Thanks bro for such kind of awesome content.
Thanks buddy for watching my stuff. It is not on my list for the next videos but I noted your suggestion.
Nice!! Can we level up and do some flush loans? Or is that a big ask?
Thanks man. There is nothing like a big ask ;-) I am always thankful for suggestions. But in this specific case I don't have enough exposure to make a resourceful video on that (yet).
Super video!
Quick question though, my cerebro plot doesnt show and I have the exact same code with %matplotlib inline.
Could you help? =)
Thx mate. I had to downgrade matplotlib as far as I remember. Maybe you give that a shot. cheers!
perfect video as always, thank you much
Thanks a lot Pavel. Appreciate your support.
i'm completely new to algo trading and coding. Can you test an intraday strategy on Backtrader?
Hi mate, already did on one of my videos. Be sure to check out the ones in the Python for Finance playlist. Cheers!
@@Algovibes ok thanks!
having spent one month on zipline, i decided to use another friendly backtesting library.. what would be yoru second pick after Zipline? Something with a big community and lots of documentation .. Zipline is just to hard to use .. with gratitude
Sorry for my late reply ali. My preferred way of Backtesting is doing it from scratch :-)
you should use geometric mean for the return
This is a Backtrader Introduction. I don't even use any returns here. Can you elaborate? Thx in advance!
thank you.
Welcome mate. Thanks a lot for watching! :-)
hi.
you are amazing.
could you please write a code for kucoin with websocket and RSI STOCH and MACD?
i could not implement kucoin websocket to dataframe.
i am very new in python
thanks bro
Hello bro! nice to see that you are using Backtrader. Could you make a strategy from scratch? thanks!
Hi :-)
Sure, do you have something specific in mind?
Your tutorial is good. Can you do a similar video using Vector BT ? thanks a lot.
Thanks mate,
vectorBT is on my list, yes. Not quite sure when I will cover it tho.
Is it possible to plot the trading graph on frontend like Angular or Reacts?
I mean if the backtrader can return needed data and for exaple use Plotly to plot it from angular?
thats what i was wondering , let me know if you find out.
@@aymn-.-3398 okay
Great content what about live trading with backtrader?
Thanks a lot :-)
Amazing 😍 bro. Really amazing 😍😄😃.
Love 💕 from Pakistan ❤️❤️
Love to 🇵🇰 ❤️ Thanks for your support!
@@Algovibes ❤️😍😘🤩💕💕😊 thanks 👍💕
Awesome Video, as always!
Have you every tried vectorbt?
Thanks buddy. Nope, had a look but didn't dive deeper yet. Should probably give it a shot. Will do a vid on it if I like it, thx for the suggestion!
@@Algovibes I came to it after watching a vid from Larry ua-cam.com/video/9rpMzng_aw0/v-deo.html. Currently stuck with cascaded trades though 🤪
@@Algovibes Please do a vectorbt in depth tutorial. Vectorbt is like way more cooler
is it possible to test multiple symbols plus multiple timeframes? like every time any of the 500 stocks out of the sp500 rsi(Daily) went < 30, we want to open one(only one until the next stocks rsi turns < 30) trade on the m15 timeframe if the sma50(m15) crosses the sma200(m15)?
Thanks for watching man! Sure, that's possible. I wouldn't do it with BT tho if I wanted to do that.
which browser yure using? in your point of view this one is best pip lib? thanks
Any chance you can make a video with a different api besides Binance it’s banned in my country
Hi Daniel, I roughly covered Kucoin here:
ua-cam.com/video/0QKXso4PIc4/v-deo.html
@@Algovibes thanks man!!! Love ya vids
What would you prefer, *Backtrader* or *Backtrading.py* library?
Depends on the purpose. Backtrading surely for quickly backtesting stuff. Backtrader probably for more extensive stuff.
Can Backtrader also be used for live trading or only backtesting?
Regarding the docs also for live trading but I do not have any experience with that!
I use VSCode and just followed the quickstart; however, the third step doesn't work and gives multiple file errors. What did I do wrong?
Can you elaborate?
what screen is that at :38 in the video? i'm trying to import backtest into python and i don't know what screen that is that you're using. thank you
Is it possible to get intraday data and test this back testing on it?
Sure, also possible. You could e.g. use the Binance API or just take the 1m interval from yfinance.
Binance API -> Just check out some videos in my cryptobot playlist
Can the same be done in VSCODE
Sure!
What Python version is supported?
does this library work for 3min timeframe or 1h timeframe?
Yes, it should
Is optimization possible?
Yea, pretty sure it is. The author is actually covering some optimization topics in the docs.
ERROR: Could not build wheels for ta-lib, which is required to install pyproject-toml based projects can you solve this
I am not using ta-lib in this video. Can you double check? thx!
@@Algovibes but do you know I can solve this issue
Can i ask how to use cerebro.plot in pycharm ? it seems to only work on Jupyter notebook ??
Should be working similarly but with an external plot (window with the plot popping up)
My kernel dies every time at cerebro.plot(). Our codes are totaly the same. I'm using Jupyter Notebook on macbook pro'17. I would really appreciate if you can help/ direct me with the solution. Thanks for the video!
Hi Yigit,
did you add the matplotlib inline line as I mentioned in the beginning?
@@Algovibes yes I did. Our codes are totally the same. Do u know any possible solutions or causes to this issue? Thanks for your reply
Hello, i would like to contact for a privatd coding service if is posible. Thanks
Can I have the code you used in this video ?
It's basically copy pasted from the Backtrader documentation. For getting my Notebooks you are invited to join as a member:
ua-cam.com/users/Algovibesjoin
top!!!
Thx for your comment :-)
It's incomplete. Where's the last plot?
How can i get the codes
ua-cam.com/users/Algovibesjoin
The vast majority of this code can just be found in the docs. Anyhow: Happy to welcome you as a member!
Why is cerebro.plot() not working for me ?
forgot matplotlib inline?
@@niikurasu2855 I’ve done it
I got this
"ImportError: cannot import name 'warnings' from 'matplotlib.dates' (C:\Users\anaconda3\lib\site-packages\matplotlib\dates.py)"
Backtrader can be a bit petulant sometimes 😛
The Matplotlib error is dependent on your version as far as I remember.
i had same issue and just
pip install matplotlib==3.0.0
and it all worked
vectorbt is better then backtrader
Thanks for the suggestion! Will have a look.
man that is some sluggish backwards code.
What exactly are you referring to? 😄
@@Algovibes probably a bit strongly worded but I would tidy up some of those if else statements and use np.where, it is a lot faster and it is very tidy and requires fewer lines of code. I have been building software that works dynamically with 250 pairs so I was basing my view on that.
for example this one line of code hammers through hundreds of pairs in a fraction of a second.
np.where(mean.mean() > tempdf5.loc[0,[s for s in symlist]].values, 1, 0)
this is an example of what I would do.
My code executes without error but won't stop running. I have to kill it with taskmaster(windows). Any ideas?
Which IDE/environment are you using?