Talk 1: An agent-based model for designinga financial market that works well
Talk 2: Can an AI perform market manipulation at its own
discretion? - A genetic algorithm learns in an artificial market
simulation -Takanobu Mizuta

SPARX Asset Management Co., Ltd.
Mail: mizutata[at]gmail.com
HP: https://mizutatakanobu.com

Today, I try 2 talks. Sorry if There is not enough time for Talk 2.
(I think I have prepared too many slides.)Note that the opinions contained herein are solely those of the authors and do not necessarily reflect
those of SPARX Asset Management Co., Ltd.

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf
Here is a Japanese ver. slides https://mizutatakanobu.com/2021e.pdf YouTube https://youtu.be/tq9AsMrig9s

1

The economist John McMillan, who used game theory to investigate manymarkets, said “a market works well only if it is well designed”. Market design(regulations, rules) determines whether a market works well or badly.
McMillan also concluded that “the economy is a highly complex system. It is
at least as complex as the systems studied by physicists and biologists.”
Some articles argued that traditional economics had not found ways todesign markets that work well and anticipated an artificial market model todo so. Financial regulators and exchanges, who decide rules and regulations,especially desire an artificial market model to design a market that works
well.
This presentation showed a philosophy of an agent-based artificial market
model. Why are models needed? How models should be? In the first place,what is a model? We should understand what is a model deeper for healthy
discussion using a model. I will try to clear up a common
misunderstanding for a model. After the discussion, I will review the case,investigating tick size reduction using a model.
You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

Takanobu Mizuta
Now, I belong to SPARX Asset Management Co., Ltd. as Fund Manager and Senior Researcher.
I am also a part-time lecturer of the Graduate School of Public Policy, The University of Tokyo.
In SPARX Asset Management, I am responsible for quotative investigate of Japanese stock market
and the portfolios, and maintaining system/DB for the investigation,
and academic-study regulation/rules using multi-agent simulations.

2014 Ph.D.: School of Engineering, The University of Tokyo (Kiyoshi Izumi Laboratory)
2004 Joined SPARX Asset Management (current affiliation)
2002 Master: School of Science, The university of Tokyo (Space Plasma Physics)
2000 Bachelor: Japan Meteorological College
2016/4-, Vice Chair: Special Interest Group on Financial Informatics
the Japan Society for Artificial Intelligence (JSAI SIG-FIN),
2019-, Technical Committee Member: IEEE Computational Intelligence Society,
Computational Finance and Economics (IEEE CFETC)

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

I belong to the asset management company

Directly
ExecuteAsset Owner
Pension Fund, Severin Wealth Fund

Partially
EntrustMe!
Partially
EntrustHFT（High Frequency Trades）

Asset
Management
Company

Order
Order

Individual
Investor

High-Speed
TradesCompany

Broker(Security
Company)

Stock
Exchange
ExecuteFor Talk 1 there is my review paper, read it if you are interested
My Review Paper
Mizuta 2020, “An agent-based model for designing a financial market that works well”,
IEEE Symposium Series on Computational Intelligence, Computational Intelligence for Financial Engineeringand Economics (CIFEr), December 1 to 4, 2020, Canberra, Australia(virtual)
https://doi.org/10.1109/SSCI47803.2020.9308376
https://arxiv.org/abs/1906.06000
Presentation on YouTube https://youtu.be/rmlb72ykmlETalk 1: An agent-based model for designinga financial market that works well
Talk 2: Can an AI perform market manipulation at its own
discretion? - A genetic algorithm learns in an artificial market
simulation -You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

6

(1) An artificial market model = an agent-based model for a financial market(2) Suitable complexity, advantages and disadvantages(3) Typical Model(4) Case study: tick size reduction

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

7

(1) An artificial market model = an agent-based model for a financial market(2) Suitable complexity, advantages and disadvantages(3) Typical Model(4) Case study: tick size reduction

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

8

Importance and difficulty of market design

Peoplehave been able to develop advanced economies
by cooperating to exchange goods for money

Creation of any industry requires “investment” to first purchase or build tools to make goods
enables smooth investment

FinancialMarketCreates Better Goods Better Service

Two Extreme Opinions

No regulation is Best?

Destroy a Society?

Both is Wrong“A market works well only if it is well designed”
Proper rules and regulations are required(By the economist John McMillan, who used game theory to investigate many markets)
9John McMillan, 2002
https://wwnorton.com/books/Reinventing-the-Bazaar/“A market works well only if it is well designed”
Market design determines whether
a market works well or badly
Very important forDeveloping economy

A market is a highly complex system.
It is at least as complex as the systems
studied by physicists and biologists
Very difficult and complex system“Economies are complex systems in which the simple, microscopic
components consist of people buying and selling goods, and thecollective behavior is the complex, hard-to-predict behavior ofmarkets as a whole, such as fluctuations in stock prices”
Changing detailed rules, even ones that seem trivial, sometimes causes
unexpected large impacts and side effects.

both God and the devil are in the details
Designing a market well is very important for developing an
advanced economy, but not easy.

Melanie Mitchell, 200910https://global.oup.com/academic/product/complexity-9780195124415

A parable: difficulty of controlling complex system
Mori (Commissioner, Financial Services Agency, Japan), 2015, “Rethinking Regulatory Reforms”, the 6th Annual Pan
Asian Regulatory Summit, Hong Kong
https://www.fsa.go.jp/common/conference/danwa/20151013/01.pdf

Mori (Commissioner, Financial Services Agency, Japan), 2015,
criticized US and euro making many regulations for finance.
Three* years after the tragedy of the Titanic in 1912, the International
Convention on Safety of Life at Sea introduced the “lifeboats for all” regulation,requiring that enough lifeboats be equipped for all passengers and crew. The
United States applied the international rule to domestic liners as well. SS
Eastland, a sightseeing steamship on the Great Lake, therefore equipped
lifeboats for her 2,500 passengers. Three weeks after, the steamship, with extra
weight of lifeboats on her, was suddenly capsized during her trip on Lake
Michigan and many* of her passengers lost their lives, more than in the Titanic
disaster. The Titanic tragedy called for a new regulation, and the burden of theregulation caused an even bigger tragedy. Lifeboat for all, which was intended toallow an orderly rescue from a capsized ship, may have served to create a false
sense of security. But it simply did not work.
*I modulated

The conference, other people talking

Side Effect: no one expected when the regulations are madeComplex System leads results no one expected
No one can expect what partial optimization effects a whole
In complex System, Simple aggregation of parts does not make a whole

https://commons.wikimedia.org/wiki/
File:Eastland_disaster_port_side.jpg#/
media/File:Eastland_disaster_port_side.jpg

both God and the devil are in the details

11Agent-Based Model succeeded to explain Social Complex Systems other than Financial Market
Building virtual society in a computer with many "agents" modeled for humans.
The agents that work as micro process interact each other.
The aggregation of the micro process makes macro phenomena.

Mathematical
model

Micro
Process

Third
Viewpoint
AgentBased
Simulation

Empirical
Study

Macro
Phenomena

Interaction• Like the egg in the Columbus story, it is able to find that some interactions leadside effects and unexpected results in the society as complex system.
• It is able to find the reasons and mechanism, and find new problems that empiricalstudies should investigate• It is established as a helping and complementing method to existing methods inother fields.

12For examples,• Making Evacuation Route of new building for Fire and/or Terror• Investigating for effects of building new roadway to traffic jam• Discussing how spread COVID-19
and so on
There are many many studies succeeded explain thephenomena of social complex systems

13

The agent-based model that contributed discussion how to prevent COVID-19
https://www.washingtonpost.com/graphics/2020/world/corona-simulator/

News paper writer simulated* Agents move like a ball: move in astraight line, reflect when bumped* They are infected when bumped* They recover after some time infected
and no more infection.
-> If no action: high peak but fast
convergence
Preventive policy: low peak but slow
convergence-> Near the peak is Good timing to end
the policy?
We can find mechanism and discuss

This model is too simple to replicate the real world but the simplicity enable give
us finding mechanism and understanding process.

14

Example of equation model cannot but simulation model can (Schelling Model)
Party with Students(#) and Professors(@)
#
# #
#
@
@ @
#
#
@

# @ #
# @
@
@
#
# @ # @
@ # @ @# # #@ # @ #
@

@
# @
@ #
# @
@
@
@
#

# # # #
# # # #
# # # #@ # @@ @ @ #
#
@ #
@
@

@
@ @

@
@
@

@
@
#
#
#

The space of #is smaller

@
@
@ @
@
# @
# #

Micromotives and Macrobehavior, 2006
http://books.wwnorton.com/books/978-0-393-32946-9/
Explanatory article, “Parable of the polygons”
https://ncase.me/polygons/

Rules:* around me (8pixs)
with more 1/3 myequals -> not move
* No -> move
After many steps,,,

Mod. rules:＃:need one more equal@:need one less equalWill come back again

#
#
#
@

#
#
#
@
@
@

@ @

#
# @
@ @
@
@ #
# #
# #

@ # #
@ @ #
@
@ @
@ @ @
# @ @
# #
#

#
#
@
@

# and @ have been separated
The segregation occurs even if we want not to be heavily
minority. We do NOT hate other kinds.
The purpose of simulation is understanding the reasons andmechanism, not forecasting the final distribution.

Where are tables? How much they eat? Where are assistant professors?
Is the party place square? Are behaviors of people too simple?
---- Silly questions for the purpose of simulation.
prevent our understanding the mechanism.

Simplifying depends on that we want to understand15

An artificial market model = an agent-based model for a financial market

Virtual and Artificial financial Market built on Computers
ModelsIncludeAgents (Artificial Investors)＋
Price Mechanism (Artificial Exchange)
Order

Price
Mechanism(Exchange)

Agent(Investor)

Each Agent determines anorder by some rules,
Price Mechanism gather
agents orders anddetermines Market Price

Determination market priceComplete Computer Simulation needing NO Empirical Data
✓ can discuss on the mechanism between the micro-macro feedback✓ can be conducted to investigate situations that have neveroccurred in actual financial markets✓ can be conducted to isolate the direct effect of changing rules
16

NATURE/SCIENCE articles argued Importance of Simulations⚫ Farmer and Foley (2009) NATURE, Vol. 460, No. 7256, pp. 685-686.
https://www.nature.com/articles/460685a

In today’s high-tech age, one naturally assumes that US President Barack Obama’s economic teamand its international counterparts are using sophisticated quantitative computer models to guide us
out of the current economic crisis. They are not. There is a better way: agent-based models.
⚫ Battiston et al. (2016) SCIENCE, Vol. 351, Issue 6275, pp. 818-819.
http://science.sciencemag.org/content/351/6275/818

Traditional economic theory could not explain, much less predict, the near collapse of the financial
system and its long-lasting effects on the global economy. Since the 2008 crisis, there has been
increasing interest in using ideas from complexity theory to make sense of economic and financial
markets.
These articles argued that

Traditional economic theory could not explain, muchless predict, the near collapse of the financial system

Agent-Based Model is needed

17Criticism to Standard Economic Model and arguing needs of Agent-Based Model
Richard Bookstaber
Expert of risk management at Investment Banks and Hedge Funds
Famous for The author of “A Demon of Our Own Design” isnoted for its forecasting of the financial crisis of 2008

Standard Economic Model did not prevent Financial
Crises of 2008. An Agent-Based Model will prevent
the Crises.
Arguing importance of using Agent-Based Model
when we discuss how prevent the Financial Crises
Richard Bookstaber, 2017 https://press.princeton.edu/books/hardcover/9780691169019/the-end-of-theory

Also, President of the ECB

Speech of the President of ECB (European Central Bank), 2010
Agent-based modelling dispenses with the optimization assumption and allows for more
complex interactions between agents. Such approaches are worthy of our attention.
https://www.ecb.europa.eu/press/key/date/2010/html/sp101118.en.html

18

Practical Persons have began to use Agent-Based Model to solve Urgent Real Problem
Regulators, Central Bankers, Stock Exchanges
JPX Working Papers Series
JPX(parent com of Tokyo Stock Exchange) shows Working Papers,
10 papers of all 35 (as of end March 2021) are Agent-Based Studies
Reduction of Tick Size, Frequently Batch Auction,
Suitable Latency of Exchange System, and so on
https://www.jpx.co.jp/english/corporate/research-study/working-paper/index.html

So many other Examples,Working Paper by Bank of Japan
Toshiyuki Sakiyama and Tetsuya Yamada, Market Liquidity and Systemic Risk in Government Bond
Markets: A Network Analysis and Agent-Based Model Approachhttps://www.imes.boj.or.jp/research/abstracts/english/16-E-13.html
Project by EU
Integrated Macro-Financial Modelling for Robust Policy Design Work Package 7: Bridging agent-based
and dynamic-stochastic-general-equilibrium modelling approaches for building policy-focused macrofinancial models https://cordis.europa.eu/project/id/612796/reporting
My review
Takanobu Mizuta, A Brief Review of Recent Artificial Market Simulation Studies for Financial Market
Regulations And/Or Rules, SSRN Working Paper Series https://ssrn.com/abstract=2710495

19

(1) An artificial market model = an agent-based model for a financial market(2) Suitable complexity, advantages and disadvantages(3) Typical Model(4) Case study: tick size reduction

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

20

An agent-based model explaining a complex system

A financial market is highly complex system where a simple summation of microprocesses (trader behaviors) never explains macro phenomena (price formation).

Separately investigating macro phenomena and micro processes
unclearly explains complex systems where macro phenomena andmicro processes interact.
A mathematical model
An empirical study

cannot directly treat nor clearly explain the interactions

An Agent-Based Modelcan directly treat and clearly explain the interactions
Because…

21

A mathematical model
An empirical study

An Agent-Based Model

Macro Phenomena

Macro Phenomena
Price Formation
Simulation Feedback

As a result

Treat
Directly &Interactively

Micro Process
Agents Behavior

Simple Modelling

can directly treat andclearly explain the interactions

Price Formation
Simple summation
cannot explain

Precious
Modelling

Treat
Separately

Micro Process
Traders Behavior

Precious
Modellingcannot directly treat nor
clearly explain the interactions

22

Advantages and Disadvantages of Agent-Based Model

Happened

Will happen

Empirical
Study

Agent-Based
Model

Outputs of an empirical study are includedin the area that has happened in a real
financial market. The advantage of anempirical study is outputs exclude the allarea not happening in the past or future.
The disadvantage, however, is outputs
exclude any area happening in the future.

The advantage of an agent-basedmodel is outputs include the part of
the area happening in the future.
The disadvantage, however, is
outputs include the part of area nothappening in the past or future.

An agent-based model just outputs “possible” results to understand themechanism of a market. Discussing whether the results will occur or not needs
other methods, e.g., an empirical study and a mathematical model.
23

Advantage: directly treat Positive Feedback (Self-Fulfilling Prophecy)

ExpectingSomeone buy
Higher Price

It convincesme

Positive Feedback
Self-Fulfilling Prophecy
Self-Reinforcing Process

Meet myExpectation

I Buy

Price raises
24Collaborate to mutually compensate for their disadvantages

Environment happening in the future

Macro
Phenomena

Empirical Study
Financial Engineering
Macro Modeland so on

Understanding
Interaction
Mechanism

Agent-Based
Model
Verified & Validated
by other methods
VerifyValidate
Simulation Agent-Model
result

Micro
Process

Behavioral Economics
Experimental Economics
Neuroeconomics
and so on

Discussing the outputs of an agent-based model always needs knowledge
given by empirical studies and mathematical models. A market that works wellshould be designed by not one but several methods, and the methods shouldcollaborate to mutually compensate for their disadvantages.
25

What is a role of Simulation Models? Suitable complexity?

Discussing the philosophy of models andsimulations.
“What is a role of Simulation Models? ”“What is a model?”,“How complexity is suitable for the model?”Very very good book.
I think all researcher who use some model should read this bookfor healthy discussion using models.
(Following some slides, I will introduce the discussion of the book)

Simulation and Similarity Using Models to Understand the World, 2012https://global.oup.com/academic /product/9780199933662

26

Which ‘’map’’ explains the access better?
Some of maps are “models” of the real geography for understanding an access.

Very different from the real, however,very good explaining the access.

Very similar to the real, however,very bad explaining the access.

(left)From official web site of Shinagawa Season Terrace ( https://shinagawa-st.jp/en/access/train.html )(right)Google map (Imagery © 2020, CNES/Airbus, Digital Earth Technology, Maxar Technologies, Planet.com, The Geoinformation Group, Map data © 2020 Google)

must shave non-investigating features from the model
Different investigations, different shaving parts.

27

Role of Model (in the case of Agent-Based Artificial Market Model)

InvestorA

Investor
B

Investor
C

Inherit Only Important Properties(Behaviors, Algorithms) for Investigating Phenomena

Other Investigating
Phenomena,
Other Important Properties,
Other Good Models

Never Real-Existing Investor
For Understanding Properties
of Real-Existing Investors

Model ofInvestors e.g.: Fashion Model: Understanding Closes
Model Home: Understanding Home

An Aim is to understand how Important Properties (Behaviors, Algorithms)
affect Investigating Macro Phenomena and play Roles in System.

It is NOT aim Replicating real-existing Investors A, B and C.
It is aim Understanding real-existing Investors.
The simplicity of the model is very important because unnecessary replication of macro phenomena
leads to models that are overfitted and too complex. Such models prevent understanding anddiscovery of mechanisms affecting price formation because of the increase in related factors.

Other Focusing Phenomena, Other Good Models; no model good for anything exist

28

Example of equation model cannot but simulation model can (Schelling Model)
Party with Students(#) and Professors(@)
#
# #
#
@
@ @
#
#
@

# @ #
# @
@
@
#
# @ # @
@ # @ @# # #@ # @ #
@

@
# @
@ #
# @
@
@
@
#

Rules:* around me (8pixs)
with more 1/3 myequals -> not move
* No -> move
After many steps,,,

Mod. rules:＃:need one more equal@:need one less equal# # # #
# # # #
# # # #@ # @@ @ @ #
#
@ #
@
@

@
@ @

@
@
@

@
@
#
#
#

The space of #is smaller

@
@
@ @
@
# @
# #

Micromotives and Macrobehavior, 2006
http://books.wwnorton.com/books/978-0-393-32946-9/
Explanatory article, “Parable of the polygons”
https://ncase.me/polygons/

#
#
#
@

#
#
#
@
@
@

@ @

#
# @
@ @
@
@ #
# #
# #

@ # #
@ @ #
@
@ @
@ @ @
# @ @
# #
#

#
#
@
@

# and @ have been separated
The segregation occurs even if we want not to be heavily
minority. We do NOT hate other kinds.
The purpose of simulation is understanding the reasons andmechanism, not forecasting the final distribution.

Where are tables? How much they eat? Where are assistant professors?
Is the party place square? Are behaviors of people too simple?
---- Silly questions for the purpose of simulation.
prevent our understanding the mechanism.

Simplifying depends on that we want to understand29

We want know a relationship between
Micro Process:
Deciding Orders, Rules of Exchange& Macro Phenomena: Price Formation

Mathematical Model
Macro Model

Stock
MarketCountry Ａ
Bond
MarketCountry A
Stock
MarketCountry B

Replicate Only
Important Properties

can treat only this region

Price
Formation(Simulation
Result)Model ofInvestors

Deciding
OrdersInherit Only
Important Properties

Role of Model (cont.)

InvestorA
Investor
B

InvestorModel of (Algorithms)
C
Exchange
ChangeRules
Matching
OrdersWe want know
(Aggregation of
Algorithms)

a relationshipbetween them30

(1) An artificial market model = an agent-based model for a financial market(2) Suitable complexity, advantages and disadvantages(3) Typical Model(4) Case study: tick size reduction

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

31

An artificial market model = an agent-based model for a financial market (again)

Virtual and Artificial financial Market built on Computers
ModelsIncludeAgents (Artificial Investors)＋
Price Mechanism (Artificial Exchange)
Order

Price
Mechanism(Exchange)

Agent(Investor)

Each Agent determines anorder by some rules,
Price Mechanism gather
agents orders anddetermines Market Price

Determination market priceComplete Computer Simulation needing NO Empirical Data
✓ can discuss on the mechanism between the micro-macro feedback✓ can be conducted to investigate situations that have neveroccurred in actual financial markets✓ can be conducted to isolate the direct effect of changing rules
32Price Mechanism: Not so Simple
Should replicate rules of real stock exchange

Not so Simple Modelcontinuous double auction
Sell
Amount
10
30

Order
Buy
Price Amount
103
102
101
50
100
When placing buy
When placing sell 130
order here,
99
order here,98
150 The orders executed
The orders executed
immediately
97
immediately
96
70
If there is already better price order, the orders executed immediately<=>simple model

Price Return = k(amount buy orders – a. sell orders)33Agents

Simple Model

The model of Mizuta (2013) is based on Chiarella (2002).The model is satisfied withstylized facts (statistical characteristics observed in actual financial markets).

Expected Return of each NA

Technical

Pf
1 
t
t 
 w1, j log t + w2, j rh, j + w3, j j r =P
i wi, j 

t
e, j

Fundamental

noise

All agents use this same equation to obtain an expected return, however, because w
is different each agent, expected returns are different each agent. This leads
heterogeneous (many order prices are diversified) although the model is simple.

The simplicity of the model is very important.
Models include too many related factors prevent understanding anddiscovery of mechanisms affecting price formation.
34

Fundamental and Technical Strategies
Fundamental Strategy
Fundamental Price ＞ Market Price -> Expect + return
Fundamental Price < Market Price -> Expect - return
Technical Strategy
Historical Return ＞ 0 -> Expect + return
Historical Return < 0 -> Expect - return
Technical
Strategy

Fundamental
Price
MarketPrice

Fundamental
Strategy35

Detail of Expected Return
j: agent number (1,000 agents)
ordering in number ordert: tick time

Expected Return of each NA

Historical Return
t
h, j

r

= log( P / Ptt − j)Technical

Pf
1 
t
t 
 w1, j log t + w2, j rh, j + w3, j j r =P
i wi, j 

t
e, j

wi , j and  j

PfFundamental Price

Random ofUniform Distribution

Pt

Market Price at t

wi , jji=1,3: 0～1
i=2: 0～10
0～10000

noise

Fundamental

Parameters for agents

10000 = constantExpected Price of each NA tj

Random ofNormalDistribution
Average=0
σ=3%Pet, j = P t exp(ret, j )36

Why the two strategy?

efficient market hypothesis
Not always
neededonly
exist

Fundamental
strategy

Empirical
Questionnaire*1
Main
Strategy

Shouldnot exist

Absolutely
neededTechnical
strategy

AbsolutelyNotneeded Nature ofShould needed Econophysics*2
Human being
exist
Replicate Stylized
Experimental
Facts
Definition of Stock
Economics*3
If you hold all stocks
Laboratory
You are owner of company
Market*1 Menkhoff, L. and Taylor, M. P. (2007): The Obstinate Passion of Foreign Exchange Professionals: Technical Analysis, Journal of Economic Literature
Yamamoto, R. (2021): Predictor Choice, Investor Types, and the Price Impact of Trades on the Tokyo Stock Exchange, Computational Economics
https://arxiv.org/abs/1906.06000*2 Lux, T. and Marchesi, M.(1999) Scaling and criticality in a stochastic multi-agent model of a financial market, Nature*3 Haruvy and Noussair (2006): The Effect of Short Selling on Bubbles and Crashes in Experimental Spot Asset Markets
https://doi.org/10.1111/j.1540-6261.2006.00868.x

37

Laboratory Market vs. Artificial Market

Sorry, the figure from Japanese bookhttps://www.coronasha.co.jp/np/isbn/9784339028164/

Fundamental Price
Artificial Market
Laboratory Market

Haruvy and Noussair (2006): The Effect of Short Selling on Bubbles and Crashes in Experimental Spot Asset Markets
https://doi.org/10.1111/j.1540-6261.2006.00868.x

Parameter fitting of the artificial market model including fundamental andtechnical strategies leads to similar results with the laboratory market.
This means that both strategies are needed to replicate the laboratory
market, and they may also be needed to replicate real markets.

38Order Price and Buy or Sell
Price

Order Price of each NA

P t o, jSell(one unit)
Random(GaussDistribution)

Expected Price of each NA

P e, j = P exp( r e, j )tttBuy(one unit)

To replicate many waiting limit orders,
order price is scattered around expected price
NA places one buy order when order price > expected price
NA places one sell order when order price < expected price39

Verification: Stylized Facts
The purpose of simulation is understanding the reasons and mechanism,
not replicating ALL Stylized Facts
The simplicity of the model is very important because unnecessary replication of macro phenomena
leads to models that are overfitted and too complex. Such models prevent understanding anddiscovery of mechanisms affecting price formation because of the increase in related factors.
Many empirical studies, e.g., Sewell 2006 have shown that both stylized facts (fat-tail and volatilityclustering) exist statistically in almost all financial markets.
Conversely, they 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.

Fat-tail

1 to 100

kurtosis of price returns is positive
Volatility-clustering 0 to 0.2
square returns have a positive auto-correlation

The magnitudes ofthese values are
unstable and vary
greatly depending on
the asset and/or
period.

For the above reasons, an artificial market model should replicate these values as significantly positive
and within a reasonable range as I mentioned. It is not essential for the model to replicate specificvalues of stylized facts because the values of these facts are unstable in actual financial markets.
40

Stylized Facts

The model of Chiarella (2002) is very simple but replicates long-term statistical characteristics observed in actual
financial markets: a fat tail and volatility clustering.
In contrast, Mizuta (2013) replicates high-frequency micro structures, such as execution rates, cancel rates, andone-tick volatility, that cannot be replicated with the model of Chiarella (2002).
The simplicity of the model is very important for this study, because unnecessary replication of macro phenomena
leads to models that are overfitted and too complex. Such models prevent understanding and discovery ofmechanisms affecting price formation because of the increase in related factors.

41

(1) An artificial market model = an agent-based model for a financial market(2) Suitable complexity, advantages and disadvantages(3) Typical Model(4) Case study: tick size reduction

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

42Here, I very briefly introduce Mizuta et. al. 2013 as a typical study investigating the designof a financial market using an artificial market model.
Mizuta et. al. 2013, “Investigation of Relationship between Tick Size and Trading Volume of Markets using
Artificial Market Simulations”, JPX working Paper Vol. 2
https://www.jpx.co.jp/english/corporate/research-study/working-paper/index.html

43

Tick Size: Battle Between Markets

In Japan, Tokyo Stock Exchange and PTSs (proprietary trading system) battles share of
trading volume. PTS: SBI Japan next securities, Chi-X Japan
Time evolution of prices of same stock at different market
having different tick sizes.

95.0

Market Price

94.0
93.0
92.0
91.0
Minimum Increment: \1 ⇒ Tick Size: 1%

90.0

Minimum Increment: \0.1 ⇒ Tick Size: 0.1%

マルチエージェントによる金融市場のシミュレーション, 2020/9
https://www.coronasha.co.jp/np/isbn/9784339028225/

Share of PTS increased

15:00

14:00

13:00

11:00

10:00

09:00

89.0

time (hh:mm)

Difference of 1% Return is Serious Problem for some
Investors ⇒ They prefer Stock Market has Smaller Tick Size

Tick size is one of the most important factor for battle between markets

44Market Selection Model
Initial Trading
Volume Share: 90%
Tick Size: Large
Exchange A

Initial Trading
Volume Share: 10%
Tick Size: Small
Exchange B
Market Order： Choose theexchange list best priceAgentsLimit Order： Allocate on basis of
Historical Trading Volume Share ofeach exchange

Market Order： buy or sell at the best available price, immediately
Limit Order： buy or sell at a specific price or better,
waiting opposite Market Orders

45

Share of Ex.A with (ΔPA,ΔPB)=(0.1%,0.01%),(000.1%, 0.0001%)

Usually when Tick Size of Ex. A is larger, Ex. A loses volume share,
however, when enough small Tick Sizes, Ex. A dose NOT lose even if
Tick Size of Ex.A is larger than Ex.B.

46

Actual Market Share of New York Stock Exchange(NYSE)Angel, J., et. al., “Equity Trading in the 21st Century”, Marshall School of Business Working Paper No. FBE 09-10
https://ssrn.com/abstract=1584026

For about 2 years, almost same time as simulation result,
NYSE lost its share and it fall from its dominant position47

Tick Size Condition Not to Move Share

Share of Ex.A
Tick Size of Ex.B
at 500 days
0.001% 0.002% 0.005% 0.01% 0.02% 0.05% 0.1%
0.001%
90%
92%
94%
97%
99% 100% 100%
0.002%
89%
91%
93%
97%
99% 100% 100%
0.005%
84%
87%
92%
96%
99% 100% 100%
Tick
sizes
0.01%
77%
78%
83%
92%
98% 100% 100%of Ex.A 0.02%
54%
54%
59%
70%
93% 100% 100%
0.05%
5%
5%
5%
6%
23%
93% 100%
0.1%
0%
0%
0%
0%
0%
0% 94%
Condition Not toMove Share⊿PB>⊿PAor t > ⊿PA t = 0.05 %48

 t < ΔPA
Impossible
to trade at
Ex. A

Marketprice

Tick size of
Ex. A
time

Ex. A never represents⇒ Orders move to Ex. B
movement of market prices.

 t > ΔPA

Marketprice

Enoughresolution
at Ex. A
Ex. A represents them.

Tick size of
Ex. A
time
⇒ not need Ex. B

An Aim is to understand how Important Properties (Tick-Size) affectInvestigating Macro Phenomena (Market Share) and play Roles in System.

It is NOT aim Replicating real-existing Investors and Market Prices,
but understanding mechanism of the system.

Progress of study after that
Equational model led similar result with theartificial market model<- Not the ratio but the difference of ticksizes determines the speed of taking share<- Too small tick size battle is not effective•

Nagumo, S. et. al.(2016), The effect of tick size on trading volume
share in three competing stock markets, Journal of Physics: Conference
Series, vol. 750,no.1.
https://doi.org/10.1088/1742-6596/750/1/012019•

Nagumo, S. et. al.(2017), The Effect of Tick Size on Trading Volume
Share in Two Competing Stock Markets, Journal of the Physical Societyof Japan, vol. 86,no.1. https://doi.org/10.7566/JPSJ.86.014801

Share of PTS decreased after the tick size reduction
2015/2/27 Nikkei news paper
https://www.nikkei.com/article/DGKKZO83727450W5A220C1DTA000/

After the tick size reduction50Summary
This talk showed a philosophy of an agent-based artificial market model.
Why are models needed? How models should be? In the first place, what is a model?
We should understand what is a model deeper to discus healthy using a model.
I will try to clear up a common misunderstanding for a model.
Someone may think tick size reduction is a trivial matter for a financial market. This is,however, important and should not be underestimated. Changing detailed rules sometimes
causes unexpected large impacts and side effects. John McMillan illustrated this nature as“both God and the devil are in the details''. Detailed design can determine whether afinancial market develops or destroys an advanced economy. Designing a market well isvery important for developing and maintaining an advanced economy, but not easy.

I hope that more agent-based artificial market models will contribute todesigning a financial market that works well to further develop and maintainadvanced economies.

51

More detailed Summary✓ Designing a financial market that works well is very important for developing and maintaining an
advanced economy, but is not easy because changing detailed rules, even ones that seem trivial,
sometimes causes unexpected large impacts and side effects.
✓ A computer simulation using an agent-based model can directly treat and clearly explain such complex
systems where micro processes and macro phenomena interact. Recently, an artificial market model,
which is an agent-based model for a financial market, has started to contribute to discussions on rules
and regulations of actual financial markets.
✓ We should understand what is a model deeper for healthy discussion using a model. I tried to clear up acommon misunderstanding for a model. Why are models needed? How models should be? In the firstplace, what is a model?
✓ The purpose of simulation is understanding the reasons and mechanism, not exactly forecasting thereal world. The simplicity of the model is very important because unnecessary replication of macro
phenomena leads to models that are overfitted and too complex. Such models prevent understanding
and discovery of mechanisms affecting price formation because of the increase in related factors. We
must shave non-investigating features from the model. Different investigations, different shaving parts.
✓ I briefly introduced an artificial market model to design financial markets that work well and describe aprevious study investigating tick size reduction. I hope that more artificial market models will contributeto designing financial markets that work well to further develop and maintain advanced economies.

Talk 1: An agent-based model for designinga financial market that works well
Talk 2: Can an AI perform market manipulation at its own
discretion? - A genetic algorithm learns in an artificial market
simulation -You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

53

For Talk 2, there is my Conference paper, read it if you are interested
Conference Paper
Mizuta 2020, “Can an AI perform market manipulation at its own discretion? - A genetic algorithm learns in an
artificial market simulation -”, IEEE Symposium Series on Computational Intelligence, Computational Intelligencefor Financial Engineering and Economics (CIFEr), December 1 to 4, 2020, Canberra, Australia(virtual)

https://doi.org/10.1109/SSCI47803.2020.9308349

https://arxiv.org/abs/2005.10488

Presentation on YouTube https://youtu.be/Rzfm9C4FPNg

2020 IEEE Symposium Series on Computational Intelligence (SSCI)
on Computational Intelligence for Financial Engineeringand Economics (CIFEr) http://www.ieeessci2020.org/

Paper ID: #31

Can an AI perform market manipulation at its own discretion?
- A genetic algorithm learns in an artificial market simulation Takanobu Mizuta

SPARX Asset Management Co., Ltd.
Mail: mizutata[at]gmail.com
HP: https://mizutatakanobu.com

Note that the opinions contained herein are solely those of the authors and do notnecessarily reflect those of SPARX Asset Management Co., Ltd.

You can download this presentation material fromhttps://mizutatakanobu.com/2020CIFEra.pdf

55

(1) Introduction(2) Model(3) Simulation Result(4) Summary

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

56

(1) Introduction(2) Model(3) Simulation Result(4) Summary

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

57

Market manipulation is prohibited
Traders artificially increasing or decreasing market prices to profit

Stock Market
Responsible
manipulation

Artificially increased
Intentionally large impact
Spoofing, Rumors

Market manipulation is prohibited in many countries
as it leads to unfair trades.

58

Who should be held responsible when AI trader performs market manipulation?

Developer builds
an AI trader

AI trader

Stock Market

Responsible
Intention
to Manipulation

Manipulation

No Responsible
present regulationsof the United States

NO intention
to Manipulation

Manipulation

Scopino(2016) indicated that when a developer builds an AI trader with no intention to
perform market manipulation and the AI trader actually performs market manipulation atits own discretion, the developer should not held responsible

Even though market prices are manipulated, no one is held responsible,
which presents difficulties in maintaining the integrity of the market.

59Can AI trader discover market manipulation?
An AI trader must automatically learn the impacts of its trades on market
prices in order to discover that market manipulation earns profit.

However, AI traders are usually evaluated by backtesting
Backtesting

The profit is estimated if the AI traders were trading at a certain
point in time using historical real data on past market prices.
AI judged Buy
If AI bought, how much earns?

AI judged Sell
If AI sold, how much earns?

past market prices<- Prices are Fixed

An AI trader cannot learn the impacts of its trades to market prices

An AI trader cannot discover market manipulation by backtesting60However, an artificial market simulation enables an AI
trader to automatically learn the impacts of its trades onmarket prices because the trades alter the market prices
in the simulation.
In this study,

I constructed an AI trader using a genetic algorithm thatlearns in an artificial market simulation.
I investigated whether the AI trader discovers market
manipulation through learning even when the developerof the trader has no intention of market manipulation.
61

An artificial market model = an agent-based model for a financial market

Virtual and Artificial financial Market built on Computers
ModelsIncludeAgents (Artificial Investors)＋
Price Mechanism (Artificial Exchange)
Order

Price
Mechanism(Exchange)

Agent(Investor)

Each Agent determines anorder by some rules,
Price Mechanism gather
agents orders anddetermines Market Price

Determination market priceComplete Computer Simulation needing NO Empirical Data
✓ can discuss on the mechanism between the micro-macro feedback✓ can be conducted to investigate situations that have neveroccurred in actual financial markets✓ Of course, in the simulation the trades alter the market prices.
62

(1) Introduction(2) Model(3) Simulation Result(4) Summary

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

63ModelGenetic
Algorithm
800 Actions (Buy(B), Sell(S), No action(null))
Gene

B

Gene
10000
Genes

Gene

S

B
S

S

S

S

S
S

・・・・・

B

・・・・・

B

B

Profit=Evaluation

AI agent(AIA)

B

All Actions

・・・・・

Exchange

Order

Artificial Market

S

Artificial Market

Evaluation

・
・
・
B

Actions Indicated
By GeneNormalAgent (NA)

Evaluation

・
・
・
Gene

All Actions

All Actions

・・・・・
S

Artificial Market
Simulation

All Actions
Evaluation

・・・
Artificial Market

Inherit to new generation after
Crossover and Mutation
Repeat 1500 generations

One Gene: indicates all 800 trades of AI agent(AIA)
is evaluated by the AIA's profit in an artificial market simulation
One artificial market: includes one gene and 1000 normal agents.
Normal agents: have same parameters for artificial markets.
-> when AIA’ trades are same, normal agents’ trade are same

Genetic algorithm: searches for the gene that earns the most profit inheriting 1500 times
includes 10000 genes(10000 artificial markets)

64Artificial Market Simulation

Artificial Market
Simulation

Stock Exchange

Actions Indicated
By Genecontinuous double auction

SharesSell
1030

SharesBuy

AI agent(AIA)

Exchange

NormalAgent (NA)
Order

Price
103
102
101
50
100
When buy order come here
130
99
transaction immediately occurs
98
150
When sell order come heretransaction immediately occurs
97
96
70
Multiple buyers and sellers compete to buy and sell stocks in the market, andtransactions can occur at any time whenever an offer to buy and an offer tosell match.
65

AI agent(AIA)
This study focuses on whether an AI trader can discover market manipulation throughlearning even if the builder has no intention of market manipulation.
Therefore, I do not intentionally model trading strategies, and my model directly searches
for all the optimal trades in an artificial market environment.
Genetic
Algorithm

800 Actions (Buy(B), Sell(S), No action(null))
Gene

B

S

S

・・・・・

B

Artificial Market
Simulation

All Actions

Profit=Evaluation

Buy, Sell or, no action（every 10 tick time, one share)

Actions Indicated
By GeneAI agent(AIA)

Exchange

NormalAgent (NA)Order

The trades of AIA impacts market prices
in artificial market simulation
AIA can automatically learn the impacts of its trades on market prices

66Normal Agents

Historical Return

j: agent number (900 agents)
ordering in number ordert: tick timerht, j = log( P t / P

Expected Return of each NAt − j)Technical

Pf
1 
t
t 
 w1, j log t + w2, j rh, j + w3, j j r =P
i wi, j 

t
e, j

wi , j and  j

PfFundamental Price

Random ofUniform Distribution

Pt

Market Price at t

wi , jji=1,3: 0～1
i=2: 0～100
0～1000noise

Fundamental

Parameters for agents

10000 = constantExpected Price of each NA tj

Random ofNormalDistribution
Average=0
σ=3%Pet, j = P t exp(ret, j )67

Fundamental and Technical Strategies
Fundamental Strategy
Fundamental Price ＞ Market Price -> Expect + return
Fundamental Price < Market Price -> Expect - return
Technical Strategy
Historical Return ＞ 0 -> Expect + return
Historical Return < 0 -> Expect - return
Technical
Strategy

Fundamental
Price
MarketPrice

Fundamental
Strategy
68Genetic algorithm

Genes are ordered by profit
800 Actions (Buy(B), Sell(S), No action(null))

Gen

B

Gen
Gen

S
B

S

S
S

S

S

S

・
・
・
・
S

10000
Genes
Gen

B

S

S

・
・
・
・

・・・・・

B

The top 400 genes

Not changed

・・・・・
S

・・・・・

B

Non-top 400 genes
・・・・・

B

are replaced with a probability of 65%
by a crossover gene containing
two genes randomly selectedfrom the top 400 genes.
After crossovers, the actions are
mutated with a probability of 20%

Genetic algorithm searches for the gene that earns the most profit
inheriting 1500 times includes 10000 genes
Genetic algorithm is very popular way generally used by many many studies [Goldberg 1989]69

(1) Introduction(2) Model(3) Simulation Result(4) Summary

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

70Time evolution of market prices with the AIA and without(In the following result, I used the AIA of the optimal gene in the final generation.)
10600

Price

10400

10200

10000

7000

6000

5000

4000

3000

2000

1000

0

9800

Tick Timewith AIA

without AIA

The AIA amplified the variation in the market prices.

71

Time evolution of market prices with the AIA and trading volume

9800

(20)

Trading Volume

0

7000

10000

6000

20

5000

10200

4000

40

3000

10400

2000

60

1000

10600

0

Price

trading volume (positive and negative numbers indicate buying and selling, respectively)
aggregated within every 200 tick times.)

Tick Time
Trading Volume of AIA (right)

Market Price (left)

Fundamental Price (left)

The AIA’s trades are evidently market manipulation.

72

market prices continued to increase even though the AIA did not buy many stocks,
because technical strategy of NA, a larger positive return was expected due to theprevious positive return
10600

60

40

10000

0

9800

(20)

7000

6000

5000

4000

3000

20

2000

1000

0

Price

10400 stocks,
bought manycausing the market
prices to10200
increase

Trading Volume

AIA was able to sell at higher prices
than when they were bought

Tick Time
Trading Volume of AIA (right)

Market Price (left)

Fundamental Price (left)

The AIA’s trades are evidently market manipulation73

Backtesting (without the impacts on market prices)time evolution of market prices is the same as that without the AIA
because the AIA’s trades never impact market prices

40

7000

6000

(20)
5000

9980
4000

0

3000

10000

2000

20

1000

10020

0

Price

10040

Trading Volume

fundamental strategy;
60
AIA had a tendency to buy stocks because the market
prices were lower than the fundamental price

10060

Tick Time
Trading Volume of AIA (right)
Market Price (left)
Fundamental Price (left)

AIA could not discover market manipulation as trading strategy

74

Additional Ten Simulation Runs
No.
2
3
4
5
6
7
8
9
10
11

Simulation
Min/Pf-1 Max/Pf-1 (Max-Min)/Pf Trading Volume of AIA
Result Type-0.59%
4.12%
4.7%
518 Manipulation(overbuying)-0.63%
4.49%
5.1%
506 Manipulation(overbuying)-0.77%
5.37%
6.1%
496 Manipulation(overbuying)-4.33%
0.00%
4.3%
414 Manipulation(underselling)-0.14%
0.00%
0.1%
0No Trades-3.67%
0.03%
3.7%
489 Manipulation(underselling)-0.77%
5.02%
5.8%
511 Manipulation(overbuying)-0.61%
4.96%
5.6%
507 Manipulation(overbuying)-3.68% -0.01%
3.7%
491 Manipulation(underselling)
0.00%
0.17%
0.2%
0
No Trades✓ Eight runs resulted in manipulation including two underselling✓ Two were no trades✓ No fundamental strategy
75

No.
2
3
4
5
6
7
8
9
10
11

Back Testing
Min/Pf-1 Max/Pf-1 (Max-Min)/Pf Trading Volume of AIA-0.04%
0.13%
0.2%
221
-0.08%
0.21%
0.3%
230
-0.10% -0.03%
0.1%
0-0.10%
0.01%
0.1%
0-0.14%
0.00%
0.1%
413
-0.05% -0.01%
0.0%
0-0.05%
0.23%
0.3%
482
-0.04%
0.11%
0.2%
529
-0.01%
0.13%
0.1%
567
0.00%
0.17%
0.2%
484

Result Type
Fundamental Strategy
Fundamental Strategy
No Trades
No Trades
Fundamental Strategy
No Trades
Fundamental Strategy
Fundamental Strategy
Fundamental Strategy
Fundamental Strategy✓ Seven fundamental strategy✓ No manipulation

76

9400

(20)

Trading Volume

0

7000

9600

6000

20

5000

9800

4000

40

3000

10000

2000

60

1000

10200

0

Price

No. 5; Manipulation(underselling)

Tick Time
Trading Volume of AIA (right)

Market Price (left)

Fundamental Price (left)77(1) Introduction(2) Model(3) Simulation Result(4) Summary

You can download this presentation material from https://mizutatakanobu.com/2021kyushu.pdf

78

Suggestion the need for regulation✓ In this study, I constructed an AI trader using a genetic algorithm thatlearns in an artificial market simulation. Then I investigated whether
the AI trader discovers market manipulation through learning evenwhen the person who built the AI trader has no intention of market
manipulation.

✓ The results showed that the AI trader discovered market manipulation
as an optimal investment strategy. This indicates that even though
the developer has no intention of market manipulation, the AI trader
can discover market manipulation as an optimal investment strategy
through learning with an artificial market simulation in which the AI
trader automatically learns the impacts of its trades on market prices.
✓ This also indicates the possibility that an AI trader cannot discovermarket manipulation through learning with backtesting in which there
are no impacts on market prices.

79

Suggestion the need for regulation✓ The results suggest the need for regulation, such as obligating AI
developers to prevent AIs from performing market manipulation.

✓ Another suggestion is that developers should limit trades
performed by AI to avoid impacting market prices.

80