Posts

Correlation Portfolio Diversification

Free MQL5 Coding Tutorials Video Series | Expert Advisor

One of the most popular languages to code an Expert Advisor in is MQL5. Hence why there is an entire video series covering the topic. Let’s dive into the first topic.

Multi-symbol Expert Advisor

By coding a multi-symbol Expert Advisor, you can run the same backtest you would typically run on a single asset on multiple assets simultaneously. By doing this, you not only save yourself time but increase the statistical significance of your backtesting and optimisation processes.

This multi-symbol capability also means that when you run your Expert Advisor on a live account. You’ll be able to reduce the load on your computer’s resources, potentially increasing the execution speed.

We’ve touched on some of the Darwinex performance metrics in previous episodes. These have included the Open & Close Strategy Investible Attributes. Instead, let’s focus on the information available under the Underlying Strategy tab.

Clicking on the Underlying Strategy tab displays a wealth of trading data. For example, you can see information regarding the D-Leverage. D-Leverage is a much more in-depth look at the leverage in use at any one time.

Also displayed is the number of trades open simultaneously. This gets broken down further by showing the assets traded and the length of time the trades are open. Assuming the Darwin provider is happy to share this trading data.

As a trader, it is possible to restrict the level of public information available to investors to protect your intellectual property.

By looking at the trade distribution, you can clearly see how many positions are open at any time, how long these positions are open, and how correlated these positions are.

Highly correlated positions open simultaneously will likely result in a spike in the D-Leverage at the same time.

If the Darwin has multiple positions open on uncorrelated symbols, this can mean the Darwin is at lower risk from extreme market conditions.

Another insightful concept is that of creating your own custom performance metrics. By creating bespoke performance metrics, you can fine-tune your optimisation parameters. These custom metrics can lead to a robust optimisation. This optimisation is performed in MT5 using the custom macs option.

In trading, everything revolves around price. So, it is essential that you handle your price data correctly. Because the price data you use to test should be close to the price data conditions you are likely to trade in a live account.

Anyone who creates a live trading account with Darwinex is eligible to open up a Darwin and attract third-party capital. You can even use the Darwinex Investible Attributes and Performance Metrics if you don’t have a trading account. You’ll need to create an online login and import your trading data from your existing broker.

The performance metrics and Investible Attributes that Darwinex makes available are valuable tools for either the trader or the investor to base their trading/investing decisions on.

Brought to you by Darwinex: UK FCA Regulated Broker, Asset Manager & Trader Exchange where Traders can legally attract Investor Capital and charge Performance Fees.

Risk disclosure:

https://www.darwinex.com/legal/risk-disclaimer

Content Disclaimer: The contents of this video (and all other videos by the presenter) are for educational purposes only, and are not to be construed as financial and/or investment advice.

PROs and CONs of Commercial Expert Advisors Trading Strategy Analysis

Commercial Expert Advisors: everything that glitters is not gold [EAS-I]

This post on commercial expert advisors (also referred to in short, as EAs) is the first of an EA Series we’re embarking upon.

Today we shed light on some of the main advantages and disadvantages of the same to traders.

The intention here is not to tag commercial expert advisors as either good or bad, but rather to formalize a view towards them in general, what they can and can’t achieve from a trader’s perspective.

For your convenience, the remainder of this post is divided into two sections, PROs and CONs respectively.


PROs of Commercial Expert Advisors

Let’s discuss these in terms of:

  1. Experience
  2. Discipline
  3. Diversification
  4. Speed

 

1) Experience

Trading Experience

Purchasing an EA offers non-programmers and new traders, a low-cost route to algorithmic trading.

Learning for one’s self takes time, money, patience and experience before achieving a level where production-level strategy development becomes possible.

The challenge of learning to trade manually is often just as daunting (if not more) as learning to program algorithmic trading strategies.

Furthermore, most commercial expert advisors will often be marketed with backtests spanning several years, and possibly even a live track record. These are often enough for traders to trust the work of the EA vendor rather than embark on a learning journey themselves.

It becomes a simple case of buying the EA and trading the markets with it.

Nothing wrong with this of course – people buy microwave ovens too 🙂 They just need to know how to operate them, not build them from scratch.


2) Discipline

Trading Discipline

Discretionary trading is no easy feat.

At bare minimum, it is a test of patience, skill and composure far more intense and stressful than most other professional walks of life.

A discretionary trader attempts to (manually) ensure stable risk management, duly enter/exit trades that fit predefined criteria (sometimes at a moment’s notice), and resist the temptation to engage in “conviction” or “revenge” trades – to name a few things.

Repeating this exercise across multiple markets is a mammoth task for even the most seasoned of individuals.

Humans are naturally always at risk of human error (both accidental and behavioral), the latter being more of a problem than the former in financial trading.

As a consequence, off-the-shelf automated trading solutions present an appealing alternative, offering a low-cost way to enforce pre-defined rules and risk measures.

By being automated, they mitigate to the fullest possible extent, the negative impacts of human limitation.


3) Diversification

Portfolio Diversification

Manual traders trading multiple markets, will often find themselves facing an array of charts (one or more for each underlying market they wish to trade).

Each chart will contain an overlaid set of market indicators, distilling price action and other factors into actionable intelligence.

Even with a single trading strategy applied across multiple markets, this practice (especially for day traders) requires “multi-modal” multi-tasking:

  • taking multiple inputs (e.g. prices, technical data, news, etc),
  • for EACH market being studied,
  • and acting on it promptly… in real time!

The sheer stress involved can often be reason enough to deter the most lion-hearted traders from pursuing multiple markets manually.

Commercial expert advisors automate this effort. Depending on their features, they can easily analyze multiple markets simultaneously, applying a pre-defined ruleset to trading them without human emotion (and associated risk of avoidable error) in play.


4) Speed

Transaction Speed (Humans vs Robots)

Human reaction times are unquestionably slower than those of computers.

For example, a human trader’s response to a trading signal or market event, at its fastest will involve at least a few seconds.

The same response can be delivered by computers in a fraction of that time. In the case of MetaTrader, this would be anywhere from a few microseconds to a few milliseconds.

The speed advantage offered by commercial expert advisors is hence a welcome plus for traders, particularly those trading intraday or higher frequencies manually.

Now let’s move on to the negatives.


CONs of Commercial Expert Advisors

We’ll discuss these in terms of:

  1. Credible vs. Unrealistic Backtests
  2. Vendor Credentials
  3. When a live track record just isn’t enough.

 

1) Credible vs. Unrealistic Backtests

In a recent post on MetaTrader Backtesting, we discussed several crucial best practices for data handling, parameter selection and other variable factors, when backtesting any trading strategy.

A challenge for traders (old & new) when considering commercial expert advisors, is ascertaining whether vendors have exercised such best practices when publishing backtests promoting their products.

In particular, products whose backtests showcase “exponential” or (at worst, extremely stable) growth over historical data, are very likely to demonstrate different (usually inferior) performance when subjected to live trading conditions.

As an exercise, which backtest below do you believe, is more credible:

Backtest A) Equity growth from $500 USD to $5,000,000 USD over a period of 10 backtest years, that looks something like this:

Overfit Trading Strategies (risk-focused)

Backtest B) Equity growth from $500 USD to $1,100 USD over the same period of 10 backtest years, that looks something like this:

Realistic Backtest MetaTrader

If your intended purchase has a backtest resembling (A), you need to be concerned.


2) Vendor Credentials

Traders considering commercial algorithmic solutions should be wary of vendors with no demonstrated trading credentials other than what their websites say.

In fact – it would serve you well to request the vendor for a link to their DARWIN!

Professional traders understand Capacity and Divergence. If a trader with experience and a profitable trading strategy is offering their “secret sauce” formula for sale, odds of it staying profitable as the number of users grows, are slim at best.

 

At bare minimum, one should ask the vendor these questions:

  1. How many traders have purchased your EA so far?
  2. Do you have a live track record, preferably a public DARWIN listing?
  3. If yes, has your EA been running with a pure DMA broker who passes your trades directly to market, or with a dealer/broker-dealer?

 

Here’s a bold statement:

A live track record using limited capital in a non-DMA environment, is as good as having no live track record at all.


3) When a live track record just isn’t enough.

When a live trading track record just isn't enough.

Some general rules of thumb are:

  1. If a large number of traders are already using the same EA at multiple venues, odds of backtest returns holding up in live trading are slim (if not non-existent).
  2. If a backtest shows very small initial equity growing to very large final equity, odds of excess leverage and loss averse trading practices (i.e. losing trades running for very long periods of time) being responsible for visibly nice returns, are very high.

In both these cases, both the backtest and corresponding live track record (if presented) by an EA vendor cannot be considered credible for the following reasons:

  1. The backtest likely employs practices that would be incredibly dangerous (if not impossible) to replicate in live trading.
  2. Unlike DARWIN assets where traders/investors have visibility on capacity and divergence, a live track record from one person (the vendor) can never demonstrate the market impact of a large number of people sending the same orders to the market, at almost the same time, on the same assets, in a finite liquidity pool serviced by a finite group of liquidity providers.

 


Conclusion

We encourage everyone to read our CEO’s great take on this too, in MT4 EAs = good business model?

Have some thoughts to share about EAs, or want to follow the conversation?

Visit this Community Forum thread:
https://community.darwinex.com/t/commercial-expert-advisors/951

As always, we would greatly appreciate if you shared this article with your colleagues and social networks.

The more traders understand trading, the better they are likely to become over time!