Summary · the whole project in five minutes
Will AI traders learn to manipulate?
In this market, no. Six AI traders learned honest trading, and none learned to spoof.
The new learning-agent experiment reverses the original question: can a trader discover suspicious behaviour, and do existing detectors flag it on unseen sessions? Each was rewarded only for getting a good price, and all six settled on ordinary execution. A hand-built spoof was not reliably profitable here once the risk of its fake order really trading was counted, which is the opposite of an earlier published study where a learning trader did discover spoofing. The chapter has the replay of learning, the controls and every result. The earlier detector work is summarised below as the foundation; those older results concern human-designed spoofs.
What the question is asking
- 1
The cheat
In a stock market, everyone can see the orders waiting to buy and sell. A spoofer places a huge order they never mean to trade, so others think demand is changing. They trade the other way at a better price, then quietly cancel the huge order. It is illegal, and in 2025 three traders were fined for it in the UK.
- 2
The problem
To teach an AI to spot cheating you normally show it many proven examples. Those are rare and secret. So a popular idea is to show the AI only normal trading and let it flag anything unusual.
- 3
The real question
Does that work? Can an AI that has never seen a spoof tell one apart from honest trading that looks the same, such as a genuinely large order?
How I tested it
- I built a pretend stock market on my laptop, with computer traders who react to the orders they see. Spoofing really works in it: a fake order made the spoofer's real order percentage points more likely to go through.
- I gave detectors different amounts of teaching: nothing at all (the AI only learns normal trading), labelled examples, a hand-written rule, and the legal definition of the offence.
- I tried to break the best one, first with tricks I thought of, then with a search program that hunted for tricks on its own.
What I found
-
AUC
An AI taught nothing cannot tell cheating from honest trading.
It found spoofs unusual, but it found honest large orders even more unusual. A score of 0.5 would be a coin toss. A spoof is unusual in only one way, its size, and honest big orders are just as big.
-
→
Examples and rules learn what cheating looks like, so a disguise beats them.
A hand-written rule caught every large spoof, until the same spoof was split into four smaller orders.
-
Telling it the purpose of the cheat works.
The law says manipulation means giving a false signal. Turned into three simple questions (did a trader show interest, take it back, and trade the other way?) it caught split spoofs too, with no examples at all, and wrongly flagged of honest large orders.
-
2 holes
A program hunting for loopholes found real ones, and fixing them made the detector closer to the law.
It hid the fake order behind a decoy no trader could see, and it exploited a flaw in how I scored success. Each fix came from reading the law more carefully: a signal only counts if traders can see it.
-
There is a price for every false alarm, and it can be set.
A small enough spoof can always hide under an alert threshold. But with the refined detector, accepting false alarms in about this share of normal trading made spoofing stop paying at all. Against the other detectors, no amount of false alarms helped.
-
AUC
No detector can read minds.
An honest trader who changes their mind does exactly what a spoofer does. Only the reason differs, so an alert should start an investigation, never end one.
So what is the answer?
An AI that only looks for the unusual finds honest traders first. An AI that knows the purpose of the cheat, and who placed each order, catches it in disguises it has never seen. The useful kind of "teaching" turned out to be a principle, not examples.
What it does not show
- It is a simulation. I designed the market and the spoofer; real markets are messier.
- It needs to know who placed each order. Regulators have that; the public does not. A spoofer using two accounts the regulator cannot link escapes.
- It is a school project. The detector was designed after the first experiment by someone who knew the spoofer, then tested on cases it was not tuned for.
Want the detail?
Every detector side by side
Orders 16 times a typical size, calm market. Share of spoofs caught: higher is better. Share of honest behaviour flagged: lower is better.






Research LabPick a market situation and see how every detector reacts.