Rayner Teo Bollinger Bands Strategy Backtest In Python High Return

  Рет қаралды 43,371

CodeTrading

CodeTrading

Күн бұрын

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

Пікірлер: 148
@MrSamyWageh
@MrSamyWageh 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 жыл бұрын
THANK YOU AGAIN FOR YOUR EFFORTS! :-)
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Happy you are still interested, thank you for your support 😊
@newbienoob1
@newbienoob1 2 жыл бұрын
First comment 🙂 thank you sir i will backtest this on forex and indices
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Good luck, let us know if you find anything interesting!
@aaronsarinana1654
@aaronsarinana1654 2 жыл бұрын
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.
@gokhalesadan
@gokhalesadan Жыл бұрын
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 жыл бұрын
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 жыл бұрын
@@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 жыл бұрын
@@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 2 жыл бұрын
thanks sir for what you teach us
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Thank you for your appreciation, enjoy the learning process!
@lgbpinho
@lgbpinho Жыл бұрын
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 Жыл бұрын
Thank you yes there are ways of doing things in Python. ... it's a nice comprehension!
@santhoshdasari7
@santhoshdasari7 2 жыл бұрын
Thanks you 🙏
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Thank you for your support 😊. Good luck to you.
@anderwork7571
@anderwork7571 Жыл бұрын
good shit bro
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Lol indeed
@optionbuyside3483
@optionbuyside3483 4 ай бұрын
Great leaning
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Thank you for your support!
@rami20102015
@rami20102015 2 жыл бұрын
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 .
@VonSchelzen
@VonSchelzen Жыл бұрын
Fantastic
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Thank you;
@sanjlakhanpal5017
@sanjlakhanpal5017 13 күн бұрын
I luv yr channel
@CodeTradingCafe
@CodeTradingCafe 12 күн бұрын
and my channel loves you :) thank you for your support
@ventiladorbueno1846
@ventiladorbueno1846 2 жыл бұрын
Thank you
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Ventilador still here! Thank you ,🙂
@thirupathisalveru5411
@thirupathisalveru5411 2 жыл бұрын
thank you
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Thank you for your support 😊
@fernandomilans1296
@fernandomilans1296 Жыл бұрын
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 Жыл бұрын
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.
@Asparuh.Emilov
@Asparuh.Emilov Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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!!
@tudatostrader
@tudatostrader Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@CodeTradingCafe Okay, just to get a hint. Are you from the EU?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
@@tudatostrader yes but not only, I partly understand polish Italian and Portuguese, and fluent in English French and Arabic. I will let you guess 😂
@leandrorodrigues3488
@leandrorodrigues3488 Жыл бұрын
That has few opportunities over time, with high “win rate”. However you have 500 tickers in SP500 to find 1 per day.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
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 Жыл бұрын
@@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 ?
@AMA_RILDO
@AMA_RILDO 2 жыл бұрын
Hey mate, have you ever thought to open a discord group for all you fans? would be amazing for us
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
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.
@isecretlyworshipponies628
@isecretlyworshipponies628 4 ай бұрын
It would be great to check if it works ona timeframe which is suitable for day trading like 1 hour etc.
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Bollinger bands definitely are a good addition for entry points filtering, for the trend detection we can adapt something for the hourly timeframe.
@mathewz7434
@mathewz7434 2 жыл бұрын
would you try backtesting priceaction strategies such as fakeouts and retest of prices?
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Why not just let me know if there is a specific strategy to inspire from. Thank you for your comment
@mathewz7434
@mathewz7434 2 жыл бұрын
@@CodeTradingCafe An example could be turtile soup strategy and Fair value gaps
@mathewz7434
@mathewz7434 2 жыл бұрын
@@CodeTradingCafe also top down analysis of the charts
@hourglass9
@hourglass9 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
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!
@happystoat99
@happystoat99 Жыл бұрын
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 Жыл бұрын
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 Ай бұрын
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.
@pablolecce6931
@pablolecce6931 Жыл бұрын
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 Жыл бұрын
@@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. kzbin.info/www/bejne/rqOteKZ3epKhrJo
@pablolecce6931
@pablolecce6931 Жыл бұрын
@@CodeTradingCafe You're welcome. Is always an honor help people that try to help me
@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: kzbin.info/aero/PLwEOixRFAUxZVV0XNWlapem1yoRA4rt_O Backtesting, the best is to read the backtesting.py online manual
@jordanfong4255
@jordanfong4255 5 ай бұрын
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 5 ай бұрын
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)
@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 жыл бұрын
@@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.
@top10top54
@top10top54 2 жыл бұрын
Try bactesting priceaction strategies for forex, most of the strategies have high win rates
@CodeTradingCafe
@CodeTradingCafe 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 kzbin.info/www/bejne/f2LSZpyeoJaSfMk
@leocycling
@leocycling Жыл бұрын
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 :)
@user-od7ge8ms4v
@user-od7ge8ms4v Жыл бұрын
Congratulations for this perfect strategy but how I can do it to for live trading?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
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 Жыл бұрын
@@CodeTradingCafe thanks for replying I apriciate I will checked 👍🙏👏
@user-od7ge8ms4v
@user-od7ge8ms4v Жыл бұрын
@@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 Жыл бұрын
@@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 Жыл бұрын
@@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 
@whyyoutube8197
@whyyoutube8197 Жыл бұрын
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 Жыл бұрын
@@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.
@akash_ray_trading4413
@akash_ray_trading4413 Жыл бұрын
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
@arireimers6451
@arireimers6451 3 ай бұрын
does this backtesting strategy work for every trading strategy
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
I guess so provided you code the indicators properly... and the trade signal of course.
@Luca-wg4cv
@Luca-wg4cv 11 ай бұрын
but to run it on alpaca say what else I have to write?
@CodeTradingCafe
@CodeTradingCafe 11 ай бұрын
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 11 ай бұрын
@@CodeTradingCafe Can you tell me code to make this strategy work with alpaca bees? Or any other broker?
@CodeTradingCafe
@CodeTradingCafe 11 ай бұрын
In this video I share a code running a bot with OANDA check it out, it might be helpful kzbin.info/www/bejne/jZTJfJSQgZmppqM
@FunMaxClub
@FunMaxClub 2 ай бұрын
Is this available as a web-based applications
@CodeTradingCafe
@CodeTradingCafe 2 ай бұрын
Hi, unfortunately not, it's just testing strategies on historical data in Python, so you need Python installed to run the code files.
@teenspirit1
@teenspirit1 11 ай бұрын
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 11 ай бұрын
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 2 жыл бұрын
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 2 жыл бұрын
Hi, thank you, if the comment has a link KZbin filters automatically thinking it's spam.
@Krisler12
@Krisler12 2 жыл бұрын
@@CodeTradingCafe Posted it again. Please give an answer.
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
Hi I still can't see it, if you included a link it will be automatically filtered by KZbin
@Krisler12
@Krisler12 2 жыл бұрын
@@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 2 жыл бұрын
@@CodeTradingCafe Did you find it?
@mehdimalek309
@mehdimalek309 26 күн бұрын
Daily !! Really? Can I use it on 5M ?
@CodeTradingCafe
@CodeTradingCafe 25 күн бұрын
Hi why not Daily? it's my preferred timeframe
@borism4849
@borism4849 Жыл бұрын
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 4 ай бұрын
It’s easy with 0.0 fee 🤦🏻‍♂️
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
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 жыл бұрын
I prefer in php..
@CodeTradingCafe
@CodeTradingCafe 2 жыл бұрын
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 🙂
@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
@user-wh3hr3oz6l
@user-wh3hr3oz6l Жыл бұрын
poo
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
thanks, supportive still :)
@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
МАМА И STANDOFF 2 😳 !FAKE GUN! #shorts
00:34
INNA SERG
Рет қаралды 3,8 МЛН
🌊Насколько Глубокий Океан ? #shorts
00:42
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 23 МЛН
LSTM Top Mistake In Price Movement Predictions For Trading
9:48
CodeTrading
Рет қаралды 77 М.
Quant Strategy: Pairs Trading Algorithm (Mean Reversion)
15:00
Spencer Pao
Рет қаралды 55 М.
Mean Reversion Trading Strategy Using Python
39:03
Computer Science
Рет қаралды 16 М.
Custom Indicators In Backtesting.py - Python Deep Dive
35:19
Chad Thackray
Рет қаралды 27 М.
Bollinger Bands Trading Strategy: How to Trade it Like a PRO
8:56