lightbulbStrategy Design

This section walks you through a tactical workflow for designing a strategy that is testable, debuggable, and deployable in PredictBack.

Step-by-step workflow

  1. Pick a strategy objective

    • Decide what you’re trying to capture:

      • Trend continuation

      • Mean reversion

      • Volatility expansion / contraction

      • Passive liquidity capture

    • Define a single measurable outcome (e.g., positive expectancy with bounded drawdowns).

  2. Select your market set (regime coverage)

    • Choose 1–N related markets (same category) and include at least:

      • A trending market

      • A flat / choppy market

      • A jumpy / event-driven market

    • Goal: avoid designing only for one regime.

  3. Define the signal inputs (indicators)

    • Choose the minimum indicators needed to express the hypothesis.

    • Keep it simple first; add filters only after you see failure modes.

  4. Write explicit entry logic

    • Use either:

      • Crossover conditions for “state changes” (trend flips)

      • Compare conditions for thresholds (RSI > 65)

    • Ensure the entry rule is unambiguous.

  5. Write explicit exit logic

    • Always define exits before optimizing entries.

    • Exit types:

      • Invalidation exit (signal flips)

      • Time-based exit (hold N bars)

      • Risk exit (stop-loss)

      • Profit exit (take-profit)

  6. Set sizing + constraints

    • Configure:

      • Order size

      • Initial balance

      • Optional stop-loss / take-profit

    • Keep sizing fixed for first pass; add dynamic sizing later.

  7. Run the backtest and inspect mechanics

    • Check:

      • Trade count (too many trades = likely noise)

      • Drawdowns (path-dependence)

      • Equity curve smoothness

      • Order history (are trades firing where you expect?)

  8. Diagnose and iterate

    • Identify why it fails:

      • Overtrading in chop?

      • Late entries in trends?

      • Large losses during jumps?

    • Then adjust one variable at a time:

      • Indicator period

      • Threshold

      • Add a confirmation filter (AND)

      • Add alternative exits (OR)


Key components in PredictBack (quick mapping)

  • Price Data

    • The market(s) your strategy runs on.

  • Indicators

    • Signals computed from price (SMA, EMA, RSI, MACD, Bollinger).

  • Compare

    • Threshold logic using operators (>, <, , , =).

  • Crossover

    • Detects when A crosses above/below B.

  • AND / OR

    • Combine multiple conditions into a single decision.

  • Buy / Sell

    • Trade actions triggered when upstream logic evaluates to true.

Operator definitions

  • > greater than

  • < less than

  • greater than or equal to

  • less than or equal to

  • = equal to

How to Read Backtest Results (What to Check First)

After running a backtest, inspect in this order:

  1. Trade Count

    • Too many → noise / overfitting

    • Too few → regime dependence

  2. Max Drawdown

    • Indicates path-dependency and tail risk

  3. Cumulative PnL Curve

    • Smooth → structural edge

    • Stair-step or cliff-like → event sensitivity

  4. Order History

    • Verify trades trigger where logic says they should

    • Check for clustering or over-reaction

  5. Win Rate vs PnL

    • High win rate + low PnL → execution drag

    • Low win rate + positive PnL → convex payoff

Last updated