Backtesting guide

Profit factor definition for a trading backtest

In a trading backtest, profit factor equals gross profit divided by the absolute value of gross loss. A value above one means simulated gross profits exceeded simulated gross losses before considering what the sample, costs, and distribution leave unexplained.

Read the practical guide

Key Takeaways

  • Profit factor = gross profit / absolute gross loss.
  • A value above one describes the tested sample; it does not establish future profitability.
  • A few outlier winners can dominate the ratio, so inspect the trade distribution.
  • Recalculate after realistic costs and across holdout periods or rolling windows.

How to calculate profit factor

Add the profit from all winning trades to get gross profit. Add the absolute losses from all losing trades to get gross loss. Divide gross profit by gross loss. For example, gross profit of $12,000 and gross loss of $8,000 produce a profit factor of 1.5. This arithmetic example explains the formula; it is not a recommended threshold or performance claim.

Why one profit factor can mislead

The ratio does not show trade count, timing, drawdown, exposure, position size, or whether one exceptional winner generated most of the profit. It can also change materially after commissions and slippage. Compare it with the trade list, equity path, average win and loss, maximum drawdown, and the result after removing or capping extreme trades.

  • Check how concentrated gross profit is among trades.
  • Recalculate after all modeled costs.
  • Compare in-sample, holdout, and rolling-period values.

There is no universal good profit factor

A single cutoff ignores strategy frequency, sample size, leverage, costs, and regime. Interpret the ratio relative to the full risk profile and its stability under reasonable changes. A lower but stable result with transparent assumptions may be more credible than a high value produced by a small or heavily tuned sample.

Direct Pineify workflow

Inspect profit factor in the context of the full trade list

Upload a compatible TradingView Strategy Tester trade-list CSV to Backtest Deep Report to review profit factor alongside drawdown, trade distribution, and other report evidence.

Backtest Deep Report

Analyze a TradingView trade-list export instead of treating profit factor as a standalone verdict.

Analyze the TradingView CSV

Boundary: Backtest Deep Report analyzes an existing TradingView CSV. It does not run the strategy, obtain market data, verify the original fill assumptions, or support native MT4 and MT5 exports.

Primary sources

This page is educational and does not provide investment advice. Backtests are hypothetical, depend on their data and assumptions, and do not guarantee future results. Trading can result in substantial loss.

Frequently Asked Questions