Skip to content
Coming next5 planned lessons

Module 04

Turning a Setup into Rules

Translating a discretionary setup into unambiguous entry, exit and sizing rules that code can execute and a backtest can measure.

What you will be able to do

  • Rewrite a discretionary setup as yes/no conditions computed only from past data.
  • Define stops, targets, time exits and position sizing as code.
  • Structure a strategy as a function that turns bars into signals.
  • Keep a versioned rule document in step with the code.

Planned lessons

  1. 1

    From chart idea to testable statement

    Removing words like "strong" and "near" until every condition can be computed.

    Coming next

  2. 2

    Entry and exit rules

    Signals, stops, targets and time exits written as explicit code.

    Coming next

  3. 3

    Position sizing as a rule

    Fixed fractional risk, volatility-based sizing, and hard caps.

    Coming next

  4. 4

    A strategy as a function

    Structuring rules as a signal function that a backtester — and the Lab — can call bar by bar.

    Coming next

  5. 5

    Versioning your rules

    Keeping the rule document, the change log and the code saying the same thing.

    Coming next