SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
Financial market simulation based on zero
intelligence models
Vyacheslav Arbuzov1,2
arbuzov@prognoz.ru
1Prognoz Risk Lab
2Perm State University
Perm 21.03.2014
Applied Economic Modeling Workshop
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Basic knowledge about LOB
Continuous double auction scheme
Figure 1. Order book representation
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Basic knowledge about LOB
Continuous double auction
Three fundamental processes specifying a LOB are:
1 Rate/size of market orders
2 Rate/placement/size of limit orders
3 Rate/placement/size of cancellations
Volume
Price
Figure 2. Different types of orders
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Data
LSE data. Farmer, Patelli & Zovko
Data from Farmer, Patelli & Zovko (2005), The Predictive Power
of Zero Intelligence in Financial Markets
Only used data from electronic order book
01/08/1998 to 30/04/2000 (434 trading days)
Selected 11 stocks, each with over 80 events per day and over
300,000 in total
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Data
LSE data. Farmer, Patelli & Zovko
stock num. events average limit market deletions # days
ticker (1000s) (per day) (1000s) (1000s) (1000s)
AZN 608 1405 292 128 188 429
BARC 571 1318 271 128 172 433
CW. 511 1184 244 134 134 432
GLXO 814 1885 390 200 225 434
LLOY 644 1485 302 184 159 434
ORA 314 884 153 57 104 432
PRU 422 978 201 94 127 354
RTR 408 951 195 100 112 431
SB. 665 1526 319 176 170 426
SHEL 592 1367 277 159 156 429
VOD 940 2161 437 296 207 434
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Data
LSE data. Mike, Farmer
Data from Mike, Farmer (2008), An empirical behavioral model of
liquidity and volatility
Only used data from electronic order book
02/05/2000 to 31/12/2002
Selected 25 stocks
Trading day from 9:00 am to 16:00.
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Data
LSE data. Mike, Farmer
Stock # of orders Stock # of orders Stock # of orders
SHEL050 3,560,756 BLT 984,251 III050 301,101
VOD 2,676,888 SBRY 927,874 TATE 243,348
REED 2,353,755 GUS 836,235 FGP 207,390
AZN 2,329,110 HAS 683,124 NFDS 200,654
LLOY 1,954,845 III050 602,416 DEB 182,666
SHEL025 1,708,596 BOC100 500,141 BSY100 177,286
PRU 1,413,085 BOC050 345,129 NEX 134,991
TSCO 1,180,244 BPB 314,414 AVE 109,963
BSY050 1,207,885
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Data
MOEX data
Aeroflot JSC
Only used data from electronic order book
01/01/2012 to 31/01/2012 (21 trading days)
History of all orders and trades
2 765 074 orders
15 786 trades
Trading day from 10:00 am to 18:45.
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Tool kit
Tools for market simulations
Data warehouse: Oracle
Statistical calculations and visualization: R-3.0.2
Market engine simulations: C++
R package (RODBC) for working with database
R package (Rcpp) for working with MinGW compilers (C++)
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
ZI model of 2003
Daniels M.G., Farmer J.D., Gillemot L., Iori G., Smith E. (2003)
Quantitative model of price diffusion and market friction based on
trading as a mechanistic random process, Phys. Rev. Lett. 90
.
There is no established name of this model.
So in our research, we try to named this model as
The Daniels model
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Theory
Basic knowledge
Standard settings and parameters of the zero-intelligence model.
Model works in the logarithm space.
ZI agents place and cancel orders randomly
The logarithm of the tick size is dp
The logarithm of the best (lowest) ask price is a(t)
The logarithm of the best (highest) bid price is b(t)
The spread at time t is s(t) = a(t) − b(t)
Each order/cancellation has characteristic size σ shares (the
sizes of limit orders and market orders are the same)
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Theory
Poisson process
Impatient agents place market orders with Poisson rate µ
shares per unit time (buy and sell market orders equally likely
so effectively rate µ/2 for each).
Patient agents place buy limit orders with Poisson rate α
shares per price per time (uniformly in the semi-infinite
interval (−∞; a(t)) and sell limit orders with the same rate
in) (b(t); ∞)
Cancellations occur with probability δ per unit time (akin to
radioactive decay)
All processes are independent
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Theory
Poisson process
Figure 3. Scheme of the Daniels model
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Estimation of parameters
Estimation of α
We follow the methods of Farmer, Patteli, Zovko (2005). Given
real data of all orders/cancellations, can calibrate the parameters
σ, α, δ, µ
For buy orders calculate relative price ∆ = m − p and for sell
orders ∆ = p − m , where m - logarithm of midquote price
and p is the logarithm of order price
Rt = Qupper
t − Qlower
t , where Qlower
t is the 2 percentile of
density of ∆ and Qupper is the 60 percentile
α is calculated each day and then averaged. On day t,
αt = Lt/|Rt|, where Rt is the range of relative prices that
capture 58 % of day t’s limit orders and Lt is the total
number of shares of effective limit orders within this range.
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Estimation of parameters
Estimation of σ, δ, µ
δt is calculated each day and then averaged. δt is calculated
using only cancelled limit orders in the price range Rt.
Measure δt as the inverse of the average lifetime of a
cancelled limit orders
σ is calculated simply as the average size of all limit orders.
The model assumes both averages equal and in practice the
average limit order size is only slightly larger than the average
market order size.
µ is calculated as the ratio of the number of shares of market
orders to the number of events during the trading day.
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Practice
Estimation of α
Qupper = 12 tick size Qlower = −11 tick size
L = 1, 655, 646 α = 0.108
orders
perasecond · peraprice
Figure 4. Heavy tails of price distribution
(in this case ∆ = priceorder − pricebestaside)
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Practice
Estimation of µ,δ,σ
Parameters Description Value
α Intensity of limit orders 0.108
µ Intensity of market orders 0.006
δ Intensity of cancellations 0.287
dp Tick size 0.01
σ Volume of orders 1184
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Practice
Results of simulations
Figure 5. Distribution of spread
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Practice
Results of simulations
Figure 6. Distribution of returns
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Practice
Results of simulations
Figure 7. Orders lifetime distribution
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Mike-Farmer model
Mike S., Farmer J. D. (2008) An empirical behavioral model of
liquidity and volatility, J. Econ. Dyn. Control 32
.
The Mike-Farmer model
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Description
Basic knowledge
Important properties of the order flow for a future upgrade of the
model (from Farmer et al. (2006)):
Trending of order flow
Power placement of limit prices
Non-Poisson order cancellation process
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Price distribution
Let’s x is logarithmic distance from the same best price. For buy
orders x = π − πb and for sell order x = πa − π.
-0.01 -0.005 0 0.005 0.01
x = relative limit price from same best
10
0
10
1
10
2
10
3
P(x)
Student distribution, alpha=1.3
S0 = 0
S0 = 0, BUY
S0 = 0, SELL
S0 = 0.003
AZN
MOEX data LSE data
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Conditional cancellation process
Position in the order book
The distance of the price of the order i from the opposite best at
time t is:
∆i(t) = π − πb(t) - for sell orders
∆i(t) = πa(t) − π - for buy orders
∆i(0) - the distance to the opposite best when the order is placed
∆i(t) = 0 - when the order is executed
yi(t) = ∆i(t)
∆i(0)
yi = 1 - when order is placed
yi = 0 - when order is executed
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Conditional cancellation process
Position in the order book
Bayes’ rule: P(Ci|yi) = P(yi|Ci)
P(yi) P(C)
P(Ci|yi) = K1(1 − D1e−yi ) P(Ci|yi) = K1(1 − e−yi )
0 1 2 3 4 5
y
10
-3
10
-2
10
-1
P(C|y)
real data
fitted curve
MOEX data LSE data
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Conditional cancellation process
Order book imbalance
nimb = nbuy/(nbuy + nsell) for buy orders
nimb = nsell/(nbuy + nsell) for sell orders , where
nbuy - number of buy orders in order book
nsell - number of sell orders in order book
Bayes’ rule: P(Ci|nimb) = P (nimb|Ci)
P (nimb) P(C)
P(Ci|nimb) = K2(nimb + B)
0 0.2 0.4 0.6 0.8 1
nimb
0
0.004
0.008
0.01
P(C|nimb)
real data
linear fit
MOEX data LSE data
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Conditional cancellation process
Number of orders in the order book
ntot = (nbuy + nsell)
Bayes’ rule: P(Ci|ntot) = P(ntot|Ci)
P(ntot) P(C)
P(Ci|ntot) = K3(1 − D2e−ntot ) P(Ci|ntot) = K3
ntot
MOEX data LSE data
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Combined cancellation model
P(Ci|yi, nimb, ntot) = P(yi|Ci)P(nimb|Ci)P(ntot|Ci)
P(yi)P(nimb)P(ntot) P(C)
.
P(Ci|yi, nimb, ntot) = A(1 − D1e−yi )(nimb + B)(1 − D2e−ntot ) .
where
.
A = K1K2K3
P(C)2
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Mike-Farmer results of simulations (LSE results)
10
-4
10
-3
10
-2
10
-1
R
10
-4
10
-2
10
0P(|r|>R)
real data
Simulation IV.
RETURN
Figure 8. Distribution of returns
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Mike-Farmer results of simulations (LSE results)
10
-4
10
-3
10
-2
10
-1
S
10
-4
10
-2
10
0P(s>S)
real data
Simulation IV.
SPREAD
Figure 9. Spread distribution
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Mike-Farmer results of simulations (LSE results)
10
0
10
1
10
2
10
3
tau
10
-6
10
-4
10
-2
P(tau)
Simulation, slope = -1.9
Real data, slope = -2.1
Figure 10. Lifetime distribution
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Heavy tails in price distribution
Figure 11. Power Law of logarithmic distance
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Fitting of price distribution
Figure 12. Price distribution fitting using Power Law and t-Student
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Liquidity metric
Arbuzov V., Frolova M. Market liquidity measurement and econometric
modeling // Market Risk and Financial Markets Modeling, Springer, 2012
RTCI =
n
i=1
|pi−p|·ni
n
i=1
pini
where pi – price of order i,
ni - volume of order i,
p – best bid price for buy orders and best ask price for sell orders
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Conditional cancellation process
Bayes’ rule: P(Ci|RTCI) = P (RT CI|Ci)
P (RT CI) P(C)
P(Ci|RTCI) = K4(RTCI + D3)
Figure 13. Conditional cancellation process
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Results of simulations (MOEX)
Figure 14. Returns distribution
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Results of simulations (MOEX)
Figure 15. Spread distribution
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Empirical calculations
Results of simulations (MOEX)
tau
P(tau)
100
101
102
103
10−5
10−4
10−3
10−2
10−1
100
Empirical
Daniels
MF
Upgrade
Figure 16. Order lifetime distribution of analyzing models
Vyacheslav Arbuzov Financial market simulation
Intoduction Daniels model Mike-Farmer model Upgrading model Results of models
Answers and questions
References
Arbuzov V., Frolova M. (2012) Market liquidity measurement and econometric modeling. Market Risk and
Financial Markets Modeling, Springer.
Bouchaud J.-P., Gefen Y., Potters M., Wyart M., (2004) Fluctuations and response in financial markets:
the subtle nature of ‘random’ price changes. Quantitative Finance 4 (2), 176–190.
Daniels M.G., Farmer J.D., Gillemot L., Iori G., Smith E. (2003) Quantitative model of price diffusion and
market friction based on trading as a mechanistic random process, Phys. Rev. Lett. 90
Farmer J. D., Gillemot L., Iori G., Krishnamurthy S., Smith D. E., Daniels M. G. (2006) A Random Order
Placement Model of Price Formation in the Continuous Double Auction. The Economy as an Evolving
Complex System III, 133-173. New York: Oxford University Press.
Farmer J. D., Patelli P., Zovko I. I. (2005) The predictive power of zero intelligence in financial markets,
Proc. Natl. Acad. Sci. USA 102 2254–2259
Mike S., Farmer J. D. (2008) An empirical behavioral model of liquidity and volatility, J. Econ. Dyn. Control
32 200–234
R Core Team (2013) R: A language and environment for statistical computing. R Foundation for Statistical
Computing, Vienna, Austria.
Vyacheslav Arbuzov Financial market simulation

Más contenido relacionado

Destacado

Extent3 prognoz practical_approach_lppl_model_2012
Extent3 prognoz practical_approach_lppl_model_2012Extent3 prognoz practical_approach_lppl_model_2012
Extent3 prognoz practical_approach_lppl_model_2012extentconf Tsoy
 
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over WebsocketIntroduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocketsametmax
 
Hidden Markov Models
Hidden Markov ModelsHidden Markov Models
Hidden Markov ModelsVu Pham
 
Hidden Markov Model & Stock Prediction
Hidden Markov Model & Stock PredictionHidden Markov Model & Stock Prediction
Hidden Markov Model & Stock PredictionDavid Chiu
 

Destacado (6)

Seminar psu 05.04.2013
Seminar psu 05.04.2013Seminar psu 05.04.2013
Seminar psu 05.04.2013
 
HPC in R
HPC in RHPC in R
HPC in R
 
Extent3 prognoz practical_approach_lppl_model_2012
Extent3 prognoz practical_approach_lppl_model_2012Extent3 prognoz practical_approach_lppl_model_2012
Extent3 prognoz practical_approach_lppl_model_2012
 
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over WebsocketIntroduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
 
Hidden Markov Models
Hidden Markov ModelsHidden Markov Models
Hidden Markov Models
 
Hidden Markov Model & Stock Prediction
Hidden Markov Model & Stock PredictionHidden Markov Model & Stock Prediction
Hidden Markov Model & Stock Prediction
 

Similar a Financial market simulation based on zero intelligence models

Investigation of Frequent Batch Auctions using Agent Based Model
Investigation of Frequent Batch Auctions using Agent Based ModelInvestigation of Frequent Batch Auctions using Agent Based Model
Investigation of Frequent Batch Auctions using Agent Based ModelTakanobu Mizuta
 
How Many Orders does a Spoofer Need? - Investigation by Agent-Based Model -
How Many Orders does a Spoofer Need?  - Investigation by Agent-Based Model -How Many Orders does a Spoofer Need?  - Investigation by Agent-Based Model -
How Many Orders does a Spoofer Need? - Investigation by Agent-Based Model -Takanobu Mizuta
 
Black Friday Sales Analytics
Black Friday Sales AnalyticsBlack Friday Sales Analytics
Black Friday Sales AnalyticsSOUMIT KAR
 
AI: 強化学習の応用
AI: 強化学習の応用AI: 強化学習の応用
AI: 強化学習の応用Kevin No
 
"Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin...
"Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin..."Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin...
"Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin...Quantopian
 
Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...
Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...
Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...Quantopian
 
Business mathematics gmb 105 pres
Business mathematics gmb 105 presBusiness mathematics gmb 105 pres
Business mathematics gmb 105 presWilliam Masvinu
 
Pricing and hedging GDP-linked bonds in incomplete markets
Pricing and hedging GDP-linked bonds in incomplete marketsPricing and hedging GDP-linked bonds in incomplete markets
Pricing and hedging GDP-linked bonds in incomplete marketsStavros A. Zenios
 
Supply Chain Management
Supply Chain ManagementSupply Chain Management
Supply Chain ManagementEvren E
 
How to survive in a High Frequency World
How to survive in a High Frequency WorldHow to survive in a High Frequency World
How to survive in a High Frequency WorldWilhelm Fritsche
 
Online Learning Startegy of MArket MAking.pdf
Online Learning Startegy of MArket MAking.pdfOnline Learning Startegy of MArket MAking.pdf
Online Learning Startegy of MArket MAking.pdfGal Zahavi
 
gatheral_financialrisks_paris2014.pdf
gatheral_financialrisks_paris2014.pdfgatheral_financialrisks_paris2014.pdf
gatheral_financialrisks_paris2014.pdfTomHardy96
 

Similar a Financial market simulation based on zero intelligence models (20)

Investigation of Frequent Batch Auctions using Agent Based Model
Investigation of Frequent Batch Auctions using Agent Based ModelInvestigation of Frequent Batch Auctions using Agent Based Model
Investigation of Frequent Batch Auctions using Agent Based Model
 
How Many Orders does a Spoofer Need? - Investigation by Agent-Based Model -
How Many Orders does a Spoofer Need?  - Investigation by Agent-Based Model -How Many Orders does a Spoofer Need?  - Investigation by Agent-Based Model -
How Many Orders does a Spoofer Need? - Investigation by Agent-Based Model -
 
Black Friday Sales Analytics
Black Friday Sales AnalyticsBlack Friday Sales Analytics
Black Friday Sales Analytics
 
AI: 強化学習の応用
AI: 強化学習の応用AI: 強化学習の応用
AI: 強化学習の応用
 
"Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin...
"Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin..."Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin...
"Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin...
 
Ch5 - Forecasting in marketing engineering
Ch5 - Forecasting in marketing engineeringCh5 - Forecasting in marketing engineering
Ch5 - Forecasting in marketing engineering
 
Montecarlosimulation2
Montecarlosimulation2Montecarlosimulation2
Montecarlosimulation2
 
Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...
Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...
Statistics - The Missing Link Between Technical Analysis and Algorithmic Trad...
 
Business mathematics gmb 105 pres
Business mathematics gmb 105 presBusiness mathematics gmb 105 pres
Business mathematics gmb 105 pres
 
Ali upload
Ali uploadAli upload
Ali upload
 
Pres fibe2015-pbs-org
Pres fibe2015-pbs-orgPres fibe2015-pbs-org
Pres fibe2015-pbs-org
 
Pres-Fibe2015-pbs-Org
Pres-Fibe2015-pbs-OrgPres-Fibe2015-pbs-Org
Pres-Fibe2015-pbs-Org
 
2022CIFEr
2022CIFEr2022CIFEr
2022CIFEr
 
Pricing and hedging GDP-linked bonds in incomplete markets
Pricing and hedging GDP-linked bonds in incomplete marketsPricing and hedging GDP-linked bonds in incomplete markets
Pricing and hedging GDP-linked bonds in incomplete markets
 
Supply Chain Management
Supply Chain ManagementSupply Chain Management
Supply Chain Management
 
How to survive in a High Frequency World
How to survive in a High Frequency WorldHow to survive in a High Frequency World
How to survive in a High Frequency World
 
Online Learning Startegy of MArket MAking.pdf
Online Learning Startegy of MArket MAking.pdfOnline Learning Startegy of MArket MAking.pdf
Online Learning Startegy of MArket MAking.pdf
 
Automated Trading
Automated TradingAutomated Trading
Automated Trading
 
gatheral_financialrisks_paris2014.pdf
gatheral_financialrisks_paris2014.pdfgatheral_financialrisks_paris2014.pdf
gatheral_financialrisks_paris2014.pdf
 
Portfolio Planning
Portfolio PlanningPortfolio Planning
Portfolio Planning
 

Último

TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...ssifa0344
 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfGale Pooley
 
Stock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfStock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfMichael Silva
 
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...ssifa0344
 
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...ssifa0344
 
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Pooja Nehwal
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure servicePooja Nehwal
 
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptxFinTech Belgium
 
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home DeliveryPooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home DeliveryPooja Nehwal
 
The Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfThe Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfGale Pooley
 
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service NashikHigh Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptxFinTech Belgium
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfGale Pooley
 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfGale Pooley
 
The Economic History of the U.S. Lecture 23.pdf
The Economic History of the U.S. Lecture 23.pdfThe Economic History of the U.S. Lecture 23.pdf
The Economic History of the U.S. Lecture 23.pdfGale Pooley
 

Último (20)

TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdf
 
Stock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfStock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdf
 
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
 
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
 
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
 
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
 
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
 
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
 
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home DeliveryPooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
 
The Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfThe Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdf
 
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service NashikHigh Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
High Class Call Girls Nashik Maya 7001305949 Independent Escort Service Nashik
 
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
 
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdf
 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdf
 
The Economic History of the U.S. Lecture 23.pdf
The Economic History of the U.S. Lecture 23.pdfThe Economic History of the U.S. Lecture 23.pdf
The Economic History of the U.S. Lecture 23.pdf
 

Financial market simulation based on zero intelligence models

  • 1. Financial market simulation based on zero intelligence models Vyacheslav Arbuzov1,2 arbuzov@prognoz.ru 1Prognoz Risk Lab 2Perm State University Perm 21.03.2014 Applied Economic Modeling Workshop Vyacheslav Arbuzov Financial market simulation
  • 2. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Basic knowledge about LOB Continuous double auction scheme Figure 1. Order book representation Vyacheslav Arbuzov Financial market simulation
  • 3. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Basic knowledge about LOB Continuous double auction Three fundamental processes specifying a LOB are: 1 Rate/size of market orders 2 Rate/placement/size of limit orders 3 Rate/placement/size of cancellations Volume Price Figure 2. Different types of orders Vyacheslav Arbuzov Financial market simulation
  • 4. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Data LSE data. Farmer, Patelli & Zovko Data from Farmer, Patelli & Zovko (2005), The Predictive Power of Zero Intelligence in Financial Markets Only used data from electronic order book 01/08/1998 to 30/04/2000 (434 trading days) Selected 11 stocks, each with over 80 events per day and over 300,000 in total Vyacheslav Arbuzov Financial market simulation
  • 5. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Data LSE data. Farmer, Patelli & Zovko stock num. events average limit market deletions # days ticker (1000s) (per day) (1000s) (1000s) (1000s) AZN 608 1405 292 128 188 429 BARC 571 1318 271 128 172 433 CW. 511 1184 244 134 134 432 GLXO 814 1885 390 200 225 434 LLOY 644 1485 302 184 159 434 ORA 314 884 153 57 104 432 PRU 422 978 201 94 127 354 RTR 408 951 195 100 112 431 SB. 665 1526 319 176 170 426 SHEL 592 1367 277 159 156 429 VOD 940 2161 437 296 207 434 Vyacheslav Arbuzov Financial market simulation
  • 6. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Data LSE data. Mike, Farmer Data from Mike, Farmer (2008), An empirical behavioral model of liquidity and volatility Only used data from electronic order book 02/05/2000 to 31/12/2002 Selected 25 stocks Trading day from 9:00 am to 16:00. Vyacheslav Arbuzov Financial market simulation
  • 7. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Data LSE data. Mike, Farmer Stock # of orders Stock # of orders Stock # of orders SHEL050 3,560,756 BLT 984,251 III050 301,101 VOD 2,676,888 SBRY 927,874 TATE 243,348 REED 2,353,755 GUS 836,235 FGP 207,390 AZN 2,329,110 HAS 683,124 NFDS 200,654 LLOY 1,954,845 III050 602,416 DEB 182,666 SHEL025 1,708,596 BOC100 500,141 BSY100 177,286 PRU 1,413,085 BOC050 345,129 NEX 134,991 TSCO 1,180,244 BPB 314,414 AVE 109,963 BSY050 1,207,885 Vyacheslav Arbuzov Financial market simulation
  • 8. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Data MOEX data Aeroflot JSC Only used data from electronic order book 01/01/2012 to 31/01/2012 (21 trading days) History of all orders and trades 2 765 074 orders 15 786 trades Trading day from 10:00 am to 18:45. Vyacheslav Arbuzov Financial market simulation
  • 9. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Tool kit Tools for market simulations Data warehouse: Oracle Statistical calculations and visualization: R-3.0.2 Market engine simulations: C++ R package (RODBC) for working with database R package (Rcpp) for working with MinGW compilers (C++) Vyacheslav Arbuzov Financial market simulation
  • 10. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models ZI model of 2003 Daniels M.G., Farmer J.D., Gillemot L., Iori G., Smith E. (2003) Quantitative model of price diffusion and market friction based on trading as a mechanistic random process, Phys. Rev. Lett. 90 . There is no established name of this model. So in our research, we try to named this model as The Daniels model Vyacheslav Arbuzov Financial market simulation
  • 11. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Theory Basic knowledge Standard settings and parameters of the zero-intelligence model. Model works in the logarithm space. ZI agents place and cancel orders randomly The logarithm of the tick size is dp The logarithm of the best (lowest) ask price is a(t) The logarithm of the best (highest) bid price is b(t) The spread at time t is s(t) = a(t) − b(t) Each order/cancellation has characteristic size σ shares (the sizes of limit orders and market orders are the same) Vyacheslav Arbuzov Financial market simulation
  • 12. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Theory Poisson process Impatient agents place market orders with Poisson rate µ shares per unit time (buy and sell market orders equally likely so effectively rate µ/2 for each). Patient agents place buy limit orders with Poisson rate α shares per price per time (uniformly in the semi-infinite interval (−∞; a(t)) and sell limit orders with the same rate in) (b(t); ∞) Cancellations occur with probability δ per unit time (akin to radioactive decay) All processes are independent Vyacheslav Arbuzov Financial market simulation
  • 13. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Theory Poisson process Figure 3. Scheme of the Daniels model Vyacheslav Arbuzov Financial market simulation
  • 14. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Estimation of parameters Estimation of α We follow the methods of Farmer, Patteli, Zovko (2005). Given real data of all orders/cancellations, can calibrate the parameters σ, α, δ, µ For buy orders calculate relative price ∆ = m − p and for sell orders ∆ = p − m , where m - logarithm of midquote price and p is the logarithm of order price Rt = Qupper t − Qlower t , where Qlower t is the 2 percentile of density of ∆ and Qupper is the 60 percentile α is calculated each day and then averaged. On day t, αt = Lt/|Rt|, where Rt is the range of relative prices that capture 58 % of day t’s limit orders and Lt is the total number of shares of effective limit orders within this range. Vyacheslav Arbuzov Financial market simulation
  • 15. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Estimation of parameters Estimation of σ, δ, µ δt is calculated each day and then averaged. δt is calculated using only cancelled limit orders in the price range Rt. Measure δt as the inverse of the average lifetime of a cancelled limit orders σ is calculated simply as the average size of all limit orders. The model assumes both averages equal and in practice the average limit order size is only slightly larger than the average market order size. µ is calculated as the ratio of the number of shares of market orders to the number of events during the trading day. Vyacheslav Arbuzov Financial market simulation
  • 16. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Practice Estimation of α Qupper = 12 tick size Qlower = −11 tick size L = 1, 655, 646 α = 0.108 orders perasecond · peraprice Figure 4. Heavy tails of price distribution (in this case ∆ = priceorder − pricebestaside) Vyacheslav Arbuzov Financial market simulation
  • 17. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Practice Estimation of µ,δ,σ Parameters Description Value α Intensity of limit orders 0.108 µ Intensity of market orders 0.006 δ Intensity of cancellations 0.287 dp Tick size 0.01 σ Volume of orders 1184 Vyacheslav Arbuzov Financial market simulation
  • 18. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Practice Results of simulations Figure 5. Distribution of spread Vyacheslav Arbuzov Financial market simulation
  • 19. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Practice Results of simulations Figure 6. Distribution of returns Vyacheslav Arbuzov Financial market simulation
  • 20. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Practice Results of simulations Figure 7. Orders lifetime distribution Vyacheslav Arbuzov Financial market simulation
  • 21. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Mike-Farmer model Mike S., Farmer J. D. (2008) An empirical behavioral model of liquidity and volatility, J. Econ. Dyn. Control 32 . The Mike-Farmer model Vyacheslav Arbuzov Financial market simulation
  • 22. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Description Basic knowledge Important properties of the order flow for a future upgrade of the model (from Farmer et al. (2006)): Trending of order flow Power placement of limit prices Non-Poisson order cancellation process Vyacheslav Arbuzov Financial market simulation
  • 23. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Price distribution Let’s x is logarithmic distance from the same best price. For buy orders x = π − πb and for sell order x = πa − π. -0.01 -0.005 0 0.005 0.01 x = relative limit price from same best 10 0 10 1 10 2 10 3 P(x) Student distribution, alpha=1.3 S0 = 0 S0 = 0, BUY S0 = 0, SELL S0 = 0.003 AZN MOEX data LSE data Vyacheslav Arbuzov Financial market simulation
  • 24. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Conditional cancellation process Position in the order book The distance of the price of the order i from the opposite best at time t is: ∆i(t) = π − πb(t) - for sell orders ∆i(t) = πa(t) − π - for buy orders ∆i(0) - the distance to the opposite best when the order is placed ∆i(t) = 0 - when the order is executed yi(t) = ∆i(t) ∆i(0) yi = 1 - when order is placed yi = 0 - when order is executed Vyacheslav Arbuzov Financial market simulation
  • 25. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Conditional cancellation process Position in the order book Bayes’ rule: P(Ci|yi) = P(yi|Ci) P(yi) P(C) P(Ci|yi) = K1(1 − D1e−yi ) P(Ci|yi) = K1(1 − e−yi ) 0 1 2 3 4 5 y 10 -3 10 -2 10 -1 P(C|y) real data fitted curve MOEX data LSE data Vyacheslav Arbuzov Financial market simulation
  • 26. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Conditional cancellation process Order book imbalance nimb = nbuy/(nbuy + nsell) for buy orders nimb = nsell/(nbuy + nsell) for sell orders , where nbuy - number of buy orders in order book nsell - number of sell orders in order book Bayes’ rule: P(Ci|nimb) = P (nimb|Ci) P (nimb) P(C) P(Ci|nimb) = K2(nimb + B) 0 0.2 0.4 0.6 0.8 1 nimb 0 0.004 0.008 0.01 P(C|nimb) real data linear fit MOEX data LSE data Vyacheslav Arbuzov Financial market simulation
  • 27. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Conditional cancellation process Number of orders in the order book ntot = (nbuy + nsell) Bayes’ rule: P(Ci|ntot) = P(ntot|Ci) P(ntot) P(C) P(Ci|ntot) = K3(1 − D2e−ntot ) P(Ci|ntot) = K3 ntot MOEX data LSE data Vyacheslav Arbuzov Financial market simulation
  • 28. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Combined cancellation model P(Ci|yi, nimb, ntot) = P(yi|Ci)P(nimb|Ci)P(ntot|Ci) P(yi)P(nimb)P(ntot) P(C) . P(Ci|yi, nimb, ntot) = A(1 − D1e−yi )(nimb + B)(1 − D2e−ntot ) . where . A = K1K2K3 P(C)2 Vyacheslav Arbuzov Financial market simulation
  • 29. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Mike-Farmer results of simulations (LSE results) 10 -4 10 -3 10 -2 10 -1 R 10 -4 10 -2 10 0P(|r|>R) real data Simulation IV. RETURN Figure 8. Distribution of returns Vyacheslav Arbuzov Financial market simulation
  • 30. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Mike-Farmer results of simulations (LSE results) 10 -4 10 -3 10 -2 10 -1 S 10 -4 10 -2 10 0P(s>S) real data Simulation IV. SPREAD Figure 9. Spread distribution Vyacheslav Arbuzov Financial market simulation
  • 31. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Mike-Farmer results of simulations (LSE results) 10 0 10 1 10 2 10 3 tau 10 -6 10 -4 10 -2 P(tau) Simulation, slope = -1.9 Real data, slope = -2.1 Figure 10. Lifetime distribution Vyacheslav Arbuzov Financial market simulation
  • 32. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Heavy tails in price distribution Figure 11. Power Law of logarithmic distance Vyacheslav Arbuzov Financial market simulation
  • 33. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Fitting of price distribution Figure 12. Price distribution fitting using Power Law and t-Student Vyacheslav Arbuzov Financial market simulation
  • 34. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Liquidity metric Arbuzov V., Frolova M. Market liquidity measurement and econometric modeling // Market Risk and Financial Markets Modeling, Springer, 2012 RTCI = n i=1 |pi−p|·ni n i=1 pini where pi – price of order i, ni - volume of order i, p – best bid price for buy orders and best ask price for sell orders Vyacheslav Arbuzov Financial market simulation
  • 35. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Conditional cancellation process Bayes’ rule: P(Ci|RTCI) = P (RT CI|Ci) P (RT CI) P(C) P(Ci|RTCI) = K4(RTCI + D3) Figure 13. Conditional cancellation process Vyacheslav Arbuzov Financial market simulation
  • 36. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Results of simulations (MOEX) Figure 14. Returns distribution Vyacheslav Arbuzov Financial market simulation
  • 37. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Results of simulations (MOEX) Figure 15. Spread distribution Vyacheslav Arbuzov Financial market simulation
  • 38. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Empirical calculations Results of simulations (MOEX) tau P(tau) 100 101 102 103 10−5 10−4 10−3 10−2 10−1 100 Empirical Daniels MF Upgrade Figure 16. Order lifetime distribution of analyzing models Vyacheslav Arbuzov Financial market simulation
  • 39. Intoduction Daniels model Mike-Farmer model Upgrading model Results of models Answers and questions References Arbuzov V., Frolova M. (2012) Market liquidity measurement and econometric modeling. Market Risk and Financial Markets Modeling, Springer. Bouchaud J.-P., Gefen Y., Potters M., Wyart M., (2004) Fluctuations and response in financial markets: the subtle nature of ‘random’ price changes. Quantitative Finance 4 (2), 176–190. Daniels M.G., Farmer J.D., Gillemot L., Iori G., Smith E. (2003) Quantitative model of price diffusion and market friction based on trading as a mechanistic random process, Phys. Rev. Lett. 90 Farmer J. D., Gillemot L., Iori G., Krishnamurthy S., Smith D. E., Daniels M. G. (2006) A Random Order Placement Model of Price Formation in the Continuous Double Auction. The Economy as an Evolving Complex System III, 133-173. New York: Oxford University Press. Farmer J. D., Patelli P., Zovko I. I. (2005) The predictive power of zero intelligence in financial markets, Proc. Natl. Acad. Sci. USA 102 2254–2259 Mike S., Farmer J. D. (2008) An empirical behavioral model of liquidity and volatility, J. Econ. Dyn. Control 32 200–234 R Core Team (2013) R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. Vyacheslav Arbuzov Financial market simulation