Backtesting Rayner Teos 1067% Trading Strategy in Python on all S&P 500 Stocks

Поделиться
HTML-код
  • Опубликовано: 20 дек 2024

Комментарии • 167

  • @gener4ld
    @gener4ld 3 года назад +12

    There is on flaw in your logic: you should have used the adj. close column to factor out the signal changes of the stock splits. The last stock split of Nvidia was on July 20 this year on a 4:1 ratio, there were others in 2007, 2006, 2001 and 2000. I did not yet verify it, but I am pretty sure this would bump your numbers for Nvidia and could also explain a 51% drawdown.

    • @Algovibes
      @Algovibes  3 года назад +4

      Pinned!
      Very very good point and by considering too many cryptos (where the Close is equal to the Adj Close) I just forgot that. I actually did that in all of my other stock videos...shame on me.
      I will check the difference it makes when I am taking the Adjusted Close when I am home. If I forgot that please give me a hint again.

    • @AsifKhan-lq1tn
      @AsifKhan-lq1tn 3 года назад +1

      @@Algovibes hi, big fan of your work, I just have a question to ask you if you could help, I am trying to calculate simple moving average for like 100 stocks, but its taking much time like 2 to 3 seconds, also if I calculate 20 day SMA and 50 day SMA at a time so it doubles the time, can you plz tell me how to do it in milliseconds, like I have seen many sites do it in milliseconds no matter how many SMA to calculate at a time.

    • @hamsolo474
      @hamsolo474 3 года назад

      @@AsifKhan-lq1tn Are you using the method to calculate moving averages he demonstrates at 2:40?
      And he shows how to iterate through a list of ticker symbols at the end of the video.
      If you are doing exactly what algovibes is doing then and it takes you multiple seconds then you must have incredibly slow hardware or some misconfiguration on your pc.

  • @danpetre5414
    @danpetre5414 3 года назад +3

    Your channel is better than Netflix :)

    • @Algovibes
      @Algovibes  3 года назад +1

      lol :D Thank you mate.

  • @B.St9
    @B.St9 3 года назад +3

    Ganz ehrlich. Ich liebe deine Videos! Mach weiter so und hör nicht auf🙏🏼

    • @Algovibes
      @Algovibes  3 года назад +1

      Danke dir für deinen netten Kommentar 💓

  • @tylerdurden8453
    @tylerdurden8453 3 года назад +9

    Backtesting a trading strategy on the current stocks in the S&P 500 is full of survivorship bias. By default high performing stocks are added to the S&P and low performers are removed.

  • @itayhilel2168
    @itayhilel2168 3 года назад +10

    Loved the video, next we should check more claims that gurus on RUclips make.

    • @Algovibes
      @Algovibes  3 года назад +2

      :D Yea as said in the beginning the videos are not meant not prove someone wrong but as long as people give exact inputs on a strategy I just find it interested to code it in Python and got the feeling People enjoying it.

  • @eduardob5463
    @eduardob5463 3 года назад +1

    Wow man! Mind blowing video!!! Many thanks for share. Hope some day I can write code like you! Cant wait for another video like this 😎

  • @jackp4838
    @jackp4838 3 года назад +12

    What about a live trading bot using this strategy next?

    • @Algovibes
      @Algovibes  3 года назад +4

      :D That would be infinite content. Backtest a certain strategy then implement a bot. I would love to do it but on the other side I don't want to bore my audience :p

    • @fuzzwad5049
      @fuzzwad5049 3 года назад

      @@Algovibes I just found your channel, would definitely not be bored to see you make a bot for this. This is really cool stuff.

  • @marcelangir7534
    @marcelangir7534 3 года назад +1

    In the 9:24, My "x = df[(df.Buy == 1) | (df.Sell == 1)]" step STILL return a row with column "buy" and "sell" both 1. Anybody can help me ? thx

    • @marcelangir7534
      @marcelangir7534 3 года назад +1

      Owh, by the way, I forgot to tell u, Im not checking using NVIDIA price data. The data sets are different, but the code is exactly the same.

    • @Algovibes
      @Algovibes  3 года назад

      Hi man, sure. Can you pass the asset you are testing? I am trying it out as well.

  • @dragonwave2652
    @dragonwave2652 3 года назад +2

    What is a logic of getting future low value for creating a buying signal?

    • @Algovibes
      @Algovibes  3 года назад +1

      It's just to check if the buy limit order would have been executed. If it wouldn't the trade shouldn't be considered in the backtest.

  • @czernobill6428
    @czernobill6428 3 года назад +2

    Hey, danke für die super Videos. Habe deinen Kanal vor kurzem entdeckt und sofort abonniert.
    Weißt du bei welchem Broker man in D eine solche Strategie mit Aktien ausprobieren kann, damit die Orders automatisch ausgeführt werden? Erstmal nur Paper Trading, sollte kostenlos sein. Später dann richtig.

    • @regeleionescu935
      @regeleionescu935 3 года назад +1

      Crezi că înțelege cineva limba germană?

    • @Algovibes
      @Algovibes  3 года назад +2

      lol :D Ironically I am German and I got everything he said but I had to use a translator to understand what you wrote.
      @Czerno Bill (Dat name :D) Vielen Dank für deinen Support :-)
      Muss der Broker deutsch sein? Bei sowas würde ich grundsätzlich Interactive Brokers empfehlen, da die ganz gute Schnittstellen haben.
      Wenn du dich an nicht offizielle rantraust: Es gibt Trade Republic libraries in Python.

  • @billytrummer5589
    @billytrummer5589 3 года назад +5

    I just think it's interesting because if you extended your hold time you'd likely have a similar win rate but greater profit margins.

    • @Algovibes
      @Algovibes  3 года назад

      That's an interesting thing to test. Agreed!

  • @monkyspnk777
    @monkyspnk777 2 года назад +1

    Do you include your code, all your code in the repo?

    • @Algovibes
      @Algovibes  2 года назад

      Hi Andrew,
      all code since the membership option is set up and I already uploaded more than 10 older Notebooks as per request.
      Be invited to join in:
      ruclips.net/user/Algovibesjoin

  • @biaodong5143
    @biaodong5143 3 года назад +1

    Hi thanks a lot for the tutorial and the sharing. If I may, the df['Sellprice'] = df.Open.shift(-1) should not be executed before x=df[(df.Buy==1) | (df.Sell==1)] otherwise we miss the real selling price at the day when the selling signal appears, because in most cases there are dates with 0 buy and 0 sell between a transaction, and its open price, which is deleted later on with the filtering function x=df[(df.Buy==1) | (df.Sell==1)], is selected as the selling price.

    • @Algovibes
      @Algovibes  3 года назад

      Thanks for your comment, but I disagree. x and y are just subdataframes. They don't filter out anything from the initial frame. You can check e.g. manually the very first trade as an example. The Sellprice is in fact the exact same as it is when manually screening for the trade.

    • @biaodong5143
      @biaodong5143 3 года назад +1

      @@Algovibes if I understand correctly, the valid sell price is only in the x data frame, and selecting the sell price before the x would give a sell price that could be filtered out by x

    • @hamsolo474
      @hamsolo474 3 года назад

      @@Algovibes What do you mean by "they are just subdataframes. They don't filter out anything from the initial frame".
      Isn't the point of x to filter rows that don't contain a buy or sell signal, and the point of y to filter consecutive buy/sell signals?

    • @hamsolo474
      @hamsolo474 3 года назад

      @@biaodong5143 I think you are right but wouldn't the correct sell price be in y? As x contains consecutive buy and sell signals but y contains alternating buy and sell signals?

  • @DIMAZRU
    @DIMAZRU 3 года назад +1

    sorry for noob question but how i can print all lines in 'profits'?

    • @Algovibes
      @Algovibes  3 года назад

      You could just transform it to a list or set the pandas setting to showing all lines.
      -> profits.to_list()

  • @kremicfein
    @kremicfein 2 года назад +1

    Hi, hast Du den Code irgendwo in nem Repo?

    • @Algovibes
      @Algovibes  2 года назад

      Ich mach das relativ fair: Wenn die videos genug traction haben lade ich den code bei pastebin o.Ä. hoch und verlinken das in der Beschreibung. Das Video ist ziemlich kurz davor btw Kann also sein, dass ich das demnächst hochlade.

  • @AomineDaici
    @AomineDaici 3 года назад +2

    When will the code for this technique be published?

    • @Algovibes
      @Algovibes  3 года назад

      Probably soon. It is dependent on the engagement.

  • @pavloyevhenovych7716
    @pavloyevhenovych7716 3 года назад +2

    Awesome work man! I love what are you doing. But please do something with "swallow sound" very annoying to hear it....

    • @Algovibes
      @Algovibes  3 года назад +1

      Hi man, thanks a lot. Can you check out my newer videos? I was trying to adjust the input volume.
      Would be thankful for your feedback.

  • @Nerdyandhot
    @Nerdyandhot 3 года назад +1

    are you able to back test price action aswell?

    • @Algovibes
      @Algovibes  3 года назад +1

      Thanks for the suggestion!

  • @harshalvarade1166
    @harshalvarade1166 2 года назад +1

    I have a simple strategy of specific time breakout/breakdown on xauusd how do I backtest it can you please help.

    • @Algovibes
      @Algovibes  2 года назад

      How can I help?

    • @harshalvarade1166
      @harshalvarade1166 2 года назад

      @@Algovibes how to backtest or develop an EAfor that strategy

  • @waimansze395
    @waimansze395 2 года назад +2

    Hi thanks for a lot for the tuition! However, I got a question regarding the backtesting. How can I assign the strategy results to corresponding tickers from all S&P500 stocks? it can be worthwhile to find out which stock performs the best among all other stocks. Thanks!

    • @Algovibes
      @Algovibes  2 года назад +1

      Welcome man, thanks for watching. You can do that by knowing that the index of a particular return is the same as for the stock. So e.g. return 0.02 on index 2 will be Stock "X". You can actually form a dataframe out of that as well.

    • @waimansze395
      @waimansze395 2 года назад +1

      @@Algovibes sorry I'm new to python. I have made the code as follow:
      tickers[frame,index(max(frame['gain']))]. however, the error "RangeIndex' object is not callable" popped up. is there any quick way to create a dataframe with tickers like what you mentioned? many thanks!

  • @SIMONONLY
    @SIMONONLY 3 года назад +1

    Awesome Vid, any chance to apply parameters optimization like using gridsearch to perfect the returns or sharpe ratios in your next video. Thx

    • @Algovibes
      @Algovibes  3 года назад +1

      Thanks mate. Already did some stuff here and there. Probably not in the next one but might be covered in future videos. Thanks for the suggestion :-)

  • @farhan6516
    @farhan6516 3 года назад +2

    want to buy crypto price final drop and want to sell crypto price final up. can we do it using python

    • @Algovibes
      @Algovibes  3 года назад

      Could you elaborate? Sounds interesting in the first place.

  • @michaelnovik270
    @michaelnovik270 3 года назад +2

    Hi! Thank you for another great video!
    Do you know how to backtest strategy and get report with every trade from the backtest? I mean trades which were simulated by backtester, in approximately the following format: opentime; openprice; asset; close time; close price; profit. Is there any way to get such trades report with backtrader libriary or some other?

    • @Algovibes
      @Algovibes  3 года назад +1

      You mean historical reports or realtime reports? BTW thanks for watching and your comment, appreciate it!

    • @michaelnovik270
      @michaelnovik270 3 года назад

      @@Algovibes Yes, historical trades reports from backtesting. It can be very helpful to analyze trades when testing a strategy.

  • @GilsonFabiano
    @GilsonFabiano 3 года назад +1

    Nice bro. How are you?
    Can you set video language source to english? The youtube is generating auto subtitle from germany language.

    • @Algovibes
      @Algovibes  3 года назад

      Was a stressful week, but I am fine :-) Hope you are too!
      I double checked and I have enabled both German and English. Don't you have the option? Thanks a lot for your feedback in advance!

    • @GilsonFabiano
      @GilsonFabiano 3 года назад

      @@Algovibes I hope it's better now. for me it only appears automatically generated translation from German, so I can't translate to my language correctly.

  • @twiggygarcia5096
    @twiggygarcia5096 2 года назад +1

    thanks for these videos, very intresting!

    • @Algovibes
      @Algovibes  2 года назад +1

      Awesome to read. Thanks a lot for watching man.

  • @odev6764
    @odev6764 3 года назад +1

    Could you share this notebook?

    • @Algovibes
      @Algovibes  3 года назад

      Probably in the near future, yes

  • @NexGenSlayer
    @NexGenSlayer 3 года назад +2

    I'm getting a 'SettingWithCopyWarning' when trying to add the moving average series to the dataframe. Idk what to do to fix this or why I'm getting this unless my Pandas version is different from yours. I am downloading a bunch of stocks all at once since the yfinance's dowload functionality allows you to download a group of stocks and will employ multi-threading to make it go faster. I don't have an issue when I'm dowloading just one stock. For example, if I was to try and add a column to just a singular stock from the dataframe with multiple stocks, df['NVDA']['SMA200'] = df.Close.rolling(200).mean(), that 'SettingWithCopyWarning' occurs and the dataframe does not add the SMA200 column. It instead says I need to use the iloc function.

    • @Algovibes
      @Algovibes  3 года назад +2

      Did you make a copy of your df as I did in the video? Mostly solves this issue.

    • @NexGenSlayer
      @NexGenSlayer 3 года назад +1

      @@Algovibes That fixed it. I still get the warning, but it now works as it should. Thanks! Keep up the good content btw :)

  • @SIMONONLY
    @SIMONONLY 3 года назад +1

    For the last condition of 'Buy' (0.98*df.Close >= df.Low.shift(-1)), what if the 2% lower order get filled in next 2,3,4,etc days . Would the script ignore those days ?

    • @Algovibes
      @Algovibes  3 года назад

      Yes, it just checks for the next day. Reason behind that is the rolling minimum. Could be different the next day. If it is still a low, the check will start from new.

  • @marcelconduit8194
    @marcelconduit8194 3 года назад +5

    Love your videos! Could you create a video for the MACD strategy of Trading Rush? Would be awesome!
    P.S. Sounds like you are from Germany or? If some great I‘m also ;)

    • @Algovibes
      @Algovibes  3 года назад +4

      Thanks for the suggestion! :-) Noted!
      Ja bin ich!

    • @jacobnotte3699
      @jacobnotte3699 3 года назад +3

      Germans unite!

  • @bosco6771
    @bosco6771 3 года назад +1

    Thanks so much for the video ! A small glitch to check with you: is the Buy Signal determination encountering forward-looking bias ? 0.98 * df.Close >= df.Low.shift(-1) is looking at future data to determine whether there is a Buy Signal for the current day.

    • @bosco6771
      @bosco6771 3 года назад

      I am trying to enhance the code by using the same logic but to determine whether there is a Buy Signal for "tomorrow", instead of "today", to avoid forward-looking bias. Let me know your view as well. Thanks !

    • @Algovibes
      @Algovibes  3 года назад +4

      Someone else already commented that but it isn't the case. I maybe explained that too briefly. With this I am just checking if a limit buy order could have been taking place on the next day when ALL conditions are fulfilled. I am not taking information from the next day, I am just checking if that trade would HAVE been executed due to the limit buy order.

    • @georgebrandon7696
      @georgebrandon7696 2 года назад

      @@Algovibes You will NEVER get a buy/sell signal on that last row (today to buy tomorrow). NEVER. Why? Because in real world, real-time, data, that row does not exist to pull from. So when you do get a buy/sell signal on that last row, your day's trading has already been closed. THIS is why most trading bots don't trade on the next day open, but the current day close (after hours trading).

  • @kshitijsawant8723
    @kshitijsawant8723 3 года назад +1

    Hello can you please help me code the my strategy?

  • @russnagel1
    @russnagel1 3 года назад +3

    More great content, keep up the good work!

  • @Shkololo228movie
    @Shkololo228movie 3 года назад +2

    Why burprice is equal to 0,98 from close?

    • @Algovibes
      @Algovibes  3 года назад

      Because we are placing a buy limit order 98% of the Close price where the asset hits a 10 d low and is also above the SMA.

  • @farhan6516
    @farhan6516 3 года назад +1

    can we do multiple trades in one bot?

  • @MrMorgalis
    @MrMorgalis 3 года назад +1

    Super video wieder.
    Hast du vielleicht zeit um ein DCA bot zu schreibem wie es auf 3comma lauft?
    DCA bot auf 3comma ist free aber nur eine bot.

    • @Algovibes
      @Algovibes  3 года назад

      Danke dir :-) Ich hab leider keine Erfahrungen mit 3comma.

    • @MrMorgalis
      @MrMorgalis 3 года назад

      @@Algovibes ruclips.net/video/52GQnByG4m0/видео.html , ist sehr einfach , guck nur 5 oder 6 minuten, funktioniert gut. monatlich 35 bis 40% account Erhöhung.
      gruss dir

  • @paaatreeeck
    @paaatreeeck 3 года назад +1

    So how and where do you implement this so that the bot can actually buy and sell real stocks?

    • @Algovibes
      @Algovibes  3 года назад

      I have a whole playlist on implementing strategies. Be kindly invited to check out my cryptobot playlist.

  • @Guindous_
    @Guindous_ 3 года назад +1

    Thank you for your videos, they help me a lot

    • @Algovibes
      @Algovibes  3 года назад

      That's awesome to hear. Thank you :-)

  • @natabelle100
    @natabelle100 3 года назад +1

    Would you be able to share your python w us?

    • @Algovibes
      @Algovibes  3 года назад

      I am currently holding it like so: I am publishing the script on pastebin when a certain level of engagement is reached.

  • @maxmustermann3690
    @maxmustermann3690 3 года назад +1

    isn't the profit 143% ?? or am i getting it wrong?

    • @Algovibes
      @Algovibes  3 года назад

      It's 43% but as said I didn't cover momentum stocks as Rayner but just took the whole S&P. The other thing is: I was using Close prices and not adjusted Close prices.

  • @jacobnotte3699
    @jacobnotte3699 3 года назад +1

    Also, this backtest does have survivorship bias... correct? (Not that it matters for this)

    • @Algovibes
      @Algovibes  3 года назад +1

      100% correct! But to show this strategy I consider it to be of minor relevance.

  • @dineshshelke9833
    @dineshshelke9833 3 года назад +1

    Can I use this for indian markets
    Nifty!!

    • @AvgGuyFitness
      @AvgGuyFitness 3 года назад +1

      What is stoping you ?

    • @Algovibes
      @Algovibes  3 года назад

      Indian market is super interesting! I played around with Indian stocks in this one here, might be interesting for you and should help you getting started:
      ruclips.net/video/YIsKSQh1xpY/видео.html

  • @sazamhashmi
    @sazamhashmi 3 года назад +1

    Hi, i would like to contact you some how to help me in doing something similar for PSX. If you could help out it would be great.

    • @Algovibes
      @Algovibes  3 года назад +1

      Here I am :-) How can I help you?

    • @sazamhashmi
      @sazamhashmi 3 года назад

      I need help for KSE 100 as yahoo finance is not working on it. Can you help me out in it? Also i have theories to predict stock prices and i am learning from your videos on how to program it on python. Thanks to you and may God bless you for sharing the videos on how to program. I really love your channel it's super amazing.

  • @benjamintreitz1647
    @benjamintreitz1647 2 года назад +1

    great video learned a lot!

    • @Algovibes
      @Algovibes  2 года назад

      Thanks a lot Benjamin.

  • @EndoplasmicReticuIum
    @EndoplasmicReticuIum 3 года назад +1

    What IDE is that?

  • @rahulpatil6272
    @rahulpatil6272 3 года назад +1

    Thanks for the video, mate. However, I have a doubt. If I need to calculate how much profit/loss I would've had with respect to certain capital, would multiplying the capital with the gain be the correct way? I'm confused on this so any help would be appreciated.
    Thanks in advance, and keep up the great work.

    • @Algovibes
      @Algovibes  3 года назад +2

      It is exactly as you wrote! Thanks for watching :-)

    • @jefflittle8913
      @jefflittle8913 2 года назад

      @@Algovibes I think this is wrong. To get the gain you have to determine the time frame and adjust based on that. Total gain over an unknown timeframe and unknown capital requirement is completely meaningless.

  • @Oiutrem
    @Oiutrem 3 года назад +1

    Hey man! Thank you once more. Trade stats is where I’m stuck and this one maybe showed me a way.
    Could make one calculating more complex stats like, sharpe, sortino, calmer, cosective winners, losers, etc?
    Anyway thanks again! Keep doing it you are great!

    • @Algovibes
      @Algovibes  3 года назад

      Thanks man. Yep that's a nice idea. Not sure if I will implement all but I noted your suggestion.

    • @mavsebpl
      @mavsebpl 3 года назад

      @@Algovibes Hi man, how can I get in touch with you ... email ?

  • @niktotube2477
    @niktotube2477 3 года назад +2

    Can you please make like one video that will be like an hour or more lenght. Where you will explaining everything about trading crypto from zero. like for complete beginners. explaining every function and every trade in complete details. I think it will be very very useful.
    I am not a beginner, but still sometimes I get confused.
    Or maybe I just have to watch all your videos from beginning.
    anyways, thank you very much! you are doing really great content!!!

    • @Algovibes
      @Algovibes  3 года назад

      Hi buddy,
      I think I covered most of the details here:
      ruclips.net/video/_IV1qfSPPwI/видео.html
      BTW I have a playlist on cryptobots. If you watch them one after another it might make more sense.

  • @jacobnotte3699
    @jacobnotte3699 3 года назад +1

    So glad I found your channel! Thanks for the binge-worthy material :)

    • @Algovibes
      @Algovibes  3 года назад +1

      Thank you very much mate :-)

  • @farhan6516
    @farhan6516 3 года назад

    How to do second trade when open first trade?

    • @Algovibes
      @Algovibes  3 года назад

      Could you elaborate?

  • @hamsolo474
    @hamsolo474 3 года назад +1

    Hey, I love your videos, I am learning a lot from them, however I have a question at 13:30 you say we have to "profits[::2]" because "otherwise it wont make sense". I dont understand why we do this. Can you please explain this point a little further?

    • @Algovibes
      @Algovibes  3 года назад

      Hi man, thanks for your kind words!
      I am exlaining why am I doing that at 12:45. By shifting the sell column one row back I already got everything for the executed trade: Sellprice - Buyprice. The row afterwards is just containing Nonsense prices. With that syntax I am just filtering that out.

  • @sChaikovsky
    @sChaikovsky 3 года назад +1

    I think this is the first time I see you on the screen

    • @Algovibes
      @Algovibes  3 года назад

      No :D That's not me that is Rayner Teo!

  • @yash25dec
    @yash25dec 3 года назад +1

    Great learning

    • @Algovibes
      @Algovibes  3 года назад

      Thanks ☺️ Happy to read that!

  • @blankerhans9659
    @blankerhans9659 3 года назад +1

    Mach mal bitte ein Video über Kennzahlen berechen mit yfinance wie PEG ratio etc. :)

    • @Algovibes
      @Algovibes  3 года назад +1

      Hab ich schon :-)
      ruclips.net/video/ZUQEd22oNek/видео.html
      und hier um das ganze ein bisschen schöner darzustellen und peer group comparison oder ähnliches zu machen:
      ruclips.net/video/YsnPlQyCYfo/видео.html

    • @blankerhans9659
      @blankerhans9659 3 года назад

      Ja hab ich tatsächlich beide schon geguckt. Aber irgendwie stimmt mein KGV zB nicht mit den auf anderen Websites überein… Und habe zB versucht ein PEG Ratio zu berechnen, aber es gibt kein Net Profit um das zu berechnen. :(

  • @tinlu4137
    @tinlu4137 3 года назад +1

    1067% ??

    • @Algovibes
      @Algovibes  3 года назад

      Didn't test it on the best performing stocks over the last 100days as said. But taking only the S&P stocks it seems to be way lower.

    • @swingtrader833
      @swingtrader833 3 года назад +1

      I assume the reason Rayner's net profit was 1067% versus Algovibes' net profit of only 43% is because I think Algovibes is calculating the average stats of stocks trading individually, while Rayner's calculations are based on the fact that different stocks will trigger buys at different times of the year from one another. So Rayner is generating more trades per year than Algovibes.
      Therefore, if I'm understanding Algovibes' code correctly - and I may not be since I'm just learning python - then it's not really surprising that Rayner ended up with a much higher net profit.
      What I do find strange is that Algovibes' average profit was 1% while Rayner's was only 0.49%. Rayner's and Algovibes' average profit should be the same. Or Rayner's average profit should be higher, if using 100-day momentum is a benefit.

  • @SuperJg007
    @SuperJg007 3 года назад +2

    This doesn't have to be done solo if you ask me, we can combine multiple strategies, then mark a certain threshold for indicators in all strategies to execute the trade.
    For instance say we have 5 strategies, we can have a threshold of 80% confidence. signal from atleast 4/5 of those strategies being one way.
    have you thought about using a lstm model or a transformer model?
    love your video as always, best freaking channel ❤️

    • @Algovibes
      @Algovibes  3 года назад

      Thank you for your kind words mate :-) And also for sharing your thoughts.
      Yes, I am planning on to integrate a LSTM model in a bot. I wanted to cover MPL first. Might not be my next videos but surely in the upcoming months.

    • @thunderbolt997
      @thunderbolt997 3 года назад

      @@Algovibes i have a theory with lstms since they learn the underlying mechanism of its data. Could it be that it learns to create a macd indicator or rsi indicator why not directly give the lstm macd indicator as input wouldnt this jumpstart the lstm so it doesnt have to learn to create its tools

  • @williamwhitehead374
    @williamwhitehead374 3 года назад +1

    Brilliant!

    • @Algovibes
      @Algovibes  3 года назад

      Thank you my friend :-)

  • @kannansingaravelu
    @kannansingaravelu 3 года назад +1

    There is a look ahead bias. Use shift(1) for previous day instead of shift(-1) which is forward looking.

    • @Algovibes
      @Algovibes  3 года назад

      Got to disagree here. The only thing I am checking here is the next days Low being below 98% of todays Close to see if it WOULD be possible at all to place a buy limit order. I am not taking information from the next day, I am just implementing the buy limit order here.
      If I would implement that in e.g. live trading I can just place it with 98% of the Close. But here in this case: How can I know that the price on the next day was ever below 98% so that my trade would have been executed? There is no look ahead bias.

    • @georgebrandon7696
      @georgebrandon7696 2 года назад

      @@Algovibes No look ahead bias, but it's IMPOSSIBLE to get a buy sell signal on your last day to buy tomorrow because you can't shift data back that never exists. And when will that row become available to shift back? The end of the day. How can you buy the stock on next day open when you don't get the signal until that day closes? LOL
      Coulda shoulda would abought it, but you didn't. But I didn't know I should have bought it until the end of day close numbers were released. Yeah, hindsight is 20/20.
      You DO realize, most people are wanting to learn how to code the strategy and use it in the real world (via a bot). Not just backtest the strategy on historical data.

  • @aadilpatel07
    @aadilpatel07 3 года назад +1

    Hey love your videos, well it would be great if you could share the code with us

    • @Algovibes
      @Algovibes  3 года назад +1

      Thanks mate! I am sharing the code once a certain engagement threshold is crossed. Explained that in my newest community post.

  • @ClashofWilson
    @ClashofWilson 3 года назад +1

    try live pls!

    • @Algovibes
      @Algovibes  3 года назад

      Thanks for the suggestion :-)

  • @CarloAbdiel117
    @CarloAbdiel117 3 года назад +1

    Love u bro

    • @Algovibes
      @Algovibes  3 года назад +1

      Love you too ❤️

  • @user-iy2qo6no2d
    @user-iy2qo6no2d 3 года назад

    1067% nicht schlecht Kappa

  • @yehezkielerlen6692
    @yehezkielerlen6692 3 года назад +1

    i want to copy what u did in ur vid, but i afraid if bot doesnt give me profit

    • @Algovibes
      @Algovibes  3 года назад +1

      In general you shouldn't build a bot if you cannot take losses. You can use paper trading (trading without actual money).

  • @pablosdiveo
    @pablosdiveo 3 года назад +1

    You are using comparing the close of today against the low of the next day. This is not correct. It will not work in real life.

    • @Algovibes
      @Algovibes  3 года назад

      No because in real life you will - after the signals are occurring - be able to set a buy limit order and just get the feedback depending on the price development on that day.
      I have to check that in the backtest in that way just to see if my order would have been executed. This is correct - but I should have explained that better most probably.

  • @albertocastillo1293
    @albertocastillo1293 3 года назад +1

    Hi, Thanks for your great work. Would be possible to contact you directly?.

    • @Algovibes
      @Algovibes  3 года назад

      Thanks mate. Well, here I am :-) How can I help?

    • @albertocastillo1293
      @albertocastillo1293 3 года назад

      @@Algovibes Yesterday I set to you a message using the coding ground platform explaining very briefly what I do. I would like to discuss with you some ideas that could be interesting for you but I would prefer using a private channel like email or any other.

  • @EmmanuelMassing-e9u
    @EmmanuelMassing-e9u 27 дней назад

    orteils

  • @rraul
    @rraul 3 года назад +1

    👏👏👏

    • @Algovibes
      @Algovibes  3 года назад

      🙇🏽‍♂️ :D

  • @williamwhitehead374
    @williamwhitehead374 3 года назад +1

    👏🏾

  • @georgebrandon7696
    @georgebrandon7696 2 года назад

    How can you check for a next day new low when you're at today? And how can you buy/sell on the next day open when you lack the buy/sell signal for the final row in the historical data?
    Back testing is nice an all, but your code is absolutely useless in the real world if tying to drive real time decisions. And good luck running any of this every minute because you would just traceback error out due to not having a future row to shift to calculate. And in every single one of your backtest videos this is true. Some people don't care about backtesting. Congrats, your strategy works. But now how do you implement it in the real world with this code? You can't.

    • @Algovibes
      @Algovibes  2 года назад +1

      Hi George,
      appreciate your comment but have to stop you here. I am showing the whole process: From Backtesting, over live implementation into cloud deployment. Of course it is different to go live with a strategy then simply backtesting it.
      Be invited to basically just check out all my videos, in specific the videos in the cryptobot playlist. I am mostly covering the backtest of a certain strategy and then going live with it.
      Example would be this series:
      First: ruclips.net/video/mtgr9eMXmgU/видео.html
      Backtesting multiple assets: ruclips.net/video/d4WgOIrby5Q/видео.html
      Tradingbot implementation: ruclips.net/video/FlL1X17sw8o/видео.html
      Cheers!

    • @georgebrandon7696
      @georgebrandon7696 2 года назад

      @@Algovibes That's all fine and well. But go ahead and backtest this and then use a stock where the buy signal is triggered in the last 5 rows of data. It will end up giving an error about indexing... It works when there is no signal on the last 5 rows. But as soon as it goes looking for that row to grab the price, it will error out. You MUST deal with that error,. And in your code, you do not. Had this happen when using the backtesting on several tickers. One being AEE. But that will vary depending on data timeframes.

  • @eduardob5463
    @eduardob5463 3 года назад +1

    Wow man! Mind blowing video!!! Many thanks for share. Hope some day I can write code like you! Cant wait for another video like this 😎