Keel Docs
Getting Started

Your First Backtest

Step-by-step guide to running your first backtest on Keel.

Your First Backtest

This tutorial walks you through creating a strategy and backtesting it against real market data.

Prerequisites

Step 1: Create a Strategy

From your dashboard, click New Strategy and give it a name.

Step 2: Add Components

Add components from the sidebar to build your pipeline. A minimal strategy needs:

  1. Data source — loads price data for your chosen instruments and timeframe
  2. Signal — generates trading signals from the data (e.g., momentum, mean reversion)
  3. Forecast scaling — normalizes signals to a consistent scale
  4. Position sizing — converts forecasts into target portfolio weights

Step 3: Connect the Pipeline

Connect the components in order. The builder validates all connections automatically — fix any errors in the problems panel before proceeding.

Step 4: Run the Backtest

  1. Click the Backtest button
  2. Set the date range (e.g., last 90 days)
  3. Click Run

Step 5: Read the Results

Your backtest report includes:

MetricDescription
Sharpe RatioRisk-adjusted return (> 1.0 is good, > 2.0 is excellent)
Total ReturnPercentage gain/loss over the period
Max DrawdownLargest peak-to-trough decline
Win RatePercentage of profitable trades
Total TradesNumber of completed round-trip trades

What's Next?

  • Experiment with different parameters and components
  • Try the CLI to build and validate strategies from the terminal
  • Deploy your strategy live when you're satisfied with the results