stocks

Build a Diversified Portfolio in StrategyQuant – Step by Step!

Have you ever wondered how to combine multiple trading strategies into one powerful, balanced portfolio? 🤔

In this new video, I’ll show you exactly how to do it — from testing three proven systems (two Donchian breakouts and one Mean Reversion) to combining them into a single, diversified portfolio with optimized risk allocation.

You’ll see how to:
✅ Recalculate strategy weights to balance risk
✅ Use the Portfolio Composer to simulate different allocations
✅ Apply the Markowitz model to optimize your Sharpe ratio
✅ Analyze correlations to reduce overall drawdown

And the best part? I’ll show you the real results — including how one simple change increased the portfolio’s profit fourfold 📈

If you want to learn how to build a robust algorithmic portfolio and make your equity curve smoother than ever,
👉 Watch the full video on YouTube:

Transcript:

Hello, everyone, and welcome back, uh, our channel.
In previous videos, we developed three strategies, two based on the Donchian channel breakout, one long term, one short term, and then the mean reversion strategy.
Today, I will create a portfolio from these three strategies. So first thing I have to do, I will look at one of the strategies in Strategy Plant.
Now, I know I tested it on money management where the risk was 10% of the account.
In order to give each strategy some weight, or in other words allocate a certain percentage of the account to them, we will have to recalculate these strategies so that together they make up 100% of the account risk.
We can do this by loading the individual strategies into AlgoWizard, assigning them 100% in money management, running a full backtest, and then saving the strategies.
Or I can use the custom project section, where I create a task called automatic retest, which backtests all strategies at once. And I will do that right here.
I load three strategies into a relevant databank.
I have to select all of them, and here in the settings, I leave everything as you see it so that everything is set to from strategy.
In the automatic retest tab, I take the strategies from the simple strategies databank and save them to the retest folder. I will leave everything as it is, except for money management.
In money management, I set risk fixed percent of account stock picker to 100%. But everything else will remain the same in the other tabs, and I simply run the backtest.
And once the backtest is complete, uh, you can see the retest results in the databank, and you can see that the results are completely different than before. So now, I save all the strategies.
While saving it, I add a postfix to indicate that it is 100%, and save them in the folder where I have the other strategies.
Now I have these strategies saved, and I move on to Portfolio Composer. Here, portfolios are simulated based on certain weights.
So each strategy is assigned a weight, the portfolio recomputes it, and then outputs the results. You can do this either manually or automatically. So, now I load the strategies.
Of course, I select the last ones I saved with the postfix 100. After loading, I see that I have 100% of the account for each strategy, exactly as I tested it before.
In the configuration, I see that I have selected full available data here, which I will leave as it is.
I choose some initial capital so that it’s a little bit in line with usual people, let’s say $10,000.
We leave the leverage at one to one, and here we see what money management strategies they have now. All of them have 100% risk from the account.
Now we could decide that each strategy will use one-third of the account, so I assign a weight of 30% to each strategy and leave 10% free, for, let’s say kind of security.
Now I have to mark all the strategies and recompute the portfolio with the recompute portfolio button. Now when it’s done, I have here some metrics.
I can see s- the total portfolio profit, annual return, number of trades, sharp ratio, profit factor, return drawdown ratio, win percentage, average rate, average monthly profit, or how each year performed and so on.
And then you can check list of trades and equity curve. You can see on the equity curve that it’s beautifully smooth with no major fluctuations.
When I look at the individual strategies, I can see that mean reversion one is currently leading strongly in terms of profit compared to the others. We can compare this strategy with a benchmark.
For example, how we would have performed if we had just bought the SPY market and left it alone.
And when I choose normalization by drawdown, I see that our portfolio earns much more than if we just held SPY, moreover with much smaller drawdowns.
However, what if we wanted to balance a strategy so that one does not outperform the other?
We can change the weight of the individual strategies manually here, or you can try automatic recalculation or recomputation. Automatic computation, according to the Markowitz model, is used here.
Check out the link below the video if you are more interested how exactly it works. Now, you can set the weights either by sharp ratio, return drawdown ratio, annual profit, and so on.
I personally choose the sharp ratio, and I run ten simulations. Now I just set the weights to 100% again, so, to start from the same points as at the beginning. Then I will turn on the recomputation.
Now I’m done, and at a first glance, you can see that our profit has actually increased about fourfold.
The average monthly profit has also quadrupled, but our drawdown has also increased four-fold from one percent to about five. But it’s always profit at the expense of risk. Keep that in mind.
Here you can see the individual equities, where the mean reversion strategy leads because it has more trades and trades more often, so that’s pretty logical and clear.
When I set and turn on the benchmark again…I see that with normalized risk, it again completely outperforms the benchmark and all the fluctuation in the spy market because I don’t really have them here.
My curve is, like, beautifully growing. It leads beautifully upwards. And in this way, weights can be assigned to strategies. But let’s see how it was in this case.
This strategy got 32% long chain breakup, 9% mean revision, almost 60, which is great. There is one more thing that is good to look at, and it’s how strategies are correlated with each other.
I switched to the portfolio master tab. I love the strategies, but please just be careful to load the original ones with the 10% risk and then create a single portfolio.
Once the portfolio is ready, display the results and look at the individual correlations.
What I can see here is that the daily correlation from profit/loss is almost zero, so each strategy is completely different.
I can try weekly correlation and correlate according to losses, because if profits correlate, I don’t mind. So, it only matters if losses correlate. So, let’s try weekly view.
And not even 0.1, so that’s great. And for the third time, I’ll try correlation by month. What we see here is it’s actually negative, so the most is minus 0.34, which is a great result for me.
This way you can quickly and effectively build portfolios of your strategies and reduce your overall risk.
Because if one strategy isn’t working, another one will, and you can play around with it and try assigning different weights. And you just have to try, try, and try.
For more practical trading tips, don’t forget to like and follow, and I look forward to seeing you in the next video.

 

Tomas Vanek

Tomas Vanek, founder of SimpleDUB.com and QuantMonitor.net, is a visionary in automated trading and AI-powered automation. Driven by a passion for efficiency in finance, data, and scalable technology, he created SimpleDUB as a professional multilingual video translation platform and QuantMonitor.net to deliver robust algorithmic trading solutions. Through QuantMonitor, he simplifies trading strategy development and portfolio management for traders of all levels using advanced templates, intelligent automation, and powerful analytical tools.

0 Comments
Oldest
Newest Most Voted

Continue reading