BacktestSummary
Backtest result summary providing type-safe access to common performance metrics. Mapped to internal/backtest.BacktestSummary via gqlgen autobind.
type BacktestSummary {
strategyName: String!
totalTrades: Int!
wins: Int!
losses: Int!
draws: Int!
profitTotalAbs: Float!
profitTotal: Float!
profitMean: Float
winRate: Float
maxDrawdown: Float
profitFactor: Float
expectancy: Float
sharpe: Float
sortino: Float
sharpeDaily: Float
sortinoDaily: Float
dailyRatiosSource: String
calmar: Float
avgStakeAmount: Float
stakeCurrency: String!
backtestStart: Time
backtestEnd: Time
backtestDays: Int
marketChange: Float
finalBalance: Float
startingBalance: Float
maxDrawdownAbs: Float
maxDrawdownStart: Time
maxDrawdownEnd: Time
maxRelativeDrawdown: Float
maxRelativeDrawdownStart: Time
maxRelativeDrawdownEnd: Time
cagr: Float
recoveryFactor: Float
resultsPerPair: [BacktestPairResult!]
}
Fields
BacktestSummary.strategyName ● String! non-null scalar
BacktestSummary.totalTrades ● Int! non-null scalar
BacktestSummary.wins ● Int! non-null scalar
BacktestSummary.losses ● Int! non-null scalar
BacktestSummary.draws ● Int! non-null scalar
Closed trades with exactly zero profit (Freqtrade draws), so wins + losses + draws = totalTrades (#4786). A trade shown as "0.00%" can still be a tiny win or loss; only an exact zero is a draw.
BacktestSummary.profitTotalAbs ● Float! non-null scalar
BacktestSummary.profitTotal ● Float! non-null scalar
BacktestSummary.profitMean ● Float scalar
BacktestSummary.winRate ● Float scalar
Share of winning trades (freqtrade winrate). Unit: fraction 0..1 (0.05 = 5%).
BacktestSummary.maxDrawdown ● Float scalar
Account drawdown (Freqtrade max_drawdown_account): the relative drop AT the largest drop in money, measured from the peak before it. Unit: fraction 0..1 (0.05 = 5%). It need not be the deepest fall from a peak; that is maxRelativeDrawdown, which the Backtests "Biggest drop" tile shows. Other pages keep this one. Its dates are maxDrawdownStart / maxDrawdownEnd.
BacktestSummary.profitFactor ● Float scalar
Gross profit over gross loss (Freqtrade profit_factor). Null when no trade lost (#4786): Freqtrade writes 0 there. Show it as infinite with "No losing trades" when totalTrades > 0.
BacktestSummary.expectancy ● Float scalar
BacktestSummary.sharpe ● Float scalar
Freqtrade's report Sharpe (calculate_sharpe): the sum of per-trade returns over the days, divided by the standard deviation of PER-TRADE returns, times sqrt(365). It mixes a daily mean with a per-trade spread, so it runs large for runs with many small trades. Null when Freqtrade wrote its -100 "zero deviation" marker. See sharpeDaily.
BacktestSummary.sortino ● Float scalar
Freqtrade's report Sortino, as sharpe. Null on the -100 marker.
BacktestSummary.sharpeDaily ● Float scalar
Sharpe over DAILY balance returns (#4786): Freqtrade's calculate_sharpe_from_balance, mean daily return over its population standard deviation, times sqrt(365). The Backtests Expert numbers show this. Taken from the result's wallet_stats.sharpe (Freqtrade's "Sharpe (daily wallet balance)", open positions marked to market) when present; else computed over the closed-trade balance series (see dailyRatiosSource). Null with no daily return or zero deviation.
BacktestSummary.sortinoDaily ● Float scalar
Sortino over daily balance returns: mean daily return over the population standard deviation of the NEGATIVE daily returns, times sqrt(365) (calculate_sortino_from_balance). Same source rule as sharpeDaily. Null without a losing day or with zero deviation.
BacktestSummary.dailyRatiosSource ● String scalar
Where sharpeDaily / sortinoDaily come from, as a code:
- wallet: Freqtrade's own wallet_stats (2026.4+ results);
- closedTrades: an older result, computed over closed trades only, where a multi-day hold is flat until it closes. Caption it "closed trades only". Null when there are no daily ratios.
BacktestSummary.calmar ● Float scalar
BacktestSummary.avgStakeAmount ● Float scalar
BacktestSummary.stakeCurrency ● String! non-null scalar
BacktestSummary.backtestStart ● Time scalar
BacktestSummary.backtestEnd ● Time scalar
BacktestSummary.backtestDays ● Int scalar
BacktestSummary.marketChange ● Float scalar
BacktestSummary.finalBalance ● Float scalar
BacktestSummary.startingBalance ● Float scalar
BacktestSummary.maxDrawdownAbs ● Float scalar
BacktestSummary.maxDrawdownStart ● Time scalar
When the max drawdown began: the balance peak before the largest drop in money (Freqtrade drawdown_start, the same event as maxDrawdown and maxDrawdownAbs), UTC. When the peak is the starting balance, Freqtrade dates it at the FIRST trade's close, not the window start. Can equal maxDrawdownEnd (the first trade is the trough). Null when the run had no drawdown.
BacktestSummary.maxDrawdownEnd ● Time scalar
When the max drawdown bottomed out: the trough (Freqtrade drawdown_end), UTC. Null when the run had no drawdown.
BacktestSummary.maxRelativeDrawdown ● Float scalar
The deepest fall from a running peak (Freqtrade max_relative_drawdown), on closed-trade balance, with the peak starting at the starting balance. Unsigned. Unit: fraction 0..1 (0.05 = 5%). The Backtests "Biggest drop" tile shows THIS, with maxRelativeDrawdownStart / maxRelativeDrawdownEnd, so it is the same event as the balance chart's lowest point (BacktestBalancePoint.drawdownPct). The chart is sampled daily, so it can read shallower when a dip recovers within the day, never deeper.
Can differ from maxDrawdown: 1000 -> 500 -> 3000 -> 2400 has maxDrawdown 0.20 (the 600 drop, the largest in money) and maxRelativeDrawdown 0.50 (the 500 drop from 1000). Null when the result carries none (no trades).
BacktestSummary.maxRelativeDrawdownStart ● Time scalar
The peak before the maxRelativeDrawdown drop, UTC: the close of the trade that set that peak, or backtest_start when the peak is the starting balance (unlike maxDrawdownStart, which Freqtrade dates at the first trade's close then). Null when there was no drop or the result has no trades to date it.
BacktestSummary.maxRelativeDrawdownEnd ● Time scalar
The trough of the maxRelativeDrawdown drop, UTC: the close of the trade at the bottom. Null when there was no drop or the result has no trades to date it. The chart's lowest point sits at the midnight after this.
BacktestSummary.cagr ● Float scalar
BacktestSummary.recoveryFactor ● Float scalar
BacktestSummary.resultsPerPair ● [BacktestPairResult!] list object
Member Of
Backtest object