Really love your tutorials man! They are done so well and comprehensive. I pick up many useful coding tips and tricks not just for algotrading but for my actual data science day job. Always look forward to your stuff!
fascinating! maybe this is what I am looking for. Question if I were to look for the highest timeframe to which the K% of stochastic RSI is above 80 for a given range (lets say starting at 10D and doing a 12H interation till 1D). Then do the same but this time to find the highest time frame to which K% rsi stochastic below 20. Would vectoration be better? I will be wanting to keep this analysesfor historical back testing.
Can you make similar vectorized trading code for both long and short trade with flag/position system..so that multiple position will not take at the same time?
Great Video as always ! I would love to see a video on so-called "event-based-backtesting". I am kind of confused of how one could use a more complex backtesting engine to a live-stream of data. Why the distinction ? Is a vectorized Backtester not able to perform the task ?
Hey algo, May I ask you a quick q? When you sell a coin using the Binance API, I receive them as AUD (i am from australia). How can I sell a quantity of a coin and have it as USDT? Or in other words, is there a client.create_order but for exchanges between coins?
Other fantastic video, thanks a lot!. I also think that it's very important develop a vector strategy but not always it's easy to get do it, for example I'm not getting to filter the number positions/stocks maximal that we can have using only vectorization where the strategy is based on all stock SP500. It's a good suggest for a new video.
@@Algovibes Sure, this is the idea to develop without loops: - Over all stocks of SP500. - Maximal positions of the strategy for explample: 9 - Each week check if there are any stocks that compile the buy conditions, for example: RSI >70 and sma(21) < price If there are positions free so buy the stocks until the max. (9) select order by max ROC. - Sell the positions after 10 weeks or if the RSI < 40. The estrategy is the less important, the key is to get do it with a vectorizacion method. The portfolio of the strategy never can to have more than 9 stocks.
Thank you for sharing such a great video. I have a question, I have seen many people use even-driven backtest instead of vectorized. Do you think only Vectorized backtesting will be enough to test an strategy?😢
Shifting the rows is simply taking the next n days into one column to use vectorized operations. Ofc you can opt for Backtesting libraries but try to go over it again. Let me know if you have any understanding questions and I'll try to do my best helping you out.
Thx for the vid. I there a possibility to share a strategy ? I’ve found a NCAV/MV strategy which can be implemented in Python and it might be interesting since it’s going to be a fundamental strategy.
Dear reader , i like your video's a lot . Maybe you can make a video about a Websocket connection thats ping every 1 minute. And that the client automaticly reconect when its receive more than 1 minute nothing
Hi BetaHex, please check out the linked video. Explained the strategy there. The Low is simply giving us the information if we would have hit the buy limit order on a specific day. We are not buying "from the Low".
Really love your tutorials man! They are done so well and comprehensive. I pick up many useful coding tips and tricks not just for algotrading but for my actual data science day job. Always look forward to your stuff!
Thank you my man! :-) Also working in the field and happy to read my stuff is useful to you.
Much Love Mate!
Thanks a lot. Beautiful name :-)
Yup! I changed my code and use pandas for backtesting. No fear of overloading or even creating multiple dataframes now 👍
Awesome. Thanks a lot for your comment :-)
Excellent video thanks....Great to look inside the code before moving to looping methods..thank you
Thanks a lot for watching mate!
this is very helpful. Do you have any examples of vectorized backtesting on a long/short strategy and using profit take and stop losses?
happy to read, thx mate. sure, just explore my Python for Finance playlist. There is tons of stuff like that :-)
Thanks for sharing 🙏
Thanks for watching buddy!
raw_trades = filter_buys.T.idxmax()
mark error in this line TypeError: reduction operation 'argmax' not allowed for this dtype
raw_sells = filter_sells.T.astype(float).idxmax() works fine.
Hi Luciano, just stick to the code in the video and you won't run into issues. Anyhow, did you solve the error?
Thx Saldo for helping out others!
fascinating! maybe this is what I am looking for. Question if I were to look for the highest timeframe to which the K% of stochastic RSI is above 80 for a given range (lets say starting at 10D and doing a 12H interation till 1D). Then do the same but this time to find the highest time frame to which K% rsi stochastic below 20. Would vectoration be better? I will be wanting to keep this analysesfor historical back testing.
Can you make similar vectorized trading code for both long and short trade with flag/position system..so that multiple position will not take at the same time?
super interesting content and concurrent to the channel 👍🔥
Thanks a lot buddy :-)
Great Video as always ! I would love to see a video on so-called "event-based-backtesting". I am kind of confused of how one could use a more complex backtesting engine to a live-stream of data. Why the distinction ? Is a vectorized Backtester not able to perform the task ?
Thanks a lot Argjend! Also thanks for your suggestion.
Hey algo,
May I ask you a quick q? When you sell a coin using the Binance API, I receive them as AUD (i am from australia). How can I sell a quantity of a coin and have it as USDT? Or in other words, is there a client.create_order but for exchanges between coins?
Good question. I usually just store my Cash as USDT and transfer it back as a major crypto to my other wallet. So I have no idea if that's possible.
Other fantastic video, thanks a lot!. I also think that it's very important develop a vector strategy but not always it's easy to get do it, for example I'm not getting to filter the number positions/stocks maximal that we can have using only vectorization where the strategy is based on all stock SP500. It's a good suggest for a new video.
Hugo, thanks a lot! Can you maybe elaborate a bit on your suggestion. Thanks.
@@Algovibes Sure, this is the idea to develop without loops:
- Over all stocks of SP500.
- Maximal positions of the strategy for explample: 9
- Each week check if there are any stocks that compile the buy conditions, for example: RSI >70 and sma(21) < price
If there are positions free so buy the stocks until the max. (9) select order by max ROC.
- Sell the positions after 10 weeks or if the RSI < 40.
The estrategy is the less important, the key is to get do it with a vectorizacion method. The portfolio of the strategy never can to have more than 9 stocks.
if i want to apply this to cryptos what do i need to do ?
Interesting question! Just pull the price data for cryptos as I did in the videos in the cryptobot playlist and repeat the procedure in the video.
@@Algovibes Thanks
Hi when I do the Boolean indexing checkbuys[checkbuys_sum] it returns a dataframe of True, False, Nan instead of « 1 ». Do you know why?
@@ЕвгенийКрасилов-о9о Thanks I will try that!
@@ЕвгенийКрасилов-о9о It works :)
yeah i had to "filter_buys = checkbuys.astype(int)[checkbuys_sum]" to get the index max to integers, but I'm dangerously low on knowledge
Thank you for sharing such a great video. I have a question, I have seen many people use even-driven backtest instead of vectorized. Do you think only Vectorized backtesting will be enough to test an strategy?😢
Welcome mate, Event-Driven Backtest is definitely important as well!
dunno why df.loc[i:].index[int(e)] give out of IndexError: index 10 is out of bounds for axis 0 with size 10
got to get rid of buydates towards end of df else out of range for above formula
Thanks @newdata! Also for sharing the solution.
@@Algovibes how?
Thanks for your video. The shifted rows and index are too complicated to understand. Why not just use backtesting?
Shifting the rows is simply taking the next n days into one column to use vectorized operations. Ofc you can opt for Backtesting libraries but try to go over it again. Let me know if you have any understanding questions and I'll try to do my best helping you out.
Thx for the vid. I there a possibility to share a strategy ? I’ve found a NCAV/MV strategy which can be implemented in Python and it might be interesting since it’s going to be a fundamental strategy.
Welcome chancellor! Can you pass me a reference? Happy to take a look.
@@Algovibes Ive posted the strategy reference, but for some reason it’s not here anymore
Awesome
Happy that you think so :-) Thanks for watching!
What do you do for work man?
For a living I am working in a Data Science related field.
Dear reader , i like your video's a lot .
Maybe you can make a video about a Websocket connection thats ping every 1 minute.
And that the client automaticly reconect when its receive more than 1 minute nothing
Hi buddy,
already did that in a lot of videos in the cryptobot playlist. Be kindly invited to check it out! :-)
Do you have a link from that video that autoconnect ?
Why buy from the low, thats not realistic
Hi BetaHex,
please check out the linked video. Explained the strategy there. The Low is simply giving us the information if we would have hit the buy limit order on a specific day. We are not buying "from the Low".
😀
🤭