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
| Feature | Quick Test | Full Backtest |
|---|---|---|
| Duration | Fixed 7 days | Custom date range |
| Save Required | No | Yes |
| Metrics | Basic: Return, Win Rate, Trades, Drawdown, Profit Factor | Full suite |
| Chart | Trade markers | Full equity curve |
| Access | AI Builder editor panel | Backtests page |
| Speed | Instant (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
- Select an exchange -- Choose the exchange you plan to trade on from the dropdown at the top of the editor panel.
- Pick a symbol -- Select the trading pair (e.g., BTC/USDT) you want to test against.
- 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.
- Click "Quick Test" -- The backtest runs in-memory and returns results in seconds.
- Review results -- A summary card appears with key metrics and trade markers on the chart.
Quick Test Results
| Metric | Description |
|---|---|
| Return (%) | Net profit or loss over the 7-day period |
| Win Rate (%) | Percentage of trades that were profitable |
| Total Trades | Number of completed round-trip trades |
| Max Drawdown (%) | Largest peak-to-trough decline during the test |
| Profit Factor | Gross 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
- Save your strategy -- In the AI Builder, give your strategy a name and click Save. The strategy code is stored as a versioned snapshot.
- Go to the Backtests page -- Navigate to Backtests in the sidebar.
- Select your strategy -- Find and select the AI-generated strategy you saved.
- Configure the backtest -- Set the date range, trading pair, timeframe, initial balance, and any strategy parameters.
- 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
| Setting | Description |
|---|---|
| Strategy | The saved AI-generated strategy to test |
| Trading Pair | Symbol to backtest (e.g., ETH/USDT) |
| Timeframe | Candle interval (1m through 1d) |
| Start Date | Beginning of the test period |
| End Date | End of the test period |
| Initial Balance | Simulated starting capital in USDT |
Understanding the Metrics
| Metric | What It Tells You | What to Look For |
|---|---|---|
| Return (%) | Overall profit or loss as a percentage of starting capital | Positive returns; compare against buy-and-hold for the same period |
| Win Rate (%) | Proportion of trades that closed in profit | Above 40-50% for most strategies; lower win rates can still be profitable with high reward-to-risk |
| Total Trades | Number of completed round-trip trades | Enough 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 trough | Below 20% is generally conservative; above 30% signals significant risk |
| Profit Factor | Ratio of gross profits to gross losses | Above 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
- AI Builder Overview -- Learn what the AI Strategy Builder can do
- Getting Started -- Build your first AI-generated strategy
- Advanced Features -- Multi-timeframe analysis, custom indicators, and more
- Interpreting Backtest Results -- Deep dive into performance metrics
- Backtesting Best Practices -- Avoid common pitfalls like overfitting