Learn
Lesson · Backtesting and Trading Systems

Trade Log, Equity Curve, and Drawdown

Create an auditable trade log, reconstruct portfolio equity through time, and measure peak-to-trough loss and recovery duration.

Review concepts
Core concepts

What to understand

Keep each definition operational so it can be implemented and tested.

1

Trade log

Store signal, order, fill, quantity, cost, exit, P/L, and reason codes.

2

Equity curve

Mark open positions and cash consistently through chronological time.

3

Drawdown

Measure the decline from the previous equity peak and the time required to recover.

Interactive lab

Trade Log and Drawdown Lab

Change the order of the same trade outcomes. Inspect equity, drawdown, losing clusters, and recovery.

Trade Log and Drawdown Lab

Deterministic synthetic educational data · no live market connection

BACKTEST MODEL
Process

Make the result auditable

Every equity change should trace back to source events.

1

Record

Store complete events and reason codes.

2

Reconcile

Rebuild cash, positions, fees, and equity from the log.

3

Inspect

Find drawdown depth, duration, clusters, and regime dependence.

Knowledge check

Check your understanding

Select one answer for each question. Feedback appears immediately.

1. Maximum drawdown measures:

2. Why preserve reason codes?

3. Two tests with the same final return can have:

4. Equity peaks at $51,974 and falls to $49,427 before recovering. The maximum drawdown and the gain needed to recover are:

Practical rules

  • Store enough fields to reproduce every trade.
  • Calculate drawdown from the full portfolio equity curve.
  • Review both depth and duration.

Common mistakes

  • Keeping only entry and exit prices.
  • Ignoring open-position mark-to-market changes.
  • Judging risk only by final return.
References

Official reading

The labs are simplified simulations. These sources cover historical performance, data, costs, or execution limitations.

FINRA · Smart Beta—What You Need to Know
Explains that historical backtesting is hypothetical and does not predict future performance.

Open official reference ↗

Investor.gov · Understanding Fees
Reviews how fees and trading costs reduce investment results over time.

Open official reference ↗

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.