Metrics & Parameters Glossary
Definitions for all performance metrics, signals, and strategy parameters
Performance Metrics
CAGR (Compound Annual Growth Rate)
The annualized growth rate of your investment over the backtest period. It represents the constant yearly rate that would yield the same total return.
Formula: CAGR = (Ending Value / Starting Value)^(1 / Years) - 1
A CAGR of 15% means your portfolio would grow by 15% per year on average. This is the most important metric for comparing long-term strategy performance.
Total Return
The cumulative percentage return over the entire backtest period.
Formula: Total Return = (Ending Equity / Starting Equity) - 1
A total return of 150% means your initial investment increased by 150%, so 100,000 became 250,000.
PnL (Profit and Loss)
The absolute dollar amount gained or lost over the backtest period. This is simply the difference between ending equity and starting equity.
While useful for understanding absolute gains, PnL doesn't account for risk or the time value of money, so CAGR and Sharpe are better for strategy comparison.
Max Drawdown (MDD)
The largest peak-to-trough decline in equity during the backtest period. This measures the worst loss you would have experienced from a previous high point.
A max drawdown of -25% means at one point, your portfolio declined 25% from its highest value. Lower drawdowns indicate more stable strategies.
Drawdown tests your risk tolerance. A strategy with 50% annual returns but -60% drawdown might be psychologically unbearable.
# Trades
The total number of round-trip trades (buy and sell pairs) executed during the backtest period.
More trades mean higher transaction costs. A strategy with 500 trades vs. 50 trades needs to generate enough extra return to justify the additional costs.
Win % (Win Rate)
The percentage of trades that were profitable.
Formula: Win Rate = (Winning Trades / Total Trades) x 100
Win rate alone is misleading. A strategy with 90% win rate but small wins and large losses can still lose money. Always consider win rate alongside average win/loss size.
Signals & Trading
Signal (-1, 0, +1)
+1 (BUY): Strategy indicates a long position should be taken.
0 (HOLD): Strategy indicates holding current position or staying in cash.
-1 (SELL): Strategy indicates closing positions or taking a short position.
The final stock signal is computed by combining individual strategy signals using either majority vote or weighted vote (typically CAGR-weighted).
Cooldown Bars
The minimum number of time periods (bars) that must pass between consecutive trades. Prevents overtrading and reduces transaction costs.
With cooldown_bars=5 on daily data, after selling a position, the strategy must wait at least 5 days before buying again.
Strategy Indicators
RSI (Relative Strength Index)
A momentum oscillator ranging 0-100. RSI > 70: overbought (sell). RSI < 30: oversold (buy).
Parameters: rsi_window (14), rsi_overbought (70), rsi_oversold (30).
MACD (Moving Average Convergence Divergence)
Trend-following momentum indicator. Buy when MACD line crosses above signal line; sell when it crosses below.
Parameters: macd_fast_window (12), macd_slow_window (26), macd_signal_window (9).
Bollinger Bands
Volatility bands above and below a moving average. Price at lower band = oversold. Price at upper band = overbought.
Parameters: bb_window (20), bb_k (2.0 standard deviations).
SMA (Simple Moving Average)
Average price over N periods. Price > SMA = bullish. Price < SMA = bearish.
Parameters: window (50 or 200 commonly).
Ichimoku Cloud
Multi-line trend system with support/resistance cloud. Signals based on Tenkan/Kijun crosses and cloud position.
Parameters: tenkan (9), kijun (26), senkou_b (52), shift (26).
Portfolio Parameters
buy_pct_cash
Percentage of available cash to use when buying (1.0 = 100%, 0.5 = 50%).
min_return_before_sell
Minimum return threshold before allowing a sell (prevents premature exits).
Need more information? These metrics and parameters are industry-standard tools for quantitative trading. For deeper understanding, we recommend “Quantitative Trading” by Ernest Chan or “Evidence-Based Technical Analysis” by David Aronson.