Hi,
we all back-tested EAs and got the statistical report. Then some EAs went live.
The idea is now to enable an EA to change its own risk-percent (=opening lot size) due to a comparison of the OrderHistory to the statistical results of the back-tests.
I have prepared a function to read the order-histoty:
To find a good solution to set significant-worse or -better true needs to deal with sample size and the amount of the change of the values of the backtest.
This requests statistical knowledge, which I don't have, but may be someone here - and he could help?
The code above is not tested yet. If s.o. has a suggestion or sees a mistake please don't hesitate to let me know.
Thanks in advance,
gooly
Have you seen this article? https://championship.mql5.com/2012/en/2008. I like to look at 100 Independent Positions ( not necessarily 100 deals/orders ). Or 3_weeks of trading which ever is higher. However, this really depends upon the system/trader. Should someone have a system which only trades once per week, they might choose a different matrix depending on the share_power of the system.
No I did not know it but I don't think that I can get, what I an looking for:
He wrote:
The Trading Game: "The standard for a very good system is to generally take a 10 percent lower winning percentage while maintaining a 1.0 better win/loss ratio over the breakeven point. If this combination exists, you are about as close to a Holy Grail strategy as you are going to get."
So his advice is directed at the trade-logic. But it would be another challenge for an EA to change its own trading logic!
I know the problem of the sample size which can be either the time between first and last trade of back-test versus order-history or just the number of trades of both samples. But I know there are statistical methods to deal with even small sample sizes and the amount of the difference of a signal-value to be able to decide whether to change the risk (lot-size) or not.
The first part talks about the zero_curve and the second part talks about comparing_systems. One way of applying this is, should your Trading System Safety Factor (TSSF) fall below the green line .... then reduce the lot_size. <--this I believe is what you're looking for. The other way is trading a different system which is performing better.
Which methods? What do you mean by "difference of a signal-value"?
double ddFrctn = MM_DD_Max_Prct / 100., // MM_DD_0_TSS1_DDS2_3 AB = AccountBalance(), perPipPerLot = PipValuePerLot(market_pair), riskPips = risk / pips2dbl, maxLossPerLot = riskPips * perPipPerLot, chartRisk = GetMaxRisk(); lotsNew = chartRisk / maxLossPerLot; string why = "Max Chart Risk "; if( (MM_DD_0_TSS1_DDS2_3 & 1) != 0 ){ //{Trading System Solutions - Publications - Money Management - The Basics // of Money Management III //http://www.tsresearch.com/public/money_management/money_management3/ // // suggests chartRisk = % Risk * (Capital – (1 – Max_%_Drawdown) * hi bal. // E.g. hi=110K cur=100K available = 100 - 80%*110 = 12K * riskPct // trade = rate (AB - 80% hibal) hibal capital avail 5%cap 25% avail // when AB = hiBal: 10000 10000 2000 500 500 // trade = rate DDfract AB 10000 9800 1800 490 450 // trade = percent * AB 10000 9600 1600 480 400 // prcnt = chartRisk / AB 10000 9400 1400 470 350 // rate = percent / DDfract 10000 9200 1200 460 300 // 25% = 5% / 20% 10000 9000 1000 450 250 // 10000 8800 800 440 200 // 10000 8600 600 430 150 //} 10000 8400 400 420 100 double percent = chartRisk / AB, // MMMODE_GEOMETRICAL & MM_Risk_Max rate = percent / ddFrctn, // or equivalent percent. avail = AB - (1. - ddFrctn) * history_hiBal, TssRisk = avail * rate; if(chartRisk > TssRisk){ lotsNew = TssRisk / maxLossPerLot; why = "Max DD Risk "; } } // TSS
The first part talks about the zero_curve and the second part talks about comparing_systems. One way of applying this is, should your Trading System Safety Factor (TSSF) fall below the green line .... then reduce the lot_size. <--this I believe is what you're looking for. The other way is trading a different system which is performing better.
Which methods? What do you mean by "difference of a signal-value"?
"difference of a signal-value": I have the values from the back-test let's say: max-4-cons.-losers and avg-2-cons-lLosers. Now from the OrderHistory I count 6 cons.-losers. Now I want to know if this is statistically significant due to the numbers of trades in the OrderHistory to reduce the risk or not.
The back-test produces values that I want to use as expectant values for a statistical test.
The zero_curve does not solve my problem.- Of course I can calc the zero_curve, I can even calc it on the base of the back-test, but still I don't know whether the sample size of the order history is big enough if I compare both.
The back-test produces values that I want to use as expectant values for a statistical test.
The zero_curve does not solve my problem.- Of course I can calc the zero_curve, I can even calc it on the base of the back-test, but still I don't know whether the sample size of the order history is big enough if I compare both.
No, I haven't seen this kind of analysis. The closest I can think of is Z-Score. You probably do
need
statisticians and mathematicians to tell you if this method is viable. But they do-not come around here often. Perhaps going to a forum where they hang out and throwing this question at them would be faster.
For me, exceeding the maximum#-of-consecutive-losing-positions would be a very-very big_deal. To even consider this number, I would have had to back-test the system on all_pairs and all-data which I could lay my hands on. It wouldn't be a question of "do I have enough sample from the back-tests" ... I simply cannot get anymore samples.
I'll also have to be fairly convinced that my results are not curve-fitted. I mean ... would you flip a coin 100 times and say the maximum number of consecutive heads || tails is 7. I wouldn't, I would run the simulation some very high number of times, that when ever it does happen, if it does happen, I would consider myself extremely unlucky. Its either time to re-evaluate the system or stop-trading altogether.
ubzen,
it is not only a question of curve-fitting but the market behaviour can change as well. During the EUR-crisis every statement of a 2nd-grade, local politician caused a bigger movement in the currency which has disappeared now. The market before Lehman was different to the market after Lehman for some time.
I know I (we) need statisticians or mathematicians and even your link to the Z-code is as you said close, but it does not evaluate the results of two different samples.
The important part is the question as of which sample size a specific difference to the expected values (from the back-test) does matter either to decrease or increase the risk (lots) because the trading confirms or disproves the back-test to be sure not to be either to late or to early.
Have a nice weekend.
gooly.
PS. I am surprised a little bit. MT4 exist for so many years. One of its biggest advantages is the back-test and there is nothing that uses the back-test results to confirm or to warn the live trading.
They were waiting for me to ask this question, quel honneur ;)
They were waiting for me to ask this question, quel honneur ;)

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
we all back-tested EAs and got the statistical report. Then some EAs went live.
The idea is now to enable an EA to change its own risk-percent (=opening lot size) due to a comparison of the OrderHistory to the statistical results of the back-tests.
I have prepared a function to read the order-histoty:
To find a good solution to set significant-worse or -better true needs to deal with sample size and the amount of the change of the values of the backtest.
This requests statistical knowledge, which I don't have, but may be someone here - and he could help?
The code above is not tested yet. If s.o. has a suggestion or sees a mistake please don't hesitate to let me know.
Thanks in advance,
gooly