Just The Markets

Free course · Stock Trading · Intermediate

Rules First, Money Later: Test a Trading Strategy

A free course for traders who want to test a trading strategy before funding it. It starts with rules exact enough to backtest and ends with the first small live trades.

AI-assisted, reviewed by the Just The Markets human editor: John Todora → About 53 minutes Free, no sign-up

Who it is for

Traders with a stock trading idea they want to test on price history, then on paper and at small size, before putting real money behind it.

By the end you can

  • Turn a loose trading idea into entry, exit, stop, size and filter rules that give the same trades every time
  • Spot a backtest flattered by missing delisted stocks, future data or over-tuned settings
  • Charge realistic costs against a backtest and see what they do to the result
  • Read expectancy, maximum drawdown and losing streaks from a trade list
  • Set limits for paper trading and small live size before scaling up

The lessons

  1. 01
    Turning a Trading Idea Into Rules a Backtest Can Run

    Trading rules a backtest can run must give two people the same trades. A worked example turns buy strong stocks on pullbacks into exact entry, stop, exit and size.

    About 13 minutes, with a quiz at the end

  2. 02
    Backtest Costs and Biases: Slippage, Survivorship, Look-Ahead

    Backtesting bias and missing costs can make a losing rule set look profitable. Survivorship, look-ahead, overfitting, and costs worked on a $50,000 account.

    About 14 minutes, with a quiz at the end

  3. 03
    Reading Backtest Results: Expectancy, Drawdown and Streaks

    Backtest results come down to expectancy, maximum drawdown, losing streaks and trade count. Worked on a hypothetical 40% win rate with 2.5R average wins.

    About 14 minutes, with a quiz at the end

  4. 04
    From Backtest to Live: Paper Trading and Small Size

    Paper trading tests whether you can execute the rules; small real size tests your nerve and your fills. How to size down, set a trade count, and when to stop.

    About 12 minutes, with a quiz at the end

Start the first lesson →

A trading idea you cannot write down as rules is a mood. It may be a good mood. You still cannot test it, size it or tell when it has stopped working, because nothing about it is fixed enough to compare with what the market did. The course takes an idea you already have and walks it through the stages that decide whether it deserves money: rules, history, costs, a sober reading of the numbers, and finally a live account at a size small enough that being wrong is cheap.

Who the course suits

You trade stocks from your own account. You have an idea. Perhaps a pullback entry, perhaps a breakout. The charts you remember say it works. You want to know before you put real money on it.

No programming is needed. Some comfort with a spreadsheet is.

What to have ready

Daily price history for the stocks you want to test. Open, high, low and close is enough, in a spreadsheet or a backtesting tool. A blank page for the rules. A trade log, one row per trade, with columns for entry, exit, stop and the result in dollars and in multiples of the amount risked, which is the unit the later lessons use for every sum and the only one that lets you compare trades of different sizes fairly.

If your data source offers delisted stocks, get them too. The reason comes up early, and it can change a result a lot.

How to work through it

Take the lessons in order, and use your own idea throughout. The examples run on hypothetical rules and hypothetical trade statistics, with round numbers. Your own backtest is the one that matters.

Write your rules before you look at any results. That order is the whole premise of the course title, and it is the easiest step to skip, because once you have seen a chart of what would have happened it is very hard to write a rule that ignores it. Save a dated copy of the rules before your first test run.

Keep a change log beside them. Each time you alter a setting after seeing a result, note what changed and why, since a rule set adjusted many times against the same stretch of history ends up describing that history and very little else.

Each lesson ends with a short quiz. Wrong answers usually point at a single step you skimmed.

What it leaves out

Programming, machine learning and optimization software are out of scope. So is options backtesting. It needs historical option prices and a model for fills. Tax treatment is left alone as well; situations differ.

Where to go after

Once a strategy survives a first backtest, test it on data it has never seen. Out-of-sample testing is the only part that counts makes that case. The method, step by step, is in how to run a walk-forward test. Before you trade live, run your own win rate through the losing streak calculator so the first bad run is one you expected. The stock trading hub has the rest.

People also ask

Can I backtest a strategy without knowing how to code?

Yes. A spreadsheet with daily open, high, low and close prices is enough for a simple rule set, with one column per condition and one row per day. Many charting and backtesting tools also let you enter rules through menus. Coding helps with speed and with testing many stocks at once.

How many trades does a backtest need before it means anything?

There is no fixed count, but a handful of trades tells you almost nothing, because a few lucky wins can make a losing rule set look good. More trades across different market conditions give a steadier estimate of expectancy. Treat any result built on a small sample as a guess.