Basic

A model has to meet a market

A model that predicts well and a system that trades well are not the same thing. The gap between them is the market: costs, fills, and the fact that the world stops publishing the numbers you trained on.

What you will see

refuse. A refusal is a decision, and it is the cheaper one.

About 1 min of reading

Try It

Compare an edge to a cost

1

Write the edge and the cost

printf 'edge_bps 12\ncost_bps 7\n' > /tmp/econ.txt; cat /tmp/econ.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
Two numbers in the same unit. Same unit is what makes the comparison legal.
2

Compute the difference

awk -F' ' '{s[$1]=$2} END {print s["edge_bps"]-s["cost_bps"]}' /tmp/econ.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
5. A positive difference is the only condition under which a trade is sized.
3

Refuse when the cost wins

printf 'edge_bps 4\ncost_bps 7\n' > /tmp/econ2.txt; awk -F' ' '{s[$1]=$2} END {print (s["edge_bps"]>s["cost_bps"]) ? "size" : "refuse"}' /tmp/econ2.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
refuse. A refusal is a decision, and it is the cheaper one.

Data Flow

A prediction to a sized decision
1 The model predicts a number
↓
2 The cost per trade is measured
↓
3 The edge is compared to the cost
↓
4 The size is chosen from the difference
Why this works
Why the model is never shipped alone

A model without its costs is a claim. A model with its costs is a decision you can size and refuse.

The one question that ends most debates

Is the edge bigger than the cost. That question has a numeric answer, and the answer is why the debate exists.

Examples

The gap is named, not guessed

Prediction error, cost per trade, and fill quality are three separate numbers. Adding them in your head is how a strategy loses money quietly.

What a backtest assumes

A backtest assumes the past is the future and that fills were free. The first assumption is tested, the second is only assumed.

The unit of a strategy

A strategy is a distribution of outcomes, not one outcome. One good year says nothing about a distribution of one sample.

Next Lesson
The Greeks
The Greeks →