Z-Score Optimization in Forex Trading (2024)

Contents

  • What is Z-score?
  • How to calculate Z-score of Forex system
    • Example of Z-score calculation
    • Z-score probability
  • How touse Z-score inForex?
  • Z-score optimization
  • Further improvement

This guide sheds light on avery important but often overlooked concept inEA optimization— Z-score. But before wedescribe the actual use case of Z-score optimization, it would be wise toexplain abit more about this interesting trading system performance indicator.

What is Z-score?

A Z-score (orstandard score) measures thedistance between themean ofsome set ofthestatistical results andthegiven observation.

InForex systems, traders are interested in Z-score not of a trade's return (profit/loss size) but rather in a Z-score of the outcome— was it a profitable one or a losing one? A Z-score, calculated using winning and losing streaks, measures thedependence between theoutcome of the previous position andtheoutcome of the next position.

If we consider profitable positions aspositive results andlosing positions asnegative statistical results, counting thetotal number ofall wins, losses, overall trades, aswell asthenumber ofwin andloss streaks, we can calculate a Z-score foragiven trading strategy orexpert advisor.

Usually, a Z-score fluctuates between -3 to+3, but sometimes, can go above andbelow these "limits". A Z-score value of0 means that we are dealing with completely random results.

Each Z-score value has also aprobability ofdependence (P) associated with it, which informs us ofhow probable dependence between thetrades is. P values below -2 andabove +2 have high (>95%) probability ofdependence between trades:

  • A positive Z-score means that profitable position is likely tobe followed byalosing one, while alosing one should probably be followed byawinning one. Basically, it means that the probability of long winning and losing streaks is low.
  • A negative Z-score means that profitable positions are likely tobe followed bymore profitable positions, andlosing positions are tobe followed bymore losing positions. Basically, it means that winning or losing streaks are probable.

The concept of Z-score is illustrated in this image of two samples. The first sample is taken from a completely random trading system (50% chance of winning and 50% chance of losing), and the second sample is taken from a trading system with significant edge and dependence on previous trades:

As you can see, their Z-scores are totally different, with a large positive Z-score of the second system signaling high likelihood of switching between profitable and losing trades.

How to calculate Z-score of Forex system

To calculate a Z-score of your system, you need a rather large sample of trade outcomes recorded in chronological order. Using these outcomes, you can calculate Z-score with this formula:

Z-Score Optimization in Forex Trading (2)

where:

  • Z is the Z-score you are calculating;
  • N is the total number of trades in the sample;
  • R is the total number of losing and winning streaks;
  • P equals 2 × W × L;
  • W is the total number of winning trades in the sample;
  • L is the total number of losing trades in the sample.

You can see your Z-score byloading your MT4 or MT5 trading report into our Forex report analyzer.

Example of Z-score calculation

Let's look at the following example calculation process of a system's Z-score.

Let's assume a sample of 100 trading outcomes with 40 streaks (winning and losing), 50 winning trades, and 50 losing trades; then:

  • N = 100;
  • R = 40;
  • P = 2 × 50 × 50 = 5000.

Z-Score Optimization in Forex Trading (3)

The negative Z-score value of -2.11 means that the system's trading outcomes are likely non-random and that losing positions will likely be followed by more losing positions while profitable trades will likely be followed by more profitable trades (trades are likely to come in streaks).

Z-score probability

Each Z-score value has a certain probability associated with it. This probability tells us how likely is it that the system that we analyze produces outcomes that are dependent on the previous outcome.

You can look at this table to quickly find the probability of such a connection between your trading results if you already know your Z-score:

If we consider the Z-score value of -2.11 from the example above, we can see that the probability of positive dependence between the system's outcomes is between 95.45% and 97.22%, which is quite significant.

How touse Z-score inForex?

If you know the Z-score ofyour expert advisor ortrading system andits value is above +2 orbelow -2, you can "skip" atrade when alosing position is expected. Nevertheless, theprofit onthis "skipped" position should be tracked (virtually), toknow when tostart trading again.

It should also be noted that Z-score calculation makes sense only for sufficiently large samples. Math literature suggests a sample size of no less than 51 to get a reliable Z-score value.

Z-score optimization

For example, you backtested your expert advisor and found out that after more than a hundred trades, the resulting Z-score is +3.02, which means that profitable andlosing positions are likely toappear inanalternating order (long streaks of losses or wins are not probable). The probability for Z-score value of +3.02 is greater than 99.73%.

It would make sense to modify thecode ofsuch anexpert advisor tostop sending live orders when aprofitable position is closed (the next one is very likely to be a loss). TheEA would then enter asort of a virtual trading mode, where position is opened andtracked only virtually (using MQL4 variables). When such position is closed (virtually of course), its profit/loss is considered— if it is aloss, live trading becomes enabled once again; if it is a win, operation invirtual mode should be continued. This is how it should be done forpositive Z-scores.

Ofcourse, it can be easily modified towork with negative Z-score.

You can download an exampleMT5 EA with positive Z-score optimization implemented:

  • ATC Z-score Optimization Test Expert Advisor

Further improvement

This scheme ofZ-score optimization implies that you measure your Z-score onabacktest andthen consider that it won't change much during thelive run infuture. An alternative plan would be toimplement aconstant measurement ofZ-score insideyour EA's code andto adjust theoptimization on-the-fly. Theproblem is that it is quite difficult toimplement this ina live expert advisor.

When the shares ofthewinning andlosing positions are very unequal, Z-score optimization may become abit tricky. In this case, it is probably better tomake it asymmetrical (favoring less rare outcomes) orto skip it completely, even if Z-score is above/below +2/-2.

One notable case where Z-score optimization would be very inefficient and even ruinous is when your expert advisor opens more than one trade at once and these trades have nearly identical chance of ending up in loss or in profit. If your EA trades like that, you need to count such a group of nearly simultaneous trades as one outcome when computing a Z-score.

If you have any questions regarding theuse ofa Z-score metric inexpert advisor optimization orif you want toshare some idea forusing Z-score values in Forex trading, you can start a discussion on our forum.

If you want to get news of the most recent updates to our guides or anything else related to Forex trading, you can subscribe to our monthly newsletter.

Z-Score Optimization in Forex Trading (2024)

FAQs

What is a good z-score in forex? ›

Usually, a Z-score fluctuates between -3 to +3, but sometimes, can go above and below these "limits". A Z-score value of 0 means that we are dealing with completely random results.

Is there a 100% winning strategy in forex? ›

The short answer will be no. There simply isn't a 100% winning strategy in forex. What works in a specific market at a specific moment may not be replicated or repeated to bring the same results. Trading forex is risky and complicated, and no strategy can guarantee consistent profits.

What is the most reliable forex strategy? ›

Three highlighted profitable forex trading strategies are: Scalping strategy “Bali”, Candlestick strategy “Fight the tiger”, and “Profit Parabolic” trading strategy. How to choose: Choose a forex trading strategy based on backtesting, real account performance, and market conditions.

What is the z-score strategy in trading? ›

In the Z-Score Trading Strategy, investors identify companies with low Z-Scores as potential candidates for short-selling or avoiding investments altogether, as they are at higher risk of bankruptcy. Conversely, companies with high Z-Scores are seen as financially stable and may be attractive for long-term investments.

What is the 5 3 1 rule in forex? ›

Clear guidelines: The 5-3-1 strategy provides clear and straightforward guidelines for traders. The principles of choosing five currency pairs, developing three trading strategies, and selecting one specific time of day offer a structured approach, reducing ambiguity and enhancing decision-making.

What is 90% rule in forex? ›

The 90 rule in Forex is a commonly cited statistic that states that 90% of Forex traders lose 90% of their money in the first 90 days. This is a sobering statistic, but it is important to understand why it is true and how to avoid falling into the same trap.

Can you make 100 pips a day in forex? ›

Making 100 pips a day in forex is possible, but it requires more advanced strategies. You can go after short-term price movements but also hold your position for longer periods to go after bigger profits.

Is it hard to get rich from forex? ›

Forex trading may make you rich if you are a hedge fund with deep pockets or an unusually skilled currency trader. But for the average retail trader, rather than being an easy road to riches, forex trading can be a rocky highway to enormous losses and potential penury.

Can you become a millionaire off forex? ›

The answer is yes! Forex can make you a millionaire if you are a hedge fund trader with a large sum. But forex from rags to riches for the majority is usually a rocky and bumpy ride which often leaves some traders in their dreams.

How to make 50 pips a day in forex? ›

Focus on the pending order and place a stop-loss. If it is a buy order, the stop-loss should be placed 5 to 10 pips below the 7 am candle's low. If it is a sell order, 5 to 10 pips above the 7 am candle's high. In both cases, your take-profit would be 50 pips above (buy order) or below (sell order) the order.

What is the most profitable trading strategy? ›

One of the ways beginners can implement the most profitable trading strategies effectively is by embracing the buy-and-hold strategy. This involves researching companies with solid fundamentals and stable earnings, then holding their stocks for a long time without being swayed by short-term market fluctuations.

What is the secret of forex trading? ›

Opening and closing orders should just be treated as an execution that is always performed without any emotion. All of your trades should open according to your system and analysis conducted beforehand, this is one of the most important Forex trading secrets.

What is a good Z score? ›

0 is used as the mean and indicates average Z-scores. Any positive Z-score is a good, standard score. However, a larger Z-score of around 3 shows strong financial stability and would be considered above the standard score.

Which z score is most preferable? ›

Short Answer

A z-score equal to 2.00 will be preferred because it is a positive value, which depicts that the test score attained is 2 standard deviations greater than the mean score.

Does higher Z score mean better performance? ›

The higher (or lower) a z-score is, the further away from the mean the point is. This isn't necessarily good or bad; it merely shows where the data lies in a normally distributed sample.

What is an acceptable Z score? ›

Assessment of z-scores is based on the following criteria: |z-score| ≤ 2.0 is regarded as satisfactory; 2.0 < |z-score| < 3.0 is regarded as questionable ('warning signal'); |z-score| ≥ 3.0 is regarded as unsatisfactory ('action signal').

What is a good financial Z score? ›

Investors can use Altman Z-score Plus to evaluate corporate credit risk. A score below 1.8 signals the company is likely headed for bankruptcy, while companies with scores above 3 are not likely to go bankrupt.

Is a high Z score good? ›

What Is a Good Z-Score? The higher (or lower) a z-score is, the further away from the mean the point is. This isn't necessarily good or bad; it merely shows where the data lies in a normally distributed sample. This means it comes down to preference when evaluating an investment or opportunity.

What is a good Z score cutoff? ›

The critical z-score values when using a 95 percent confidence level are -1.96 and +1.96 standard deviations.

Top Articles
Latest Posts
Article information

Author: Msgr. Benton Quitzon

Last Updated:

Views: 6431

Rating: 4.2 / 5 (63 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Msgr. Benton Quitzon

Birthday: 2001-08-13

Address: 96487 Kris Cliff, Teresiafurt, WI 95201

Phone: +9418513585781

Job: Senior Designer

Hobby: Calligraphy, Rowing, Vacation, Geocaching, Web surfing, Electronics, Electronics

Introduction: My name is Msgr. Benton Quitzon, I am a comfortable, charming, thankful, happy, adventurous, handsome, precious person who loves writing and wants to share my knowledge and understanding with you.