I ran this algorithm through my own backtesting library on the Russell 1000 shares with data from about the last two years. I got the results below. As in your video, the "win rate" is >60%, which is nice, but overall this strategy would produce a loss. Would be nice to somehow improve the exit criteria to avoid the fact that losses are on average greater than the gains. Positions 850 Average profit -0.07% Longest duration 11 Average duration 5.87 Wins 542 (63.8%) Average win 3.00% Largest win 22.10% (DLTR) Consecutive wins 36 Losses 308 (36.2%) Average loss -5.45% Largest loss -30.74% (NFLX) Consecutive losses 16
@FlyVC
Жыл бұрын
on Paper, rsi looks great, however I also dont see the value of it. Especially in this timeframe where the market moved mostly upwards, a simple buy and hold would have provided way better average returns.
@Algovibes
Жыл бұрын
Agreed! Anyhow basically exactly what I said. The interesting thing would now to check if you can improve the exit as pointed out from int2str (the goat name tho).
@bryan-9742
Жыл бұрын
Sick!!! So here’s the thing. A lot of your viewers are not a bit more advanced. It’s hard to think through using single asset backtests and then using the same strategies for a universe of assets where , for example, each month the signal will have a portfolio of stocks with different weightings at each period. I have a bit of a backtest class to work out those thoughts outlined that I can put below if you’d like
@Niko-ie6dh
Жыл бұрын
I like the videos where you backtest certain strategies and most importantly discuss the results critically at the end like here. maybe you should also include the buy and hold return of the same asset/ timeframe for comparison. One remark for the strategy: as far as I understand it you are using your whole account balance on a single trade everytime. It would be fair to add compounding because thats like it would most probably happen in reality. say you start with a balance of 10.000$ then after your first trade you made a profit or loss, means the next trade would be made with that new balance. thats far more realistic than a flat percentage comparison :-)
@christophermorris486
Жыл бұрын
It’s always a good day when Algovibes upload. I’ve just started my coding journey a few weeks ago and I cannot state how eye opening your videos are. Simple to digest and adding additional nuances at a pace that makes learning feel natural. Keep up the good work man one of the best presenters on the tube!
@Algovibes
Жыл бұрын
Thank you so much Christopher. Appreciate your positive attitude!
@chrisarets2231
Жыл бұрын
Always funny to look at code you wrote in the past. Makes you realize how much better of a coder you are today :)
@Algovibes
Жыл бұрын
A true master is an eternal student :-)
@tessalittle2411
Жыл бұрын
Firstly - I am new to python and using my love for this discipline of trading, your videos are really brilliant! You explain well everystep and you make it seem so easy, true mastery for sure. I use RSI and stochastics together with moving averages on both RSI and price so this is a great help to get me started with my strategy. I look forward to getting into python for my data science - YAY! double win
@Algovibes
Жыл бұрын
Awesome. Thanks a ton for your comment buddy. Be invited to check out my other stuff :-) Cheers
@rraul
Жыл бұрын
Nice to see you revisiting your early code. Keep it up!
@Algovibes
Жыл бұрын
Thanks rraul!
@simondechoisy779
26 күн бұрын
This is a very interesting video. I would love to see you vectorise the solution. Keeping my 🤞 that this is something you will do.
@Algovibes
26 күн бұрын
Hi mate, happy to read! Will see what I can do :-)
@simondechoisy779
26 күн бұрын
@@Algovibes very excited to hear this. I find your channel very useful and it has helped me progress quickly. Vectorising this kind of approach would be a big leap forward!
@ageens
Жыл бұрын
I think, this is good with leveraged stocks and ETFs, like if I take (ETFs) TMF over TLT i have higher profitable trade rate and the very profit - too.
@sazamhashmi
Жыл бұрын
This video was good one it gave me the idea on how to move around with the market. Thank you. Your the best out there.
@Algovibes
Жыл бұрын
Thanks a lot mate
@Lnd2345
Жыл бұрын
Thanks for another great video. Am I right to think that this strategy doesn’t work at all given the return of a buy and hold strategy with apple stock is 470% during that period?
@Algovibes
Жыл бұрын
Welcome mate! You cannot make this comparison as the exposure time differs but from a pure return perspective: Yes.
@hackmedia7755
Жыл бұрын
better to break down the nesting into smaller helper functions. The best way to backtest in my opinion is randomized stock data. Not just historical data. It would find what strategies are robust.
@anilmm2005
Жыл бұрын
Interesting video as usual. Universe of stocks to trade would definitely generate more and would be eager to see the results.
@Algovibes
Жыл бұрын
Thanks for your feedback anil, appreciate it!
@BeenThrDunThat
Жыл бұрын
It would be interesting to see a version that does look at more of the stocks. Will take a stab on my own and see if it matches your next video if you decide to do it.
@Algovibes
Жыл бұрын
Sure! Let me know your insights. Thanks for watching man.
@DawidGdybadz
Жыл бұрын
compare it to buy and hold. But the multiple stocks is a good idea. Is it possible to monitor all stocks for this kind of signals?
@kadourkadouri3505
Жыл бұрын
Hey nice job ! Do you know any free source of hourly S&P500 (or SPY) historical data ? Thanks a lot
@Algovibes
Жыл бұрын
Thanks buddy. Historical granular data is unfortunately quite hard to get for stock data. For crypto it's an easy one. The only thing I know is yfinance, but you cannot go back in time limitless. What you could do is to store them somewhere in a Database and just pull them daily. Hope this helps!
@kadourkadouri3505
Жыл бұрын
@@Algovibes Ok Thanks
@welcometomathy
Жыл бұрын
Can you please test Scott Welsh free strategies? They look very promising.
@welcometomathy
Жыл бұрын
kzitem.info/news/bejne/zIV80qKskZiKiZw
@Algovibes
Жыл бұрын
Can you pass me a reference? thx!
@draggoos
8 ай бұрын
Simply holding AAPL from 2015 would have made you 624%, with this strategy you make 25%. The only way to understand if this is a good strategy is by comparing how long the capital was locked in the trade.
@Algovibes
8 ай бұрын
Actually good comment. Be invited to check out my other vids. Doing benchmark comparisons, Holding period coverage and considerations and everything you need in other videos. Cheers!
@rollinas1
Жыл бұрын
You probably want to use pandas chaining and .assign method for all the different columns so you do not create objects all over. Easier to test and maintain the code and do the roast later. Matt Harrison material basically.
@Algovibes
Жыл бұрын
Appreciate your input and these are actually super interesting topics but I need to keep kind of a balance what the viewer can digest. Anyways as said: Much appreciated thoughts - thank you!
@FrancescoGoodwin
Жыл бұрын
Which IDE do you use, it lookes like jupiter but I guess it is not jupiter?
@Algovibes
Жыл бұрын
Yes exactly: Jupyter notebook :-)
@user-od7ge8ms4v
Жыл бұрын
When you will upload the code?
@Algovibes
Жыл бұрын
Hi buddy, somewhen the next days
@sukriadnansangadji8232
Жыл бұрын
Please explain bot with hedging strategy
@Algovibes
Жыл бұрын
Can you elaborate on that one? Thanks a lot!
@bryan-9742
Жыл бұрын
always ean a little bit. that is a very simple way to create the 'winrate' than my inefficient way! aha
@Algovibes
Жыл бұрын
:-) thanks a lot for watching Bryan! Happy that you learned something.
Пікірлер: 46