Testing AI-Generated Strategies

Validate your AI-generated strategies before deploying them with real capital. TradeStaq offers two testing modes: Quick Test for rapid iteration and Full Backtest for comprehensive analysis.

Quick Test vs Full Backtest

FeatureQuick TestFull Backtest
DurationFixed 7 daysCustom date range
Save RequiredNoYes
MetricsBasic: Return, Win Rate, Trades, Drawdown, Profit FactorFull suite
ChartTrade markersFull equity curve
AccessAI Builder editor panelBacktests page
SpeedInstant (seconds)Minutes

Use Quick Test while iterating on your strategy prompt. Switch to Full Backtest once you have a version worth evaluating in depth.

Quick Test

Quick Test runs a 7-day in-memory backtest directly from the AI Builder editor. No save is required, so you can test ideas as fast as you can type them.

Walkthrough

  1. Select an exchange -- Choose the exchange you plan to trade on from the dropdown at the top of the editor panel.
  2. Pick a symbol -- Select the trading pair (e.g., BTC/USDT) you want to test against.
  3. Choose a timeframe -- Set the candle timeframe (1m, 5m, 15m, 1h, 4h, 1d). Shorter timeframes produce more candles and more potential trade signals within the 7-day window.
  4. Click "Quick Test" -- The backtest runs in-memory and returns results in seconds.
  5. Review results -- A summary card appears with key metrics and trade markers on the chart.

Quick Test Results

MetricDescription
Return (%)Net profit or loss over the 7-day period
Win Rate (%)Percentage of trades that were profitable
Total TradesNumber of completed round-trip trades
Max Drawdown (%)Largest peak-to-trough decline during the test
Profit FactorGross profit divided by gross loss

Tip: If Quick Test shows zero trades, your entry conditions may be too restrictive for the chosen symbol and timeframe. Try loosening thresholds or switching to a more volatile pair.

Full Backtest

Full Backtest provides configurable date ranges, detailed metrics, and an equity curve chart. It requires a saved strategy and runs from the Backtests page.

Walkthrough

  1. Save your strategy -- In the AI Builder, give your strategy a name and click Save. The strategy code is stored as a versioned snapshot.
  2. Go to the Backtests page -- Navigate to Backtests in the sidebar.
  3. Select your strategy -- Find and select the AI-generated strategy you saved.
  4. Configure the backtest -- Set the date range, trading pair, timeframe, initial balance, and any strategy parameters.
  5. Run the backtest -- Click Run Backtest. The test enters the processing queue and results appear when complete.

Auto-Versioning

Every time you edit and save a strategy in the AI Builder, a new version is created automatically. This means:

  • Each backtest is linked to a specific version of your strategy code.
  • You can compare results across versions to see whether changes improved performance.
  • Previous versions are preserved -- you never lose a working iteration.

Full Backtest Configuration

SettingDescription
StrategyThe saved AI-generated strategy to test
Trading PairSymbol to backtest (e.g., ETH/USDT)
TimeframeCandle interval (1m through 1d)
Start DateBeginning of the test period
End DateEnd of the test period
Initial BalanceSimulated starting capital in USDT

Understanding the Metrics

MetricWhat It Tells YouWhat to Look For
Return (%)Overall profit or loss as a percentage of starting capitalPositive returns; compare against buy-and-hold for the same period
Win Rate (%)Proportion of trades that closed in profitAbove 40-50% for most strategies; lower win rates can still be profitable with high reward-to-risk
Total TradesNumber of completed round-trip tradesEnough trades (20+) to be statistically meaningful; too few means the results may not be reliable
Max Drawdown (%)Largest decline from a peak equity value to a subsequent troughBelow 20% is generally conservative; above 30% signals significant risk
Profit FactorRatio of gross profits to gross lossesAbove 1.0 means profitable overall; above 1.5 is a strong result

Note: A strategy can have a low win rate and still be profitable if winning trades are significantly larger than losing trades. Always evaluate metrics together, not in isolation.

The Iteration Workflow

The AI Builder is designed for rapid iteration. The most effective workflow follows a tight loop:

1. Generate

Describe your strategy idea in the AI Builder prompt. Be specific about entry conditions, exit conditions, indicators, and risk parameters.

2. Quick Test

Run a Quick Test to get immediate feedback. Focus on whether the strategy produces trades and whether the direction of returns makes sense.

3. Review

Look at the metrics and trade markers. Ask yourself:

  • Are trades entering where you expect?
  • Is the win rate reasonable for the strategy type?
  • Is drawdown within your risk tolerance?

4. Refine

Go back to the AI Builder and adjust your prompt. Common refinements include:

  • Tightening or loosening entry thresholds
  • Adding or adjusting stop-loss and take-profit levels
  • Combining additional indicators for confirmation
  • Changing the timeframe to match the strategy's intended holding period

5. Retest

Run Quick Test again. Repeat steps 2 through 4 until the strategy performs consistently.

6. Validate

Once satisfied with Quick Test results, save the strategy and run a Full Backtest over a longer period that includes different market conditions (trending, ranging, volatile).

Next Steps