Skip to content
Wildflower
Join free
Not fooling yourself

Free Trading School · Level 4 · Course 4.3

Shuffling trade order

Lesson 15 of 18 in Not fooling yourselfModule 4: Robustness checks

Testing and making it your own · Not fooling yourself

Shuffling trade order

Wildflower Trading School · Lesson 4.3.4.2

Wildflower

A test gives you one list of trades, in the order they happened. By the end of this lesson, you'll know why that order is partly chance. You'll learn how to shuffle your trades in a spreadsheet to see the range of drawdowns the same trades could have given you. And you'll know how to read the results, and exactly what shuffling can and can't tell you.

1 of 12

What you'll learn

  • Shuffle the trade order. The total stays the same while the deepest drop changes.
  • See the range of drops. Many shuffles show how deep the drop could have been.
  • Build it in a spreadsheet. Sort by random numbers and track the running total and drop.
  • Plan around the range. Your test's own order may have been a gentle one.
  • Know what it can't show. It says nothing about the edge and assumes a random order.

Exercise

  1. Put the results of a test you've logged into column B of a spreadsheet, and build the five steps: =RAND(), =SORT(), the running total, peak and drawdown columns, and =MAX().
  2. Reshuffle 20 times and write down each worst drawdown.
  3. Compare the range with your test's own.

Next: Adding worse costs on purpose.

Quick check

  1. 1. When you shuffle a list of trades, what stays the same?

  2. 2. A test's own order had a 2R drawdown, but most shuffles show 4R to 5R. What does that suggest?

  3. 3. Why can shuffling make bad stretches look rarer than they are?

0 of 3 answered.

Finished this lesson?

Tick it off and keep your place

Make a free account and we'll remember where you are, so “Adding worse costs on purpose” is waiting next time.

Read the full notes

Reordering a 's trades at random, many times, shows the range of drawdowns the same trades could have produced. The total never changes, so it says nothing about the edge.

  • A test gives one order of trades. The same trades in another order give the same total but a different path, so a different and . Shuffling many times shows the range; it's a kind of .
  • Made-up list: 20 trades, 8 wins of +2R and 12 losses of −1R, total +4R. Test order: worst drawdown 2R. Worst possible order: 12R. Twenty shuffles gave 3R (×3), 4R (×7), 5R (×7), 6R (×2) and 7R (×1).
  • In a spreadsheet: results in B2:B21; =RAND() in C; =SORT(B2:B21, C2:C21, TRUE) in E2; running total (F2 =E2, F3 =F2+E3), peak (G2 =MAX(0,F2), G3 =MAX(G2,F3)) and drawdown (H2 =G2-F2); =MAX(H2:H21) in J2. Reshuffle by editing any cell (Google Sheets) or pressing F9 (Excel), and note each result as a value.
  • It shows the drawdowns these trades could give and how favourable the test order was. It can't say anything about the edge, assumes the order is random (real losses can bunch), and can't invent a trade worse than any in the list.
  • More: Maximum drawdown and what it means for you and Monte Carlo simulation.

Worked example

Made-up numbers

Twenty shuffles of the same trades

Made-up numbers · 20 trades · 8 wins +2R, 12 losses −1R · total +4R

  1. Test order: worst drawdown 2R
  2. 20 shuffles: 3R three times, 4R seven times, 5R seven times, 6R twice, 7R once
  3. 14 of 20 shuffles: 4R or 5R; worst of 20: 7R
  4. Worst possible order (12 losses first): 12R

The test's own order was a gentle one. Plan around the range, not the one path the test happened to take.

Your turn

Drill

Made-up numbers · one shuffled order · +2, −1, −1, −1, +2, −1, −1, +2

Trading is risky. You can lose money. Test results are hypothetical, and a good test doesn't mean future profits. This lesson explains how testing works. It isn't advice.