Rayner Teo Bollinger Bands Strategy Backtest In Python High Return

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 มิ.ย. 2024
  • This video shows a backtest of the Rayner Teo Bollinger Bands Strategy, that he explained on his channel, it was recommended by one of the comments and got me curious, so it's a python high return backtest, which makes it a good algorithmic trading strategy, all confirmed over 10 years of data using stock market prices. It can be used for crypto, different currencies, stocks, bitcoin or other. It works well on the daily timeframe generating high return. This strategy looks safe the equity doesn't show large drawdowns, and Rayner Teo backtest showed 1682% return. Details are explained in here with the python code.
    🍓 Follow structured courses with more details and practice exercises check my "About" page for Discount Coupons on my Udemy courses covering:
    - Python basics Kickstarter,
    - Object Oriented Programming
    - Data Analysis with NumPy and Pandas including financial analysis exercises,
    ... more courses are on the way drop me a message if you have a particular interesting topic!
    Good luck!
    💲 Discount Coupon for My Udemy course on Algorithmic Trading:
    bit.ly/CouponAlgorithmicTrading
    For the coding fans you can download the python code as a jupyter notebook file from this link:
    drive.google.com/file/d/1hK3c...
    #forexanalysis #trading #tradingbot #forex #stockmarket #stocktrading #stocktradingstrategies #algotrading #python #pythonforbeginners
    00:00 Introduction And High Returns Brief Explanation
    01:12 Rayner Teo Bollinger Strategy Basics
    05:57 Python Code Explanation
    08:05 Coding The Technical Indicators
    08:30 Trading Signals Functions
    12:35 Trading Chart and Signals Visualization
    13:35 Strategy Backtest
    19:35 Backtest Results Returns And Trades Details
    20:55 Equity Chart Throughout the Backtest

ความคิดเห็น • 146

  • @MrSamyWageh
    @MrSamyWageh 2 ปีที่แล้ว +2

    Another excellent informative video. Many thanks!.

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว

      Thank you for your support, it's great to have you on board.

  • @a.winath4024
    @a.winath4024 2 ปีที่แล้ว +1

    THANK YOU AGAIN FOR YOUR EFFORTS! :-)

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว +1

      Happy you are still interested, thank you for your support 😊

  • @aaronsarinana1654
    @aaronsarinana1654 2 ปีที่แล้ว +7

    Great! As you mentioned, it'd be interesting testing on a lower time frame to see if it is still consistent. Also, trying the strategy on a portfolio with stocks picked from the s&p500. I think it's worth playing a bit more with the strategy! Great video, thanks!

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว

      Thank you, yes it's very rare to get a constantly increasing equity on a backtest. Bbands are great entry signals.

  • @newbienoob1
    @newbienoob1 2 ปีที่แล้ว +3

    First comment 🙂 thank you sir i will backtest this on forex and indices

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว +1

      Good luck, let us know if you find anything interesting!

  • @gokhalesadan
    @gokhalesadan ปีที่แล้ว +1

    Helpful video. Please make a video, detail of backtesting package and how to customize use.

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      Thank you for your comment, did you check my python learning playlist?

  • @jensasp4326
    @jensasp4326 2 ปีที่แล้ว +1

    Great! as always :-) thx ..... how about Super Trend indicator as confirmation/exit - e.g. on a lower timeframe, like 30 minutes exit test, to a 4H entry signal algorithm ? ... and one suggestion to upcoming video's, is an example on how to use the heat map function in backtesting.py, to loop through parameter settings, or the multi timeframe functionality (related to the exit on lower timeframe, than the entry) ... many thanks, for your excellent stuff!

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว

      Thank you for your comment, yes I should check the heatmap I like visual gadgets... For the entry/exit can you elaborate with a quick example?

    • @jensasp4326
      @jensasp4326 2 ปีที่แล้ว +1

      @@CodeTradingCafe Hi again :-) I Think my idea is that the primary timeframe to entry signal is 4H and then I would use the 30M to determine confirmation/Exit, like this: (a) download 30M data, Calculate the Supertrend on this data (b) resample data to the 4H timeframe (updated every 30 M) (c) Calculate Entry (BUY or SELL) on the 4H data (d) store this, and if the signal within 3 x 30 minutes is aligned with the Supertrend direction, then entry (e.g. confirmed) (e) Exit when the 30M change direction ..... the idea is, that the 4H shows the trend better, which gives the entry - and the 30M supertrend confirms the direction of the entry signal, and is used for a more precise exit ....

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว +1

      @@jensasp4326 thank you for the explanation, yes I see what you mean I will think about how to code it and maybe additional indicators on top...

  • @rami20102015
    @rami20102015 ปีที่แล้ว

    thanks sir for what you teach us

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      Thank you for your appreciation, enjoy the learning process!

  • @santhoshdasari7
    @santhoshdasari7 2 ปีที่แล้ว +1

    Thanks you 🙏

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว

      Thank you for your support 😊. Good luck to you.

  • @rami20102015
    @rami20102015 ปีที่แล้ว +1

    i hope you explain next time for Histogram MACD indicator in python , that i want to know how many red/green stick in histogram that give me the third or forth stick another color to get signal for bot. I wish you understood me .

  • @optionbuyside3483
    @optionbuyside3483 3 หลายเดือนก่อน +1

    Great leaning

    • @CodeTradingCafe
      @CodeTradingCafe  3 หลายเดือนก่อน

      Thank you for your support!

  • @lgbpinho
    @lgbpinho ปีที่แล้ว +2

    You can use the rolling() method of pd.DataFrame to check the EMA condition:
    stockData['trend'] = [ 1 if (window.close > window.ema).all() else (-1 if (window.close < window.ema).all() else 0)] for window in stockData.rolling(5)]

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +1

      Thank you yes there are ways of doing things in Python.
      ... it's a nice comprehension!

  • @fernandomilans1296
    @fernandomilans1296 ปีที่แล้ว +1

    Teacher,
    Have you tried the "Donchian Channel"? Is it more effective than the "Bollinger Bands"? It would be interesting to do a "versus"
    Regards!

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +1

      Thank you for sharing, in my opinion they are almost there same as bollingers. I don't think much difference will be seen in the results.

  • @ventiladorbueno1846
    @ventiladorbueno1846 2 ปีที่แล้ว +1

    Thank you

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว +1

      Ventilador still here! Thank you ,🙂

  • @anderwork7571
    @anderwork7571 ปีที่แล้ว +1

    good shit bro

  • @thirupathisalveru5411
    @thirupathisalveru5411 ปีที่แล้ว +1

    thank you

  • @VonSchelzen
    @VonSchelzen ปีที่แล้ว +1

    Fantastic

  • @tudatostrader
    @tudatostrader ปีที่แล้ว +1

    Hey Mate! Amazing videos! May I ask where are you from? I'm trying to figure it out from your accent. Poland maybe?

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +1

      Hi thanks a lot for your support, not Poland take another guess 🙂 it's going to be hard because I have a mix of accents coming at different times.

    • @tudatostrader
      @tudatostrader ปีที่แล้ว +1

      @@CodeTradingCafe Okay, just to get a hint. Are you from the EU?

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +1

      @@tudatostrader yes but not only, I partly understand polish Italian and Portuguese, and fluent in English French and Arabic. I will let you guess 😂

  • @mathewz7434
    @mathewz7434 2 ปีที่แล้ว +2

    would you try backtesting priceaction strategies such as fakeouts and retest of prices?

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว +2

      Why not just let me know if there is a specific strategy to inspire from. Thank you for your comment

    • @mathewz7434
      @mathewz7434 2 ปีที่แล้ว +1

      @@CodeTradingCafe An example could be turtile soup strategy and Fair value gaps

    • @mathewz7434
      @mathewz7434 2 ปีที่แล้ว +1

      @@CodeTradingCafe also top down analysis of the charts

  • @kanaya1991
    @kanaya1991 ปีที่แล้ว

    hi bro! im a question about backtesting, were can i learn how in python? im new in python and im learning hard! cheers from argentina!

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      Hi, check this playlist it might be helpful Python Learning: th-cam.com/play/PLwEOixRFAUxZVV0XNWlapem1yoRA4rt_O.html
      Backtesting, the best is to read the backtesting.py online manual

  • @happystoat99
    @happystoat99 ปีที่แล้ว +2

    I just tried this notebook on a bunch of forex pairs as well as one stock (Tesla) for the last 10 years and all lost money, sometimes a significant amount, except for USDEUR, GBPSGD and GBPCHF. Is anyone else getting the same disappointing results? Or is this a strategy specific to stock indexes?

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +2

      Hey, parameters have to be tuned for each stock/currency and still no guaranteed results. The best is to choose a stock or a currency git the strategy parameters on 5 years of data to get best results and then test the parameters on the last 5 years. Even better, fit on 10 months and test on 2 months consecutively for 10 years then aggregate the returns for the results. I know it's a lot of work but this is a good way to test if a strategy is valid. (and in reality higher margin leads to higher returns but also higher risk). Trade safe!

  • @kachunpang7543
    @kachunpang7543 หลายเดือนก่อน +1

    Why do Sharpe and volatility in the result (time 1:00 ) is NaN? What does that mean?

    • @CodeTradingCafe
      @CodeTradingCafe  หลายเดือนก่อน

      Sharpe uses data time as index, if the index in our dataframe is just an integer then we get Nan meaning non numerical value.

  • @Asparuh.Emilov
    @Asparuh.Emilov ปีที่แล้ว +1

    Watch out for the cancelling of order thing in the strategy. In real trading there is no cancellation of the position, only close. So I am not sure in the backtest what it means to cancel an order but this potentially can be something that might confuse you about the real strategy performance.

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +1

      Hi thank you, in real trading you can cancel an order as long as the position is not opened yet, I have done many times, it's an order but doesn't mean an open trade yet.

    • @Asparuh.Emilov
      @Asparuh.Emilov ปีที่แล้ว

      @@CodeTradingCafe got it! Thank you!

    • @davidsaurel4012
      @davidsaurel4012 ปีที่แล้ว +1

      A limit order can be canceled until a trade is opened

    • @patelsunilg
      @patelsunilg 2 หลายเดือนก่อน

      But in 0% price gap most likely trade will execute and position will be open. What to do in that case ?
      Secondly in if condition you have checked if zero trade count then closed them wonder how condition will be satisfy since you closing the previous trade after the condition is true ? Is it something specific to library which I’m missing.
      Btw, Thank you so much for sharing!!

  • @isecretlyworshipponies628
    @isecretlyworshipponies628 3 หลายเดือนก่อน +1

    It would be great to check if it works ona timeframe which is suitable for day trading like 1 hour etc.

    • @CodeTradingCafe
      @CodeTradingCafe  3 หลายเดือนก่อน +1

      Bollinger bands definitely are a good addition for entry points filtering, for the trend detection we can adapt something for the hourly timeframe.

  • @AMAerik
    @AMAerik ปีที่แล้ว +2

    Hey mate, have you ever thought to open a discord group for all you fans? would be amazing for us

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      Hi, I did open the account, was never ready to share it and start taking care of it, to be honest I am not sure I will have more time to follow up, someone also asked me for a GitHub share which I also did but never had the time to migrate my codes which need a lot of sorting at this point. I guess I didn't expect that much work from such a small YT channel 🙂 but you are absolutely right it's maybe time for a discord.

  • @squadgang1678
    @squadgang1678 2 ปีที่แล้ว

    i didnt understand the part in addmasignal function where you used upt == 1 and dnt==1: then you insert value as 3 and print trend loop what do you mean by trend loop? and in some places of EMASignal value is 0 what does 0 indicates?

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว

      Hi, 1 means downtrend, 2 uptrend, 0 no clear trend and 3 for faulty algo we shouldn't be having 3 normally.

    • @squadgang1678
      @squadgang1678 2 ปีที่แล้ว +1

      @@CodeTradingCafe ok thank you

  • @sukriadnansangadji8232
    @sukriadnansangadji8232 ปีที่แล้ว

    please explain the code, how to code to reOrder_long when the price is bullish or trend up. I want first order 5% second order 20%, and so on

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      Hi, thank you for your comment, I am not sure I understand what you meant, can you please elaborate.

  • @leocycling
    @leocycling ปีที่แล้ว +1

    hi bro, is this strategy applicable for 30m timeframe with bitcoin trading ?

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      Hi I think 30 min is maybe too low but there's only one way to find out :)

  • @hourglass9
    @hourglass9 ปีที่แล้ว +1

    Great Video! Can you simultaneously do a backtesting on all 4 symbols
    like for example EURUSD and SPUSD
    so if I buy on SP500 on 2011-01-07 and sell on 2011-01- 10 then in the next buy this program will recheck the opportunity in EURUSD and SPUSD and automatically matches the buying signal and then buy that stock after 2011-01-10
    in this way we can have a full return on investment
    😀

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +1

      Hi good idea, we can simply backtest each asset on its own and aggregate the results for the same time window. I am not sure if this answers your question correctly.

    • @hourglass9
      @hourglass9 ปีที่แล้ว +2

      @@CodeTradingCafe Hi Thank you for your reply.
      For example if I invest $100 in AAPL then once I sell AAPL I scan the market and see which stock is fullfilling the buying condition that I had then for example if it is their in MSFT stock I will buy MSFT so over multiple stocks if I want to test my backtesting strategy to see my return in a year.
      so I dont want to backtest each asset but like multiple asset but on a single timeframe like if i used this strategy in 2010 and 2011 then how much will my return be over investments on different stocks....Would that be possible?

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +1

      Now I get your point, I am not sure backtesting allows this I will have to look for a way around, but I am also thinking if it works how to deploy it in the live version... tricky I admit

    • @hourglass9
      @hourglass9 ปีที่แล้ว

      @@CodeTradingCafe Exactly. Thank you!🙂

    • @harrymaltby5060
      @harrymaltby5060 ปีที่แล้ว

      @@hourglass9 They tend to run as a group, I track 30+ daily and trade on those and 85% to 95% always do their run together so investing in your choice, tends to block going into another. So spotting the buy and sell points of multiple stocks with one against the other as if the money is flowing back and forth between the two is exactly difficult but exactly what I have wanted but doesn't seem to happen that often. Personally, I am hoping that potentially pulling in the MACD, etc. into the NN finds my one stock choice, one at a time. I should not talk though, I am loosing some on XPO at the moment!

  • @arireimers6451
    @arireimers6451 2 หลายเดือนก่อน

    does this backtesting strategy work for every trading strategy

    • @CodeTradingCafe
      @CodeTradingCafe  2 หลายเดือนก่อน

      I guess so provided you code the indicators properly... and the trade signal of course.

  • @FunMaxClub
    @FunMaxClub 2 หลายเดือนก่อน +1

    Is this available as a web-based applications

    • @CodeTradingCafe
      @CodeTradingCafe  หลายเดือนก่อน

      Hi, unfortunately not, it's just testing strategies on historical data in Python, so you need Python installed to run the code files.

  • @akash_ray_trading4413
    @akash_ray_trading4413 ปีที่แล้ว +1

    Coding file not available please help

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      Hey sorry I just checked it should be working there doesn't seem to be a problem

  • @leandrorodrigues3488
    @leandrorodrigues3488 ปีที่แล้ว +4

    That has few opportunities over time, with high “win rate”.
    However you have 500 tickers in SP500 to find 1 per day.

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +2

      Hi, yes it's hard to get more on the daily timeframe, it would've been nice though because large timeframe have higher return/spread ratio.

    • @leandrorodrigues3488
      @leandrorodrigues3488 ปีที่แล้ว +3

      @@CodeTradingCafe i’d create a screener running this strategy every afternoon after market closes for the 500 ticker’s. Once I have a sign to get in I receive a note to trade next day, according to strategy. That may have at least 1 sign per week, considering 500 tickers.

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +2

      I agree I do something similar on my real account a screener that sends me an email when a 'rare' opportunity is on the market, then I check it out for confirmation. I did a video on this in the past and I can't seem to find it now (which means I should tidy up the playlists). Thanks for your input!

    • @leandrorodrigues3488
      @leandrorodrigues3488 ปีที่แล้ว +1

      @@CodeTradingCafe i also added a stop loss of 5%. That decreased win rate, however in some tickers, some trades you can have 30% loss. Too dangerous for me

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      @@leandrorodrigues3488 I agree 30% is too much. But doesn't your 5% SL limit the loss ?

  • @jordanfong4255
    @jordanfong4255 4 หลายเดือนก่อน +1

    lots of look ahead bias, such as taking the next recent order instead of the initial order. As well as increasing/decreasing the order closing price to show a better fill price. Not sure if this would produce good results in a real world scenario.

    • @CodeTradingCafe
      @CodeTradingCafe  4 หลายเดือนก่อน

      Hi, thank you for your input, can you please locate where the look ahead bias is occurring? I mean in the code (it does provide good results in real trading, but it's very slow, too little trades)

  • @whyyoutube8197
    @whyyoutube8197 ปีที่แล้ว +1

    Could you test all of Tradingwarz strategies please

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      will add it to the list, I am not familiar with this model so might take some time.

    • @whyyoutube8197
      @whyyoutube8197 ปีที่แล้ว +1

      @@CodeTradingCafe sure thanks for the reply!
      Tradingwarz has roughly 4 different strategies that may or may not be used together. I suggest you backtest them separately.
      1) 3 min / 5 min ORB after a gap (can be any direction). Enter when second candle breaks in either direction. Stop loss at the high/Low of the opening 3 or 5 min candle. First profit tartlet at the -0.272 level on Fibonacci retracement (can edit Fibonacci retracement on tradingview). Thereafter your take profit is up to u I think.
      2) “Trigger trades” based on previous day’s range. From daily timeframe, draw Fibonacci retracement from Low to high if daily candle was green or high to Low if daily candle was red. Add custom level 0.9 and 0.1. Take the trade when price either breaks the 0.9 or 0.1 level (direction depending on whether u draw from Low to high or high to Low). First take profit is previous days high. Thereafter the take profit is up to you. Stop loss at the 2nd closest Fibonacci level. Eg. If price breaks 0.9 level, stop loss at 0.618 of the fib you drew.
      3) Pure Fibonacci. On the 3 or 5 min chart, wait for price to develop about for about 15 min. Thereafter, draw the fib retracement from the current swing Low to high or high to Low depending on the directional move. Set limit order at the .5 retracement or .618 or .786 retracement. Stop loss is the 100% level of your fib. Suggest you backtest the 3 levels separately and also one more backtest where you average in whenever each level is hit. First take profit is current high/Low of the day and thereafter up to you. Suggest 1.5 RR for the 2nd take profit.
      4) “Fractal” trades. He takes trades off either break of single inside bar, single outside bar, double inside bar, outside inside or inside outside bar on the 3, 5 or 15 min chart. Generally such a strat would have a lot of false signals so I suggest taking those trades only at key levels (HOD/LOD/Support resistance/fib levels). Stop loss is high/Low of the above mentioned bar that was broken.

  • @user-od7ge8ms4v
    @user-od7ge8ms4v ปีที่แล้ว +1

    Congratulations for this perfect strategy but how I can do it to for live trading?

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +1

      Hi, thank you, check my recent videos for live trading bot with oanda, I made one simple example like a month ago.

    • @user-od7ge8ms4v
      @user-od7ge8ms4v ปีที่แล้ว +1

      @@CodeTradingCafe thanks for replying I apriciate I will checked 👍🙏👏

    • @user-od7ge8ms4v
      @user-od7ge8ms4v ปีที่แล้ว +1

      @@CodeTradingCafe excuse me for this is not correct but i do to you this answer because i see you have a lot of knowledge's and i know you like this and you replyng. I have try to do a simple bot for training and if i can to do it to work to copy your strategy but i have the last error and i dont know how i can fixet. The error is this:
      FutureWarning: In a future version, object-dtype columns with all-bool values will not be included in reductions with bool_only=True. Explicitly cast to bool dtype instead.
      dfx = pd.concat([dfx, mask], ignore_index=True). If you wont answer to me. thanks in advance
      I have try this parameter: [dfx = pd.concat([dfx, mask], ignore_index=True)] but i take a lot of errors back
      THIS IS THE CODE:
      class Signals:

      def __init__(self,df, lags):
      self.df = df
      self.lags = lags

      def gettrigger(self):
      dfx = pd.DataFrame()
      for i in range(self.lags + 1):
      mask = (self.df['%K'].shift(i) < 20) & (self.df['%D'].shift(i) < 20)
      dfx = dfx.append(mask, ignore_index=True)
      return dfx.sum(axis=0)

      def decide(self):
      self.df['trigger'] = np.where(self.gettrigger(), 1, 0)
      self.df['Buy'] = np.where((self.df.trigger) &
      (self.df['%K'].between(20,80)) & (self.df['%D'].between(20,80))
      & (self.df.rsi > 50) & (self.df.macd > 0), 1, 0)
      if you can give me the key to start this bot I'll be auspicious
      Thanks in advance

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว +1

      @@user-od7ge8ms4v Hi, the message you are getting is a warning not an error, so it should work. And anyway it's pointing to a code line that's different from the class you shared. I hope this helps.

    • @user-od7ge8ms4v
      @user-od7ge8ms4v ปีที่แล้ว +1

      @@CodeTradingCafe thanks you so match for replying yes you have right but when I go to start the bot coming this messenge Instead of displaying the bot's transactions and details I receive this message 1 million times

  • @pablolecce6931
    @pablolecce6931 ปีที่แล้ว +4

    A little advice to increase your views. When you are showing a function that you used in previous videos, if you remember the video, you could say: "I will not talk about this function here, but if you wanted, you could see it in this video". This sounds more amiable and the people continue watching your channel that is what youtube algorithm wants and because this they are going to bring you even more views. ;)

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      Now I am curious to know what I said in this video 🙂 I hope nothing too bad. Thank you for the heads up.

    • @pablolecce6931
      @pablolecce6931 ปีที่แล้ว +1

      @@CodeTradingCafe No, no bad. I understand your words because in the moment you don't want to explain again part of the code. For this reason I am making a suggestion (based in my knowledge) about how you could use your tireness explaining part of the code into an useful asset.
      Don''t worry. Was fine.

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      @@pablolecce6931 thank you for your answer, actually I always hesitate if I should explain again for new viewers or I should simply refer to another video.

    • @pablolecce6931
      @pablolecce6931 ปีที่แล้ว

      @@CodeTradingCafe For example, see how this guy recommend another videos in the minute 9:22. This is a great way to do ir and mantain the people engage with your channel. th-cam.com/video/xrJGsAE-nv8/w-d-xo.html

    • @pablolecce6931
      @pablolecce6931 ปีที่แล้ว +1

      @@CodeTradingCafe You're welcome. Is always an honor help people that try to help me

  • @Luca-wg4cv
    @Luca-wg4cv 10 หลายเดือนก่อน +1

    but to run it on alpaca say what else I have to write?

    • @CodeTradingCafe
      @CodeTradingCafe  10 หลายเดือนก่อน

      You will have to go through their API documentation to check their specific functions, shouldn't be hard but it might take time.

    • @Luca-wg4cv
      @Luca-wg4cv 10 หลายเดือนก่อน +1

      @@CodeTradingCafe Can you tell me code to make this strategy work with alpaca bees? Or any other broker?

    • @CodeTradingCafe
      @CodeTradingCafe  10 หลายเดือนก่อน

      In this video I share a code running a bot with OANDA check it out, it might be helpful th-cam.com/video/WcfKaZL4vpA/w-d-xo.html

  • @top10top54
    @top10top54 2 ปีที่แล้ว +1

    Try bactesting priceaction strategies for forex, most of the strategies have high win rates

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว +2

      You mean from Rayner Teo? I will check it out, and if you have links to yt vids let me know. Thank you again

    • @top10top54
      @top10top54 2 ปีที่แล้ว

      Yes also rayner teo teaches price action strategies in his book. Example of price action is on this link th-cam.com/video/I1o5ihk1_Fg/w-d-xo.html

  • @mehdimalek309
    @mehdimalek309 9 วันที่ผ่านมา

    Daily !! Really? Can I use it on 5M ?

    • @CodeTradingCafe
      @CodeTradingCafe  8 วันที่ผ่านมา

      Hi why not Daily? it's my preferred timeframe

  • @teenspirit1
    @teenspirit1 10 หลายเดือนก่อน +1

    To people who are about to waste their time with the video:
    SPY 2011-2017 is basically a straight line.
    it is not a useful instrument to test any strategy.
    If you still want to watch it fail, try testing on 2022 or 2023 or any instrument that doesn't go up in a straight line.

    • @CodeTradingCafe
      @CodeTradingCafe  10 หลายเดือนก่อน

      In algorithmic trading different strategies serve for different markets, in a trending market this one works well, there is no one strategy fits all especially if it's fully automated, at least I haven't seen one in my 15 years of numerical modelling. On the other hand, if you have ideas that would improve our results, please share those with us, I can test those for you.

  • @Krisler12
    @Krisler12 ปีที่แล้ว

    Hi!
    I have just posted a comment with a very good idea. Why it is not visible? Please read it and say what you think because it is an amazing thing.

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      Hi, thank you, if the comment has a link TH-cam filters automatically thinking it's spam.

    • @Krisler12
      @Krisler12 ปีที่แล้ว +1

      @@CodeTradingCafe Posted it again. Please give an answer.

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      Hi I still can't see it, if you included a link it will be automatically filtered by TH-cam

    • @Krisler12
      @Krisler12 ปีที่แล้ว +1

      @@CodeTradingCafe Go to the Crypto Wizards channel and check for the last video. It is a video about Gaussian mixture model in its title. Have you find it?

    • @Krisler12
      @Krisler12 ปีที่แล้ว +1

      @@CodeTradingCafe Did you find it?

  • @borism4849
    @borism4849 ปีที่แล้ว +2

    You're underperforming a simple buy-and-hold strategy. Where is the alpha?

    • @CodeTradingCafe
      @CodeTradingCafe  ปีที่แล้ว

      some of these strategies work well some don't, can't know in advance, gotta try them and share them for those learning around in python.

  • @arturio10
    @arturio10 3 หลายเดือนก่อน +1

    It’s easy with 0.0 fee 🤦🏻‍♂️

    • @CodeTradingCafe
      @CodeTradingCafe  3 หลายเดือนก่อน +2

      Yes and no, I don't find it easy, even without fees. But just to mention a detail here, on daily timeframe fees are negligible, for example CFI brokers offer 0 overnight fees for FOREX trading, so you basically pay only the spread and a s;all fee when you open the trade, if you compare these with daily price movement... peanuts. You just need the correct broker, the correct account, and the correct timeframe.

  • @CarlosJa
    @CarlosJa 2 ปีที่แล้ว +2

    I prefer in php..

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว +1

      I am afraid that would be impossible 🙂

    • @CarlosJa
      @CarlosJa 2 ปีที่แล้ว

      @@CodeTradingCafe why would it be impossible.. I built a backtester in PHP.. Which runs faster than python.

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว

      @@CarlosJa it might have been more effort though, the advantage of Python are all the built-in libraries makes your work easier... But again if you feel comfortable with php then you are right why not.

    • @CarlosJa
      @CarlosJa 2 ปีที่แล้ว

      @@CodeTradingCafe phptrader has built in trading libraries too.

    • @CodeTradingCafe
      @CodeTradingCafe  2 ปีที่แล้ว

      @@CarlosJa oh! I didn't know that to be honest! I think a whole world happening outside of python 🙂

  • @user-wh3hr3oz6l
    @user-wh3hr3oz6l ปีที่แล้ว +1

    poo

  • @randev7391
    @randev7391 2 ปีที่แล้ว

    This is my second profit from their platform I can’t stop Investing till I own the world, I felt it was a scam before but thanks for the conviction I made it through while investing with their platform Also… it’s really a blessing to have such a great platform to earn crypto

  • @randev7391
    @randev7391 2 ปีที่แล้ว

    This is my second profit from their platform I can’t stop Investing till I own the world, I felt it was a scam before but thanks for the conviction I made it through while investing with their platform Also… it’s really a blessing to have such a great platform to earn crypto