Optimization outputs; "equity dd"

 

Hi,

 When performing EA optimisation under MQL5, one of the comparative outputs is "Draw down %".

However, when a full report/backtest is run on that single string of inputs, the value that is used in the optimization output is actually the "Equity Drawdown maximal, as a percentage".

I do not find this particularly helpful. 

I feel that Equity drawdown relative/Balance DD relative and Balance Drawdown maximal are a lot more important. 

Does anyone know how I can extract those parameters in the optimisation process instead? Or be able to compute the parameters I need via regression analysis perhaps?

 

Thanks 

 
Jeremy Roach:

Hi,

 When performing EA optimisation under MQL5, one of the comparative outputs is "Draw down %".

However, when a full report/backtest is run on that single string of inputs, the value that is used in the optimization output is actually the "Equity Drawdown maximal, as a percentage".

I do not find this particularly helpful. 

I feel that Equity drawdown relative/Balance DD relative and Balance Drawdown maximal are a lot more important. 

Does anyone know how I can extract those parameters in the optimisation process instead? Or be able to compute the parameters I need via regression analysis perhaps?

 

Thanks 

You can create custom performance ratios and optimize according to them.

See OnTester() function.

https://www.mql5.com/en/docs/constants/environment_state/statistics 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Testing Statistics
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Testing Statistics
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Testing Statistics - Reference on algorithmic/automated trading language for MetaTrader 5
 
Jeremy Roach:

Hi,

 When performing EA optimisation under MQL5, one of the comparative outputs is "Draw down %".

However, when a full report/backtest is run on that single string of inputs, the value that is used in the optimization output is actually the "Equity Drawdown maximal, as a percentage".

I do not find this particularly helpful. 

I feel that Equity drawdown relative/Balance DD relative and Balance Drawdown maximal are a lot more important. 

Does anyone know how I can extract those parameters in the optimisation process instead? Or be able to compute the parameters I need via regression analysis perhaps?

 

Thanks 

This is old, but did you ever figure out how to do this?

 
Chad M Mirus: This is old, but did you ever figure out how to do this?

Do what? The prior post to yours already gives the solution! Use the OnTester to produce the metric you wish to optimise on.

Optimization outputs; "equity dd"
Optimization outputs; "equity dd"
  • 2016.03.17
  • www.mql5.com
Hi, When performing EA optimisation under MQL5, one of the comparative outputs is "Draw down...
 

Im a trader, not a coder, so pls dont flame me...as i sadly see happen here often.....folks on here ask fairly simple questions and all the coding brainaics proceed to belittle them.....as Mike Tyson recently said..."Social media made has y'all way too comfortable with disrespecting people and not getting punched in the face for it". 

That being said, im not entirely stupid, so if the above mentioned process is doable from the MT5 terminal and is a bat file or some other ammendment to a file within the application that will allow mwe to create cutom reports, I would love to know how if anyone knows. 

Ive looked at the 'tester statisitics' section and there is not much to guide me. Currently mt5 optimisation report only shows DD expressed as a %. 

Im simply after creating a report that shows DDin $ not %...and then I wish to create a report ...perhaps in excel....that shows the ratio expressed as a percentage.  The end result being;  ( profit/DD$ = ?%) 

Any help or guidance (without being a pointy headed <Deleted>)  would be greatly appreciated.


Thanks

 
Cani #: That being said, im not entirely stupid, so if the above mentioned process is doable from the MT5 terminal and is a bat file or some other ammendment to a file within the application that will allow mwe to create cutom reports, I would love to know how if anyone knows. Ive looked at the 'tester statisitics' section and there is not much to guide me. Currently mt5 optimisation report only shows DD expressed as a %. 

Im simply after creating a report that shows DDin $ not %...and then I wish to create a report ...perhaps in excel....that shows the ratio expressed as a percentage.  The end result being;  ( profit/DD$ = ?%) Any help or guidance (without being a pointy headed <Deleted>)  would be greatly appreciated.

Yes, it is true that the standard MT5 optimisation reports only displays the percentage drawdown.

EDIT: It does however already report the Recovery Factorwhich you are trying to obtain (Profit/DD$) — "Recovery factor, equal to the ratio of STAT_PROFIT/STAT_BALANCE_DD"

However, if you do have access to the EA's source code, you can add extra logic to produce a separate data file of statistics to your liking (see "Frame" data in Working with Optimization Results).

In this extra "Frame" data, you can store the available Testing Statistics available to you, such as the maximum balance (or equity) drawdown in monetary terms (STAT_BALANCE_DD or  STAT_EQUITY_DD).

You are however, not limited to these available statistics and can obviously calculate your own and store them in the "Frame" data.

The following references may be of use to you:

Documentation on MQL5: Working with Optimization Results
Documentation on MQL5: Working with Optimization Results
  • www.mql5.com
Working with Optimization Results - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

hello Fernando, and thanks for your valued reply.

I was unaware of the formula used to display the "Recovery Factor" you pointed out...this is great news.

This was what i was after to use as a filter on generated test reports.  The ratio of $ DD against the $ Profit which gives me a accurate assessment of risk to reward for the settings used. 

I wonder are you able to assist with one further query?

In MT5 tester the results generated from an optimisation run are stored in the cache folder, and can be exported to excel, or to a file for import into another terminal for analysis.  A very useful ability.

However, I only optimise EA using a "backtest>forward" ( typically 75/25 split) test process for a more accurate assessment of the robustness of the settings, and I have been unable to find the "forward results" cache file for when i run an optimisation using the backtest>forward test option.

The issue being I use IBM Cloud the utilises 176 cores to very quickly do my optimisation runs, however its not cheap...the IBM cloud runs on a similar to a taxi...the longer its used the more it costs....therefore I want to quickly do my backtest/forward test optimisation run and then export the back/forward test cache to my local PC for detailed analysis.

To date I have been unable to export the "Forward Results" from the IBM Cloud PC for analysis.

Any help would be greatly appreciated.

EDIT: i have since found that i can export the forward test data as excel doc and do required analysis but thats all


Fernando Carreiro #:

Yes, it is true that the standard MT5 optimisation reports only displays the percentage drawdown.

EDIT: It does however already report the Recovery Factorwhich you are trying to obtain (Profit/DD$) — "Recovery factor, equal to the ratio of STAT_PROFIT/STAT_BALANCE_DD"

However, if you do have access to the EA's source code, you can add extra logic to produce a separate data file of statistics to your liking (see "Frame" data in Working with Optimization Results).

In this extra "Frame" data, you can store the available Testing Statistics available to you, such as the maximum balance (or equity) drawdown in monetary terms (STAT_BALANCE_DD or  STAT_EQUITY_DD).

You are however, not limited to these available statistics and can obviously calculate your own and store them in the "Frame" data.

The following references may be of use to you: