Analysis Configuration
The Analysis Configuration section defines the tolerances used to match backtest trades with real-time alerts. These settings determine how strict or lenient the matching algorithm is when pairing signals.
Overview
Section titled “Overview”Perfect timestamp and price matches are rare in real-world trading. Network latency, bar timing differences, and market volatility all introduce small variations. The configuration settings let you define acceptable thresholds for these differences.
The goal: Match signals that represent the same trading intent, even if they differ slightly in timing or price.
Configuration Parameters
Section titled “Configuration Parameters”Time Tolerance (Forward)
Section titled “Time Tolerance (Forward)”Max Time Difference — The maximum number of minutes an alert can occur after a backtest signal and still be considered a match.
| Setting | Default | Range |
|---|---|---|
| Max Time Diff | 5 minutes | 1-60 minutes |
How it works:
- A backtest signal at 09:30:00 with 5 min tolerance matches alerts from 09:30:00 to 09:35:00
- Alerts before the backtest signal are evaluated separately (see Backward Tolerance)
Recommendations by strategy type:
| Strategy Type | Recommended | Reasoning |
|---|---|---|
| Scalping (1-5 min) | 1-2 minutes | Precision is critical |
| Day Trading (15-60 min) | 5 minutes | Small delays acceptable |
| Swing Trading (4H+) | 15-30 minutes | Bar timing varies more |
| Position Trading (Daily) | 30-60 minutes | Daily bar close times vary |
Time Tolerance (Backward)
Section titled “Time Tolerance (Backward)”Backward Time Tolerance — How many minutes before the backtest signal an alert can occur and still match.
| Setting | Default | Range |
|---|---|---|
| Backward Tolerance | 1 minute | 0-30 minutes |
Why this matters:
- Alerts can sometimes fire slightly before the bar closes
calc_on_every_tick=truestrategies may alert before final bar confirmation- Network routing can occasionally cause out-of-order delivery
Use cases:
| Setting | When to Use |
|---|---|
0 minutes | Strict matching, alerts should never precede backtest |
1 minute | Default, allows for minor timing variations |
5+ minutes | For strategies with known early-alert behavior |
Price Tolerance
Section titled “Price Tolerance”Max Price Difference — The maximum percentage difference between backtest price and alert price for a valid match.
| Setting | Default | Range |
|---|---|---|
| Max Price Diff | 2% | 0-10% |
How it works:
- Calculated as:
|backtest_price - alert_price| / backtest_price × 100 - A 2% tolerance on a $100 stock allows ±$2 price difference
Recommendations by asset type:
| Asset Type | Recommended | Reasoning |
|---|---|---|
| Large Cap Stocks | 0.5-1% | Low volatility, tight spreads |
| Small Cap Stocks | 2-3% | Higher volatility |
| Crypto | 3-5% | Extreme volatility possible |
| Forex | 0.2-0.5% | Very tight spreads |
| Options | 5-10% | Wide bid-ask spreads |
Understanding the Matching Algorithm
Section titled “Understanding the Matching Algorithm”The analysis engine uses these tolerances in a multi-step process:
-
Time Window Filtering
Section titled “Time Window Filtering”For each backtest trade, identify all alerts within the time window:
(backtest_time - backward_tolerance) to (backtest_time + forward_tolerance) -
Price Threshold Check
Section titled “Price Threshold Check”From the time-filtered alerts, keep only those within the price tolerance:
|alert_price - backtest_price| ≤ (backtest_price × price_tolerance%) -
Best Match Selection
Section titled “Best Match Selection”If multiple alerts qualify, select the one with:
- Smallest time difference (primary)
- Smallest price difference (tiebreaker)
-
Classification
Section titled “Classification”Each backtest trade is classified as:
- Matched — Found a qualifying alert
- Missed — No alert within tolerances
Each alert is classified as:
- Matched — Paired with a backtest trade
- False Alert — No corresponding backtest trade
Impact Visualization
Section titled “Impact Visualization”Understanding how tolerance changes affect your results:
Tightening Tolerances (Lower Values)
Section titled “Tightening Tolerances (Lower Values)”| Effect | Result |
|---|---|
| ⬇️ Time tolerance | More “missed alerts” if timing varies |
| ⬇️ Price tolerance | More “missed alerts” if prices diverge |
| Overall | Higher precision, but may miss valid matches |
Loosening Tolerances (Higher Values)
Section titled “Loosening Tolerances (Higher Values)”| Effect | Result |
|---|---|
| ⬆️ Time tolerance | May incorrectly match unrelated signals |
| ⬆️ Price tolerance | May match signals from different events |
| Overall | Higher match rate, but potential false positives |
Strategy-Specific Guidance
Section titled “Strategy-Specific Guidance”For calc_on_every_tick=true Strategies
Section titled “For calc_on_every_tick=true Strategies”These strategies recalculate on every price update, which can cause:
- Alerts firing before bar close
- Multiple alerts per bar (only one survives in backtest)
Recommended settings:
- Backward tolerance: 3-5 minutes
- Time tolerance: 5-10 minutes
- Consider enabling “Ignore calc_on_every_tick” filter if available
For Market Order Strategies
Section titled “For Market Order Strategies”Strategies using market orders execute immediately, so:
- Price slippage is expected
- Time should be precise
Recommended settings:
- Time tolerance: 2-5 minutes
- Price tolerance: 2-3%
For Limit Order Strategies
Section titled “For Limit Order Strategies”Limit orders may fill at different times/prices than the signal:
- Price should match the limit price
- Time may vary significantly
Recommended settings:
- Time tolerance: 15-30 minutes
- Price tolerance: 0.5-1%
Completion Criteria
Section titled “Completion Criteria”The Analysis Configuration step is marked complete (✓) when:
- Time tolerance is set (any value > 0)
- Price tolerance is set (any value ≥ 0)
- All previous steps are complete
Once all four workflow steps show checkmarks, the “Ready to Analyze” card appears.
Best Practices
Section titled “Best Practices”- Document your settings — Note which tolerances work for each strategy
- Re-run with different settings — Compare results to find optimal values
- Match your execution style — Align tolerances with how your strategy actually trades
- Consider market conditions — Volatile periods may need looser settings
Common Issues
Section titled “Common Issues”Very Low Match Rate Despite Valid Data
Section titled “Very Low Match Rate Despite Valid Data”Cause: Tolerances too tight for your strategy’s behavior.
Solutions:
- Review specific mismatches in the Comparison Grid
- Check if time differences are consistent (might be timezone issue)
- Gradually increase tolerances and re-run
Too Many False Matches
Section titled “Too Many False Matches”Cause: Tolerances too loose, matching unrelated signals.
Solutions:
- Tighten time tolerance first (most impactful)
- Reduce price tolerance
- Review matched pairs for accuracy
Inconsistent Match Quality
Section titled “Inconsistent Match Quality”Cause: Mixed signal types with different timing characteristics.
Solutions:
- Separate analysis for entry vs. exit signals
- Filter to specific signal types
- Use different tolerances for different conditions
Related Sections
Section titled “Related Sections”- Backtesting Upload — Previous step: import trade data
- Results Summary — Understanding your analysis output
- Troubleshooting — Full troubleshooting guide