Like the video? Support my content by signing up for Interactive Brokers using the link below: www.interactivebrokers.com/mkt/?src=ptlPY1&url=%2Fen%2Findex.php%3Ff%3D1338
@iam.introspect84564 жыл бұрын
Dude these videos are gold. So well explained and im learning a ton by following along. I did want to point out a small bug in the strategy example from the Backtrader quick-start guide. When the strategy initially checks the first days close, and then the previous two days, for the first three iterations its actually making reference to the last two days of year 2000 and comparing them to the the first day of year 2000. So to fix that i added one more if statement before checking the close values: if (len(self) >= 3): This will make sure that the strategy starts on the third trading day and makes reference to the first two days of the year, rather than the last days of the year!
@cjhnsn204 жыл бұрын
These are such excellent tutorials. Thank you!!
@DeepFrydTurd10 ай бұрын
Larry again my man your awesome !!
@hanaanrosenthal3 жыл бұрын
Larry, you are a pleasure to learn from - thank you
@PianoMan3335 жыл бұрын
Great series, please keep it up and go more in depth!
@LilleyAdam2 жыл бұрын
Hi PT Larry. In your code, you used the backtrader data feed, even though you have the dataset in your current directory. Did you still need to create the class using the backtrader.feeds? Isn't that what the program uses to find the dataset?
@henryvanvuuren27923 жыл бұрын
Hi Larry. Run into a wall here. I imported a csv file downloaded from binance, with Generic csv. But after added strategies, nothing changed on Broker side. Pls can you help on what could be mising. It show the but and sell, lines, but cash values doesnt change accordingly.
@LilleyAdam2 жыл бұрын
what extension have you installed that shows up all the available objects and classes?
@s.r23502 жыл бұрын
great vids. keep it up
@andrewwilson41673 жыл бұрын
Hi all. at 4 minutes I received invalid syntax error on cerebro.adddata(data). Any help would be appreciated. Thanks
@Leo-cw6dr4 жыл бұрын
Nice tutorials! Thank you!
@twtw7853 жыл бұрын
I got lost from the strategy part. How did you connect the overall code to the strategy (separate file)? thanks
@oliverpolden4 жыл бұрын
I know you didn't write that TestStrategy code but isn't dataclose[0] the first element and not the current so that example is wrong?
@LilleyAdam2 жыл бұрын
[0] is the current element according to the backtrader documents. [-1] is the first historical element.
@oliverpolden2 жыл бұрын
@@LilleyAdam thank you for your reply. Yes you’re right about the documentation. I guess I need to do some experimenting to verify that behaviour because although it says it follows Python conventions for iterables, I can’t actually find anything in Python that says this is convention. That said, I am fairly new to Python so I’m not familiar with these conventions.
@elcoquirivera45032 жыл бұрын
I’m trying to wrap my head around why I would use this library. Why not just build an algorithm from scratch using a notebook ?
@parttimelarry2 жыл бұрын
Made a whole video on frameworks recently. A couple benefits are that it can live trade your brokerage account eg. IBKR using the same Strategy class used for backtesting. Going from a notebook to actually managing Interactive Brokers connections, account balances, live order management etc takes quite some time. Also many people enjoy open source projects since there are edge cases and bugs that only surface when thousands of people have traded many different scenarios in a live environment. Also following shared design patterns is good since you can speak a common language with other developers. You can definitely do anything from scratch, but some people appreciate the the structure.
@elcoquirivera45032 жыл бұрын
@@parttimelarryI just watched the video and it makes sense. I was thinking of building an algorithm that would pick the optimal strategy but then I would have to pass the values back to back trader. I just decided to pursue this project so I’m working on the flow.
@cryptopinas66163 жыл бұрын
You are a legend.. Thanks.
@alexaddison17834 жыл бұрын
If this channel wasn't here there would literally be nothing on youtube for backtrader (nothing good anyways)
@SamarthPusalkar4 жыл бұрын
Can we test intraday strategies with backtrader?
@meetshah48002 жыл бұрын
What if I need Indian Indices(Bank nifty) 1min time frame Backtesting???
@meetshah48002 жыл бұрын
Default parameters can be changed??
@florianhillen74044 жыл бұрын
Very nice. Test bevore you risk your hard earned money!
@polanamis4 жыл бұрын
Great video! What IDE are you using by the way, and how are you getting those suggestions for your backtrader code as you type it?
@hirengandhi40264 жыл бұрын
I am guessing thats Visual Studio Code
@Eigus-BikeCo3 жыл бұрын
Kite is a nice coding assistant for that
@codemedio64183 жыл бұрын
is this teach us step by step coding?
@phaneendhraajaythota10254 жыл бұрын
I get this below error when I try to feed data using pandas.. could you help me with this? Traceback (most recent call last): File "pandas_data.py", line 59, in cerebro.plot(style='bar') File "/home/ajay/.local/lib/python3.6/site-packages/backtrader/cerebro.py", line 996, in plot plotter.show() File "/home/ajay/.local/lib/python3.6/site-packages/backtrader/plot/plot.py", line 814, in show self.mpyplot.show() AttributeError: 'Plot_OldSync' object has no attribute 'mpyplot'
@KundanKumar-nv6yu4 жыл бұрын
Can we backtest on 15 mins data as well for intraday strategies?
@NoWayThisIsReaI4 жыл бұрын
The Yahoo feed only has Daily data, you need to get your own data or integrate with a provider to do that and there are documentation examples on how to do that on the backtrader website.
@wilhelmwilhelm12514 жыл бұрын
I always get the following error :/ AttributeError: 'str' object has no attribute 'to_pydatetime'
@vladedoske5294 жыл бұрын
try to download csv file directly from yahoo finance
@ИгорьАфанасьев-ы4с4 жыл бұрын
Thank you!! Very good content! I am a beginner algorithmic trader. You help a lot. There are a few questions. Can you please answer them how will the time? 1) dt = dt or self.datas[0].datetime.date(0) How to read this code? and what is dt? 2) self.log('Close, %.2f' % self.dataclose[0]) What does it mean %.2f and % self.dataclose[0]? I would be grateful for the answer
@anouararaamouch66034 жыл бұрын
1) equivalen to: if dt is None: dt = self.datas[0].datetime.date(0) 2) I would say check out "string and float formatters format" on G
@shindersamra40203 жыл бұрын
Bravo, bravo .
@hanaanrosenthal3 жыл бұрын
Great stuff thank u
@mank5114 жыл бұрын
Hello sir I m from India and new to coding but ur videos helping me a lot plz upload a video for login using python and also auto buy and sell using ZERODHA platform an Indian broker having API and also plz share the code ..thank u plz help