IHeatmapRow

Portfolio heatmap statistics for a single symbol. Aggregated metrics across all strategies for one trading pair.

symbol: string

Trading pair symbol (e.g., "BTCUSDT")

totalPnl: number

Total profit/loss percentage across all closed trades

sharpeRatio: number

Risk-adjusted return per trade (Sharpe Ratio = avgPnl / stdDev)

maxDrawdown: number

Maximum drawdown percentage (largest peak-to-trough decline)

totalTrades: number

Total number of closed trades

winCount: number

Number of winning trades

lossCount: number

Number of losing trades

winRate: number

Win rate percentage

avgPnl: number

Average PNL per trade

stdDev: number

Standard deviation of PNL

profitFactor: number

Profit factor: sum of wins / sum of losses

avgWin: number

Average profit percentage on winning trades

avgLoss: number

Average loss percentage on losing trades

maxWinStreak: number

Maximum consecutive winning trades

maxLossStreak: number

Maximum consecutive losing trades

expectancy: number

Expectancy: (winRate * avgWin) - (lossRate * avgLoss)

avgPeakPnl: number

Average peak PNL percentage across all trades (_peak.pnlPercentage). Higher is better.

avgFallPnl: number

Average fall PNL percentage across all trades (_fall.pnlPercentage). Closer to 0 is better.

peakProfitPnl: number

Maximum peak PNL percentage observed across all trades (best best-case). Higher is better.

maxDrawdownPnl: number

Minimum fall PNL percentage observed across all trades (worst worst-case). Closer to 0 is better.

avgDuration: number

Average trade duration in minutes ((closeTimestamp - pendingAt) / 60_000).

medianPnl: number

Median pnlPercentage — robust to outliers; reveals distribution skew when paired with avgPnl.

avgConsecutiveWinPnl: number

Average sum of pnlPercentage across consecutive winning streaks. Null if no win streak.

avgConsecutiveLossPnl: number

Average sum of pnlPercentage across consecutive losing streaks. Null if no loss streak. Closer to 0 is better.

avgWinDuration: number

Average duration in minutes of winning trades.

avgLossDuration: number

Average duration in minutes of losing trades.

sortinoRatio: number

Sortino Ratio (avgPnl / downside deviation — RMS of losing trades only). Higher is better.

calmarRatio: number

Calmar Ratio (totalPnl / maxDrawdown). Higher is better.

recoveryFactor: number

Recovery Factor (totalPnl / maxDrawdown). Higher is better.

annualizedSharpeRatio: number

Annualized Sharpe Ratio (sharpeRatio × √tradesPerYear). Higher is better.

certaintyRatio: number

Certainty Ratio (avgWin / |avgLoss|). Higher is better.

expectedYearlyReturns: number

Expected yearly returns (geometric, capped at ±MAX_EXPECTED_YEARLY_RETURNS). Higher is better.

tradesPerYear: number

Observed trade frequency extrapolated to one year (signals × 365 / calendarSpanDays).

medianStepSize: number

Median |close[i] - close[i-1]| / close[i-1] across trade closes, in %. Robust to outliers.

buyerPressure: number

Fraction of up-moves among decisive close-to-close moves. 0..1. Higher = buyers more frequent.

sellerPressure: number

Fraction of down-moves among decisive moves. 0..1. Equals 1 - buyerPressure.

buyerStrength: number

Share of upward absolute movement in total close-to-close movement. 0..1.

sellerStrength: number

Share of downward absolute movement in total close-to-close movement. 0..1.

pressureImbalance: number

buyerStrength - sellerStrength ∈ [-1, 1]. Positive = bullish bias on magnitude.

trend: "bullish" | "bearish" | "sideways" | "neutral"

Bivariate trend classification (slope × R²).

trendStrength: number

Log-price regression slope, in %/day.

trendConfidence: number

R² of the log-price regression, in [0, 1].