oliver hein, goethe university, frankfurt, financial agent-based computational economics (finace)...
TRANSCRIPT
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Kommunikations-Netzwerk-Topologie und
Marktverhalten
15. Februar 2008
von
Oliver Hein
Forschungskolloquium 2008
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
1. Frankfurt Artificial Stock Market- Components- Agent Types- Auction Method
2. Networks- Network Topologies- Network Centralization Measures
3. Simulation- Parameters- Simulation Results:
• Centralization against Volatility and Distortion• Agent Type Performance
4. Outlook
Contents
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Frankfurt Artificial Stock Market
The Frankfurt Artificial Stock Market (FASM) 1.6 is available for download at:
www.finace.org
But there is no documentation yet! Only articles exist that describe the system.
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Frankfurt Artificial Stock Market(FASM) ver. 1.6
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Handelsablauf
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Kommunikationsnetzwerke
BörseMeistausführungsprinzip
Blau=kaufen, Rot=verkaufen
Scale-Free-NetzwerkZufallsnetzwerk
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Fundamental Agents
• Fundamental agent k observes an exogenous inner value pf (random walk) and the last traded price p.
• Fundamental agent k possesses a risk premium γk.
• The order volume depends on abs(pf – p). Higher differences lead to higher order volumes.
• One buy and one sell order per fundamental agent k and per trading day are generated with:
Limit pf - γk for the buy order
Limit pf + γk for the sell order
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Trend Agents
• Trend agent k observes at time t the prices pt-xkto pt-1
• Every trading day, trend agent k computes a daily moving average mk of xk days of price p.
• If p > mk a buy order and if p < mk a sell order is generated at time t with:
Limit pt-1 ± μ
• μ is a small random number that is positive if there has been more buy orders than sell orders for pt-1 (G=Geld) and vice-versa (B=Brief).
• The order volume depends on abs(py – p). py is the price when a
switch from buy to sell or vice-versa occurred. Higher differences lead to higher order volumes.
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Retail Agents (1)
• Retail Agents are initially not endowed with a trading strategy
• They are able to adopt both trading strategies (trend, fundamental)
• They are initially inactive and get activated by an individual price increase at the stock exchange
• Once activated retail agents may adopt a trading strategy only from their direct neighbors within the communication network.
Three cases are possible:
1. no neighbor with strategy no trading, wait
2. neighbor has strategy adopt and start trading
3. several neighbors with strategy adopt the best one and start trading
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
• Retail agents stop trading and go into hibernation if an individual price decrease at the stock exchange occurred (e.g. 10%)
• They sell all their shares over a defined period (e.g. 10 days) and remain inactive for an individual number of days (e.g. 90 days)
• When the hibernation period is over, they may get activated again depending on their individual
threshold
Retail Agents (2)
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Distribution of Agent Types
Green=Retail Agents, Yellow=Fundamental Agents, Red=Trend Agents
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Double Auction Batch Limit Order Book
The maximum possible trade volume defines the new price at 1019.
Orders Possible Trade Volume
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
NETWORKS
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Random Network
Red=Retail Agents, Yellow=Fundamental Agents, Blue=Trend Agents
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Small-World Network
Red=Retail Agents, Blue=Fundamental Agents, Yellow=Trend Agents
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Scale-Free Network
Red=Retail Agents, Yellow=Fundamental Agents, Blue=Trend Agents
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Degree Centralization
The degree centralization measures the variation of the degree of a network member in relation to all other network members. (g=number of nodes, n*=node with highest degree)
The degree centralization varies between 0 and 1. The star network has a degree-centralization of 1.
*
1
1 2
g n iD Di
D
C CC
g g
Freeman, L. C. (1978/79). "Centrality in Social Networks. Conceptual Clarification." Social Networks 1, p. 215-239.
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Betweeness Centralization
Interactions between two nonadjacent nodes A and B depend on other nodes that exist on the path from node A to node B. The betweenness centralization measures the frequency of a node appearing on the path between the two nonadjacent nodes in relation to the other nodes of the network.
The betweenness centralization varies between 0 and 1, it reaches a maximum if a node is on all shortest paths between all other nodes (star network).
sjk equals the amount of shortest paths between nodes j and k.
pjk(i) equals the probability that node i is on the path between node j and k
jkiB
jkj k
p iC
s
*
12
2
1 2
g n iB Bi
B
C CC
g g
Freeman, L. C. (1978/79). "Centrality in Social Networks. Conceptual Clarification." Social Networks 1, p. 215-239.
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Closeness Centralization
The closeness centralization measures how close a node is to the other nodes of a network in relation to the other nodes of the network. It shows how quickly (shortest paths to other nodes) one node can be reached from other nodes.
d(i, j) being the distance (length of the shortest path) betweennode i and j.
1
1
,g
iC i j
j
C d n n
*
1
1 2 / 2 3
g n iC Ci
C
C CC
g g g
Freeman, L. C. (1978/79). "Centrality in Social Networks. Conceptual Clarification." Social Networks 1, p. 215-239.
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Used Centralization Measures
Network TypesBetweenness
CentralizationCloseness
CentralizationDegree
Centralization
Random 0.0306 0,0994 0.0121
Small-World 0.0461 0.0672 0.0040
Scale-Free 1 0.4048 0.3520 0.1067
Scale-Free 2 0.4574 0.5930 0.6841
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
SIMULATIONS AND RESULTS
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Simulation Parameters
General agents’ parameters agent type # τ time window initial cash initial shares
fundamental 29 0.5% - 3.5% − 5 - 8 mil. 5,000 - 8, 000
trend 18 − 10 - 70 days 1 - 2 mil. 2,000 - 3, 000
retail 453 − − 1 – 1.5 mil. 0
Retail agents’ specific parameters
activation threshold
de-activation threshold
hibernation profit window sell period
5% - 10% 10% - 18% 60 - 90 days 20 - 40 days 10 days
Order volumes of trend agents Order volumes of fundamental agentsdeviation from
signalorder volume in
sharesdeviation from
signalorder volume in
shares0% − 2% 2 0% − 2% 12% − 5% 5 2% − 4% 3
5% − 10% 15 4% − 7% 510% − ∞ 80 7% − ∞ 20
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Simulation Run withthe Small-World Network
Volume
0 500 1000 1500 2000 2500 30000
500
1000
1500
2000
2500
3000
Log Returns
0 500 1000 1500 2000 2500 3000-0,10-0,08-0,06-0,04-0,020,000,020,040,06
Price and Inner Value
0 500 1000 1500 2000 2500 3000
800
900
1000
1100
1200
Price Inner Value
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Simulation Run with theSmall-World Network
Autocorrelation of Absolute Returns
0 30 60 90 120 150-0,2
-0,1
0,0
0,1
0,2
0,3
0,4
Autokorrelation of Returns
0 30 60 90 120 150-0,2
-0,1
0,0
0,1
0,2
0,3
0,4
Annualized Moving Average Volatility
0 500 1000 1500 2000 2500 30000,04
0,06
0,08
0,10
0,12
0,14
Distribution of Returns (log scale)
-0,10 -0,05 0,00 0,05 0,100,1
1
10
100
1000
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Number of Agent Types with the Small-World Network
Number of Retail Agents
0 500 1000 1500 2000 2500 3000
0
100
200
300
400
500
Number of Fundamental and Trend Agents
0 500 1000 1500 2000 2500 3000
0
100
200
300
400
500
Fundamental AgentsTrend Agents
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Descriptive Statistics(10 Runs per Network)
A. Descriptive Statistics of Daily Log-YieldsRandom Small-World Scale-Free 1 Scale-Free 2
Mean 0% 0% 0% 0%
Standard Deviation 0.74% 0.78% 0.83% 0.91%
Skewness -0.54 -0.21 -0.56 -0.96
Min. -5.32% -7.45% -8.48% -13.22%
Max. 5.63% 5.26% 5.60% 7.35%
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Unit-Root and Fat Tail Properties(10 Runs per Network)
B. Unit-RootRandom Small-World Scale-Free 1 Scale-Free 2
Augmented-Dickey-Fuller (ADF) Test:
1% level: -3.43 -3.43 -3.43 -3.43
5% level: -2.86 -2.86 -2.86 -2.86
10% level: -2.56 -2.56 -2.56 -2.56
ADF -16.45 -16.60 -14.46 -14.57
C. Fat Tail PropertyRandom Small-World Scale-Free 1 Scale-Free 2
Kurtosis 10.95 8.18 11.36 14.70
Hill-Estimator (5% tail) 5.4 5.2 4.9 4.8
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Definition of Volatility and Distortion
21 1
2
100/
T
t t tt
volatility P P PT
2
100/
Tf f
t t tt
distortion P P PT
T = trading days (3,000), P = Price, Pf = inner value
Westerhoff, F. (2003). "Heterogeneous Traders and the Tobin tax." Journal of Evolutionary Economics 13, p. 53-70.
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Volatility and Agent Type Performance
D. Volatility, Distortion and Volume (average for 10 runs)Random Small-World Scale-Free 1 Scale-Free 2
Volatility 10.95 8.18 11.36 14.70
Distortion 4.9 4.9 5.2 5.4
Volume (shares) 443,375 568,299 691,699 1,133,726
E. Agent Type Performance (average for 10 runs)Random Small-World Scale-Free 1 Scale-Free 2
Fundamental 10.53% 13.57% 17.14% 34.91%
Trend -11.39% -15.03% -18.93% -19.12%
Retail -6.60% -8.07% -11.36% -22.65%
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Volatility and Network Centralization (10 Runs per Network)
Vo
latil
ity
40
50
60
70
80
90
Network Types
random small-world scale-free 1 scale-free 2
Ne
two
rk C
en
tra
liza
tion
0,0
0,2
0,4
0,6
0,8
VolatilityBetweeness CentralizationCloseness CentralizationDegree Centralization
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Distortion and Network Centralization(10 Runs per Network)
Dis
tort
ion
2
3
4
5
Network Types
random small-world scale-free 1 scale-free 2
Ne
two
rk C
en
tral
iza
tion
0,0
0,2
0,4
0,6
0,8
DistortionBetweeness CentralizationCloseness CentralizationDegree Centralization
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Agent Type Performance(10 Runs per Network)
We
alth
ch
an
ge
in %
-20
0
20
40
Fundamental Agents Trend Agents Retail Agents
Random
Small-World
Scale-Free 1
Scale-Free 2
Oliver Hein, Goethe University, Frankfurt, Financial Agent-based Computational Economics (FINACE)
Outlook
• A cooperation with the Sparkasse Gifhorn-Wolfsburg is in preparation, to find more empirical evidence about the behavior of retail investors.
• The model parameters are analyzed for their sensitivity and if
some may be endogenous.
• An analytical solution of the simulation model is still needed.
• Dynamic communication networks might be an interesting extension.