Running a Backtest ================== A **backtest** simulates how your strategy would have performed on historical price data. It's the core feature of Quantlens — run as many times as you need to refine your strategy. ---- Settings Panel -------------- Before running, configure the backtest in the **right-side Settings panel**: .. list-table:: :header-rows: 1 :widths: 30 70 * - Setting - Description * - **Market** - The asset to backtest (e.g. BTC/USD, ETH/USD, SPY). 8 markets included in all plans. * - **Timeframe** - Candle interval: 1 min, 5 min, 15 min, 1 hour, 4 hour, 1 day. * - **Date range** - Start and end date of the historical test period. * - **Initial capital** - Starting account size in USD (default: $10,000). * - **Commission** - Trading fee per trade, e.g. ``0.1%`` for a typical crypto exchange. * - **Slippage** - Price impact per trade. Leave at ``0`` for a clean baseline. ---- Launching the Backtest ----------------------- 1. Configure your settings (above). 2. Click the **▶ Run Backtest** button in the top toolbar. 3. A progress indicator will appear — most backtests finish in 2–10 seconds. 4. Results load automatically in the **Results** panel below the canvas. .. note:: Bronze plan: 50 backtests/month. Silver: 200/month. Gold: unlimited. The counter resets on the 1st of each month. ---- Optimiser (Silver & Gold) -------------------------- The **Walk-Forward Optimiser** (coming soon on Silver) lets you automatically test thousands of parameter combinations and find the most robust settings. .. warning:: Optimising too aggressively leads to **overfitting** — a strategy that looks great historically but fails in live trading. Always validate on an out-of-sample period. ---- Saving Results -------------- After a run completes you can: - **Export PDF Tearsheet** — a formatted report with all metrics and charts. - **Export CSV** — raw trade log (entry, exit, P&L per trade). - **Save Snapshot** — bookmark the current result to compare against future runs.