Skip to getting started

Algo Backtesting / Getting started

Your strategy.
Put to the test.

Turn a trading idea into a Python strategy. Test it on historical data, explore its parameters and see how it holds up beyond the first good result.

Professional account · Windows x64 · Local Engine

Your toolkit

Two things to get started.

Install the engine. Give your AI assistant the strategy guide.

Windows x64 · MSI

Scruffy Local Engine

The companion app that runs your strategies, prepares historical data and does the backtesting and optimisation on your computer.

Installer coming soon

The installer is being prepared. You can read the guide and create your strategy now.

AI assistant guide · Markdown

Give your LLM the right instructions

A downloadable brief for ChatGPT, Claude, Codex or another coding assistant. It explains our Python SDK, the backtest loop and how to expose parameters for optimisation.

Attach the file to your AI conversation, then describe your strategy in plain English.

Getting started

From idea to first backtest.

Start with a simple strategy and a small date range.

  1. 01

    Install and connect the Local Engine

    When the installer is available, download and run it on your Windows computer. It includes the runtime; you do not need to install Python separately to run backtests. Launch Scruffy Local Engine from the Start menu, choose Connect to Scruffy Markets and follow the pairing steps in your signed-in browser.

    In the workspace, check that Local Engine status shows Connected. If the engine is already installed, open it and use the connection actions shown there.

    Open engine connection
  2. 02

    Write your rules. Create your script.

    Download the LLM guide above and attach it to your coding assistant. Describe the market and time frame, entry and exit conditions, position size, session rules and the inputs you want to optimise. Ask for a single .py file using the Scruffy Python SDK.

    A prompt to start with

    “Using the attached Scruffy guide, create a Python strategy for [market] on [time frame]. Enter when [entry rule]. Exit when [exit rule]. Limit risk by [risk rule]. Expose [inputs] for optimisation. Explain any assumptions and how I can check the behaviour.”

    Review the generated code and save it as a .py file. Make sure it declares adjustable inputs and contains the engine entry point described in the guide.

  3. 03

    Choose your market and attach the strategy

    Open New backtest. Choose an Asset, Time frame and a published From / To date range. Attach your .py script and set the Starting balance (USD). Check the run summary before starting.

    The engine downloads missing authorised history when needed. Your first run needs internet access to prepare that data.

    Configure a backtest
  4. 04

    Run it and check the baseline

    Select Run backtest and follow the progress through strategy attachment, data preparation and execution. Once it completes, open Results and inspect the trades, equity curve, drawdown and reported costs.

    Check that entries and exits match your rules before optimising. No trades or unexpected behaviour usually mean the script or test settings need another look. A completed baseline is required for optimisation.

Explore your inputs

Make the next test count.

Optimise from a completed baseline using the same strategy and test context.

01

Choose what can change

In a completed result, select Optimise this strategy. Enable the declared inputs you want to explore and set sensible minimums, maximums and steps. Leave other inputs fixed. You need at least two valid combinations.

02

Set the goal and start

Review the optimisation goal and search size. Choose Fast genetic to explore a larger range or All combinations to test every valid combination. Select Run optimisation locally. The engine manages workers and stopping rules.

03

Review the candidates

Follow progress in Running, then compare candidates in Review. Inspect their trades, profit, drawdown and consistency. Use a promising result to explore other variables or prepare a fresh backtest with its settings.

Before you trust a result

Keep some history out of the search.

Choose an earlier range for development and optimisation, and keep a later range untouched. Re-run your chosen parameters on those unseen dates. Compare trade behaviour, costs and drawdown with the original result.

Look for stable results across nearby parameter values, enough trades to judge the behaviour, and performance that survives realistic costs. Algo Grade and Robustness Confidence are research signals, not guarantees.

A little help

Before your first run.

Do I need a Professional account?

Yes. Backtesting, dataset authorisation and optimisation require Professional access. You can read this guide and download the LLM instructions before connecting an engine.

Where does my strategy run?

On your Windows computer through the Local Engine. The engine owns execution; closing the browser does not move a job to the cloud. Keep the engine running and the computer awake while a job is active.

Does my Python script get uploaded?

Attaching a file sends it to your Local Engine. Saving the script to your private cloud library is an optional, separate action. Saving a result to cloud stores a compact summary; full trade and chart detail remains local.

The engine is not connected. What should I do?

Open Scruffy Local Engine from the Start menu and return to the workspace. Use its connection or re-pairing action. If it still cannot connect, open Tools & settings → Local engine and follow the recovery or diagnostics actions shown for your status.

Why can’t I start optimisation?

Complete a baseline backtest first and select Optimise this strategy in its results. Your script must declare optimisable parameters, and the selected ranges must produce at least two valid combinations. Changing the attached script requires a new baseline.

Can I use it offline?

Preparing new history, pairing and renewing authorisations require internet. Eligible runs can use already prepared data while the required entitlement, dataset authorisation and cache remain valid. Check the workspace status before starting.

Ready for your first baseline?

Open the workspace and start with one strategy, one market and a manageable date range.

Open backtesting workspace