How To Automate Multi-Asset Trading Strategies In Python

preview_player
Показать описание
In this video, we explore multi-asset trading automation in Python, demonstrating how to test and optimize a trading strategy across various assets. Using Python, we backtest strategies on major Forex pairs and Gold to enhance win rates and total returns. We cover setting up a trailing stop on the daily timeframe to maximize profits, using moving averages to detect trends, and utilizing Bollinger bands for entry signals.
Follow along as we code the strategy in Python, automate the backtesting process, and optimize the parameters efficiently. This video provides a comprehensive guide to multi-asset trading automation, making it easier for you to implement and enhance your own trading strategies.

This approach on multi-asset trading automation in Python will provide valuable insights and practical steps to improve trading strategies and backtest on different markets.

°°° Discount Vouchers for my Algorithmic Trading and Python courses:

Live Trading Bot Example:

To rerun the tests on your own data you can download the Python code from the link:

And the data files I used:
Рекомендации по теме
Комментарии
Автор

Hi Ziad, thank you for the content you put out you have had a real impact in my life focussing my passion for data science which even led to a job teaching fintech with edX. It has been amazing watching you over the past 2 years and growing my skillset I truely wish you everything great in life. Please continue producing great content!

Sidenote to anyone else reading this comment never made any money with automated trading and that is mostly on me, just loved the learning part of it and still continue to.

bongoseakhoa
Автор

Hi Ziad. Just watched the video and is (once again) a real gem, both for traders and coders. It has everything I wished for (lol). I hope you and your family are and stay safe

vassiliscapsis
Автор

Thank you very much as always for the turtorials!

lunghunglin
Автор

I have implemented this whole strategy will run it for the next couple of months and might update here if good things happen

STSamurai
Автор

as beginner i dont know were to start i will stick with learning the thoery for forex first and am now then comeback here any thanks for long list mate

ahmedbadal
Автор

Very good analysis. But you cannot consider a statistically robust model with only 80 events! Minimum 1000, optimal 2500, ideal 10, 000, at that point, all the indicators you have used stop being profitable. You may have taken small segments, which randomly, give positive returns with 80 events. Like when you toss a coin, at one point you may get 80 heads in 100 attempts, but in the long run, 10, 000 events, it will be 50/50. That is why robustness is necessary in the analysis. I invite you to do the backtest in H4 over a period of 20 years for 10 assets, with your programming capacity you can do it and there the commercial indicators perish. You have to look for other "little things" to be profitable, which is clearly possible! Great work colleague!

ezequielperez
Автор

Great video! I was looking for a multi-asset trading straterg but for intraday on 5min timeframes.
Will this stratergy work for the same? Any other stratergy you can recommend for the same?

mayord
Автор

13:45. Thanks for the awesome videos. Can you elaborate on how to choose a commission value? Is that a fraction of trade PnL? Let's say the commission for trading SPY is 0 but the commission to trade emini ES is $5. How to choose the commission number in the code to simulate $5 per round trade?

Sam-tgii
Автор

I love your videos been watching non stop as i learn! There is one small thing i don't get in the video and hope some one can explain the take profit and stop loss numbers i don't understand what the numbers mean are they percent ? Moreover, if i want to make a higher take profit or a bigger stop loss what should i input. Last thing in mysize = 0.1 does this mean 10% of capital ? please help :D

STSamurai
Автор

bro you tell about best platform for learn this advance like strategy by using python and which platform is best and where how to learn all think which course is best for make this own strategy .

agxgaming
Автор

Hi. Nice channael. Can you write a script for nadaraya watson envelope?

casperik
Автор

Hello! Great Video, I've been watching all your videos and love them. I want to make you some suggestions:
1- the confirmation signal that you are using gives bullish signals in the first values of the EMA_Signal, where it have nan values still, I think that's an error in your code. In the first values of the EMA_Signal, it haves nan values, so it isnt either bellow or above any candles, it should gives a neutral signal at those points (return 0)
2- you can highly speed up your code if you avoid loops and instead go for vectorized functions like built in pandas functions like rolling... some of your functions like add_total_signal(df) last 10 minutes to execute, I have optimized that function only with built-in pandas functions and avoiding loops, I have double checked that my function and yours outputs the same with the same input, the optimized function only lasts about 1 second to execute and outputs the same

danidelgado
Автор

Hello sir
We can code indicators and male a strategy but can you please make a video on
VOLATILITY CONTRACTION PATTERN OF MARK MIVERNI IN PYTHON

deekshitpatel
Автор

Hello?
Trust you're doing good?
Good work here.
Please I have a request.
Been trying for months now to create an automated trading system strictly and focused on ICT model

Technically ICT is wide but [ Time of the day and silver bullet strategy ] is enough for intraday trading.
I really appreciate if you do something towards this two strategies
No matter what method you use, I will follow as long as it works.
Thank you

SalemAdedipe-jz
Автор

Do these strategies work on daily candles, i use a simple strategy using bbands and vwap, it's profitable but showing only 5-6 trades in a year for one stock. I am thinking of selecting 10 stocks. What do you suggest, will this many signals normal when using daily candles?

kazutokirigaya
Автор

I am trying to test multiple assets but in the same backtest, I have found running them independently I would of run out of equity and my backtest wouldn't hold up in real trading. For example I have a $10, 000 account and trade $5, 000 lots, I get 5 buy signals at the same time, this backtest shows I can do that but in reality I can't. Is there a way to backtest multiple assets effectively?

duanemoffat
Автор

0.0002% comission where do you get that comission?

popescugeorgebogdan
Автор

Anyone has some good documentation about simulated annealing for financial data. Been reading some thesisses about the subject but no in depth information

bertstroobant
Автор

What software and broker are you using?

rotherhiteboy
Автор

النبي عيسى سوف ينزل في المسجد القصى و وساحته تعتبر كافية لجيشه

Developers