Profit Factor without info in Backtest

To add comments, please log in or register
Rubens Marinho
182
Rubens Marinho  

Hello traders,

Someone has any idea why my backtest is showing results with and without profit factor information?

By the way, the best results (looking for less DD) are without PF.

Any idea???



Files:
Fernando Carreiro
4868
Fernando Carreiro  
Rubens Marinho: Someone has any idea why my backtest is showing results with and without profit factor information?

By the way, the best results (looking for less DD) are without PF. Any idea???

Check to see if it is not a case of 100% win rate. When there are no losing trades, then the Profit Factor (Gross Profit / Gross Loss) cannot be calculated because it would cause a zero divide error!

Andreas Bauer
1491
Andreas Bauer  

Has anyone figured out why?!

I have the same issue; and my backtest has also drawdown. But the profit factor is still not being calculated. Why?


By the way: i try now to calculate the pf manually, but it gives different results.

lets take for example the image of thread starter, and the trade with PF info (blue background).

Gross Profit / Gross Loss would mean: 414,24 : 19  and I get = 21,8

This is not 31,13.

Enrique Dangeroux
355
Enrique Dangeroux  

Fernando gave the answer already.

You confuse drawdown with gross loss, which is not the same.

No losing trades means, no profit factor. Or profit factor == gross profit if you want but still it won't show.

Andreas Bauer
1491
Andreas Bauer  
Enrique Dangeroux:

Fernando gave the answer already.

You confuse drawdown with gross loss, which is not the same.

No losing trades means, no profit factor. Or profit factor == gross profit if you want but still it won't show.

Wait a minute...

Gross profit is the accumulated profit of all trades, gross loss the opposite.

So in the trade I mention the acc. profit is 414,24 - and the acc. loss is 19.

So, what mistake have I done?!

Enrique Dangeroux
355
Enrique Dangeroux  

Your 19 value comes from the collumn drawdown, not loss.

Like i said, you confuse drawdown with loss, which it is not.  Drawdown CAN become a loss ONLY if you close the position while in drawdown. 

Andreas Bauer
1491
Andreas Bauer  
Enrique Dangeroux:

Your 19 value comes from the collumn drawdown, not loss.

Like i said, you confuse drawdown with loss, which it is not.  Drawdown CAN become a loss ONLY if you close the position while in drawdown. 

Yes, you are right.

That means, that there is no way to calculate the profit factor on your own, when doing optimization backtests.

Because the gross loss is not being shown at all. You have to trust the system, that the pf is counted correct.

Or, when it is zero, that there have been no losing trades.


Other in single backtest. You can calculate the pf there:


To add comments, please log in or register