Backtest leveraged (up to 20×) S&P 500 and NASDAQ 100 perpetual securities using the same universal macro and technical indicators. Perpetual prices are simulated from the underlying index daily returns minus a financing cost (risk-free rate × leverage), since historical perpetual data doesn't exist before 2024.
Smooths price data by averaging closing prices over a set period. Buy when price crosses above the SMA; sell when it crosses below. Tested with periods 5, 10, 15, 20, 30, 50, 100, and 200. Shorter periods are more reactive; longer periods filter out noise and suit longer-term holds.
Like SMA but weights recent prices more heavily, reacting faster to changes. Reduces lag vs SMA, making it better for catching early trend reversals. Tested with periods 5, 8, 12, 21, 34, 50, and 100 — covering short-term to long-term timeframes.
Calculates the difference between two EMAs (fast and slow). A positive MACD signals bullish momentum (buy); negative signals bearish (sell). Tested with fast/slow combinations: 5/17, 5/26, 5/34, 8/17, 8/26, 8/34, 12/17, 12/26, 12/34. Shows both trend direction and momentum strength.
Classic long-term trend signal. A Golden Cross (50-day MA crosses above 200-day MA) is a strong bullish signal; a Death Cross (50 crosses below 200) is bearish. Slow-moving and infrequent, but widely respected by institutional investors as a major regime change signal. Requires at least 200 bars of data.
Medium-term trend crossover. When the 20-period SMA crosses above the 50-period SMA it signals a bullish shift; crossing below is bearish. Faster and more responsive than the Golden Cross, generating more trades with shorter holding periods. Good for capturing intermediate trends.
Tracks how many periods have passed since the highest high and lowest low. A rising Aroon Up above Aroon Down signals a new uptrend; the opposite signals a downtrend. Buy when the oscillator exceeds +50; sell when it falls below −50. Tested with periods 10, 15, 20, and 25.
Measures trend strength (not direction) on a 0–100 scale. Above threshold = strong trend worth trading; below half-threshold = trend weakening (exit signal). Tested with periods 10, 12, 14, 20 and thresholds 20, 25, 30. High ADX confirms that other indicators' signals are occurring in a trending environment.
Custom momentum gauge measuring the percentage price change over a lookback period. Positive % above a minimum threshold triggers a buy; negative % below the negative threshold triggers a sell. Tested with periods 3, 5, 7, 10 and minimum trend thresholds 0.3%, 0.5%, 0.7%. Useful for confirming directional bias.
Measures the speed and magnitude of price changes on a 0–100 scale. Buy when RSI falls below the oversold level; sell when it rises above the overbought level. Tested with periods 7, 10, 14, 21 and oversold/overbought combinations of 20/70, 20/75, 20/80, 25/70, 25/75, 25/80, 30/70, 30/75, 30/80 — 36 total variations.
Compares closing price to the price range over a period (0–100 scale). Buy when stochastic falls below the lower threshold (oversold); sell when it rises above the upper threshold (overbought). Tested with periods 7, 10, 14, 21 and lower/upper combinations of 20/75, 20/80, 25/75, 25/80 — 16 variations.
Measures how fast price is changing as a percentage vs N periods ago. Positive ROC = bullish momentum (buy); negative ROC = bearish (sell). Tested with periods 5, 8, 10, 12, and 20. Pure momentum indicator with no smoothing — sensitive and fast-reacting.
Measures how far price has deviated from its statistical average. Buy when CCI falls below −100 (oversold); sell when it rises above +100 (overbought). Tested with periods 10, 15, 20, and 30. Effective across all asset classes for identifying cyclical turning points.
Similar to Stochastic but inverted (0 to −100 scale). Buy when Williams %R falls below −80 (deeply oversold); sell when it rises above −20 (overbought). Tested with periods 7, 10, 14, and 21. Highly sensitive oscillator, excellent for mean reversion and quick reversal detection.
An extension of the Stochastic oscillator computing K, D, and J lines. The J line is the most reactive and signals reversals before K and D cross. Generates a buy signal when the oscillator enters overbought (J>70) and a sell when oversold (J<30). Tested with periods 7, 9, 14, and 21.
Measures momentum based on the closing price relative to the opening price over a period. High RVI means buyers dominated the session; low RVI means sellers. Buy above the threshold; sell below. Tested with periods 10, 12, 14, 20 and thresholds 40, 50, 60 — 12 total variations.
Upper and lower bands placed ±2 standard deviations around a moving average. Buy when price touches or breaks below the lower band (oversold); sell when it touches or breaks above the upper band (overbought). Tested with periods 10, 15, 20, and 30. Bands widen in volatile markets and contract in calm ones.
Uses SMA(20) crossover for the buy signal and RSI(14) overbought (>70) for the sell signal. Combines trend-following entry with a momentum-based exit to lock in gains before a pullback.
Uses SMA(20) crossover to enter and Bollinger Bands(20) upper band touch to exit. Enters on trend confirmation and exits when price reaches a statistically extended level.
Uses SMA(20) crossover to enter and Stochastic(14) overbought (>80) to exit. Entry is trend-driven; exit is based on short-term overbought momentum.
Uses EMA(12) crossover for faster trend entry and RSI(14) overbought (>70) for exit. EMA reacts quicker to price changes than SMA, allowing earlier entries and RSI locks in profits at momentum peaks.
Uses EMA(12) crossover to enter and Bollinger Bands(20) upper band touch to exit. Faster entry via EMA with a statistically-driven volatility exit.
EMA(12) crossover for entry and Stochastic(14) overbought exit. One of the most balanced hybrid combinations — trend-driven entry with a responsive momentum exit.
Uses RSI(14) oversold (<30) to buy and RSI(14) overbought (>70) to sell. A pure mean-reversion strategy — buys weakness and sells strength using the same oscillator for both signals.
RSI(14) oversold entry combined with Bollinger Bands(20) upper band exit. Enters during momentum exhaustion and exits when price reaches a statistically elevated level.
RSI(14) oversold entry with Stochastic(14) overbought exit. Both are oscillators but Stochastic tends to turn overbought faster, potentially capturing quicker profits.
ROC(12) positive momentum for entry and RSI(14) overbought for exit. Enter when momentum turns positive and exit when the move becomes overextended.
ROC(12) positive for entry and Bollinger Bands(20) upper band for exit. Captures momentum moves and exits at statistically extreme price levels.
ROC(12) positive momentum entry with Stochastic(14) overbought exit. Fast-reacting combination suited to shorter-term momentum trades.
Cross-asset signals used in ticker-specific macro timing gates. These instruments appear in gate formulas alongside the ETF's own price (Px). See the User Guide for gate construction types (OR, AND, MAJ, ROC).
Tracks high-yield (junk) corporate bonds. Used as a credit-health proxy — HYG tends to crack before equity drawdowns as it reflects risk appetite and credit-spread tightening/widening. Above its SMA = credit health on (risk-on); below = credit stress (risk-off). Also used via its rate-of-change (ROC) as a credit-momentum leading indicator.
Tracks USD-denominated emerging-market bonds. A proxy for global credit health and risk appetite — EMB above its SMA signals favorable global credit conditions supporting equities and commodities; below signals EM credit stress that often precedes broader risk-off rotations.
Tracks investment-grade corporate bonds. Used as an IG credit-trend and credit-momentum signal — LQD leads the broader credit cycle and cracks before equity drawdowns. Positive ROC or above-SMA = credit momentum on; negative/below = credit stress.
Tracks inflation-protected Treasuries. Used as a long-term inflation-regime signal — TIP above its 200-day SMA means inflation expectations are rising (reflation regime favors equities, commodities, and rate-sensitive sectors). Below = disinflation regime. One of the most common single-factor macro gates.
Tracks the US Dollar Index. Used as a dollar-strength signal — UUP above its SMA means dollar strengthening (flight-to-safety, headwind for risk assets and commodities); below means dollar weakening (risk-on for domestic equities and dollar-denominated commodities). Often combined with TIP in AND/OR gates.
Tracks intermediate-duration Treasuries. Used as a rate-movement proxy — IEF price rising = yields falling = easing financial conditions (risk-on); IEF falling = yields rising = tightening conditions. Also used via its 10-day ROC as a rate-easing momentum signal in OR gates.
Tracks long-duration Treasuries. Used as a long-rate and easing-regime signal — TLT rising = long-duration yields falling, favoring long-duration assets (REITs, growth, biotech). Also used via its 20-day ROC as a rate-easing momentum indicator, and in HYG/TLT credit-spread ratio gates.
Tracks gold price. Used as an inflation-hedge / risk-off regime signal — GLD above its SMA can signal a risk-on inflation regime (commodity demand) or a risk-off rotation into safe-haven assets, depending on context. Used in gold-regime gates (e.g. GLD below 50-day but above 200-day = a specific commodity regime). Also used in gold-to-silver ratio gates for SLV.
Tracks crude oil price. Used as a commodity-demand and inflation signal — USO above its SMA signals reflationary commodity demand; below signals risk-off rotation. Used in gold-divergence gates (GLD strong while USO weak = systemic-risk hedging) and as a crude-oil trend filter for energy-sensitive ETFs.
Tracks the S&P 500. Used as a broad-market regime signal — SPY above its 200-day SMA = bull-market regime (risk-on); below = bear-market regime. Used in majority-vote gates, broad-market trend filters, and as the denominator in energy-intensity ratio gates (XLE/SPY).
Tracks the energy sector. Used as an energy-cost signal — XLE below its SMA means energy input costs falling (tailwind for industrials, transportation, chemicals). Also used as numerator in energy-ratio gates (XLE/SPY, XLE/XLI) to measure energy relative to the broad market or industrials sector.
Tracks the materials sector. Used as an input-cost and commodity-cycle signal — XLB below its SMA can signal materials weakness (input-cost tailwind for tech and growth) or a risk-off rotation away from cyclicals. Used in broad-market majority gates and input-cost filter gates.
Tracks the financial sector. Used as a credit-cycle health signal — financials are the largest mid-cap value sector and the "gatekeepers" of credit. XLF above its SMA signals financial-sector health supportive of value equities; below signals credit-cycle deterioration.
Tracks the industrials sector. Used as a trend-confirming signal and as a denominator in energy-ratio gates (XLE/XLI) — energy cheap relative to industrials = input-cost tailwind for industrial margins.
Tracks China large-cap equities. Used as a global-growth and physical-commodity-demand signal — China is the world's largest consumer of many commodities (especially gold). FXI above its SMA signals EM/Chinese economic health supporting commodity demand; below signals global growth breakdown.
Tracks the NASDAQ-100. Used as a growth-beta signal in GBTC composite gates (BTC/QQQ ratio above its SMA = growth-beta on for Bitcoin) and as a trend filter for leveraged tech ETFs (QLD). Also used in realized-volatility gates.
Tracks copper mining companies. Used as an industrial-demand proxy for silver — ~55% of silver demand is industrial (solar, electronics, EVs). COPX above its SMA = industrial demand supporting silver; below = demand weakness.
Tracks the broad metals & mining peer group. Used alongside COPX as a materials-sector trend confirmation in silver industrial-demand gates.
In macro gate notation, "Px" refers to the price of the ETF being backtested. Used in trend filters (Px > SMA = uptrend), contrarian/defensive filters (Px < SMA = oversold, hold through drawdowns expecting mean-reversion), and fast-trend drawdown gates (Px > 10-day SMA = short-term trend intact).
A gate construction where the strategy holds when a quorum of conditions is met (e.g. ≥2 of 3, ≥3 of 4). Balanced between OR gates (step aside only when all fail) and AND gates (step aside when any fails). Reduces false exits while still providing downside protection.
In macro gate notation, "HYGROC10" means HYG 10-day rate-of-change, "TLTROC20" means TLT 20-day ROC, etc. Positive ROC = upward momentum in that asset (risk-on for the associated signal); negative = downward momentum. Used as a leading indicator — credit momentum tends to lead equity drawdowns by days to weeks.
A weekly index published by the Federal Reserve Bank of Chicago that tracks how tight or loose US financial conditions are relative to historical norms. Negative values = conditions looser than average (risk-on, supportive of equities); rising/positive values = conditions tightening (risk-off). Used in macro timing gates via its SMA trend (NFCI below its SMA = easing regime, hold) or rate-of-change (NFCIROC5 < 0 = conditions improving, hold). Unlike ETF-based credit proxies (HYG/EMB/LQD), NFCI is a composite of over 100 financial-market indicators — a direct, broad measure of system-wide financial stress.
Used in the Multi-Strategy Risk Comparison Table and the optimization results table. All metrics compared vs Buy & Hold.
Annualized standard deviation of daily returns. Measures total return variability — both up and down. Lower = more consistent day-to-day performance. Calculated as daily std dev × √252.
Standard deviation of negative daily returns only. Unlike Annual Std Dev, this ignores upside volatility — penalizing only the harmful downside swings. Lower = less downside risk.
The percentage of Buy & Hold losses the strategy captured on B&H down days. A value below 100% means the strategy loses less than B&H when markets fall — a key sign of defensive quality. Lower is better.
A composite score calculated as CAGR divided by Downside Capture. Measures annualized return per unit of downside participation — higher = better return for the amount of downside risk taken. Used as a sortable column in the optimization results table and as the "Risk-Adjusted" optimization objective. Green when the strategy's score beats Buy & Hold's.
The strategy's sensitivity to B&H on days when B&H is negative. Beta < 1 means the strategy falls less steeply than B&H in down markets. Calculated as covariance / variance of B&H returns, restricted to B&H down days.
Pearson correlation between the strategy and B&H, measured only on B&H down days. A lower correlation means the strategy's returns diverge more from B&H during market downturns — a desirable defensive property.
Strategy sensitivity to B&H daily moves across the full period. Beta = 1 means the strategy moves in lockstep with B&H; below 1 = lower market sensitivity; above 1 = amplified moves.
Pearson correlation of daily returns between the strategy and B&H across the full period. Values near +1 = strategy tracks the market closely; near 0 = largely independent returns.
The largest peak-to-trough decline in portfolio value over the period. Expressed as a negative percentage. Measures the worst-case loss an investor would have experienced holding the strategy. Less negative = better capital preservation.
Root mean square of all drawdown depths over the full period. Penalizes both deep and prolonged drawdowns more severely than shallow or brief ones. Lower = smoother recovery path. Developed by Peter Martin (1987) as a practical pain measure.
The simple average of all drawdown depths across every period in the history. A companion to Ulcer Index — lower values indicate the strategy spends less time in drawdown on average. Lower = better.
CAGR divided by the absolute value of Max Drawdown. Higher = better return earned per unit of maximum drawdown risk taken. A Calmar above 1 is generally considered strong. Useful for comparing strategies with similar returns but different drawdown profiles.
Value at Risk at the 95% confidence level. The 5th-percentile worst daily return — on 5% of trading days, losses are expected to exceed this value. Less negative = smaller tail risk. Expressed as a daily percentage.
Conditional Value at Risk (also called Expected Shortfall). The average loss on the worst 5% of days — i.e., the expected loss given that you are already in the tail. More conservative than VaR because it captures the severity of losses beyond the VaR threshold. Less negative = better.
iQUANT tests 150+ technical indicator configurations AND ticker-specific macro timing gates across three ETF universes — Asset Classes, Style Box, and Sectors. Every strategy is automatically benchmarked against Buy & Hold so you can see exactly where active management adds or destroys value.
Use preset buttons (3Y, 5Y, 10Y, 15Y) or set custom dates. Longer periods (10Y+) produce more statistically robust results.
Select a ticker, indicator, and date range, then click Run Backtest. Indicator parameters (period, thresholds, buffers) are pre-filled and fully customizable.
Click Optimize All to run 150+ configurations AND ticker-specific macro timing gates simultaneously. Choose your objective first:
The winning strategy is shown in a comparison card vs Buy & Hold across four metrics. A second card highlights the best strategy from a different indicator family for diversification. Values are green when the strategy wins, red when it doesn't.
Check the box on any result row, then click Compare N Selected. Two panels appear:
See the Glossary of Terms for definitions of every risk metric.
In addition to standard technical indicators, iQUANT includes ticker-specific macro timing gates — multi-factor strategies combining cross-asset signals like credit health, inflation trends, dollar strength, rate movements, and commodity regimes. These appear in the results table when available for the selected ticker.
Each gate shows a Factor Family tag beneath its label. See the Glossary of Terms for macro instrument definitions.
Choose this if you already have an indicator and parameters in mind, or want to refine a strategy you've tested before.
Tests every indicator, macro overlay, and multi-factor gate across thousands of parameter sets to find the best historical performer on the simulated perpetual price series.