How Many Orders does a Spoofer Need?
— Investigation by Agent-Based Model —Takanobu Mizuta
SPARX Asset Management Co. Ltd.,Tokyo, Japan
https://orcid.org/0000-0003-4329-0645
見せ玉エージェント

Abstract—Most financial markets prohibit unfair trades as
they reduce efficiency and diminish the integrity of the market. Spoofers place orders they have no intention of trading inorder to manipulate market prices and profit illegally. Most
financial markets prohibit such spoofing orders; however, further
clarification is still needed regarding how many orders a spooferneeds to place in order to manipulate market prices and profit.
In this study I built an artificial market model (an agent-basedmodel for financial markets) to show how unbalanced buy and sellorders affect the expected returns, and I implemented the spoofer
agent in the model. I then investigated how many orders thespoofer needs to place in order to manipulate market prices andprofit illegally. The results indicate that showing more spoofing
orders than waiting orders in the order book enables the spoofer
to earn illegally, amplifies price fluctuation, and reduces theefficiency of the market.
Index Terms—Agent-Based Model, Artificial Stock Market
Model, Spoofing, Unfair Trades, Illegal Trades

I. I NTRODUCTION
Most financial markets prohibit unfair trades as they reduce efficiency and diminish the integrity of the market [1].
Spoofers place orders they do not intend to trade in order tomanipulate market prices and profit illegally. Most financial
markets prohibit such spoofing orders; however, how manyorders a spoofer needs to place in order to manipulate pricesand profit has yet to be clarified.
Empirical studies cannot be conducted to investigate situations that have never occurred in actual financial markets.
Since many factors affect price formation, an empirical study
cannot isolate the direct effect of spoofing orders on priceformation. In contrast, artificial market simulation [2], [3].
using a kind of agent-based model can isolate the contributionsof changes to liquidity and simulate changes that have neverbeen observed.
Many previous studies on artificial markets investigated thenature of financial market phenomena such as bubbles andcrashes. Recent studies have also contributed to discussions on
appropriate financial regulations and rules [2], [3]. The JPX
Working Paper series includes various studies contributing tosuch discussions.1 .
Wang and Wellman investigated the effect of spoofing
orders on market prices [4]; however, no study has used an
Note that the opinions contained herein are solely those of the authors anddo not necessarily reflect those of SPARX Asset Management Co., Ltd.
1 https://www.jpx.co.jp/english/corporate/research-study/workingpaper/index.html

Buy
one shareSell
one share

100000 ticks
Spoofing buyorders (Dp shares)

100000 ticks
Spoofing sellorders

Buy
one share

100000 ticks
Spoofing buyorders

１株買い ⇒ 買い見せ玉（５日間）:株価を吊り上げる ⇒ 売る
Fig. 1. Behavior of spoofer ⇒agent.
⇒ 売り見せ玉（５日間）：株価を下げる
１株買い ⇒・・・
これを繰り返す

artificial
market model investigated how many orders a spoofer
見せ玉は決して売買成立しないように仲値±0.3%以内に常にneeds存在するとする（完全な見せ玉）
to place in order manipulate market prices and profit
illegally.
In this study I modified a prior market model [5] to show
how an imbalance of buy and sell orders affects the expected
returns of normal agents (NAs) . I implemented a spoofer agent(SA) in the model and then investigated how many orders theSA needed to place to manipulate market prices and profit
illegally.
II. A RTIFICIAL M ARKET M ODELThe model developed by Chiarella and Iori [6], while
simple, replicates long-term statistical characteristics observedin actual financial markets, fat tails and volatility clustering. Incontrast, Mizuta et. al. s model [5] replicates high-frequency
micro structures, such as execution rates, cancel rates, andone-tick volatility, that cannot be replicated with the model ofChiarella and Iori s model.
In this study I modified Mizuta et. al. s model to show
how an imbalance of buy and sell orders affects the expected
returns of normal agents (NAs), and I implemented the spoofer
agent (SA) in the model. I then investigated how many orders
the SA needs to place to manipulate market prices and profit
illegally. The simplicity of the model is crucial for this study
because unnecessary replication of macro phenomena leads
to models that are overfitted and too complex. Such models
prevent understanding and discovery of mechanisms that affectprice formation because of the increase in related factors. I
explain the basic concept for constructing our artificial market
model in the review article [3].
In the model here, there is one risk asset. The exchange market for each of the three risk assets implements a continuous
double auction to determine the market price. In this auction
mechanism, multiple buyers and sellers compete to buy andTo replicate the nature of price formation in actual financial
markets, I introduced the NA to model a general investor. The
number of NAs is n. Its behavior is as simple as replicating
long-term statistical characteristics and very short-term micro-structures in real financial markets. First, at time t = 1, NA
No. 1 places an order to buy or sell its risk asset; then, att = 2, 3, , , n, NAs No. 2, 3, , , n place buy or sell orders. Att = n + 1, the model returns to the first NA and repeats thiscycle. An NA always places an order for only one share.
An NA determines an order price and buys or sells asfollows. It uses a combination of a fundamental value andtechnical rules to form an expectation of a risk asset’s return.
The expected return of agent j for each risk asset isPftt+ w3,j ϵtj )/Σ3i wi,jre,j= (w1,j log t + w2,j rh,jP
Pt
Db − Dstrh,j= log t−τj + log (1 + w4,j δd)P
Db + Ds(1)(2)

where wi,j is the weight of term i for agent j and is independently determined by random variables uniformly distributedon the interval (0, wi,max ) at the start of the simulation foreach agent. Pf is a fundamental value and is a constant2 . P t
is the market price of the risk asset, and ϵtj is determinedby random variables from a normal distribution with average
0 and variance σϵ . Finally, τj is independently determinedby random variables uniformly distributed on the interval(1, τmax ) at the start of the simulation for each agent3 . δd isa constant. Db (Ds ) is the number of buy or sell orders within±δd × Pf from the mid -price (the average of the highest buy
order price and the lowest sell order price).
The first term of Eq. (1) represents a fundamental strategy:
the agent expects a positive return when the market price islower than the fundamental value, and vice versa. The second
term of Eq. (1) represents a technical strategy using a historicalreturn and imbalance of buy and sell orders. The first termof Eq. (2) indicates that the agent expects a positive return
when the historical market return is positive and a negative
return when the historical return is negative. The second termof Eq. (2) indicates that the agent expects a positive return
when there are more waiting buy orders than sell orders, andvice versa for a negative return. Many technical traders use(Db − Ds )/(Db + Ds ) as a technical indicator, i.e., imbalance.
2 This enables the model to focus on phenomena in short time scales, as
the fundamental price remains static.
3 When t < τ , however, the second term of Eq. (1) is zero.
j/Averaged depth

100

101
0.1

0.01

100
200
500
1000
2000
5000
10000
20000
50000
1000002000005000001000000

A. Normal Agent (NA)1000
No. of spoofing orders

sell financial assets in the market, and transactions can occur
at any time whenever an offer to buy and an offer to sell match[7]. The minimum unit of price change is δP . The buy-orderprice is rounded off to the nearest fraction, and the sell-orderprice is rounded up to the nearest fraction.
The model includes n normal agents (NAs) and one spooferagent (SA). An agent’s holding positions are not limited, sothe agents can take an infinite number of shares for long andshort positions.

No. of spoofing orders

No. of spoofing orders/Averaged depth

Fig. 2. Number of spoofing orders and average depth.

An empirical study [8] showed that traders will profit whenusing this indicator. The third term of Eq. (1) represents noise.
After the expected return has been determined, the expected
price isttPe,j
= P t exp (re,j).
(3)t
An order price Po,jis determined by random variablest
normally distributed with average Pe,jand standard deviation
Pσ , where Pσ is a constant. Whether the agent buys or sellstis determined by the magnitude relationship between Pe,jandt
Po,j :
tt
when Pe,j> Po,j, the agent places an order to buy one
share, andttwhen Pe,j< Po,j, the agent places an order to sell one
4share .

B. Spoofer Agent (SA)Figure. 1 shows the behavior of the SA. First, the SA
buy one share at a sufficiently high price to execute a trade
immediately. Then the SA shows Dp shares of spoofing buyorders in the mid-price +δd × Pf within 100000 ticks to raisemarket prices. After that, the SA sells the share immediatelyand shows Dp shares of spoofing sell orders in the mid-price−δd × Pf within 100000 ticks to drive down market prices.
The SA repeats these actions in all simulation periods.
III. S IMULATION R ESULTS
The parameters in this study were the same as those in[5].5 Specifically, I set n = 1000, w1,max = 1, w2,max =10, w3,max = 1, w4,max = 1, τmax = 10000, σϵ = 0.06, Pσ =30, tc = 20000, δP = 0.01, k = 0.1, and Pf = 10000.
Simulations were run until t = te = 10000000 for Dp =0, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000,100000, 200000, 500000, 1000000, and in one case without
4 However, to generate enough waiting orders, when t < t the agent places
ct , or to sell one share whenan order to buy one share when Pf > Po,jt .
Pf < Po,j
5 I explain how their model was verified in the Appendix “Model Verification.”

1.0%

0.8

0.8%

0.6

0.6%

0.40.4%0.20.2%0.00.0%TABLE IS TATISTICS WITHOUT THE SPOOFER AGENT

Volatility

1.0trading
standarddeviations

autocorrelation
coefficient forsquare return

NA
0
100
200
500
1000
2000
5000
10000
20000
50000
1000002000005000001000000

Imbalance

インバランスとボラティリティ

execution rate
cancel rate
number of trades / 20000 ticks
for 1 tickfor 20000 ticks
kurtosis
lag
12
3
4
5

32.3%
26.1%
6467
0.0512%0.562%
1.42
0.225
0.138
0.106
0.087
0.075

No. of spoofing orders
Imbalance

Volatility

market efficiency, Mie is defined as

見せ玉により大きなインバランスが発生
Fig. 3. Imbalance and volatility or returns.
インバランスによりボラティリティが大きくなっている

e1 ∑|P t − Pf |.
te t=1Pft

Mie =

2.5%

1.2%

1.5%

0.8%

1.0%

0.6%

0.5%

0.4%

0.0%

0.2%

-0.5%

0.0%

(4)

Market inefficiency

NA
0
100
200
500
1000
2000
5000
10000
20000
50000
1000002000005000001000000

Return

緑点線：平均板厚5000株が重要な閾値
Here, Mie is always greater than zero, and Mie = 0 means
2.0%
1.0%
いつもより明らかに板が厚いことが市場に変化を与えるのに必要that a market is perfectly efficient6 . The larger Mie is, the less

No. of spoofing orders

Return per buy and sell trades
Market inefficiency
Fig. 4. Return of SA and market inefficiency.

the SA. In all cases, the other parameters were fixed and used
the same random number table. I then simulated these runs
100 times, changing the random number table each time, andthe results reported here are the averaged statistical values ofthe 100 runs.
Figure 2 shows the number of spoofing orders Dp per average depth for various Dp. The depth is defined as (Db +Ds )/2.
The averaged depths for any Dp are almost constant, 5000.
The depth is almost the same as Dp at Dp = 5000, which isan important boundary for changing market price features.
Figure 3 shows the imbalance (Db − Ds )/(Db + Ds ) andvolatility (standard deviation of returns within 20000 ticks)
for various Dp. “NA” refers to the case without the SA. The
green vertical dashed line is the boundary Dp = 5000. Higher
Dp leads to increased imbalance and volatility. Increasing thespoofing orders amplifies price fluctuation, especially in Dp ≥5000.
Figure 4 shows the returns from the SA s buy/sell trades andmarket inefficiency Mie for various Dp. To directly measureefficient the market becomes7 .
Higher Dp leads to increased return and Mie especiallyin Dp ≥ 5000. These results indicate that showing more
spoofing orders than waiting orders in the order book enables
the spoofer to profit illegally, amplifies price fluctuation, andreduces the market s efficiency.
IV. S UMMARY
In this study I modified a prior market model [5] to showthat the imbalance of buy and sell orders affects the expected
returns of normal agents (NAs), and I implemented the spoofer
agent (SA) in the model. I then investigated how many orders
the SA needs to place to manipulate market prices and profit
illegally.
The results indicate that showing more spoofing orders than
waiting orders in the order book enables the spoofer to earnillegally, amplifies price fluctuation, and reduces the markets efficiency.
A PPENDIX
A. Model Verification
In many previous studies on artificial markets, the models
were verified to determine whether they could explain stylized facts such as a fat tail or volatility clustering [3]. A
fat tail means that the kurtosis of price returns is positive.
Volatility clustering means that square returns have a positive
autocorrelation that slowly decays as its lag becomes longer.
Many empirical studies, e.g., Sewell [9], have shown thatboth stylized facts (fat tail and volatility clustering) exist
statistically in almost all financial markets. Conversely, they
6 Even though I calculated the market inefficiency, I did not intend to discuss
the efficient market hypothesis. The market in our model is inefficient becauseof the technical strategy in Eq. (2)7 A feature of M
ie is that it is calculated directly using a fundamental
price Pf , which is never observed in empirical studies. I can also use Miein simulation and experimental studies because I can define Pf .

also have shown that only the fat- tail and volatility clustering
are stable for any asset and in any period because financial
markets are generally unstable.
Indeed, the kurtosis of price returns and the autocorrelationof square returns are stable and significantly positive, but themagnitudes of these values are unstable and vary dependingon the asset and/or period. The kurtosis of price returns andthe autocorrelation of square returns were observed to havevery broad magnitudes of about 1 ∼ 100 and about 0 ∼ 0.2,
respectively [9].
For the above reasons, an artificial market model should
replicate these values as significantly positive and within areasonable range. It is not essential for the model to replicate
specific values of stylized facts because the values of thesefacts are unstable in actual financial markets.
Table I lists the statistics, standard deviation of returns,
kurtosis of price returns, and autocorrelation coefficient forsquare returns without the spoofer agent. This shows that themodel replicated the statistical characteristics, fat tails, andvolatility clustering observed in real financial markets.
R EFERENCES[1] J. McMillan, Reinventing the bazaar: A natural history ofmarkets. W. W. Norton & Company, 2002. [Online]. Available:
http://www.nttpub.co.jp/search/books/detail/100001751[2] T. Mizuta, “A brief review of recent artificial market simulation(agent-based model) studies for financial market regulations and/orrules,” SSRN Working Paper Series, 2016. [Online]. Available:
http://ssrn.com/abstract=2710495[3] ——, “An agent-based model for designing a financial market that works
well,” arXiv, 2019. [Online]. Available: https://arxiv.org/abs/1906.06000[4] X. Wang and M. P. Wellman, “Spoofing the limit order book:An agent-based model,” in Proceedings of the 16th Conference
on Autonomous Agents and MultiAgent Systems, ser. AAMAS ’17.
Richland, SC: International Foundation for Autonomous Agentsand Multiagent Systems, 2017, pp. 651–659. [Online]. Available:http://dl.acm.org/citation.cfm?id=3091210.3091219[5] T. Mizuta, S. Hayakawa, K. Izumi, and S. Yoshimura,“Investigation of relationship between tick size and trading
volume of markets using artificial market simulations,” in
JPX working paper, no. 2.
Japan Excgange Group, 2013.
[Online]. Available: https://www.jpx.co.jp/english/corporate/researchstudy/working-paper/index.html[6] C. Chiarella and G. Iori, “A simulation analysis of the microstructure ofdouble auction markets,” Quantitative Finance, vol. 2, no. 5, pp. 346–353,
2002. [Online]. Available: https://doi.org/10.1088/1469-7688/2/5/303[7] TSE,
GuidetoTSE
Trading
Methodology.
TokyoStock
Exchange,2015.
[Online].
Available:
http://www.jpx.co.jp/english/equities/trading/domestic/[8] T. Chordia and A. Subrahmanyam, “Order imbalance and individual
stock returns: Theory and evidence,” Journal of Financial Economics,
vol. 72, no. 3, pp. 485 – 518, 2004. [Online]. Available:
https://doi.org/10.1016/S0304-405X(03)00175-2[9] M.
Sewell,“Characterizationoffinancial
timeseries,”
Research Note, University College London, Department ofComputer Science, no. RN/11/01, 2011. [Online]. Available:
http://finance.martinsewell.com/stylized-facts/