PyAlgoTrade Tutorial (Part 2) - Backtesting Basics

  Рет қаралды 15,750

Part Time Larry

Part Time Larry

Күн бұрын

I'm starting a new channel on AI at / @parttimeai
In this video, we learn the basics of PyAlgoTrade. We first download the last 20 years of historical data for SPY. Then we show the results of buying at the close of the first bar and holding the entire period.

Пікірлер: 47
@parttimelarry
@parttimelarry 3 жыл бұрын
I'm starting a new channel on AI at youtube.com/@parttimeai Source Code: github.com/hackingthemarkets/pyalgotrade-tutorials Buy Me a Coffee: www.buymeacoffee.com/parttimelarry
@jack_sparrow1049
@jack_sparrow1049 3 жыл бұрын
Take this series to advance level... Very excited to learn
@EdwardTilley
@EdwardTilley 2 жыл бұрын
Great tutorial. Champion man!
@x.e.b.u
@x.e.b.u 3 жыл бұрын
Quality band - Portishead. It is also a place here in the UK. Thanks again for your videos. Do enjoy them.
@kruthikngowda6061
@kruthikngowda6061 3 жыл бұрын
keep creating this type of content larry ,love from india
@jp21in
@jp21in 8 ай бұрын
Thank you so much for sharing this content. I’m trading out of a Roth IRA so I could care less about capital gains at all. How should I change my strategy? Should I simply do the monthly process more often? I don’t think there’s any downside to being flagged a pattern day. Trader I may have to deposit more money to allow it, but it shouldn’t cost me anything.
@dservais1
@dservais1 3 жыл бұрын
Thanks a lot for the free course ;-)
@anqicheng6069
@anqicheng6069 2 жыл бұрын
hi whats the extension for 13:17?
@enginbulank1879
@enginbulank1879 2 жыл бұрын
Great video!! Thank you. What I am wondering is, will you be able to sell at Close price? How this lib simulate limit SELL or market SELL?
@non-randomwalker4579
@non-randomwalker4579 3 жыл бұрын
Thanks for this great video! I noticed that I get now (at Dec 2021) different Adjusted price from yfinance for 2000-01-03 than you got. Adjusted prices seems to change when time goes (new dividents occured) and I think this might cause the inaccuracy. I mean that the closing prices are adjusted for today, not for the last day in the date range used to pull data. Pls. correct if I have understood this wrongly.
@TooMuchToThink1
@TooMuchToThink1 3 жыл бұрын
Do you have any advice of back testing a minute strategy developed on tradingview on this system?
@parttimelarry
@parttimelarry 3 жыл бұрын
Doesn't TradingView have a built-in backtester for strategies written in PineScript? I have heard some people say they didn't like it, but haven't taken the time to compare and learn why. As far as backtesting a minute strategy, there is a barfeed of type CSV - in the docs you can see that you can pass in a frequency parameter and you can specify the timeframe. And then you can just code the strategy class to define what you want to do on each bar. gbeced.github.io/pyalgotrade/docs/v0.20/html/barfeed.html#module-pyalgotrade.barfeed.csvfeed I'll see if I have time to put together a shorter timeframe backtest example for a different strategy.
@TooMuchToThink1
@TooMuchToThink1 3 жыл бұрын
@@parttimelarry thanks for the quick response! I’ll look into it. I noticed in your videos you pulled yahoo finance data. My understanding is that from yahoo finance I can get o/h/l/c day data, not minute data, but I’ll follow along your video and look into it. My strategy uses multi time frame analysis. But tradingviews built in backtester only goes back about 2 months, not over years and not over multiple stocks (all s&p500 stocks for example)
@timcain1734
@timcain1734 3 жыл бұрын
Another great video. I would be interested in a video that shows how a single python algo program can do backtesting or be run so it trades. For instance, if you run the program with backtest = True, the program will do backtesting. If you run the program with backtest = false, it will be live and trade.
@juliusfenata
@juliusfenata 3 жыл бұрын
Hi Larry, if we use the yfinance, how can we get the adjusted price data that include splits & dividends value?
@HechamelaTamala
@HechamelaTamala 3 жыл бұрын
Awesomeness, just what o mese it
@prestorianer
@prestorianer 3 жыл бұрын
in your example the AdjClose of the second day is lower than the first day. everything works fine. But, i started from 1999-04-30 with an AdjClose of 88.3. At the next day (1999-05-03) the price is 89.93. so its higher and the excution fails, since the quantity is to high, too. Is there a way to execute at the calculation day?
@jameswang6714
@jameswang6714 3 жыл бұрын
Anyone knows the Python Extension used at 13:17? Thanks ahead.
@jameswang6714
@jameswang6714 3 жыл бұрын
@parts Time Lary Thanks, I will contact you.
@parttimelarry
@parttimelarry 3 жыл бұрын
Hey this is a spam bot or scammer please don't contact them
@ziad3274
@ziad3274 3 жыл бұрын
@@parttimelarry Yeah please what is the name of that extension ?
@mila.elnekave12
@mila.elnekave12 2 жыл бұрын
Can anyone recommend the best IDE for PyAlgoTrade. i currently use Pycharm, can not write save data to csv. any suggestions?
@parttimelarry
@parttimelarry 2 жыл бұрын
I use Visual Studio Code
@mila.elnekave12
@mila.elnekave12 2 жыл бұрын
@@parttimelarry Thank you!
@brucebane7401
@brucebane7401 3 жыл бұрын
amazing!!!
@brucebane7401
@brucebane7401 3 жыл бұрын
@@parttimelarryl8024 is this the admin of the channel????
@parttimelarry
@parttimelarry 3 жыл бұрын
Hey this is some bot, please ignore
@rverm1000
@rverm1000 3 жыл бұрын
i like the way you go about learning new things. if i was better at python it would be somewhat easier.
@jack_sparrow1049
@jack_sparrow1049 3 жыл бұрын
can you make a tutorial on coding a custom indicator using pandas and time series data
@danielrv1325
@danielrv1325 3 жыл бұрын
This seems great, I have an idea I want to backtest, will try this. Also, which data service would you recommend the most? Nothing crazy, some OHLCV daily data for several years, I am willing to pay but not a crazy bloomberg terminal acc of course haha. Again, great content!!
@Itsdlu
@Itsdlu 3 жыл бұрын
Which Python PATH did you run it in on VS code?
@Itsdlu
@Itsdlu 3 жыл бұрын
ModuleNotFoundError: No module named 'pyalgotrade'
@madam_im_adam
@madam_im_adam 2 жыл бұрын
Sweet Portishead tee!
@rantg
@rantg 3 жыл бұрын
i am very curious about REAL algorithms, the type of signal processing tools to trade and not moving averages.
@bartubmaiden
@bartubmaiden 3 жыл бұрын
@parts Time Lary Don't think he got it
@randomdude79404
@randomdude79404 3 жыл бұрын
Yes like implementing a strategy out of a research paper (statistics based etc...) Rather than technical analysis ?
@mr.a1880
@mr.a1880 3 жыл бұрын
First.
@theonewhowas7709
@theonewhowas7709 3 жыл бұрын
please stop slamming keys
PyAlgoTrade Tutorial (Part 3) - Technicals, Analyzers, and Plotting
23:39
PyAlgoTrade Tutorial (Part 1) - Beating the S&P 500
13:37
Part Time Larry
Рет қаралды 20 М.
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН
Interactive Brokers API, TradingView Charts in Python
47:52
Part Time Larry
Рет қаралды 82 М.
Algorithmic Trading with Python and Backtrader (Part 2)
9:50
Part Time Larry
Рет қаралды 64 М.
Gap Trading [1/4] Python Gap Scanner and mplfinance
23:11
Part Time Larry
Рет қаралды 20 М.
Backtrader Live Forex Trading with Interactive Brokers (Part 1)
29:35
Part Time Larry
Рет қаралды 29 М.
Finding Breakout Candidates with Python and Pandas
29:33
Part Time Larry
Рет қаралды 71 М.
QuantStats: Portfolio Analytics with Python Tutorial
37:20
Part Time Larry
Рет қаралды 29 М.
Pandas TA Tutorial
27:00
Part Time Larry
Рет қаралды 46 М.
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН