Skip to content
v3 redesign is live — welcome to the trading cockpit.
Market updates, stock news, and futures insights — 3x/week, freeSubscribe free
Skip to content
build.logtraders.online=2,166trades.60s=74swings.ranked=308edge.latency_ms=42ms
// educational content · not financial advice

Everything on this page is published for educational and informational purposes only. Nothing here is investment, financial, legal, tax, or trading advice, a recommendation to buy or sell any security or contract, or a solicitation of any kind. Trading futures, options, equities, and crypto involves substantial risk of loss and is not suitable for every investor. Past performance — including any backtests, demos, or examples shown — does not guarantee future results. Consult a licensed professional before acting on anything you read here.

// module · backtesting

Every backtest lies. Honest ones admit how.

Most retail traders blow up because their backtest was a curve-fit. This module shows the seven biases, the engines that catch them, the validation that approximates live, the cost model that decides whether you have edge, and the eight metrics that tell you the truth. No paywall, no upsell.

biases catalogued
7
engines compared
5
walk-forward windows
6
metrics explained
8
// 01 · seven biases

The lies your backtest tells you. Every one of them is fixable.

Each card has the bias name, what the inflated equity curve looks like, a real-world example, how to detect it, and the canonical fix. Click any row to expand.

// legend backtest claimlive reality
example

Indicator computed on the close of bar T is used to enter on the open of bar T. In live trading you cannot place an order before the close that produced the signal.

how to detect

Shift every input by one bar and re-run. If returns collapse, you had look-ahead. Backtrader/vectorbt make this trivial with `.shift(1)`.

how to fix

Compute signal on bar T, execute on bar T+1 open. Never let the same bar produce the signal AND the fill price.

// seven biases. every backtest has at least one. honest research finds all of them.

// 02 · engines

Five engines. Pick the one that matches your research style.

Filter by language or paradigm. Sort by lines-of-code or name. Honest notes on speed, accuracy, live-trading bridge, and cost. No affiliate links.

filter:
LanguageParadigmSpeedAccuracyLive bridgeWhy pick itCost
BacktraderPythonEvent-driven~50k bars/sec single-thread; slow for portfolio sweeps.Bar-by-bar event loop; honest about partial fills, commission, and order routing.Built-in: IBKR, Oanda, VC, ccxt. Maintenance has slowed since 2022.40Strategy classes feel right; ecosystem of community indicators.Free / MIT.
Custom event-driven (asyncio)PythonEvent-drivenYou control the budget. 10k–500k bars/sec depending on your hot path.Whatever you model. Most people under-model partial fills and overestimate cash availability.You build it. Same code runs in backtest and live.200Total control of order semantics, position bookkeeping, and live↔backtest code parity.Free / engineering time.
LEAN (QuantConnect)C# / PythonEvent-driven~70k bars/sec local; cloud runs scale to thousands of nodes.Production-grade order modeling: slippage, partial fills, margin, fees per broker model.First-class: IBKR, Tradier, Alpaca, Coinbase, Binance, Bybit, Bitfinex, Kraken, OANDA, Zerodha.45One codebase from backtest → paper → live across many brokers and asset classes.Free locally / Cloud tiers $0–$80/mo for research, more for live deployment + data.
vectorbtPythonVectorized100×–1000× Backtrader for parameter sweeps; uses Numba/JIT.No event loop — slippage and partial fills must be modeled explicitly. Fewer guardrails.None native. You wire your own broker layer.12Multi-dimensional parameter optimization in seconds; first-class hyperparameter heatmaps.Free (open-source) + paid `vectorbtpro`.
Zipline-reloadedPythonEvent-driven~30k bars/sec; reasonable for daily-bar US equity research.Originally Quantopian's engine; minute-level data possible but painful to set up.Limited; community-built IB/Alpaca extensions exist but are unmaintained.50Pipeline API for cross-sectional equity research is best-in-class.Free / Apache-2.0.

// LOC = lines of code for a minimal SMA-crossover strategy in that engine. Lower ≠ better.

// 03 · walk-forward analysis

Six windows. Six honest evaluations.

Train on 24 months, lock parameters, trade 6, slide forward. Repeat. The stitched out-of-sample equity curve is your honest backtest. Step through each window below.

window:
month 1month 60
train (24m)
test (6m)
in-sample (fit parameters)out-of-sample (the honest test)

Window 1 — train on months 1-24, lock parameters, trade months 25-30. This out-of-sample slice is your honest test. If it diverges from the in-sample equity curve, your strategy overfit.

// anti-pattern

A single in-sample backtest with no walk-forward is not validation — it is curve-fitting. If you cannot show six out-of-sample windows, you cannot estimate live performance.

// 04 · cost model

Where the edge dies. Move the sliders and watch.

Pick a strategy frequency, dial in realistic commission and slippage. If net Sharpe collapses below 0.5, the strategy never had edge — costs just exposed it.

net Sharpe (after costs)
1.20
gross Sharpe
1.20
100% of gross edge survives — annual cost drag ≈ 0.12%

Net Sharpe survives the cost model. Now stress-test it across regimes and confirm out-of-sample windows behave the same way.

// model is illustrative — real cost depends on order size, ADV, time of day, urgency, and venue. Never trust a backtest that assumed 0 bps.

// 05 · metrics

Eight metrics. Each one hides something the next one shows.

Sharpe alone is not enough. Sortino, Calmar, max drawdown, Ulcer, win rate, profit factor, exposure. Each card includes the formula, a good value range, what it hides, and what to pair it with.

good value

Above 1.0 net of costs; above 2.0 is excellent; above 3.0 is suspicious.

what it hides

Penalizes upside volatility the same as downside; says nothing about left-tail risk; can be high while drawdown is unsurvivable.

always pair with

Sortino (downside-only) and maximum drawdown.

// 06 · printable companion

Take the whole module offline. 36 pages. Free. No login.

The full Backtesting module — every bias, every engine note, every walk-forward window, every cost case, every metric — in one printable PDF. Same content as the web, formatted for offline study and reference.

// see the library · Module 03

This is one of six modules in the Nexural Automation curriculum. The library page maps every module, shows the dependency graph, and links the master 14-page Curriculum Index PDF.

browse the full PDF library →