Walk Forward Optimization with VectorBT and Alpaca

  Рет қаралды 18,539

Part Time Larry

Part Time Larry

2 жыл бұрын

If you like this video and want to support the channel:
Buy Me a Drink: www.buymeacoffee.com/parttime...
Also, I will be starting a spinoff channel on AI in music, art, and gaming in 2023. Subscribe at: / @parttimeai
In this video, we discuss Walk Forward Optimization. We use VectorBT + Alpaca to demonstrate.

Пікірлер: 35
@parttimelarry
@parttimelarry 2 жыл бұрын
If you like this video and want to support the channel: Buy Me a Drink: www.buymeacoffee.com/parttimelarry Also, I will be starting a spinoff channel on AI in music, art, and gaming in 2023. Subscribe at: youtube.com/@parttimeai Source Code: github.com/hackingthemarkets/walk-forward-optimization
@lucidwavs4004
@lucidwavs4004 2 жыл бұрын
You're the man! More VectorBT vids please.
@prabhu_patil
@prabhu_patil 2 жыл бұрын
Thanks larry.. Glad to see you back with excellent content .. This really helps in analysing my stategy settings.
@izem9652
@izem9652 2 жыл бұрын
Man you're a life savior; I was struggling understanding well how to do walk-forward optimization with vektorBT (indeed, the notebook in the doc isn't well commented), it is much clearer now. Greetings from France !
@ashkanhesaraki
@ashkanhesaraki Жыл бұрын
Please do more on VectorBT, specially optimization and TP/SL exits
@somajuice666
@somajuice666 2 жыл бұрын
YES exactly what was needed Larry!
@Userjdanon
@Userjdanon 2 жыл бұрын
Cool! I have never heard of walk forward. But Ive implemented myself some kind of similar testing method. It's kind of similar to cross validation just for time series :) thanks for the video
@J2897Tutorials
@J2897Tutorials 2 жыл бұрын
Just a minor error. Probably worth mentioning though... future_data = vbt.AlpacaData.download('SPY', start='2021-06-01', timeframe='1d', limit=10000).get('Close') _APIError: your subscription does not permit querying data from the past 15 minutes_
@juanpablorocha5609
@juanpablorocha5609 Жыл бұрын
Great video brother!
@carters6138
@carters6138 2 жыл бұрын
🔥🔥🔥🔥🔥❤️❤️
@kevinalexis9886
@kevinalexis9886 4 ай бұрын
WalkForwardOptimization implementation begins - 24:00
@turnbull82
@turnbull82 Жыл бұрын
train test split instead? Seems a bit squirrely
@brianrowe1152
@brianrowe1152 2 жыл бұрын
Great but how do you write a real strategy?? Or use a real strategy function that takes a DF and returns ‘buy’. And then a real sell formula?? Is that a future video ?? Please :)
@andrewlovesbry
@andrewlovesbry Жыл бұрын
Do you have a guide for setting up VS Code?
@petrzurek5713
@petrzurek5713 Жыл бұрын
Hey Larry, wasn’t there another video of Vectorbt and Alpaca? Seems like it disappeared, can’t find it anymore …
@guttimgify
@guttimgify 2 жыл бұрын
Super helpful content! Do you have other methodology of back testing to recommend? I have thought about changing the 70/30 to something like 60/40 or smaller or 60 to 20 with a skip in between. I'm trying to come up with other methods of back testing to see how well it will perform.
@bufirolas
@bufirolas 2 жыл бұрын
Hello Larry! Again, thanks for another great, clearly explained video. I was wondering if you could think of a way to have a single, continuous, optimised performance result, instead of individual metrics for every single optimised chunk (20 in this case). I was trying to look for the trade logs in vbt and override it with a concatenated version of it but I cannot seem to find the method to access them anymore.
@lorenzourera4223
@lorenzourera4223 Жыл бұрын
How can I do a walk-forward backtest without the optimization? I'd like to see how my strategy would have performed month on month if I had kept my parameters fixed.
@brandonjohnson8880
@brandonjohnson8880 Жыл бұрын
In thos case you don't need to do walk forward. If you fix your parameters you just need to run your backtest once over the whole period.
@dservais1
@dservais1 2 жыл бұрын
Strange I can only install version 0.14.4 : λ pip install -U vectorbt==0.23.2 ERROR: Could not find a version that satisfies the requirement vectorbt==0.23.2 (from versions: 0.10, 0.11, 0.12, 0.13, 0.13.1, 0.13.2, 0.13.3, 0.13.4, 0.13.5, 0.13.6, 0.13.7, 0.14, 0.14.1, 0.14.2, 0.14.3, 0.14.4) ERROR: No matching distribution found for vectorbt==0.23.2
@parttimelarry
@parttimelarry 2 жыл бұрын
Are you using Python 3.7+? When I install a package I use pip3 in a Python 3.8 virtual environment. Some systems have pip for Python 2.7, just checking.
@dservais1
@dservais1 2 жыл бұрын
@@parttimelarry I'm using 3.10.2 on windows 10.
@emblazed2579
@emblazed2579 2 жыл бұрын
​@@dservais1 I experienced the same issue as you. Vectorbt currently doesn't support python 3.10. Downgrading to python 3.9 resolved the issue, and vectorbt installed version 0.23.2.
@dservais1
@dservais1 2 жыл бұрын
@@emblazed2579 ​ ​ @Part Time Larry I had to downgrade from Python 3.10.2 to 3.8.10 to make it working. Thanks for the videos Larry, and thanks to Emblazed for the trick.
@parttimelarry
@parttimelarry 2 жыл бұрын
@@emblazed2579 Thanks for helping out here!
@urgebharadwaj9081
@urgebharadwaj9081 2 жыл бұрын
Hello, larry your videos are very informative and easy to understand!😊♥️. please make a video on metatrader 5 expert advisor...
@TheDjarEl
@TheDjarEl 2 жыл бұрын
Trying the same code on 1H data for 100 days for BTC. Takes 14GB of RAM to run.... For only 2 parameters to optimise. I can do the same in a C/C++ loop will take like 50 MB of RAM... Vector BT is over engineered, really.
@parttimelarry
@parttimelarry 2 жыл бұрын
Thanks for the comments!
@TheDjarEl
@TheDjarEl 2 жыл бұрын
@@parttimelarry but thanks for the video and explanations it is a very nice work you are doing ! :)
@olegpolakow7286
@olegpolakow7286 2 жыл бұрын
I just measured peak memory usage of modeling 100 days of hourly price data for the code above (which yields 252 rows × 15600 columns btw) - 369.6 MB. Also note that vectorbt supports multiple modes, one of them allows you to run everything in Numba, just like in C/C++. If you run into memory issues feel free to post a GitHub issue and I'll take a look :)
@TheDjarEl
@TheDjarEl 2 жыл бұрын
@@olegpolakow7286 thanks 👍. I am running on Jupiter notebook on Ubuntu, maybe that takes much more memory.
@parttimelarry
@parttimelarry 2 жыл бұрын
@@olegpolakow7286 Thanks so much for the library and the notebooks and for replying here.
@gokhanfidan4636
@gokhanfidan4636 2 жыл бұрын
hi larry. thanks for amazing works. you are great. also i didn't catch the last point of video. We found the best index of what ? i mean the point is to find those that give good results in real life among the data I tested. but you suddenly stopped. what did you find with "performance[performance.groupby('split_idx').idxmax()].index" ?? and what should i do next ? don't wory i am not going to take it as a financial advice :))
@letsgobrandon2044
@letsgobrandon2044 2 жыл бұрын
I’m a follower and love your content and I appreciate your time. This video was difficult to stay with because you talk fast type fast and mouse is all over the screen. I came away with a near headache and frustration. To say the least.
@parttimelarry
@parttimelarry 2 жыл бұрын
Thanks for the feedback
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 862 М.
Historical Fear and Greed Index Data, Jupyter Notebooks
20:09
Part Time Larry
Рет қаралды 18 М.
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
Jumping off balcony pulls her tooth! 🫣🦷
01:00
Justin Flom
Рет қаралды 28 МЛН
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 114 МЛН
This is why Deep Learning is really weird.
2:06:38
Machine Learning Street Talk
Рет қаралды 378 М.
How to do a Walk Forward Optimization in Python with Vectorbt
22:33
Breadth Thrusts - Zweig, Whaley, and Breakaway Momentum
22:54
Part Time Larry
Рет қаралды 11 М.
Stop, Intel’s Already Dead!
13:47
Linus Tech Tips
Рет қаралды 726 М.
Walk Forward Optimization in Python with Backtesting.py
1:03:20
Chad Thackray
Рет қаралды 15 М.
Почему 08.08.2024  - день, который нельзя пропустить | Нумеролог
21:37
Нумеролог Андрей Ткаленко
Рет қаралды 480 М.
Pandas TA Tutorial
27:00
Part Time Larry
Рет қаралды 45 М.
Vectorbt for beginners - Full Python Course
3:59:04
Chad Thackray
Рет қаралды 71 М.
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН