Strategy Lifecycle
Every phase of a strategy's journey — from a blank canvas through building, saving, backtesting, hyperparameter optimization, and finally deploying to live trading. Understand each step, every configuration option, and the critical caveats that separate backtest success from live profitability.
Toolbar Overview
The toolbar sits above the canvas and provides one-click access to every lifecycle operation. Each button has a distinct icon (described below), a keyboard shortcut where applicable, and clear enabled/disabled states. When a button is unavailable (e.g., Redo when there is nothing to redo, Backtest when the DAG has validation errors), it appears grayed out. This is your command center — learn what each button does so you can reach for it without thinking.
The toolbar is divided into two logical groups. The left group (New, Save, Load, Undo, Redo, Auto-Layout, Fit View) covers editing and file management. The right group (Backtest, Optimize) covers analysis and validation. This grouping reflects the natural workflow: build on the left, test on the right.
| Parameter | Type | Default | Description |
|---|---|---|---|
| New | Button (page/plus icon) | Ctrl+Shift+N / Cmd+Shift+N | Clears the canvas for a new strategy. If there are unsaved changes, a confirmation dialog appears: "You have unsaved changes. Discard them and create a new strategy?" Options: Discard / Cancel. Clicking Discard clears all nodes, edges, undo history, and resets the viewport. The clipboard is NOT cleared — any previously copied nodes survive the reset. |
| Save | Button (floppy disk icon) | Ctrl+S / Cmd+S | Saves the current strategy to your account. For unsaved strategies, opens the Save dialog prompting for a name (max 100 chars). For previously saved/loaded strategies, performs a quick-save — immediately overwrites the server version without opening a dialog, showing a brief checkmark animation. Triggers validateDag() before saving — errors block save, warnings do not. |
| Load | Button (folder icon) | — (no shortcut — intentional safety measure) | Opens the Load dialog showing all strategies saved to your account. Each entry shows: name, last modified date, node count, and symbol/timeframe. Includes search (substring filter), sort (by name/date), and delete (trash icon with confirmation). Loading replaces all current canvas content — prompts to save if unsaved changes exist. |
| Undo | Button (left-curving arrow icon) | Ctrl+Z / Cmd+Z | Reverts the last action. Grayed out when there is nothing to undo. A brief toast shows what was undone (e.g., "Undo: Added SMA #2"). Up to 50 steps of history. Covers: add/delete node, move node, parameter change, connection create/delete, auto-layout, paste. Does NOT cover: viewport changes, selection changes, inspector open/close. |
| Redo | Button (right-curving arrow icon) | Ctrl+Shift+Z / Cmd+Shift+Z | Re-applies the most recently undone action. Grayed out when there is nothing to redo — either no undo was performed, or a new action was taken after undoing (which clears the redo history). If you undo 3 steps and then add a node, those 3 steps are permanently gone. |
| Auto-Layout | Button (grid/organize icon) | — | Automatically arranges all nodes in a left-to-right hierarchical layout using a Sugiyama-style layered graph drawing algorithm. Nodes are positioned by DAG depth: data sources at layer 0 on the left, execution nodes on the right. Within each layer, nodes are ordered to minimize edge crossings. This is an undoable action — Ctrl+Z restores manual positioning. Save before auto-layout if you have carefully positioned nodes. |
| Fit View | Button (expand/fit frame icon) | Ctrl+0 / Cmd+0 | Pans and zooms so every node on the canvas is visible with 40px padding on each side. Calculates the bounding box of all nodes and adjusts zoom accordingly. The emergency recovery tool: use after pasting nodes off-screen, loading a strategy with mismatched viewport, or excessive panning. If Fit View shows nothing, you may have deleted all nodes — Ctrl+Z to restore. |
| Backtest | Button (play/chart icon) | — | Opens the Backtest Configuration modal. Only enabled when the strategy passes DAG validation (no blocking errors — cycles, type mismatches). Yellow warnings do NOT disable this button — they are advisory. Configure: Start Date, End Date, Starting Balance (min 100), Leverage (min 1), Slippage (min 0), Transaction Fee (min 0). Results appear in the Backtest Panel (equity curve, metrics table, trade ledger, signal components). |
| Optimize | Button (tuning knob/sparkle icon) | — | Opens the Optimization workflow. Prerequisites: (1) DAG validation passes, (2) strategy has at least one optimizable parameter, (3) account has sufficient credits. First opens the Backtest Config modal to set the evaluation conditions, then the Optimization modal with two tabs: Parameter Optimization (ranges, step sizes, toggles) and Pipeline Config (11 validation phases). Credits estimator shows cost before submission. |
Image Placeholder: Strategy Builder toolbar with all 9 buttons labeled: New (document icon), Save (floppy disk), Load (folder), Undo (left arrow), Redo (right arrow), Auto-Layout (grid), Fit View (expand frame), Backtest (play button), Optimize (tuning knob). Grayed-out states shown for Undo and Redo. A dividing line separates the editing group (left) from the analysis group (right). Each button has its keyboard shortcut noted below it.
The toolbar is always visible and communicates the current state of your session at a glance: whether there are unsaved changes (Save button appearance), whether undo/redo are available (enabled/disabled states), and whether your strategy is valid enough to backtest or optimize. Learn the iconography and shortcut associations — they are identical across every page of the Strategy Builder. Every operation you will perform, from creating a blank canvas to launching a multi-trial optimization, starts with one of these buttons.
Saving Strategies
Strategies are saved to your BitPredict user account and accessible from any device where you are logged in. There is no auto-save — you must save manually. This is by design: auto-save would record every intermediate state (including broken experiments), cluttering your strategy library and making it hard to identify meaningful versions.
The Save Dialog (First Save)
When saving a strategy that has never been saved (fresh canvas or loaded template):
- Strategy Name (required): A text field accepting up to 100 characters. This is your primary identifier in the Load dialog, in backtest reports, and on optimization results pages. Choose something descriptive: include the symbol, primary timeframe, strategy type, and key differentiator. Good: "BTCUSDT 1h SMA20/50 Crossover + RSI Filter + 2% SL." Bad: "test", "strategy 7", "final v2 really final."
- Overwrite Warning: If the strategy name matches an existing saved strategy, the dialog warns: "A strategy with this name already exists. Overwrite it?" The previous version is permanently replaced — there is no server-side version history. Use naming conventions like "v1", "v2" to maintain your own history via separate saves.
Quick Save (Ctrl+S / Cmd+S)
If the strategy was previously loaded from your account or has been saved at least once, pressing Ctrl+S (or clicking the Save toolbar button) immediately overwrites the existing version on the server. No dialog opens. The toolbar Save button shows a brief checkmark confirmation animation. This makes saving a reflex action — one keystroke, no interruption.
To create a copy under a different name (branching your strategy development), load the strategy, modify it, and use the "Save As New" option if available, or save from a fresh canvas by copy-pasting the entire graph and saving as a new name.
What Gets Saved
- All nodes: type, alias, position (x, y), every parameter value, every handle configuration, all MTF override settings.
- All edges: source node ID, source handle type, target node ID, target handle type.
- Canvas viewport: pan position and zoom level at time of save.
- Strategy metadata: created date, last modified date, version number (auto-incremented on each save).
What Does NOT Get Saved
- Backtest results: These are transient and tied to a specific backtest configuration (date range, balance, fees). After loading a strategy, re-run the backtest to see results.
- Optimization configurations: Each optimization run has its own configuration (parameter ranges, pipeline settings, objective). These are stored with the optimization job on the server, not as part of the strategy definition.
- Undo history: The undo stack starts fresh when you load a strategy. Your session's undo history is not persisted to the server.
- Clipboard contents: The internal clipboard (localStorage) is independent of strategy save/load and is not included in the saved strategy definition.
DAG Validation on Save
Clicking Save (or pressing Ctrl+S) triggers validateDag() before persisting to the server:
- Errors (red badges) block save: If the DAG has structural issues — cycles detected, incompatible handle type connections, missing required data sources — the save is blocked and errors are displayed. Fix all errors before saving. Common errors: cycle detected (node feeds back into itself), type mismatch (DATA handle connected to SIGNAL input), missing data source (no Data Source node on canvas).
- Warnings (yellow badges) do NOT block save: Unconnected input handles, indicators with no manual input selected, conditions comparing against empty inputs, orphaned nodes — these generate warnings but do not prevent saving. The strategy saves successfully and you can fix warnings later.
Image Placeholder: Save dialog with: a text input labeled 'Strategy Name' pre-filled with 'BTCUSDT 1h SMA Crossover v2', a 92/100 character counter, and a yellow overwrite warning banner reading 'A strategy with this name already exists. Overwrite it?' with Discard/Cancel buttons. Below: a diagram showing what gets saved (nodes, edges, viewport, metadata) with green checkmarks and what doesn't (backtest results, optimization configs, undo history) with red X marks.
Save is your primary defense against data loss. There is no auto-save, no draft recovery, and no server-side version history beyond the latest saved copy. Every strategy you care about should be explicitly saved — and versioned by saving checkpoints under distinct names. The validation-on-save guarantee means any strategy in your library is at least structurally valid: you will never load a strategy and find it fundamentally broken.
Quick save (Ctrl+S after the first save) overwrites without confirmation. If you make experimental changes, accidentally hit Ctrl+S, and then realize you wanted to keep the previous version, there is no undo — the server has the new version. Before making major changes, save a checkpoint under a different name (e.g., "BTC 1h Trend v2 — before refactor"). This manual versioning is your only safety net against accidental overwrites.
Loading Strategies
The Load dialog displays all strategies saved to your account. Strategies are private to your account — only you can see and load them. There is no shared, public, or team strategy library.
Load Dialog Interface
- Strategy List: A scrollable, vertically-stacked list of strategy entries. Each entry displays: strategy name (bold, primary text), last modified date (relative: "2 hours ago", "3 days ago", "Jan 15, 2026"), node count (e.g., "12 nodes" as a complexity indicator), and symbol/timeframe extracted from the data source node (e.g., "BTCUSDT | 1h"). If you have no saved strategies, the list shows an empty state: "No saved strategies yet. Build and save your first strategy."
- Search: A text input at the top of the dialog. Type to filter the list by strategy name. Filtering is case-insensitive and matches substrings, not just prefixes — searching "btc" finds "BTC 1h SMA Crossover" and "ETH-BTC Arbitrage." Results update as you type (no need to press Enter).
- Sort: A dropdown to order the list by Name (alphabetical, A-Z or Z-A), Date Created (newest or oldest first), or Date Modified (newest or oldest first). Default sort: Date Modified (newest first), so your most recently worked-on strategies appear at the top.
- Delete: Each strategy row has a trash icon on the right. Clicking it opens a confirmation dialog: "Delete [Strategy Name]? This action cannot be undone." This is permanent — deleted strategies are removed from the server and cannot be recovered. There is no trash bin, recycle bin, or undo for deletion.
Load Behavior
Clicking a strategy entry (or its Load button) triggers this sequence:
- Unsaved Changes Check: If the current canvas has unsaved modifications, a confirmation dialog appears: "You have unsaved changes. Discard them and load [Strategy Name]?" Options: "Discard and Load" (loses current canvas state) or "Cancel" (stays on current canvas).
- Full Replacement: Loading is a wholesale replacement, not a merge. All existing nodes, edges, and canvas state are cleared and replaced with the loaded strategy. You cannot load a strategy and have it combine additively with the current canvas.
- Viewport Restored: The canvas pans and zooms to the saved viewport position. If the saved viewport was at 87% zoom centered on a specific subgraph, you see that exact view.
- Undo History Cleared: The undo stack starts fresh. The Undo toolbar button is grayed out after loading. You cannot undo the load to return to the pre-load state.
- Clipboard Preserved: Your internal clipboard (localStorage) is NOT cleared by loading. Any nodes you copied before loading can still be pasted into the loaded strategy.
Strategy Privacy
All strategies are private to your BitPredict account. Other users cannot see, load, copy, or reference your strategies. If you want to share a strategy with another user, you would need to manually export the JSON definition (if an export feature is available) and have them import it. A strategy marketplace or sharing feature is a potential future enhancement.
Image Placeholder: Load dialog with: a search bar at top, a sort dropdown showing 'Date Modified (Newest)', and a scrollable list of 6 strategies. Each row shows: strategy name (bold), 'Modified 3 days ago', '14 nodes', and 'BTCUSDT | 1h'. One row is highlighted blue (selected). A trash icon on the right of each row. Below: a flow diagram showing the Load behavior sequence — check unsaved changes → replace all nodes/edges → restore viewport → clear undo history → preserve clipboard.
The Load dialog is your strategy library. Treat it like a file system: use descriptive names so you can find the right strategy in seconds, clean up old/abandoned strategies via delete, and use search+sort to quickly locate strategies when your library grows to dozens of entries. The unsaved-changes check prevents accidentally losing hours of work, but it is still your responsibility to save before loading.
Creating a New Strategy
Starting from a blank canvas. Follow this step-by-step checklist to build a strategy methodically — each step builds on the previous one, and testing at each stage catches errors before they compound into an undebuggable 30-node graph.
Starting Fresh
- Click New in the toolbar, or press
Ctrl+Shift+N(Cmd+Shift+Non Mac). - If there are unsaved changes on the current canvas, a confirmation dialog appears: "You have unsaved changes. Discard them and create a new strategy?" Click Discard to proceed or Cancel to go back and save first.
- The canvas clears completely: all nodes, edges, viewport position, and undo history are reset. The clipboard is NOT cleared — any previously copied nodes remain available to paste.
- The Node Inspector closes. The canvas toolbar buttons reset to default states (Undo/Redo grayed out).
Build Checklist: 12 Steps from Data Source to Save
- Add Data Source: Drag from the Block Library (Data Source category). Configure: Symbol (e.g., BTCUSDT), Bar Type (Spot, Perpetual, Futures), Timeframe (1m, 5m, 15m, 1h, 4h, 1d). Decide: single timeframe or enable MTF for multi-timeframe analysis. If MTF, individual nodes can override their timeframe later. This node produces a
DATA-type output handle — the root of your DAG. - Add Indicators / Patterns: Drag Indicator or Pattern blocks from the library. Configure: indicator name (SMA, EMA, RSI, MACD, etc.) or pattern name (Engulfing, Doji, Hammer, etc.), parameters (period, source price, output type). Connect the Data Source's
datahandle to the indicator's input. Rename the alias to something meaningful: "Fast MA 20" instead of "SMA #1." - Add Conditions: Drag Condition blocks. Connect indicator
valueoutputs to the condition'sleftorrightinputs. Set the operator: crosses_above, crosses_below, greater_than, less_than, equals, between, etc. Set the right side: another indicator, a fixed numeric value, a pattern signal, or a price level. The condition produces aRESULT-type boolean output. - Add Logic Gates (optional): Drag AND, OR, NOT, or XOR gate blocks. Connect condition
resultoutputs to gate inputs. AND requires all inputs true; OR requires at least one; NOT inverts; XOR requires exactly one. Gates combine multiple signals into one clean wire — prefer them over chaining conditions in series. - Add Signal Gates (optional): Drag Signal Gate blocks for timing-based signal modification: Hold (sustain a signal for N bars), Delay (wait N bars before passing), Cooldown (block re-entry for N bars after a trade closes), Pulse (emit a one-bar signal).
- Add Filters (optional): Drag filter blocks: Trend Filter (ADX-based — only trade above/below trend threshold), Volatility Filter (ATR or BB-width — only trade within volatility range), Volume Filter (only trade above volume threshold), Time Filter (only trade during specific hours/days), Regime Filter (only trade in bull/bear/ranging). Filters produce a
GATE-type boolean output. - Add Entry Node(s): Drag Entry Long (green) and/or Entry Short (red) blocks from the Execution category. Connect condition/logic
resultoutputs to entry condition inputs (cond-0throughcond-4). Connect filtergateoutputs to entry filter inputs (filter-0throughfilter-4). Configure: combination mode (how multiple cond-N inputs combine), position sizing. - Add Exit Node(s): Drag Exit blocks. Configure exit types: Signal Exit (connect a condition result to trigger exit on a signal) and/or Risk Management Exit (stop-loss %, take-profit %, trailing stop %, time-based exit in bars). Set "applies_to" to specify which entry nodes this exit covers. Always add at minimum a Risk Management exit with a stop loss.
- Connect Everything: Verify the data flow: Data Source → Indicators/Patterns → Conditions → Logic Gates → Entry. Plus: Filters → Entry (filter inputs). Plus: Conditions → Exit (signal). Every node's input handle should be connected or have a manual value. Yellow warning badges indicate unconnected handles.
- Validate: DAG validation runs automatically. Check for red badges (blocking errors — cycles, type mismatches) and yellow badges (warnings — unconnected inputs, missing configurations). Fix all red errors. Investigate all yellow warnings.
- Backtest: Click Backtest, configure the date range/balance/fees, and run. Review the equity curve, metrics, and trade ledger. If zero trades: check condition operators and thresholds. If poor results: iterate on parameters and logic. Build incrementally — test after every 2-3 new nodes.
- Save: When satisfied (or at a logical checkpoint), save with a descriptive name: "BTCUSDT 1h SMA20/50 Crossover + RSI Filter + 2% SL." The strategy is now in your library, ready to load, modify, backtest, or optimize later.
Template Strategies (If Available)
The Load dialog may include template/example strategies — pre-built, validated strategies demonstrating common patterns: SMA Crossover, RSI Mean Reversion, MACD Signal Line Crossover, Bollinger Band Breakout, MTF Trend Confirmation. These are read-only on the server (you cannot overwrite them). Loading a template and modifying it is often faster than building from scratch: the connections, parameters, and DAG structure are already correct. You simply adapt the specifics to your trading idea and save as a new strategy under your account.
Image Placeholder: Empty canvas with a subtle overlay: 'Start by dragging a block from the Block Library.' On the right, the 12-step build checklist shown as a vertical numbered list with small checkmark icons. An inset shows the Block Library panel with the Data Source block highlighted. A second inset shows a simple completed DAG: Data Source → two Indicators → Condition → Entry Long → Exit.
The most common beginner mistake is building a complex 20-node strategy without ever running a backtest, then discovering it produces zero trades — with no clue which node is the problem. Build incrementally: after adding Data Source + 1 Indicator + 1 Condition + Entry, run a quick backtest (short date range). If it trades, add complexity one piece at a time, testing after each addition. If it does not trade, you know the problem is in those 4 nodes — far easier to debug than 20. Also, do not skip the Exit node. A strategy with only an Entry and no Exit relies entirely on opposing entry signals to close positions, giving you zero control and potentially holding positions indefinitely through adverse price moves.
Backtesting
Backtesting runs your strategy against historical price data to simulate how it would have performed in the past. The backtest engine executes on BitPredict's servers — not in your browser — so it can handle multi-year date ranges, 1-minute bar granularity, and complex DAGs with dozens of indicators without freezing your tab.
Backtest Configuration Modal
Click the Backtest toolbar button to open. Every field is validated before submission. Here is each field in detail:
| Parameter | Type | Default | Description |
|---|---|---|---|
| Start Date | Date (calendar picker) | — (required) | Beginning of the backtest period. Must be on or after the minimum available data date for the symbol/timeframe. For BTCUSDT 1h, data typically starts ~2017. Earlier dates = more historical context but longer computation. For a meaningful sample, start at least 6 months back — this gives enough trades for statistical significance (>30 minimum, >100 recommended). |
| End Date | Date (calendar picker) | — (required) | End of the backtest period. Cannot be in the future. Must be strictly after Start Date (minimum 1 day). The backtest processes data up to and including this date. Tip: end at least 1-2 weeks before "today" to avoid partial/incomplete recent bars that can produce edge-case behavior. |
| Starting Balance | Number (USDT) | 10,000 | Initial virtual capital. Minimum: 100. Choose a realistic amount matching your intended live trading capital. Higher balances reduce position-size rounding artifacts. Example: with $1,000, a 0.01 BTC position at $60,000 = $600 (60% of account). With $10,000, the same position = 6% — more realistic for position sizing. |
| Leverage | Number | 1 | Trading leverage multiplier. 1 = spot (no leverage, 1:1). 2-100 = leveraged. Higher leverage amplifies returns AND drawdowns proportionally. A 5% adverse price move with 10x leverage = 50% loss. Be realistic — most professional algo strategies use 1-5x. Values you would never use in live trading produce misleading backtest results. |
| Slippage | Number (percentage) | 0.05 | Simulated slippage as percentage of trade value. 0.05 = 0.05% (5 basis points). Accounts for signal-to-fill price difference. Recommended: BTC/ETH (high liquidity) 0.02-0.05%, mid-cap altcoins 0.05-0.2%, low-cap 0.2-0.5%. Applied to both entry and exit. Example: $1,000 BTC trade with 0.05% slippage = $0.50 per side, $1.00 round-trip. |
| Transaction Fee | Number (percentage) | 0.1 | Exchange fee as percentage. 0.1 = 0.1% (10 bps) — typical for spot. Perpetual futures: 0.02% maker / 0.06% taker. Applied to both entry and exit (2x per trade). Minimum: 0 (unrealistic — always set a real value). Combined with 0.05% slippage, total round-trip cost = 0.3% per trade. A strategy with 0.5% average profit per trade loses 60% of its gross edge to costs. |
Validation Rules
- Start Date is not before the minimum available data date for the symbol/timeframe.
- End Date is not in the future.
- End Date is strictly after Start Date.
- Starting Balance is at least 100.
- Leverage is at least 1.
- Slippage is at least 0.
- Transaction Fee is at least 0.
- The DAG passes validation (no blocking errors).
Failed validation highlights the offending field in red with a specific error message. The Run button remains disabled until all errors are resolved.
The Backtest Panel
After submitting, the backtest runs on BitPredict's servers. A loading spinner indicates progress. When complete, the Backtest Panel slides up from the bottom. It contains four sections:
1. Equity Curve (Interactive Chart)
- Line chart of cumulative account value over time. X-axis: dates. Y-axis: USDT value.
- Drawdown shading: Regions below the previous equity peak are shaded in red/pink — visually highlights all drawdown periods.
- Interactive: zoom (drag to select region), pan (drag chart), hover (tooltip with exact date and value).
- Optional benchmark line: dashed gray buy-and-hold line for comparison. If your strategy underperforms buy-and-hold, ask whether active trading adds value.
2. Metrics Table
Comprehensive performance statistics with concrete interpretation thresholds:
| Parameter | Type | Default | Description |
|---|---|---|---|
| Total Return % | Percentage | — | (Ending - Starting) / Starting x 100. Example: $10,000 to $13,500 = 35%. Context: 35% over 3 months is exceptional; 35% over 3 years is modest (~10.5% annualized). |
| CAGR | Percentage | — | Compound Annual Growth Rate: (Ending/Starting)^(1/years) - 1. Normalizes return to an annual figure. More useful than Total Return for comparing strategies with different backtest lengths. |
| Sharpe Ratio | Number | — | Risk-adjusted return. >1.0 = good. >2.0 = excellent. >3.0 = suspicious — investigate for look-ahead bias or overfitting. <0.5 = likely not viable. Negative = loses money vs risk-free rate. A Sharpe of 1.5 with 100 trades is more meaningful than 2.0 with 10 trades. |
| Sortino Ratio | Number | — | Like Sharpe but only penalizes downside volatility. Higher Sortino relative to Sharpe = "clean" returns from steady upside, not volatile swings. A Sortino >2.0 is very good. |
| Calmar Ratio | Number | — | CAGR / Max Drawdown %. Answers "how much pain per unit of gain?" >1.0 is decent; >2.0 is strong. A strategy with 50% CAGR and 40% Max DD (Calmar 1.25) may be less attractive than 25% CAGR and 10% Max DD (Calmar 2.5). |
| Max Drawdown % | Percentage | — | Largest peak-to-trough decline. <10%: very low risk. 10-20%: acceptable. 20-30%: high risk, requires conviction. 30-50%: very high — most traders cannot hold through this. >50%: strategy is essentially broken or over-leveraged. |
| Win Rate % | Percentage | — | Trend following: typically 35-45% (many small losses, fewer large wins). Mean reversion: 55-65%. Scalping: 60-80%. Win rate alone is meaningless — a 30% win rate with 5:1 reward/risk is highly profitable. Above 70% combined with low profit factor suggests cutting winners short. |
| Profit Factor | Number | — | Gross Profit / Gross Loss (absolute). >1.5 = decent. >2.0 = strong. >3.0 = very strong (check for overfitting). 1.0-1.5 = marginal — edge may disappear in live trading. <1.0 = losing strategy. A profit factor of 2.0 with 500 trades is reliable; 2.0 with 10 trades is not. |
| Total Trades | Integer | — | Minimum for statistical meaning: 30. Preferred: 100+. A strategy with 5 trades over 2 years is meaningless regardless of metrics — insufficient sample size. |
| Best / Worst Trade | USDT / % | — | If one trade accounts for >30% of total profits, the strategy is fragile — remove that one outlier and performance collapses. A single catastrophic loss wiping out months of gains suggests inadequate risk management. |
3. Trade Ledger
A paginated, sortable table of every individual trade. Columns: Entry Time, Exit Time, Direction (Long/Short), Entry Price, Exit Price, P&L (USDT), P&L %, Bars Held, Exit Reason (Signal Exit, Stop Loss, Take Profit, Trailing Stop, Time Stop, Forced Close). Click column headers to sort. Scan for anomalies: trades with unrealistic holding periods, exit reasons mismatched with your configuration, or P&L values inconsistent with price movements.
4. Signal Components (Per-Node Contribution)
Shows what each node computed at every bar and which trades it contributed to. If a Condition node shows "0 trades triggered" over the entire backtest, it is either misconfigured or too restrictive. This per-node traceability lets you trace any trade back through the DAG to see exactly which conditions fired — the debugging superpower of the visual approach.
Image Placeholder: Backtest Configuration modal with all fields filled: Start Date (Jan 1, 2025), End Date (Jun 30, 2025), Starting Balance ($10,000), Leverage (1), Slippage (0.05%), Transaction Fee (0.1%). A blue 'Run Backtest' button at the bottom. Preview inset of the Backtest Panel: upward-sloping equity curve with red drawdown shading, a metrics summary card showing Sharpe 1.8, Max DD 12%, Win Rate 48%, Profit Factor 1.9, 87 trades.
The backtest is your primary truth-teller. It does not care about your confidence in the strategy, how elegant the logic is, or how many hours you invested. It reports what actually happened — or would have happened — given your assumptions. Learn to value negative backtest results: every failed hypothesis filtered out here saves you from losing real money in live trading. Honest configuration (realistic costs, sufficient date range, matching your actual capital) is essential — a backtest with zero slippage and zero fees is a fantasy, not a forecast.
A backtest with a Sharpe of 3.5, 85% win rate, and zero losing months over 2 years is almost certainly overfit. Real markets do not produce such smooth returns. Common causes: look-ahead bias (using future data in past indicators), survivorship bias, too many parameters relative to the number of trades, or unknowingly optimizing on the same data used for testing. The Optimization pipeline's holdout test, walk-forward validation, and Monte Carlo simulation exist specifically to catch this. Approach perfect backtests with deep skepticism.
Optimization
Optimization uses Tree-structured Parzen Estimator (TPE) — a Bayesian optimization algorithm — to systematically search your strategy's parameter space for the combination that maximizes your chosen objective metric. Instead of manually testing RSI periods of 10, 12, 14, 16, 18, and 20 (and every combination with SMA lengths, ADX thresholds, etc.), you define ranges, and the optimizer intelligently explores the most promising regions of the parameter space.
Access & Prerequisites
- Click Optimize in the toolbar.
- Prerequisites: (1) DAG validation passes (no blocking errors). (2) Strategy has at least one optimizable parameter (numeric indicator periods, threshold values, etc. — fixed fields like symbol or bar type are not optimizable). (3) Your account has sufficient credits.
- The Backtest Configuration modal opens first — set your evaluation conditions (same fields as Step 4).
- After confirming, the Optimization modal opens with two tabs.
Tab 1 — Parameter Optimization
- Search Breadth Presets:
- Low (75-125%): Narrow search around current values. For fine-tuning an already-good strategy. Example: RSI period 14 → explores 10-18. Fastest, cheapest.
- Medium (50-150%): Balanced. Good default for most optimizations. RSI period 14 → explores 7-21.
- High (0-200%): Wide exploratory search. RSI period 14 → explores 1-28. Slowest, most credits.
- Node Parameters: All optimizable parameters grouped by category (Indicators, Classifiers, Conditions, Entries, Filters, Risk Management). Each parameter row shows: name, current value, a dual-handle range slider (drag min/max), a step size input (e.g., step=2 tests 10, 12, 14...), and an enable/disable toggle. Only enabled parameters are optimized; disabled ones stay fixed.
- Live Combination Count: Updated in real time as ranges and step sizes change. Shows estimated unique combinations (e.g., "~2,500 combinations"). The actual number of trials evaluated is capped by the
n_trialssetting in Tab 2, regardless of how many theoretical combinations exist.
Tab 2 — Pipeline Config (11 Validation Phases)
Each phase can be independently enabled/disabled. Disabling phases reduces credit cost but also reduces robustness — you are trading thoroughness for speed.
- Data Splits: Train/Val/Holdout ratios (default 70/15/15). Data is split chronologically, not randomly, to respect temporal order. The holdout data is NEVER seen during training — it is the ultimate honesty check.
- TPE Search: n_trials (typically 50-500), optional timeout, and objective mode: Single Metric (e.g., maximize Sharpe), Weighted Multi-Metric (e.g., 50% Sharpe + 30% Profit Factor + 20% -Max DD), or Multi-Objective with NSGA-II (Pareto frontier — find solutions where no metric can improve without worsening another).
- Multiple Testing Correction: Adjusts for the statistical reality that testing many parameter combinations increases the chance of finding a "good" result by random chance. Methods: Deflated Sharpe Ratio (recommended), Bonferroni (conservative), Benjamini-Hochberg (controls false discovery rate).
- Sensitivity Analysis: Perturbs each optimized parameter slightly (e.g., +/- 5-10%) and re-evaluates. A robust strategy should maintain performance under small perturbations. If changing RSI period from 14 to 15 cuts Sharpe in half, the optimization found a fragile local peak, not a robust solution.
- Noise Injection: Adds small multiplicative noise to price data to simulate market microstructure randomness. Tests whether the strategy's edge comes from genuine patterns or from fitting to noise. If 0.1% noise crashes performance, the strategy is likely overfitting to exact historical ticks.
- Regime Consistency: Partitions the backtest into market regimes (Bull, Bear, Range-bound, Transition) and checks performance in each. A strategy that only works in bull markets is a bull market detector — not a robust trading system.
- Synthetic Data Testing: Generates synthetic price series with similar statistical properties (returns distribution, volatility clustering) via block or stationary bootstrap. If the strategy finds "patterns" in random synthetic data, it is fitting to noise.
- Temporal Stability: Evaluates on sliding time windows. Consistent Sharpe/Max DD across windows = temporally stable. Erratic performance, with great results in some windows and terrible in others = likely overfit to specific periods.
- Walk-Forward Validation: The gold standard. Trains on older data, validates on the next contiguous out-of-sample window. Uses purging (removing overlapping data) and embargoing (inserting gap between train/test) to prevent data leakage. Multiple windows show the distribution of out-of-sample performance.
- Monte Carlo Simulation: Reshuffles trade sequences thousands of times. If 95%+ of random trade orderings are profitable, the edge is likely real. If only 40% are profitable, performance may be a fluke of fortunate trade ordering.
- Holdout Test: Final evaluation on completely unseen data. Define gates: minimum Sharpe, minimum trades, maximum drawdown on holdout. Trials that fail the holdout are rejected regardless of how good they looked on training data. Pass = evidence of genuine out-of-sample predictive power.
Credits Estimator
A live estimate at the bottom of the Optimization modal shows:
- Estimated Time: Computed from date range (number of bars) x number of TPE trials x enabled pipeline phases x MTF complexity factor. Example: "Estimated: 12 minutes."
- Credits Required: 1 credit per 3 minutes of estimated computation time, rounded up, minimum 1. Example: 12 minutes = 4 credits. A wide search (High breadth, 200 trials, 7 phases) on 2 years of 1h data may cost 15-30 credits. A narrow search (Low breadth, 50 trials, 3 phases) on 6 months of 4h data may cost 2-5 credits.
- Your Balance: Current credit balance. If insufficient, the Run button is disabled and a message directs you to acquire more credits.
Submitting & Viewing Results
Click Run Optimization to submit. The job is queued on BitPredict's servers. You do NOT need to keep the browser open. Monitor from the Optimizations page (/optimizations):
- See all optimization jobs with status (Queued, Running, Completed, Failed), progress (N/M trials), elapsed time, and credits consumed.
- View all trials ranked by the objective metric, each with pass/reject status for every pipeline phase (green checkmark = passed, red X = rejected).
- Drill into any trial for full analytics: equity curve, trade ledger, signal components, sensitivity surface (how performance varies with each parameter), Monte Carlo distribution histogram, regime breakdown pie chart, walk-forward window performance table.
- View the exact configuration that produced each trial (parameter values, backtest settings, pipeline settings) via the Configs modal.
- Apply the best trial's parameters directly to your canvas (updates all node parameters to the optimized values).
- Save ML models (Classifier/Regressor nodes) for reuse in other strategies.
Image Placeholder: Optimization modal: Tab 1 (Parameter Optimization) showing Search Breadth preset dropdown (Medium selected), parameter groups (Indicators: SMA period range 10-50 step 5, RSI period 7-21 step 1, MACD fast 8-20 step 2) with dual-handle sliders and enable/disable toggles. Live combination count: '~3,400 combinations.' Tab 2 (Pipeline Config) showing all 11 phases as toggle cards: Data Splits (70/15/15), TPE Search (100 trials, Sharpe), Sensitivity Analysis, Noise Injection, Regime Consistency, Synthetic Data, Temporal Stability, Walk-Forward, Monte Carlo, Holdout — with checkmarks on enabled phases. Credits estimator: 'Est. 12 min | 4 credits | Balance: 42 credits.' Blue 'Run Optimization' button.
Optimization is not a "find the magic parameters" button — it is a systematic search through a defined parameter space with rigorous validation to separate genuine edges from statistical flukes. The pipeline phases exist specifically to reject overfit solutions. A trial that passes walk-forward, Monte Carlo, and holdout has survived a gauntlet designed by quantitative researchers. Begin with a simple setup: Medium breadth, 50-100 trials, 3-4 key phases (Data Splits, TPE Search, Walk-Forward, Holdout). If the best trials fail the holdout, the problem is likely the strategy concept, not the optimization settings. Fix the concept before spending more credits.
More phases and more trials do not automatically produce better results. A 500-trial optimization with all 11 phases enabled over 1 year of data can cost 30-50+ credits and still produce overfit results if the underlying strategy concept is unsound. The optimizer finds the best parameters FOR YOUR HISTORICAL DATA — it cannot tell you whether your strategy logic is fundamentally flawed. If walk-forward and holdout consistently reject all trials, go back to Phase 1 (Development) and reconsider your strategy's core thesis.
From Backtest to Live
The journey from a strategy concept to live trading with real capital is a structured, 5-phase process. Each phase progressively de-risks the strategy. Skipping phases is the most common reason algorithmic traders lose money — backtests are optimistic by nature, and only live execution reveals the true performance gap.
Phase 1: Development
Strategy Builder — Build, Backtest, Iterate
- Build the strategy DAG in the visual editor.
- Run quick backtests with short date ranges (1-3 months) to validate the core idea.
- Iterate rapidly: change a parameter, backtest, review. The tight feedback loop is your advantage.
- Once the concept shows promise (positive Sharpe on training data, >30 trades), move to Phase 2.
- Goal: A plausible strategy with positive expected value on historical data — not optimized, not validated, just "this idea has merit."
Phase 2: Validation
Optimization Pipeline — Optimize, Walk-Forward, Monte Carlo, Holdout
- Run hyperparameter optimization to find the best parameter set.
- Review walk-forward: does the strategy work consistently out-of-sample across multiple time windows?
- Check Monte Carlo: if 95%+ of random trade-sequence reshuffles are profitable, the edge is likely real.
- Verify holdout: the strategy MUST pass the final unseen data test. If it fails, iterate on the concept or accept the idea does not work.
- Examine regime consistency: a strategy that only works in 2023's bull market is fragile.
- Check sensitivity: small parameter perturbations should not crash performance.
- Goal: A robust, validated strategy with evidence of out-of-sample predictive power and acceptable risk metrics.
Phase 3: Paper Trading
Virtual Accounts — Live Data, Simulated Capital
- Deploy the optimized strategy to a virtual (paper trading) account.
- Runs on live market data with simulated capital — real prices, real latency, simulated fills, no financial risk.
- Run for a minimum of 2-4 weeks. Less than 2 weeks cannot capture different market conditions (weekday vs weekend, high vs low volatility, news events).
- Compare live paper performance against backtest: Is live Sharpe within 30-50% of backtest? Is win rate similar? Is drawdown consistent? Are trades firing at expected frequency?
- Watch for red flags: slippage worse than configured, signals at wrong times (timestamp issues), regime drift from backtest period.
- Goal: Real-world confirmation the strategy behaves as expected on live data with real-world execution constraints.
Phase 4: Small Live (Recommended)
Minimal Capital — Verify Execution
- Deploy to a real exchange account with minimal position sizes — the smallest the exchange allows (e.g., 0.001 BTC). The goal is execution verification, not profit.
- Run for 1-2 weeks.
- Verify: fill rates (are limit orders filling?), actual vs expected slippage (compare executed prices to signal prices), latency (delay between signal and order submission), exchange downtime (any missed trades?).
- Compare small live vs paper trading — any discrepancies? Paper trading often shows optimistic fills because it ignores order book depth.
- Goal: Proof the strategy operates correctly with real money, fees, and liquidity — at a scale where losing everything costs pocket change.
Phase 5: Full Live
Production — Scale Up, Monitor, Maintain
- Scale up to full position sizes gradually — double size every few days as confidence builds.
- Enable alerts (Telegram, Discord, Slack) for trade notifications, error conditions, and drawdown thresholds.
- Define a kill switch before deploying: Write down objective criteria for pausing/stopping:
- Drawdown exceeds 20% from peak (or 2x backtest max drawdown).
- Win rate over last 20 trades drops below 25%.
- 5-7 consecutive losing trades.
- Rolling 30-day Sharpe drops below 0.5.
- Exchange reports abnormal conditions (maintenance, extreme volatility).
- Monitor daily (not obsessively): P&L, drawdown, trade frequency, error logs.
- Keep a trading journal: note observations, manual interventions, anomalies.
- Re-optimize every 3-6 months with latest data. Do NOT re-optimize after every losing week — that is curve-fitting to noise.
Critical Caveats
Backtest does not equal live. Backtests assume perfect execution at signal price minus configured slippage. Live trading adds: network latency (50-500ms), partial fills (order book depth limits), exchange downtime (scheduled and unscheduled), and liquidity constraints (large orders move the market). As a rule of thumb, expect live performance to be 20-50% worse than backtest. If your backtest Sharpe is 1.5, a live Sharpe of 0.8-1.2 is realistic. If you NEED a backtest Sharpe of 3.0+ to feel comfortable, you are setting unrealistic expectations.
Overfitting is the #1 killer of live strategies. A strategy with 30+ optimizable parameters, optimized over 1 year of data with 500 TPE trials, can achieve a backtest Sharpe of 4.0 and lose money from day one of live trading. The mathematical reason: with enough parameters, you can fit any finite dataset perfectly — but you are fitting noise, not signal. The pipeline phases (walk-forward, Monte Carlo, holdout) exist to catch this. If the best trials consistently fail the holdout, reduce complexity, increase data, or try a different approach.
- Regime Changes Are Inevitable: Markets are non-stationary — the statistical properties that held in 2023 may not hold in 2025. A breakout strategy that worked in a trending market gets chopped in a range-bound one. The Regime Consistency phase tests for this, but only on historical regimes. Be mentally prepared to pause or retire strategies when market conditions change.
- Position Sizing Matters: Backtests assume infinite liquidity at the signal price. In live trading, position size is limited by: available margin (exchange margin requirements), max order limits, and market depth. A $500,000 BTC trade is trivial; the same size in a low-cap altcoin may move the price 5-10%. For large positions, use TWAP execution (split across multiple smaller orders over time).
- Always Use a Stop Loss: Even with sophisticated exit logic, always have a hard stop loss via the Risk Management exit node. This is insurance against black swans, flash crashes, and exchange outages. A stop loss is not a trading strategy — it is a safety net. Set it at 1.5-2x the Average True Range (ATR) of your timeframe as a starting point.
- Correlation Risk: Running multiple strategies on correlated assets (BTCUSDT, ETHUSDT, SOLUSDT) multiplies exposure to market-wide drawdowns. When BTC drops 20%, correlated altcoins often drop 25-30%. Diversify across genuinely uncorrelated assets and strategy types (trend-following + mean-reversion + options-based).
- Costs Compound Relentlessly: Slippage (0.05%) + fee (0.1%) = 0.15% per side, 0.3% round-trip. A strategy making 5 trades per day pays ~1.5% daily in costs. Over 250 trading days: 375% annual cost drag. Calculate your expected annual costs: trades_per_year x round_trip_cost_pct. If this exceeds your expected annual return, the strategy cannot survive.
Image Placeholder: Five-phase lifecycle diagram as a horizontal flowchart with arrows connecting each phase: Phase 1 'Development' (gear icon) → Phase 2 'Validation' (shield/checkmark icon) → Phase 3 'Paper Trading' (document/magnifying glass icon) → Phase 4 'Small Live' (seedling/dollar icon) → Phase 5 'Full Live' (rocket/stack of coins icon). Below each phase: key activities, timeframes, and goals. A red 'Kill Switch' callout at Phase 5 with the 5 criteria. Warning badges: 'Backtest ≠ Live', 'Overfitting Risk', 'Regime Changes', 'Always Use Stop Loss', 'Costs Compound.' A feedback arrow from Phase 5 looping back to Phase 1: 'Re-optimize every 3-6 months.'
The lifecycle exists because the cost of failure increases exponentially at each stage: Phase 1 failure costs time. Phase 2 failure costs credits. Phase 3 failure costs nothing (simulated capital). Phase 4 failure costs pocket change. Phase 5 failure can cost your entire account. Each phase catches a different class of failure that earlier phases cannot detect. A freshly optimized strategy deployed directly to full live carries all the undetected risks from Phases 3 and 4 — execution failures, latency issues, and exchange-specific problems that no backtest can reveal. Respect the lifecycle. It exists to protect your capital.
The most dangerous psychological trap: a strategy passes backtest and optimization with impressive metrics, so you deploy directly to full live. You skip paper trading ("it is just simulated") and small live ("the backtest is perfect"). Then you discover the exchange API has 500ms latency, your signals fire on bars that already closed, slippage is 3x your assumption, and you lose 20% in the first week. The phases exist for a reason. No backtest replicates live execution conditions. Paper trading is not optional — it is your cheapest opportunity to discover execution failures before they cost real money.