Profit factor 0.00 in backtesting - Intention or bug?

 

Occasionaly, there are cases with a 0.00 profit factor in backtesting with the strategy tester. Looking closer at these cases, it turnes out that they all have 100% win trades. Moreover, these cases have typically a poor combined score, although all other criteria (profit, number of trades, drawdown etc.) are pretty good.

Theoretically, the profit factor is calculated dividing gross profit by gross loss. So cases with 100% win trades should have an indefinite profit factor (division by zero). They are, however, stated with profit factor 0.00 and a poor combined score (usually below 70), which distorts there real value significantly.

It is hard to believe that this is the intention of the MT5 developers. 

 
FraMat:

Occasionaly, there are cases with a 0.00 profit factor in backtesting with the strategy tester. Looking closer at these cases, it turnes out that they all have 100% win trades. Moreover, these cases have typically a poor combined score, although all other criteria (profit, number of trades, drawdown etc.) are pretty good.

Theoretically, the profit factor is calculated dividing gross profit by gross loss. So cases with 100% win trades should have an indefinite profit factor (division by zero). They are, however, stated with profit factor 0.00 and a poor combined score (usually below 70), which distorts there real value significantly.

It is hard to believe that this is the intention of the MT5 developers. 

You are absolutely correct, mathematically you cannot divide by zero. When gross loss is 0 - Profit Factor defaults to 0.00 to prevent system crash - that is standard software architecture, not a bug.

Furthermore, a 100% win rate in backtesting is a massive red flag for overfitting, look-ahead bias or flawed data. The tester downweights the score precisely to flag these unrealistic results. Educate yourself on basic market variance and tester logic before claiming developer error.

 
Oleksandr Medviediev #:

You are absolutely correct, mathematically you cannot divide by zero. When gross loss is 0 - Profit Factor defaults to 0.00 to prevent system crash - that is standard software architecture, not a bug.

Furthermore, a 100% win rate in backtesting is a massive red flag for overfitting, look-ahead bias or flawed data. The tester downweights the score precisely to flag these unrealistic results. Educate yourself on basic market variance and tester logic before claiming developer error.

Could you please enlight me how the tester takes the win rate into account for the combined score. Does a very high win rate draw down the combined score?
 
FraMat #:
Could you please enlight me how the tester takes the win rate into account for the combined score. Does a very high win rate draw down the combined score?
Google it. And don't try to overthink the system - if your inputs break basic math, the score drops.