q.Quantitative TradingEnglish course · Lesson 15 of 24Course home

Lesson 15 / Mean Reversion and Relative Value

Why might a widening deviation stay wide?

Replace “it fell, so it will rise” with a defined relationship and explicit failure conditions. Calculate quantities and P&L on both legs to see what a statistical relationship can deliver.

What you will learn

  1. Distinguish a low price from a deviation in a defined relationship
  2. Calculate pair-trade P&L leg by leg
  3. Define when the relationship has failed and when to exit

Allow about 30–45 minutes. The exercises use fictional data. The page checks structured answers in your browser. Export your work before refreshing.

Start with the concepts ↓
Concept 01

Define what can revert, and over what window

Mean reversion asks whether a measure tends to return to a reference level after a deviation. The measure might be a return, a valuation, or a spread. A price decline alone provides too little information.

The reference level can change. Changes in business structure, rules, or risk exposure can invalidate the old mean. Adding indefinitely while waiting for a recovery turns an untested relationship into a funding risk.

Concept 02

Define the spread

Set S = A − 2B. If A starts at 60 and B at 25, S is 10. Consider shorting 1 unit of A and buying 2 units of B. This pair earns a gross profit if S falls and takes a loss if S rises.

The starting spread is 10. Profit depends on how it changes. Total absolute notional across both legs is 110. The net signed notional of −10 leaves funding requirements for both legs.

Concept 03

Calculate each leg

If A goes to 58 and B to 26, short A makes 2 and long B makes 2, for a total of 4. That matches the drop in S from 10 to 6. If A goes to 65 and B to 26, total P&L is −3.

The exercise isolates linear P&L and leaves out fees, stock borrowing, margin, and unsynchronized fills. If one leg fails to fill, the actual position has exposure on the filled side.

Concept 04

Decide when to treat the relationship as broken

Specify how to choose assets and when to estimate the ratio. Define the deviation for entry, the exit level, the maximum time to wait, and when to pause. Estimating a ratio with the full future sample and then trading earlier dates introduces look-ahead bias.

High correlation alone leaves spread stability unproven. Standardized deviations also depend on the window used to estimate the mean and standard deviation. Past reversions do not guarantee another one.

Experiment · Predict the outcome, then change one input

Mean Reversion and Relative Value experiment

Start at A = 60 and B = 25, short 1 A and long 2 B. Predict whether two rising prices must produce a loss, then compute P&L by leg.

Gross price P&L on a pair with fixed quantities. The model omits short availability, funding, fees, and margin constraints.

Practice with fixed inputs

Try the calculations

Use the values in each question. Enter amounts and percentages in the requested units, including a minus sign where needed.

Knowledge check

Explain your reasoning

1. Does a starting spread of A − 2B = 10 lock in a profit of 10?
2. Does high correlation between the legs prove a stable spread?
3. Can you estimate a historical hedge ratio with all the later data?
4. The short sale of A did not fill, but the buy of B did. What do you hold?

Record your work

Lesson work

Complete a research card for a pairs trade.

Record both legs of a pairs trade

At entry, A = 50 and B = 20. Short 1 unit of A and buy 2 units of B. At exit, A = 48 and B = 22. Define the spread as A − 2B. Ignore fees, securities borrowing and margin.

Complete the questions below before trying the optional writing exercise. Use the fixed inputs here, even if you changed the experiment above. Enter numbers in the units shown and keep at least two decimal places where needed. Follow the specified precision for tables. You can check one answer at a time or all answers together.

1. Spread at entry
yuan
Reference answer (try the question first)
2. Spread at exit
yuan
Reference answer (try the question first)
3. Combined gross profit or loss from both legs
yuan
Reference answer (try the question first)
4. Does an entry spread of 10 guarantee a profit of 10?
Reference answer (try the question first)

Save your homework to export these results. Check again after changing an answer. Optional writing and self-assessment are ungraded. Save your work before refreshing.

Optional writing (ungraded)

Writing guidance and self-review

Record the inputs, rules, results and open questions in each field. You can cite the earlier calculations and experiments as fictional examples. Tie each conclusion to specific data or events.

Use the checklist to review your own writing. Use evidence from the study to evaluate the strategy.

Save the experiment, the run log, your first and current checks, written work and self-review. Export before refreshing or closing the page.