Topic: Sizing options for Portfolio EAs

I've just started exploring Portfolio EAs and wanted to bring up a discussion about lot sizing.

Prior to using Portfolio EA, my process is to analyze generated strategies and then I size them to a specific MaxDD in the history report.

For example, if I am prepping 5 EAs for trading, I have a target MaxDD for the entire account. I would then attempt to make all 5 EAs equivalent in risk, based on the target MaxDD.  If these are the only 5 EAs trading in my account and I want the account target to be 5% MaxDD, then I will attempt to configure each EA's lot sizing until the report shows that it's about 1% MaxDD.

When I add these strategies to a Portfolio, it seems to incorporate them including the configured lot sizing. So this seems proper because not all strategies are equal (with regard to their MaxDD risk).

The other option is that I could set all strategies to some equal lot size, such as 0.1 and then put them in the Portfolio. But I would argue that is imbalanced because each strategy behaves with it's own risk profile.

Does this make sense? Am I on the right track to try to equalize the risk profile on each individual strategy?

Following this same logic, I would ultimately configure the Portfolio EA's lot size based on its MaxDD target for the account its trading on.

Re: Sizing options for Portfolio EAs

Also I'm confused about what lot sizing is used to create the Portfolio stats (see screenshot). Presumably this is somehow based on the individual lot sizes of the strategies contained herein.

But when I export and put this on my chart, it wants a lot size for the Portfolio EA.

In order to properly set the Portfolio lot size, I think I need to know what the MaxDD is?  For example in this screenshot the MaxDD is shown as 2.71%

But how can I calculate the proper Lot Size for this Portfolio EA?  I think I am missing some detail?

Post's attachments

2025-10-15_18-56.png 63.79 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Sizing options for Portfolio EAs

Hi Dusktrader,

My understanding is that once you combine multiple EAs into a single portfolio, all the metrics you see are aggregate outcomes.

That means you’ll need to adjust the portfolio’s entry lot according to your overall risk target, since you can’t assign different lot sizes to each EA (magic number) inside the portfolio.

In practice, the max drawdown might come from a single EA or from several going into drawdown at the same time — but you can’t pre-balance that risk internally within the portfolio.

What you can do, though, is a step-by-step validation before exporting the final portfolio:

1. Load one EA and note its max drawdown.
2. Add the second one and check that the combined DD doesn’t deteriorate (the goal of aggregation should be to improve performance while staying within your tolerated max risk).
3. If it does worsen, replace that EA and test again.
4. Repeat this process for each additional EA until you reach a balanced set.

Once the full portfolio is ready, the exported file will show 0.01 as the minimum tradable lot, which you’ll need to recalibrate based on the aggregated max DD.

If all the EAs you’re combining use a fixed stop loss, then it’s very easy (even with AI tools) to calculate the nominal $ risk per EA separately.

That helps you estimate — for the same maximum risk — what the theoretical lot size should be for each EA to keep things balanced if you were to run them separately rather than as a merged portfolio in EA Studio.

This step can also help you decide which EAs to combine in a single code before exporting.

Vincenzo


dusktrader wrote:

Also I'm confused about what lot sizing is used to create the Portfolio stats (see screenshot). Presumably this is somehow based on the individual lot sizes of the strategies contained herein.

But when I export and put this on my chart, it wants a lot size for the Portfolio EA.

In order to properly set the Portfolio lot size, I think I need to know what the MaxDD is?  For example in this screenshot the MaxDD is shown as 2.71%

But how can I calculate the proper Lot Size for this Portfolio EA?  I think I am missing some detail?

Re: Sizing options for Portfolio EAs

I think my confusion is because there seems to be a disconnect between the backtest report (see screenshot) and the Portfolio EA.

For example, I know that the backtest does NOT use 0.01 lots. I can prove this because if I set all strategies to 0.01 lot, I get a different result in the backtest than if I present lot sizes for the individual strategies.

So then, in order to keep track of the risk and MaxDD of the entire Portfolio, I can use a process such as what you outlined while assembling the Portfolio.

But I still need to know how many lots are being simulated in the backtest. Because this can be used to determine how many lots equates to the aggregate MaxDD shown on the backtest. When the EA resets back to 0.01, I have no point of reference to know how to scale this to reach a desired MaxDD.

So the missing information (I think) is that I do not know how many lots are being simulated in the backtest.

Presumably, if individual strategies can have lots set within the total Portfolio, then this implies that there is a weighting mechanism. For example if one strategy is set to 0.05 lots and another is set to 0.1 lots... then presumably in the Portfolio, it is multiplying the EA's lot setting by the weighting of that individual strategy. That is all fine... but I still need the point of reference.

One other possible way I can get this information would be to run the resultant Portfolio EA on MT5's backtester... this would give me a MaxDD aggregate value that I could then use for scaling the Portfolio EA's lot size.

5 (edited by tradingblueocean67 2025-10-16 18:40:52)

Re: Sizing options for Portfolio EAs

Okay, look i just tried this:

1. generated few strategies all with 0.1 then selected 3 with almost the same DD. then add 1 by 1 in the portfolio and recalculate -> the DD of the portfolio did not change magnitude

2. Same strategies like 1., this time before adding them to the portfolio I have changed the size in the individual back test and accepted. So added 1 by 1 this time with size 1. Then the portfolio DD changed by a factor of 10.

Still when you download the portfolio the settimg show 0.01.

So said, the backtest of the aggregate strategies seems to be executed with the original individua size.

Make sense?



dusktrader wrote:

I think my confusion is because there seems to be a disconnect between the backtest report (see screenshot) and the Portfolio EA.

For example, I know that the backtest does NOT use 0.01 lots. I can prove this because if I set all strategies to 0.01 lot, I get a different result in the backtest than if I present lot sizes for the individual strategies.

So then, in order to keep track of the risk and MaxDD of the entire Portfolio, I can use a process such as what you outlined while assembling the Portfolio.

But I still need to know how many lots are being simulated in the backtest. Because this can be used to determine how many lots equates to the aggregate MaxDD shown on the backtest. When the EA resets back to 0.01, I have no point of reference to know how to scale this to reach a desired MaxDD.

So the missing information (I think) is that I do not know how many lots are being simulated in the backtest.

Presumably, if individual strategies can have lots set within the total Portfolio, then this implies that there is a weighting mechanism. For example if one strategy is set to 0.05 lots and another is set to 0.1 lots... then presumably in the Portfolio, it is multiplying the EA's lot setting by the weighting of that individual strategy. That is all fine... but I still need the point of reference.

One other possible way I can get this information would be to run the resultant Portfolio EA on MT5's backtester... this would give me a MaxDD aggregate value that I could then use for scaling the Portfolio EA's lot size.

Re: Sizing options for Portfolio EAs

I am not sure I'm following you blue,
but I came up with this process (attached screenshot). Let me know what you think.

My main goals are:

  • the multiple strategies within a Portfolio EA must all trade with equal weighting; in other words they should all start with an equal risk profile;

  • the Portfolio EA itself should also be calibrated for an overall desired risk profile

I think this process covers all of these goals.

In this example, I will have 3 Portfolio EAs (EURUSD, GBPUSD, EURGBP) and I want the total account risk to be 5% of equity. So I'll calibrate each of the 3 Portfolio EAs to assume up to 1.67% risk.

Another benefit is that I know if any EA goes beyond 1.67%, or if the account breaches 5% -- then one or more Portfolio EAs is out of spec.

Post's attachments

portfolio process.png 118.74 kb, 2 downloads since 2025-10-16 

You don't have the permssions to download the attachments of this post.

Re: Sizing options for Portfolio EAs

Hi Dusktrader,

Your approach correctly caps the overall portfolio risk at 5% on aggregate trade level — that part makes perfect sense.

What I am trying to highlight is this:

if each EA originally required a different lot size to stay below 1.67%, and you later set them all to 0.03 (because you have only one lot size input) in the final Portfolio EA, they won’t really be balanced.

They’ll trade with equal nominal size, but not with equal risk-adjusted exposure, since each EA has a different SL, volatility, and trade frequency.

Could you share what lot sizes came out of your calculation for the individual 3 EAs before setting them all to 0.03?

It would be interesting to compare those values — that’s where you can really see how far they deviate from a true balanced profile.

Otherwise, with the 0.03 the 5% global cap still holds, but one or two EAs might actually carry most of that internal risk.

Hope this is a bit more clearer



dusktrader wrote:

I am not sure I'm following you blue,
but I came up with this process (attached screenshot). Let me know what you think.

My main goals are:

  • the multiple strategies within a Portfolio EA must all trade with equal weighting; in other words they should all start with an equal risk profile;

  • the Portfolio EA itself should also be calibrated for an overall desired risk profile

I think this process covers all of these goals.

In this example, I will have 3 Portfolio EAs (EURUSD, GBPUSD, EURGBP) and I want the total account risk to be 5% of equity. So I'll calibrate each of the 3 Portfolio EAs to assume up to 1.67% risk.

Another benefit is that I know if any EA goes beyond 1.67%, or if the account breaches 5% -- then one or more Portfolio EAs is out of spec.

Re: Sizing options for Portfolio EAs

tradingblueocean67 wrote:

if each EA originally required a different lot size to stay below 1.67%, and you later set them all to 0.03 (because you have only one lot size input) in the final Portfolio EA, they won’t really be balanced.

They’ll trade with equal nominal size, but not with equal risk-adjusted exposure, since each EA has a different SL, volatility, and trade frequency.

Would you agree that - if the above logic is true - then regardless of the individual strategy lot sizes, that the Portfolio EA set to a consistent lot size (say 0.01 lots) would always produce the same result?

But that is not the case. I noticed if I adjust the lots of the strategies before adding them to the portfolio ... this does impact the Portfolio EA results when always using a consistent value.

That would imply that there is a weighting factor at play with the strategies inside the Portfolio EA. Do you agree with this or no?  I can also demonstrate some examples if you like.

Re: Sizing options for Portfolio EAs

dusktrader wrote:

Would you agree that - if the above logic is true - then regardless of the individual strategy lot sizes, that the Portfolio EA set to a consistent lot size (say 0.01 lots) would always produce the same result?

-> I’m not 100% sure, but from what I’ve seen, here’s how it seems to work.
When you backtest inside EA Studio (before export), you’re right — the platform internally weights the strategies, and performance changes because of the individual lot sizes you apply.
we saw the saw things!

However, once you export the Portfolio EA, I don’t think that weighting stays in the compiled code.
All strategies inside the portfolio appear to trade with the same nominal lot size, since there’s only one external input for it.

It’s actually easy to test — we can both print out the source code of the individual EAs and the Portfolio EA, and compare them line by line.
That would immediately show whether the lot-weighting logic is kept or not after export.

Let’s do it and confirm.

Re: Sizing options for Portfolio EAs

How funny... I was on the treadmill thinking about this and had the exact same idea! I just pasted my Portfolio EA code into an AI bot and it basically confirms:

  • the Portfolio EA code currently does not apply any weighting, but instead uses the flat lot size configured in the Portfolio EA when opening trades

  • interestingly, the code preserved my original weightings - so perhaps this is for future enhancement

Here is what the AI bot says:

Unfortunately, your individual risk-adjusted lot sizes are not being used. The Portfolio EA generation process preserved these values only as comments but didn't implement them in the actual trading logic. This means:

  • All strategies trade with the same lot size you enter as "Entry Amount"

  • The risk-adjusted weighting you carefully configured in EA Studio is lost

  • Strategies that should have smaller positions (like Strategy 4 with 0.02 lots) now trade with the same size as strategies that should have larger positions (like Strategy 3 with 0.13 lots)

This is a significant limitation of the Portfolio EA approach, as it eliminates the individual risk management you applied to each strategy during the EA Studio configuration process.

Re: Sizing options for Portfolio EAs

Mr. Popov, could you consider adding this as a feature to the Porfolio section?

These are the things that would be great:

  • In EA Studio, provide a checkbox to equalize risk on all strategies in the portfolio. To do this, adjust the trading lots on each strategy until the Max Drawdown equals some value (I use $500 for example). I don't think the value matters so much as that all strategies are configured to equal that value as closely as possible.

  • In the exported MT4/MT5 Portfolio EA, utilize this weighting in the lots calculation for each strategy. This might be as simple as multiplying the Portfolio EA lots (default 0.01) by that weighting value

  • In EA Studio, you could also ask the user what the account size is and how much max risk they want in the Portfolio EA; then you could precalculate the Portfolio EA lot sizing as default

This can be done manually as part of my process, but it sure would be nifty if the system did it automatically!
Thank you

Re: Sizing options for Portfolio EAs

Oh, happy to see we’re on the same page now — yesterday I was a bit concerned about sounding too pushy :-)

Two things:

1. We (I’m just the messenger) — as a small group of members in the forum — have already submitted the request/wish to adjust this functionality. You can read and comment on it here:
https://forexsb.com/forum/post/82937/#p82937
   
2. As it stands, the Portfolio EA is still a very powerful tool. It’s a quick and elegant way to visualize what happens to your equity curve when you install two or more EAs on the same trading account — even if you predefine the size upfront.

By installing all EAs separately on one account, this is exactly what you need to know beforehand:
“How will my equity behave if I run these EAs (as separate codes) on the same account?”

Here you go!

Re: Sizing options for Portfolio EAs

Oh, happy to see we’re on the same page now — yesterday I was a bit concerned about sounding too pushy :-)

Two things:
    1.    We (I’m just the messenger) — as a small group of members in the forum — have already submitted the request/wish to adjust this functionality. You can read and comment on it here:
https://forexsb.com/forum/post/82937/#p82937
    2.    As it stands, the Portfolio EA is still a very powerful tool. It’s a quick and elegant way to visualize what happens to your equity curve when you install two or more EAs on the same trading account — even if you predefine the size upfront.

By installing all EAs separately on one account, this is exactly what you need to know beforehand:
“How will my equity behave if I run these EAs (as separate codes) on the same account?”

Here you go!


dusktrader wrote:

How funny... I was on the treadmill thinking about this and had the exact same idea! I just pasted my Portfolio EA code into an AI bot and it basically confirms:

  • the Portfolio EA code currently does not apply any weighting, but instead uses the flat lot size configured in the Portfolio EA when opening trades

  • interestingly, the code preserved my original weightings - so perhaps this is for future enhancement

Here is what the AI bot says:

Unfortunately, your individual risk-adjusted lot sizes are not being used. The Portfolio EA generation process preserved these values only as comments but didn't implement them in the actual trading logic. This means:

  • All strategies trade with the same lot size you enter as "Entry Amount"

  • The risk-adjusted weighting you carefully configured in EA Studio is lost

  • Strategies that should have smaller positions (like Strategy 4 with 0.02 lots) now trade with the same size as strategies that should have larger positions (like Strategy 3 with 0.13 lots)

This is a significant limitation of the Portfolio EA approach, as it eliminates the individual risk management you applied to each strategy during the EA Studio configuration process.