Quant Memo
Core

Behaviour Cloning From Trader Logs

Behaviour cloning trains an agent to imitate the actions recorded in historical trader logs directly, treating each past decision as a labelled example rather than learning from trial and error.

Instead of letting a trading agent learn purely by trial and error, which can be slow and risky against live markets, behaviour cloning trains it to imitate a human trader directly: take historical logs of a desk's actions — what order size, at what price, in what market state — and train a supervised model to predict the action a trader took, given the state they saw at the time. The agent is being taught to copy, not to discover.

This is a useful starting point because it can quickly produce a reasonable-looking policy without any risky live exploration, but it inherits a specific weakness: it only ever sees states the human trader actually encountered, so it has no idea what to do in a state that diverges even slightly from the training data, and small errors can compound as the agent drifts into territory the logs never covered.

Behaviour cloning learns to imitate the recorded actions in trader logs rather than to reason about outcomes, which makes it fast to bootstrap but fragile whenever live conditions drift away from what the historical logs actually contained.

Worked example

A behaviour-cloned execution agent is trained on six months of a desk's order-slicing logs, learning to predict, given the current spread and volume, how large a slice the trader sent next. In backtests replaying those same six months it matches the human trader closely. Deployed live during an unusually illiquid week the training data never saw, it keeps sending slice sizes calibrated to normal liquidity, causing larger-than-intended market impact — a symptom of the model having never been taught what to do outside the states it was shown, only how to copy within them.

Related concepts

ShareTwitterLinkedIn