Is Hedging the Key to a Robust Expert Advisor? - page 2

 
Michael Charles Schefe #:
[T]hen i suggest that you search google.
I did worse than that. I consulted the MQL5 Lite AI Assistant, and it coded me a direct hedging EA that proved to be an utter disaster in the Tester.😅
 

The use of AI is now widespread worldwide because it saves a significant amount of time and effort in software development.

However, when it comes to designing an Expert Advisor for algorithmic trading, I believe AI alone is not enough. If the developer does not have a solid understanding of trading logic, risk management, and market behavior, AI can generate code, but it is unlikely to create a truly robust and profitable trading strategy.

In my opinion, the real value comes from combining the developer's experience with AI: the developer defines the trading logic, while AI accelerates and simplifies the implementation.

 
Domenico Perrotta #:

The use of AI is now widespread worldwide because it saves a significant amount of time and effort in software development.

However, when it comes to designing an Expert Advisor for algorithmic trading, I believe AI alone is not enough. If the developer does not have a solid understanding of trading logic, risk management, and market behavior, AI can generate code, but it is unlikely to create a truly robust and profitable trading strategy.

In my opinion, the real value comes from combining the developer's experience with AI: the developer defines the trading logic, while AI accelerates and simplifies the implementation.

I agree. The MQL5 Lite AI Assistant spit out is own self-generated code after I prompted a simple question about direct hedging. To be clear, I'm not in the habit of using AI to code EA's. I generally don't subscribe to direct hedging, so I let it have a go at it. That was merely an experiment.

My best EA, and best EA's in the past, have been one-and-done single position trading EA's. That is more or less by way of necessity in my FIFO jurisdiction. Even so, my algorithmic trading leaves me free time to toy with new stuff.

 

Honestly, it is an interesting concept, but too idealistic to me. I mean, if an EA has an edge, it doesn't need a hedging risk management. On the contrary, you may even lose more money than without it. Any type of risk management is a form of overfitting. Everything is overfitting. Even a stop loss is. But a stop loss or a trailing stop are still simple concepts and it's not too difficult to find the proper parameters, avoiding overfitting the strategy. With a hedging risk management, you only risk to throw good trades into the bin just because the price initially went against your initial position for a few pips (or the distance you choose). Of course, you can backtest this and find good parameters, but the risk of overfitting is quite high. I personally would never trust a hedging risk management for this reasons. I would prefer creating another EA with the idea to balance the losses of the previous one while still being profitable by itself. It is even much simpler and quicker to do.

With this, I don't mean that it's impossible. It's just a complexity that I don't find useful.

 
Daniele Fughelli #:
But a stop loss or a trailing stop are still simple concepts and it's not too difficult to find the proper parameters, avoiding overfitting the strategy.

Yes. That is so for you and I but not everyone, I suppose. If a trader's strategy doesn't have much of an edge in its logic, direct hedging could be the difference between continuing to trade versus quitting altogether.

Indirect hedging (cross-market/instrument) is a different ball of wax─wherein every trade is hedged all of the time. The best example that comes to mind at the moment is the Gold/DXY Index/U.S. 10 Year Note hedge.

 
Ryan L Johnson #:

Yes. That is so for you and I but not everyone, I suppose. If a trader's strategy doesn't have much of an edge in its logic, direct hedging could be the difference between continuing to trade versus quitting altogether.

Indirect hedging (cross-market/instrument) is a different ball of wax─wherein every trade is hedged all of the time. The best example that comes to mind at the moment is the Gold/DXY Index/U.S. 10 Year Note hedge.

In short, seeing is believing. I tried it and it seems to work, using automated systems that intervene continuously, whereas before, the same system without coverage was losing
 
Daniele Fughelli #:

Honestly, it is an interesting concept, but too idealistic to me. I mean, if an EA has an edge, it doesn't need a hedging risk management. On the contrary, you may even lose more money than without it. Any type of risk management is a form of overfitting. Everything is overfitting. Even a stop loss is. But a stop loss or a trailing stop are still simple concepts and it's not too difficult to find the proper parameters, avoiding overfitting the strategy. With a hedging risk management, you only risk to throw good trades into the bin just because the price initially went against your initial position for a few pips (or the distance you choose). Of course, you can backtest this and find good parameters, but the risk of overfitting is quite high. I personally would never trust a hedging risk management for this reasons. I would prefer creating another EA with the idea to balance the losses of the previous one while still being profitable by itself. It is even much simpler and quicker to do.

With this, I don't mean that it's impossible. It's just a complexity that I don't find useful.

Without a hedge:
The principal can reach profit more quickly;
you don't pay the spreads and commissions of hedges;
the average profit per trade can be higher;
however, the drawdown can become very high if the market continues to move up.
With a hedge:
add costs (spreads, commissions, swaps);
you can slow down the principal's profit;
in return, you reduce risk during adverse phases and can recover part of the loss through hedging cycles.
In a normal market, without a hedge, the net profit will likely be higher because you eliminate costs and don't "slow down" the principal;
in highly directional or anomalous markets, with a hedge, the average profit may be lower, but the system can survive better and contain the drawdown.
For this reason, in professional practice, many developers don't leave the hedge active all the time: they use it only when needed, for example, beyond a certain loss, a certain drawdown, or in the presence of particular volatility conditions.

So, if I were to optimize an EA, I wouldn't aim to always hedge or never hedge, but to make the hedge adaptive, so as to exploit the original logic when it's sufficient and activate the hedge only in situations where it truly adds value. This approach is more likely to maximize profit while keeping risk under control.