Download MetaTrader 5

Trading: Mathematics in Trading: How to Estimate Trade Results

To add comments, please log in or register
Use MQL5 Cloud Network. It is secure!
MetaQuotes Software Corp.
Moderator
181410
MetaQuotes Software Corp. 2007.08.15 15:52 

New article Mathematics in Trading: How to Estimate Trade Results has been published:

We all are aware of that "No profit obtained in the past will guarantee any success in future". However, it is still very actual to be able to estimate trading systems. This article deals with some simple and convenient methods that will help to estimate trade results.

We are often warned: "Cut the losses and let profit grow". Looking at final trade results, we cannot draw any conclusions about whether protective stops (Stop Loss) are available or whether the profit fixation is effective. We only see the position opening date, the closing date and the final result - a profit or a loss. This is like judging about a person by his or her birth and death dates. Without knowing about floating profits during every trade's life and about all positions as a total, we cannot judge about the nature of the trading system. How risky is it? How was the profit reached? Was the paper profit lost? Answers to these questions can be rather well provided by parameters MAE (Maximum Adverse Excursion) and MFE (Maximum Favorable Excursion).

Every open position (until it is closed) continuously experiences profit fluctuations. Every trade reached its maximal profit and its maximal loss during the period between its opening and closing. MFE shows the maximal price movement in a favorable direction. Respectively, MAE shows the maximal price movement in an adverse direction. It would be logical to measure both indexes in points. However, if different currency pairs were traded,we will have to express it in money terms.

Every closed trade corresponds to its result (return) and two indexes - MFE and MAE. If the trade resulted in profit of $100, MAE reaching -$1000, this does not speak for this trade's best. Availability of many trades resulted in profits, but having large negative values of MAE per trade, informs us that the system just "sits out" losing positions. Such trading is fated to failure sooner or later.

Similarly, values of MFE can provide some useful information. If a position was opened in a right direction, MFE per trade reached $3000, but the trade was then closed resulting in the profit of $500, we can say that it would be good to elaborate the system of unfixed profit protection. This may be Trailing Stop that we can move after the price if the latter one moves in a favorable direction. If short profits are systematic, the system can be significantly improved. MFE will tell us about this.

For visual analysis to be more convenient, it would be better to use graphical representation of distribution of values of MAE and MFE. If we impose each trade into a chart, we will see how the result has been obtained. For example, if we have another look into "Reports" of RobinHood who didn't have any losing trades at all, we will see that each trade had a drawdown (MAE) from -$120 to -$2500.


Author: MetaQuotes Software Corp.

MQL4 Comments
16319
MQL4 Comments 2007.09.27 14:46  

Great job Rashid,

I have a question.

How to calculate the Probability of Dependence, %, do you have the formula ?

Rosh
93
Rosh 2007.09.27 16:39  
Hmm... Good question. Can you read book the book The Mathematics of Money Management, Ralph Vince? I'm affraid that I can not explain so well in English.
MQL4 Comments
16319
MQL4 Comments 2007.09.28 09:09  
Thanks Rosh for your answer.

If you know the formula, can you just write it ? mathematical language is universal, you don't need english for that.


thanks
Rosh
93
Rosh 2007.09.28 10:11  
See Normal Distribution:

Standard deviation

Dark blue is less than one standard deviation from the mean. For the normal distribution, this accounts for about 68% of the set (dark blue) while two standard deviations from the mean (medium and dark blue) account for about 95% and three standard deviations (light, medium, and dark blue) account for about 99.7%.

About 68% of values drawn from a standard normal distribution are within one standard deviation away from the mean; about 95% of the values are within two standard deviations and about 99.7% lie within three standard deviations. This is known as the "68-95-99.7 rule" or the "empirical rule."

To be more precise, the area under the curve between −nσ and nσ is

where erf(x) is the error function. To 12 decimal places the first 6 values of the 1-, 2-, and 3-sigma points are given in the following table:

n
1 0.682689492137
2 0.954499736104
3 0.997300203937
4 0.999936657516
5 0.999999426697
6 0.999999998027
David Caro-Greene
7
David Caro-Greene 2007.10.03 11:35  
The wonder and beauty of MetaTrader is not the blind application of mathematical formula to trading methods, that is what Java and Tradestation are for.
MetaTrader allows the programmer to test statistical ideas without limitations to investigate the potential dependencies between money management and trading style.
Dependency between risk management and trading style is something that we should expect to be very difficult to use as a means of forecasting profit.

In the case of Rich's system perhaps it is proven that this dependency is the magic grail of trading.
Yousky
10
Yousky 2008.01.04 16:03  
Great article for result analysis.

I've a question about the Z-Score formula, according to this serie of trades :

----+--+----+-+--++-++

And with this formula :

Z=(N*(R-0.5)-P)/((P*(P-N))/(N-1))^(1/2)
where:
N - total amount of trades in a series;
R - total amount of series of profitable and losing trades;
P = 2*W*L;
W - total amount of profitable trades in the series;
L - total amount of losing trades in the series.

we have :
N = 22
R = 12
W = 6
L = 6
P = 2*W*L = 72

Is it right or not ?

If so, Z = 1.0275375... which seems to be wrong according the report result Z-Score = 0.5 (38.29%) !!!

what is wrong ? :)
Mariusz Woloszyn
76
Mariusz Woloszyn 2008.01.06 00:50  
Is there an easy way to calculate Z-score directly from MetaTrader?
Rosh
93
Rosh 2008.01.07 10:19  
emsi:
Is there an easy way to calculate Z-score directly from MetaTrader?
See example in the library Вычисление Z-счета
Rosh
93
Rosh 2008.01.07 10:33  
yousky:
Great article for result analysis.

I've a question about the Z-Score formula, according to this serie of trades :

----+--+----+-+--++-++

And with this formula :

Z=(N*(R-0.5)-P)/((P*(P-N))/(N-1))^(1/2)
where:
N - total amount of trades in a series;
R - total amount of series of profitable and losing trades;
P = 2*W*L;
W - total amount of profitable trades in the series;
L - total amount of losing trades in the series.

we have :
N = 22
R = 12
W = 6
L = 6
P = 2*W*L = 72

Is it right or not ?

If so, Z = 1.0275375... which seems to be wrong according the report result Z-Score = 0.5 (38.29%) !!!

what is wrong ? :)
Win trades plus Loss trades must be eqauls to Total trades: W+L=N
gfx2trade
3
gfx2trade 2013.11.05 16:44  

For the example with 30 trades, I find the following results: Z -0.161776414

W 16, L 14, N 30, R 15, P 448

Can anyone confirm Z calculation is correct ?

12
To add comments, please log in or register