LibraryQuant puzzles

One Rule, Four Desks, Four Objections

Quant puzzle · intro · free, full solution

The question

Here is one written rule. On any day, take the average of the last five daily numbers and the average of the last twenty. If the five-day average is above the twenty-day one, hold one unit of the thing. Otherwise hold nothing.

Somebody walks that rule down a long stretch of past numbers, which is something called a Backtest, and reports that it came out 60 points above where it started. Four people then say four things about that report.

Three questions.

  1. Which of the four quant desks does each of A, B, C and D belong to?
  2. What has the 60 established, and what has it not?
  3. D's objection is accepted and the amount held is halved. Somebody says: fine, the 60 becomes 30, and the rule still works. Name what is wrong with that sentence, and there is more than one thing.

Hint

For each objection, ask whose job it would be to fix it if it turned out to be true. For the last question, read the sentence one clause at a time.

The idea behind it

Almost every objection anybody raises about a written rule belongs to exactly one of four desks, and knowing which one is most of what orientation buys. The trap is the second half: a number produced by one desk answers that desk's question only, and rescaling it in the head answers nothing.

Worked solution

Sorting the four

A is the researcher. Trying forty rules and keeping the best one produces a winner even on numbers with nothing in them. So the count of rules tried is part of the finding rather than gossip about it. Whoever ran the test owns this objection, and it is the one most often left out of the report.

B is the trader. The rule says hold one unit. The rule has no clause for the day when a third of that unit is all there is. Everything the written rule does not cover belongs to whoever is holding the thing while it runs.

C is the developer. Two averages computed two different ways is not a mathematical disagreement. It is one calculation implemented twice, and the two copies drifted. Nothing here is wrong with the rule and nothing is wrong with the mathematics, which is what makes this failure the quiet one.

D is the risk manager. How much is gone on the worst day, and is the amount held such that a bad run dents the account rather than ending it. Risk starts from the assumption that the rule is wrong and asks what that costs.

What the 60 is entitled to say

It answers one question: on that stretch, under those settings, with those two averages computed that way, the rule finished above where it started.

That is a smaller claim than it sounds, and it is smaller in four separate directions, one per objection. A said the stretch was searched forty times over. B said the number never charged for the days when the thing could not be bought. C said the twenty-day average in the test is not the twenty-day average that would actually run. D said the amount the number describes is not an amount this account can hold.

So the 60 is a measurement of a procedure on a particular set of past numbers. It is not a rate of return (a gain stated as a share of the money put in), not something anybody should expect to repeat, and not a statement about anything outside that stretch. If a number computed on the past were a claim about the future, what would be left for the other three desks to argue about?

Where the third question goes wrong

The sentence is "the 60 becomes 30, and the rule still works". Two separate errors, and they fail in different ways.

Halving does not carry through. Half a unit is a different rule. It buys different amounts on the days it turns on, and it costs a different amount to get in and out of. On the days when only a third of the wanted amount was there, the smaller order might have been filled in full while the larger one was not. The only honest way to get the number for half a unit is to run the test again for half a unit. Arithmetic on somebody else's answer is not a test.

"Still works" was never established, at any size. The test reported a number above zero. Above zero is not a comparison. It says nothing about what holding one unit the whole way through would have produced on those same numbers, nothing about what getting in and out cost, and nothing about the forty rules tried before it. A finding of 30 with all four objections still open is exactly as strong as a finding of 60 with all four objections still open, which is to say not strong at all (and halving it did not make it more honest).

The habit worth keeping

When a number about a rule turns up, two questions before any others. Which of the four desks produced it, and which of the four have not spoken yet. Most bad decisions about rules are made in the gap between those two, by somebody reading one desk's answer as though all four had signed it.

Next, this module ends and the market itself gets described: What a market and an exchange are starts from forty vegetable stalls and one price nobody set.

In short

A belongs to the researcher, B to the trader, C to the developer and D to the risk manager. The 60 answers the researcher's question alone, and only for the stretch and the settings it was run on. Halving the amount held does not halve the 60, because a different amount held is a different rule and the test has to be run again.

Learn quant finance on Thuztra Learn

Thuztra Learn teaches the maths of quant finance from zero, in short lessons, for readers who are unsure of it. Three questions in the app build your quant roadmap, free. Membership is a paid subscription. See what Thuztra Learn is and what it costs, or see the whole Core quant curriculum.

Get the app and answer the three questions:

Download on the Microsoft Store Download for Android

On Android, the app is a direct download, not a Google Play listing. Which devices, and what each one needs.

Further reading

Topics

Also in the library