0% found this document useful (0 votes)
27 views294 pages

Introduction to Econophysics - Carlo Requião Da Cunha

Uploaded by

anilcostaf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views294 pages

Introduction to Econophysics - Carlo Requião Da Cunha

Uploaded by

anilcostaf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 294

Introduction to

Econophysics
Introduction to
Econophysics
Contemporary Approaches with
Python Simulations

Carlo Requião da Cunha


First edition published 2022
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742

and by CRC Press


2 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN

© 2022 Carlo Requião da Cunha

CRC Press is an imprint of Taylor & Francis Group, LLC

Reasonable efforts have been made to publish reliable data and information, but the author and pub-
lisher cannot assume responsibility for the validity of all materials or the consequences of their use.
The authors and publishers have attempted to trace the copyright holders of all material reproduced
in this publication and apologize to copyright holders if permission to publish in this form has not
been obtained. If any copyright material has not been acknowledged please write and let us know so
we may rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information stor-
age or retrieval system, without written permission from the publishers.

For permission to photocopy or use material electronically from this work, access www.copyright.
com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA
01923, 978-750-8400. For works that are not available on CCC please contact mpkbookspermis-
[email protected]

Trademark notice: Product or corporate names may be trademarks or registered trademarks and are
used only for identification and explanation without intent to infringe.

Library of Congress Cataloging-in-Publication Data

Names: Requião da Cunha, Carlo, author.


Title: Introduction to econophysics : contemporary approaches with Python
simulations / Carlo Requião da Cunha.
Description: 1st edition. | Boca Raton, FL : CRC Press, [2022] | Includes
bibliographical references and index.
Identifiers: LCCN 2021020191 | ISBN 9780367648459 (hardback) | ISBN
9780367651282 (paperback) | ISBN 9781003127956 (ebook)
Subjects: LCSH: Econophysics. | Economics--Statistical methods. | Python
(Computer program language)
Classification: LCC HB137 .R47 2022 | DDC 330.01/5195--dc23
LC record available at https://lccn.loc.gov/2021020191

ISBN: 978-0-367-64845-9 (hbk)


ISBN: 978-0-367-65128-2 (pbk)
ISBN: 978-1-003-12795-6 (ebk)

DOI: 10.1201/9781003127956

Typeset in Nimbus font


by KnowledgeWorks Global Ltd.

http://www.filosofisica.com/books/econophysics.html
Dedication

for Marco, Mônica, Ingrid, Sofia, and Arthur


Contents

Preface.......................................................................................................................xi

Chapter 1 Review of Economics ......................................................................1


1.1 Supply and demand.................................................................2
1.2 Efficient market hypothesis ....................................................6
1.3 Stocks and derivatives.............................................................6
1.3.1 Options.......................................................................8
1.3.1.1 Strategies with Options.............................. 8

Chapter 2 Asset Return Statistics................................................................... 13


2.1 Return rates........................................................................... 13
2.2 Probability theory ................................................................. 16
2.2.1 Probability Measure ................................................. 17
2.2.1.1 Conditional Probability ...........................17
2.2.2 σ -Algebra ................................................................18
2.2.3 Random Variables .................................................... 19
2.2.3.1 Conditional Expectation .......................... 20
2.2.4 Distribution Functions ............................................. 21
2.2.4.1 Moments of a Distribution....................... 23
2.2.5 Lévy Processes......................................................... 24
2.2.5.1 Infinitely Divisible Processes ..................25
2.2.5.2 Stable Distributions .................................25
2.2.6 Distribution Tails...................................................... 27
2.2.6.1 Subexponential Distributions ..................29
2.2.6.2 Long and Fat Tails ...................................30
2.2.7 Pareto Distribution ...................................................31
2.2.7.1 Lorenz Curve ...........................................34
2.2.7.2 Gini Index ................................................ 35
2.3 Models for financial time series............................................ 37
2.3.1 Autoregressive Model (AR)..................................... 37
2.3.2 Moving Average (MA)............................................. 40
2.3.3 Autoregressive Moving Average (ARMA) ..............42
2.3.4 Box-Jenkins Approach.............................................44
2.3.4.1 Partial Autocorrelation ............................45
2.3.4.2 Durbin-Levinson Recursive Method ....... 47
2.3.4.3 Yule-Walker Equations ............................48
2.3.5 Heteroscedasticity ....................................................49
2.3.5.1 Generalized ARCH Model ...................... 50

vii
viii Contents

2.4 Stylized empirical facts of financial time series ................... 52


2.4.1 Stationarity............................................................... 53
2.4.1.1 Fourier Transform.................................... 55
2.4.2 Common empirical facts .......................................... 57

Chapter 3 Stochastic Calculus........................................................................ 61


3.1 Martingales and fair games................................................... 61
3.1.1 Random Walks ......................................................... 64
3.1.2 Pólya Processes........................................................ 65
3.1.3 Stopping Times ........................................................ 67
3.1.4 Wald’s Equation ....................................................... 69
3.1.5 Galton-Watson Process ............................................ 71
3.1.5.1 Extinction ................................................ 72
3.1.6 Azuma-Hoeffding Theorem..................................... 74
3.2 Markov chains....................................................................... 77
3.2.1 Transition Function .................................................. 78
3.2.2 Stationary Distribution............................................. 79
3.2.2.1 Detailed Balance...................................... 81
3.2.3 First Passage Time ................................................... 83
3.2.4 Birth-and-Death Process .......................................... 85
3.2.4.1 Pure Birth Process ................................... 86
3.2.4.2 Yule-Furry Process .................................. 87
3.2.4.3 Pure Death Process .................................. 88
3.2.4.4 Linear Birth and Death Process............... 89
3.3 Ornstein-Uhlenbeck processes.............................................. 90
3.3.1 Langevin Equation ................................................... 90
3.3.1.1 Solution.................................................... 92
3.3.1.2 Dissipation-Fluctuation Theorem............ 94
3.3.2 Limited OU Process................................................. 94
3.4 Point processes...................................................................... 95
3.4.1 Hawkes Process ....................................................... 97
3.4.1.1 Solution.................................................... 98

Chapter 4 Options Pricing............................................................................ 101


4.1 From a random walk to a Wiener process .......................... 101
4.2 Binomial trees..................................................................... 103
4.2.1 Cox-Ross-Rubinstein Model.................................. 106
4.3 Black-Scholes-Merton model ............................................. 108
4.3.1 Diffusion-Advection .............................................. 110
4.3.2 Solution .................................................................. 111
Contents ix

Chapter 5 Portfolio Theory .......................................................................... 117


5.1 Markowitz model................................................................ 117
5.1.1 Risk Estimation...................................................... 119
5.1.2 Risk-free Asset....................................................... 123
5.1.2.1 Market Portfolio .................................... 124
5.1.3 Tobin’s Separation Theorem .................................. 124
5.1.3.1 CAPM.................................................... 127
5.2 Random matrix theory ........................................................ 127
5.2.1 Density of Eigenvalues .......................................... 129
5.2.2 Wigner’s Semi-Circle Law.....................................130
5.2.3 Marčenko-Pastur Law ............................................ 133
5.2.3.1 Correlation Matrix ................................. 135
5.2.4 Wigner’s Surmise................................................... 138
5.3 Other portfolio measures .................................................... 141

Chapter 6 Criticality..................................................................................... 147


6.1 Crises and cycles................................................................. 147
6.2 Catastrophe theory .............................................................. 151
6.2.1 Cusp Catastrophe ................................................... 152
6.2.2 Catastrophic Dynamics .......................................... 153
6.3 Self-organized criticality..................................................... 160
6.3.1 Cellular Automata.................................................. 160
6.3.2 Simulations ............................................................ 162

Chapter 7 Games and Competitions............................................................. 169


7.1 Game theory through examples .......................................... 170
7.1.1 The El Farol Bar Problem ...................................... 170
7.1.1.1 Minority Game ...................................... 171
7.1.2 Cooperative Games ................................................ 176
7.1.3 Ultimatum Game.................................................... 179
7.1.3.1 Nash Equilibrium................................... 180
7.1.4 Prisoner’s Dilemma................................................ 181
7.1.4.1 Pareto Optimum..................................... 182
7.1.4.2 Walrasian Equilibrium........................... 183
7.1.5 (Anti-)Coordination Games ................................... 184
7.1.5.1 Ratchet Effect ........................................ 188
7.2 Evolutionary game theory................................................... 189
7.2.1 Mixed Strategy....................................................... 191
7.2.2 Replicator Dynamics.............................................. 193
7.3 Lotka-Volterra equations ....................................................196
x Contents

Chapter 8 Agent-Based Simulations ............................................................ 205


8.1 Complex networks .............................................................. 205
8.1.1 Metrics ................................................................... 207
8.1.1.1 Clustering Coefficient............................ 208
8.1.1.2 Centrality ............................................... 209
8.1.1.3 Assortativity........................................... 211
8.1.2 Random Networks ................................................. 213
8.1.2.1 Average Path Length.............................. 214
8.1.2.2 Clustering Coefficient............................ 215
8.1.3 Scale-Free Networks.............................................. 215
8.1.3.1 Degree Distribution ............................... 216
8.1.3.2 Clustering Coefficient............................ 218
8.1.4 Small World Networks...........................................219
8.2 Socioeconomic models ....................................................... 219
8.2.1 Schelling’s Model of Segregation .......................... 220
8.2.2 Opinion Dynamics ................................................. 224
8.2.2.1 Kirman Model ....................................... 227
8.2.3 Market Spin Models............................................... 229
8.3 Kinetic models for wealth distribution ............................... 233
8.3.1 Conservative Market Model................................... 234
8.3.2 Non-Conservative Market Model .......................... 235

Appendix A Simulation of Stochastic Processes ............................................. 239

Appendix B Monte Carlo Simulations............................................................. 243

Appendix C Fokker-Planck Equation .............................................................. 245

Appendix D Girsanov Theorem ....................................................................... 249

Appendix E Feynman-Kack Formula .............................................................. 251

Appendix F Boltzmann Equation .................................................................... 253

Appendix G Liouville-BBGKY ....................................................................... 255


G.1 Liouville theorem................................................................ 255
G.2 BBGKY hierarchy .............................................................. 256

References ............................................................................................................. 259

Index...................................................................................................................... 271
Preface
It was 2017 when I was approached by a group of undergraduate students asking me
to offer an elective course in econophysics. The course was listed in the university
catalog but had never been offered before. As I was progressively being attracted to
intersectional areas of physics I took the challenge.
The first obstacle that I had to overcome was the limited number of resources.
Econophysics is still a relatively new field and there were not many books available
on the topic if compared to books about well-established fields such as quantum me-
chanics. Moreover, most of the books about econophysics that I had the opportunity
to find were aimed at graduate level or above. On the other hand, the public demand-
ing the course had barely completed their first course on statistical mechanics. This
made me structure the discipline with adjacent topics to make the subject easier to
tackle by undergraduate students. Finding all these topics in the same book, however,
was impossible for me at that time.
It was also important to motivate the students with real life examples before in-
troducing some mathematically intense theories. Therefore, the book often begins a
chapter with a real story related to the subject and many applications are discussed
throughout the chapters. Furthermore, brief code snippets are included to show how
sophisticated theories can be translated and simulated in a current computer lan-
guage: Python. In many cases, compiled languages such as C and Fortran would
render faster simulations, but Python was chosen for its simplicity and also for the
opportunity it offers for the students to advance in a language that is highly demanded
by today’s industry.
The book was written in two languages: English and mathematics. Although many
authors prefer to produce more conceptual materials, I advocate that quite often math
can speak for itself and say much more than a spoken language. The only constraint
is that the reader must know how to read this language. Nonetheless, this book was
written for physics students, and, although there is some good level of math, it lacks
the deep formal rigor that a mathematician would expect. Also, since the book was
written with undergraduate students in mind, many derivations are explicitly shown.
I also found it the perfect opportunity to introduce some advanced math that physics
students would not typically encounter in an undergraduate program such as measure
theory, stochastic calculus, and catastrophe theory. Being firstly aimed at undergrad-
uate students, though, it does not mean that the book cannot be used by graduate
students and researchers in general. On the contrary, the material developed here had
also been used in a graduate level course in physics at UFRGS.
Econophysics, as it will be discussed, tries to build an interface between physics
and economics. The latter, though, unlike physics, can have many different schools
of thought. Typically, the school of economic thought an author tries connect with
is not made explicit in most materials about econophysics. Schools of thought
that experimentally failed are vehemently discarded in this book, unless they are

xi
xii Preface

useful to highlight improved theories from other schools. Consequently, it is not by


mere chance that the reader will find many references to the Austrian school of eco-
nomic thought. Although it is not perfect, this school establishes a good link between
physics and economics as it will be discussed along the book.
Finally, I support Paul Feyerabend’s view that science, its history and philosophy,
make an inseparable triad. When one fails, the other two are also compromised and
knowledge eventually halts. Therefore, the reader will notice several endnotes with
very short biographies about some of the authors who helped construct the theories
we have today.

PLAN OF THE BOOK


This book was primarily designed to be useful for those learning econophysics.
Therefore, every major theory necessary to understanding fundamental achievements
in econophysics are included. Most of the derivations are present but those that are
not are skipped because they are well beyond the scope of the book. All snippets are
tested and should reproduce most of the presented figures. Moreover, several appen-
dices are included to help the reader dive more deeply into some topics.
The book begins with a conceptual review of economics drawing some links with
physics. Still on the first chapter the efficient market hypothesis is introduced and
some strategies with derivatives are used to illustrate the behavior of investors.
Chapter two mixes probability theory with some concepts used in econophysics
such as log-returns. The reader will become familiarized with mathematical termi-
nology such as sigma-algebras and probability spaces but will also study how proba-
bility distributions can have curious behaviors such as heavy tails. The Pareto distri-
bution is used to discuss some common topics in economics such as the Lorenz curve
and the Gini index. The chapter continues by exploring some basic econometrics for
financial time series. Particularly, the GARCH model is discussed making a bridge
to stylized facts.
Chapter three deals with stochastic calculus for physicists. It begins with the con-
nection between martingales and fair games and moves to Markov chains. The latter
is used to model a three-state market that can be bullish, bearish or crabish, a con-
cept that appeared in one of the classes and was joyfully adopted. Mean reverting
processes are then discussed bringing the Langevin equation to the table. The chap-
ter ends with point processes that are currently being used to model some economic
problems such as the Epps effect. This is another mathematically intense chapter
that explores the fundamental properties of each of the models. Although it is not
strictly about the intersection of economics with physics, it holds the fundamental
knowledge to deal with some important concepts in later chapters.
Chapter four uses many concepts derived in the previous chapter to study op-
tions pricing. It begins defining Wiener processes and introduces the Fokker-Planck
equation. Two important models are then discussed: binomial trees and the Black-
Scholes-Merton model. Some additional stochastic calculus is used throughout the
chapter.
Preface xiii

Chapter five introduces the concept of portfolio. It begins with the well-known
Markowitz portfolio and CAPM models and then makes a connection between port-
folios and random matrix theory, speculating if some of the tools used in quantum
mechanics can be used to study these portfolios.
Chapter six is dedicated to crises, cycles and collapses. It begins with a review of
the Austrian business cycle theory and then advances to catastrophe theory, a topic
that finds connections with phase transitions in physics, but is uncommon in most
undergraduate programs. The chapter closes with self-organized criticality under a
cellular automata approach.
The next topic, game theory, is shown in chapter seven mainly through examples
without dwelling too much on its mathematical formalities. Some famous examples
such as the minority, cooperative and coordination games are discussed. By the end
of the chapter, we discuss evolutionary game theory and the prey-predator model.
This book ends with a treatment of agent-based simulations. First, an introduction
to complex networks, their properties and models are presented. Some important
socioeconomic models that resemble the famous Ising model are then presented.
The chapter closes with some brief introduction to interacting multiagent systems in
a Boltzmann equation approach.
They say that “an author never finishes a book, he only abandons it,” and I couldn’t
agree more! Non-linear effects and chaos theory, for instance, are currently important
topics in econophysics. Nonetheless, these and many other topics are left for future
editions of this book.

ACKNOWLEDGMENTS
I am most grateful to friends at Arizona State University where parts of this book
were written. I particularly acknowledge with gratitude the hospitality of Ying-
Cheng Lai in his group and am indebted to David Ferry who indirectly helped to
bring this project up to life. I am also grateful to the AFOSR for financial support
under award number FA9550-20-1-0377.

Carlo Requião da Cunha


Porto Alegre, March 2021
Review of Economics
1
Economics is a science that deals with complex systems. These systems are not com-
posed of inanimate particles, but of human beings that have their own feelings, de-
sires, that take action. This book analyzes whether these systems have any particular
dynamics for which we can use the tools developed for studying physical problems.
The theory that emerges from this endeavor is called econophysics and explicitly
develops in a per analogiam fashion [2].
The idea of tackling problems of economics from the perspective of physics is as
old as Copernicus1 . Copernicus proposed, for instance, the quantity theory of money
(QTM) that states that prices are functions of the money supply. Copernicus also pro-
posed the monetae cudendae ratio that states that people tend to hoard good money
(undervalued or stable in value) and use bad money (overvalued) instead2 . Quetelet3
was another scientist that went even further coining the term ‘social physics’ for his
work that used statistical methods for social problems.
The same happened in the opposite direction with social scientists trying to use
early concepts of physics in their works. For instance, Comte4 was a philosopher
who wanted to model social sciences as an evolution of the physical sciences. Even
Adam Smith5 is known to have been inspired by Newton’s6 works.
It was much more recent that the term econophysics was coined and used by
physicists such as Stanley7 and Mantegna8 when using the tools of statistical me-
chanics to solve problems related to finances [3, 4].
There are some concepts developed in economics that make a good connection
with physics. The first one is the concept of methodological individualism developed
by Weber9 and further explained by Schumpeter10 . There the focus of analysis of
social problems is put on the action-theoretical level, rather than in the whole. It is
not to be confused, though with atomism. This is a different term adopted by some
economists, including Menger11 . Atomism is based on the idea that once we fully
understand the individual psychology, it would possible to deduce the behavior of
group of individuals. Rather, methodological individualism does not rely on a reduc-
tion of the social sciences to psychology. It perceives social phenomena as emerging
from the action of individual agents. Moreover, these phenomena can emerge even as
unintended consequences of purposeful individual actions12 . This will prove useful,
for instance, when we study game theory and agent based models throughout this
book.
Dispersed knowledge is another economic concept that we will encounter in our
study of econophysics. As the agents individually take action, they produce a knowl-
edge that is dispersed among individuals and no agent has access to all this infor-
mation at every instant [5]. Although, it may seem obvious, it has huge implications
such as the production of genuine uncertainty. On the other hand, this dispersed
knowledge can produce regular large-scale consequences constituting spontaneous
order. Hayek13 provides the example of a virgin forest [6]. The first person walking

DOI: 10.1201/9781003127956-1 1
2 Introduction to Econophysics

through this forest creates small modifications that helps other individuals cross this
forest. Eventually, as a significant number of individuals cross this forest, a path is
naturally formed. The same process happens with prices. Through the interaction of
buyers and sellers, prices are created without the need of any central planner. This
is known by economists as a price discovery process. Moreover, as Hayek points
out, prices carry information that helps agents to coordinate their separate actions
towards the increase and decrease of production and consumption. This spontaneous
“order brought about by the mutual adjustment of many individual economies in a
market” is called catallaxy by Hayek [7].
In order to begin our study of econophysics, let’s review three more important
concepts in economics that will help us build a solid groundwork: supply and de-
mand, the efficient market hypothesis and the concept of stocks and derivatives.

1.1 SUPPLY AND DEMAND


Imagine that you are starting a business. As an entrepreneur you have to pay em-
ployees, you probably have to pay bank loans and also need to make some profit for
yourself. Thus, it is likely that you are willing to sell your products at a high price.
Just like you, other entrepreneurs want to do the same. The information about the
price is not absolute, but dispersed in the society. Therefore, some entrepreneurs may
advertise their goods at lower prices and there can even be the cases where the en-
trepreneurs need to sell a product as soon as possible. Thus, it is expected that many
entrepreneurs are willing to sell a product at high prices whereas few entrepreneurs
are willing to sell the same product at low prices.
The situation is the opposite for costumers. They have a list of needs and limited
money. However, the information is also not certain for them. A product that some
consider expensive might be considered not so expensive by others. Also, there can
be situations where a product is needed no matter the cost. Therefore, it is expected
that many customers are willing to buy a product at low prices whereas not so many
customers are willing to buy the same product at high prices.
This competition between agents has captured the attention of many economists
from John Lock14 [8] to Adam Smith [9]. It was Cournot15 [10] and Marshall16 [11],
however, that formalized supply and demand curves as shown in Fig. 1.1.
Let’s see the supply and demand curves in action. Figure 1.1 illustrates a situation
where the price is fixed at a high price Ps . In this case, only a few consumers Qds are
willing to pay this price and many entrepreneurs Qos are willing to sell. However,
when sales do not materialize, the entrepreneurs are encouraged to lower their prices.
On the other hand, not so many entrepreneurs can produce or sell the product at this
low price. Therefore, Oos tends to move to Qe and since more consumers are expected
to agree with this new price, Qds is pushed towards Qe .
Any deviation from this ‘equilibrium point’ tends to produce stimuli that encour-
ages both the consumers and entrepreneurs move back to it. For instance, if there is a
movement towards a lower price Pi , fewer entrepreneurs Qoi are encouraged to pro-
duce, but there would probably be many consumers Qid willing to buy. This pushes
entrepreneurs to try to satisfy these potential consumers. Thus, chances are that the
Review of Economics 3

entrepreneurs observe a rise in demand and increase their productions and prices.
Once again the tendency is that Qoi and Qdi move towards Qe , and Pi moves towards
Pe .

Price
demand curve supply curve

Ps

Pe
Pi

Qds Qoi Qe Qdi Qos


Quantity
Figure 1.1: Supply and demand curves showing an equilibrium point and the situation
where there are a) low and high production, and b) low and high prices

At this point, supply and demand are in equilibrium. We can intuitively notice that
this point may not be stable and oscillations can occur due to a set of reasons such
as information imperfection as we discussed before. Nonetheless, the incentive is
such that a free economic system always tends to move towards the point Qe , Pe . We
also notice that the price works as a system of information that allows entrepreneurs
to adjust their production and prices according to the demand that exists for their
products.
The cobweb (or Verhulst17 ) diagram is a tool borrowed from the field of dynam-
ical systems [12] that can be used to visualize this behavior. The model proposed
by Kaldor18 [13] is used to explain the price oscillation in some markets. We start
with a standard supply and demand diagram as shown in Fig. 1.2 and consider a hy-
pothetical scenario where farmers have a small production but the demand for their
products is high. This automatically leads to an increase in prices. This raise in prices
encourages the farmers to increase their productions to the next period. When this
next period comes, the high production leads to a competition among farmers that
want to sell their productions resulting in a lowering of the prices. This dynamics
continues successively until an equilibrium situation is achieved (intersection of the
curves). This is known as a convergent case. However, it is also possible to con-
ceive a divergent case where the oscillation increases and a limit cycle case where
the oscillation is constant in amplitude.
In order to have a convergent system, it is necessary that the demand be more
elastic than the supply in the equilibrium point Qe , Pe . Elasticity is a measure of per-
centual sensitivity of one variable with respect to another. The elasticity of demand
4 Introduction to Econophysics

D S

Q
P

D S

Q
Figure 1.2: Cobweb diagrams for the convergent case (top) and the divergent case
(bottom)

(d) or supply (s) is given by:

dQd,s /Q
ed,s = . (1.1)
dPd,s /P
Economists define |e| > 1 as an elastic case. This implies that the change of quantity
is higher than the change in price of a certain product. The opposite case where
|e| < 1 is known as inelastic.
Review of Economics 5

Therefore, in order to have a convergent case, it is necessary that:

dQs /Q dQd /Q
< . (1.2)
dPs /P Qe ,Pe dPd /P Qe ,Pe

This can be visualized in the diagrams of Fig. 1.2. If the absolute value of the slope
of the supply curve is higher than that of the demand curve at the equilibrium point
then the system is convergent.
This adaptation of the behavior of the economic agents according to the events
is known as adaptive expectations. This theory, however, suffers many criticism,
specially when one considers the divergent case. Why would the entrepreneurs insist
in an action that has made their situations only worse? This is the main objection of
Muth19 , for instance. Notwithstanding, many price oscillations have been explained
using this theory. Mathematically, an adaptive expectation could be modeled as:

pen+1 = pen + λ (p − pen ), (1.3)


where pen is the price expectation for the the nth period whereas p is the real price.
This, for instance, explains the monetary illusion pointed by Fisher20 [14]. This is a
phenomenon where the agents confuse the face value of money by its past purchase
power. Fiat currencies nowadays have no convertibility to any finite reserve, no in-
trinsic value or any use value. Therefore the purchase power assigned to them has to
be based on past experienced levels.
The adaptive expectations theory is currently understood as a particular case of
a wider theory developed by Muth and Lucas21 , known as theory of rational ex-
pectations. In their theory, all agents shape their expectations of future economic
indicators based solely on reason, the information available to them, and their past
experiences [15]. This theory asserts that although people may eventually be wrong
about those indicators, on the average they tend to convert to the correct values be-
cause they learn from past mistakes and adapt. For example, if an inflationary policy
(expansion of the monetary base) was practiced and that lowered unemployment, the
same result may not happen in the following year if the inflationary policy is prac-
ticed again. According to Muth and Lucas, that would be because people adjust their
expectations immediately after the first inflationary policy. The relationship between
the inflation rate and the unemployment rate is actually known as Phillips curve22
and the rational expectations theory predicts that it is inelastic in the short-term.
More recently, studies by researchers such as Tversky23 , Kahneman24 , Shiller25
and Thaler26 have pointed out some flaws in the theory of rational expectations.
For instance, agents are not perfectly rational and have a bounded rationality27 [16]
also limited by dispersed and incomplete information. Furthermore, as stated before,
the agents are humans that have feeling, passions and often biases and discrimina-
tion [17]. Sometimes these agents can also be carried out by suggestions (nudge ef-
fect [18]) or conform with a herding behavior [19]. The theory that emerges from this
program of merging the psychology of agents with economics is known as behav-
ioral economics. We will return to this topic in Chapter 8 when we study agent-based
models.
6 Introduction to Econophysics

1.2 EFFICIENT MARKET HYPOTHESIS


It was perhaps Regnault28 [20] who first suggested that the stock prices followed
a random walk. This hypothesis was further developed by mathematicians such as
Bachelier29 [21] and Mandelbrot30 [22] but it was with Fama31 [23] and his adviser
Samuelson32 [24] that it became popularized and received the name efficient market
hypothesis (EMH).
According to this hypothesis, a market is considered efficient when the available
information is fully incorporated into the prices. In this case, the price should follow
a random walk and by doing so past trends do not tell us anything about the current
price of a stock. Consequently, predicting or beating the market should be impossible
because the market incorporates all available information and that is arbitraged away.
Indeed, if a stock price follows a random walk, the price increment should follow a
Gaussian distribution and its expected value should always be zero as we will further
explore later in this book. If markets were perfectly efficient, a consequence would
be that the best investment scenario would be adopting passive portfolios that would
only profit by the long term natural growth of the market.
The EMH was actually categorized by Fama in three formulations. In its weak
formulation, only public market information is known by the agents, whereas in the
semi-strong formulation stock prices quickly adjust to reflect any new information.
Finally in the strong formulation of the EMH all public and private information are
immediately incorporated into prices such that not even inside trading should have
any effect on prices.
If markets were perfectly efficient, however, it would be impossible for bubbles to
exist since the information about the occurring bubble would be immediately incor-
porated into the prices. Also, if markets were efficient, there would be no reason for
investors to trade and markets would eventually cease to exist. This is known as the
Grossman33 -Stiglitz34 paradox [25]. Furthermore, it fails to explain the neglected
firm effect where lesser-known firms can produce higher returns than the average
market. This can be explained, though, by the fact that information about these firms
is not much available. This can be used by investors to demand a premium on the re-
turns. Moreover, it is simple to argue that agents are plural and have different views
about information. Therefore, they value stocks differently. Also, stock prices can
be affected by human error. And finally, prices can take some time to respond to
new information. Therefore, agents who first use this new information can take some
advantage.
Nonetheless, as the quality of information increases with technology, more effi-
cient the market tends to become and less opportunities for arbitrage tend to happen.

1.3 STOCKS AND DERIVATIVES


Let’s consider that you have a business. You observe an increase in sales but you need
more capital to expand your business. One way of solving this problem is by adopting
a strategy used since the Roman republic: you can issue stocks or shares (units of
stocks). This means that you are selling small portions of ownership of your business,
Review of Economics 7

that is now public, to raise capital. As your business makes profit, you now have to
share these dividends with your new partners or company shareholders. These shares
are also now negotiable in an equity market or stock market and constitute one type
of security together with other financial instrument such as cash and bonds .
Shares can be ordinary shares (common shares) that allows holders to vote or
preference shares (preferred stocks) that guarantee preference in receiving dividends.
These securities are usually negotiated in multiples of a fixed number (typically 100).
This constitutes a round lot. Fewer shares can also be negotiated and these fractions
of a standard lot are known as odd lot.
Now that the capital of your business is open, you as a businessman have the fidu-
ciary responsibility to operate the company according with not only your interests
but the interests of the shareholders.
The administrative board may now raise more capital to a further expansion. This
time, however, the board does not want to issue stocks, rather they want to issue
debt payable in the future with some interest. These are called debentures and are
not backed by any collateral. In order to reduce the risk, some agencies offer credit
rankings to help investors access the associated risk.
You want now to purchase a specific quantity of a commodity, say titanium, as raw
material for your business. However, for some reason you can only purchase it three
months from now. Your income is in one currency, but the price of this commodity
is negotiated in another currency. The exchange rate between the two currencies
oscillates violently and you are concerned that the price of the commodity is going
to be much higher in the delivery date. In order to fix the purchase price of the
commodity, you can issue a purchase contract executable in three months with a
predetermined price. This is an example of a forward contract and it can be used as
a hedge to protect your business against uncertainty. This kind of financial security
whose value is derived from another asset is known as a derivative.
Instead of fixing the price of the commodity (spot price), it is possible to daily
adjust it in order to obtain a better approximation to the spot price. This is called a
future contract and it is negotiable in future markets. In order to operate futures, an
initial margin amount is necessary. If you are long positioned in an operation and
the future price increases 1 %, your account receives the respective amount. On the
other hand, if you are short positioned, this amount is subtracted from your account.
If your company is producing a new product that will only be sold in the future, it
may be interesting to sell a future contract and invest the money in some transaction
indexed to the inflation rate, for example.
We are considering that your business sells products in one currency but purchase
raw materials in another. There may be other businesses whose major concern is not
the exchange rate but the inflation rate. One of these businesses may even believe that
the exchange rate will not be as bad as the inflation rate in the future. You two can
then make a contract exchanging the debt indexes. This kind of operation where two
parties exchange the liability of different financial instruments is known as swap.
8 Introduction to Econophysics

1.3.1 OPTIONS
It is also possible to purchase a contract that gives you the right to buy or sell an
asset at a specific price in the future (exercise price or strike). When you purchase
the right to buy a product at a specific price, this is called call option, whereas the
right to sell a product is called put option [26]. If the current price at the exercise
date is higher than the strike price, one can execute the right to buy the asset at
the lower value. On the other hand, if the current price at the exercise date is lower
than the strike price, one can execute the right to sell the asset at the higher value.
Both situations correspond to options in the money (ITM). If the current price and the
strike are the same, we say this option is at the money (ATM). Also, if the transaction
is not favorable, though, then the option is out of the money (OTM). Unlike future
contracts, you are not required to execute an option. Nonetheless, you have to pay a
premium for the option.
If the option you purchased can only be exercised on the expiration date, this is
called European option. If, on the other hand, you can execute it any time before
the expiration date, then it is called American option. There are also options whose
payoff is given by the average price of the underlying asset over a period. These are
called Asian options.
A call option for a hypothetical stock has a strike of $40 and this stock is trading
at the exercise day for $42. In this case we say that its intrinsic value is $2. If the
option itself is trading at $3 then there is also $1 of extrinsic value.
Suppose now, as an investor, you believe that the price of a stock is going to fall.
It would be advisable to sell some of these stocks and repurchase them for lower
prices, but you don’t have these stocks and don’t have enough funds to buys these
stocks right now. It is still possible to sell these stocks without having them in an
operation known as short selling. In this operation the investor borrows shares from a
lender and immediately sells them, say for $100 each. The shares eventually become
cheaper and the investor buys the same shares for $75 each. The investor returns
the shares to the lender and profits $25 for each share. Had the price of the shares
increased, the investor would rather incur in financial loss. On the other hand, the
same operation could have been executed with options if the investor had purchased
the right to sell the asset. Thus, options can be used to reduce the risk of financial
operations.
The opposite operation, where the investor expects an increase in the price of the
stock is known as long buying. Consider an initial public offering (IPO) where a
company starts negotiating stocks. As an investor you expect that these stocks will
start being negotiated at low values but you don’t have enough funds to buy them.
An investor can buy these stocks and sell them before having to pay for them. If the
price really increases, the investor can profit with the operation.

1.3.1.1 Strategies with Options


There are some strategies that investors undertake to try to profit with options. Let’s
consider a stock trading at $40. An associated call option with a strike of $40 has a
Review of Economics 9

loss/profit

break
strike even
$40 $42

Trading
price
−$2

Figure 1.3: Payoff diagram for a long call operation

premium of $2. An investor can buy $200 in options, which gives the right to buy
100 shares in the exercise day. When this day comes, the stock is trading at $50. The
investor executes the option and purchases a round lot of 100 stocks paying a total of
$4,000. The investor immediately sells this lot for the current price, making $5,000.
Therefore, the investor make $800 in profit.
This strategy, shown in Fig. 1.3 is known as long call. The investor starts off with
a loss of $2 paid for the premium of the option. When the negotiable price of the
stock reaches $40, the loss starts to decrease given the difference between this price
and the strike. When the negotiable price reaches $42, the break even point is reached
and the investor makes profit for any higher price.
On the other hand, if the investor believes that the trading price of this stock will
fall, then $200 can be purchased in put options (same 2$ premium). If the stock is
trading at $40 at the exercise day, the investor does not execute the right to sell the
stocks and loses the premium. If, however, the trading price is lower than $38, say
$28, the investor buys the stock at the spot market and executes the option to sell the
stocks at $40. Therefore, the investor profits $40 - $28 - $2 = $10 per stock. This is
known as long put and is shown in Fig. 1.4.
It is also possible to combine both strategies purchasing a put and a call options. If
the trading price at the exercise day is higher than $42 or lower than $38 the investor
executes one right ignoring the other. This strategy is known as long straddle and is
shown in Fig. 1.5.
As this book was being written, something unusual happened. The populariza-
tion of e-commerce has turned many businesses based on physical stores obsolete.
Following this tendency, many institutional investors have betted against GameStop
(GME)a short selling it. The intention was of buying the shares back (cover) when

aA traditional video games store.


10 Introduction to Econophysics

loss/profit

strike
$38 $40

break Trading
even price
−$2

Figure 1.4: Payoff diagram for a long put operation

loss/profit

strike
$38 $40 $42

break break Trading


even even price
−$4

Figure 1.5: Payoff diagram for a long straddle operation


NOTES 11

they would be negotiating at a lower price, then return the stocks to their original
owners and pocket the difference. Many contrarian investors, however, felt that was
an unfair game and coordinated themselves over the internet to start a rapid purchase
of these stocks—a short squeeze. The price of GME increased over 5,000 % in a few
days (see Fig. 1.6) forcing institutional investors to abandon their positions and ac-
cept considerable losses. Some hedge funds incurred in losses over 3 billion dollars
as a result of this operation. This not only is a risky operation as it clearly invalidates
the EMH.
Log GME Price (US$)

Date

Figure 1.6: Negotiated price of GME over time obtained from Yahoo Finance

Notes
1 Nicolaus Copernicus (1473–1543) Prussian astronomer.
2 This is known today as Gresham’s law in reference to Sir Thomas Gresham the Elder (1519–1579)
English merchant.
3 Lambert Adolphe Jacques Quetelet (1796–1874) Belgian astronomer, mathematician, and sociologist.
4 Isidore Marie Auguste François Xavier Comte (1798–1857) French philosopher.
5 Adam Smith (1723–1790) Scottish economist and philosopher.
6 Isaac Newton (1643–1727) English natural philosopher.
7 Harry Eugene Stanley (1941–) American physicist.
8 Rosario Nunzio Mantegna (1960–) Italian Physicist.
9 Maximilian Karl Emil Weber (1864–1920) German sociologist, philosopher, and political economist.
10 Joseph Alois Schumpeter (1883–1950) Austrian economist, advisee of Eugen Böhm von Bawerk,

adviser of James Tobin and Paul Samuelson among others.


11 Carl Menger (1840–1921) Austrian economist.
12 Term popularised by Robert King Merton (1910–2003) American sociologist.
13 Friedrich August von Hayek (1899–1992) Austrian economist, Nobel laureate in 1974. Advisee of

Friedrich Freiherr von Wieser.


14 John Locke (1632–1704) English philosopher.
15 Antoine Augustin Cournot (1801–1877) French mathematician and economist.
12 NOTES

16 Alfred Marshall (1842–1924) English economist.


17 Pierre François Verhulst (1804–1849) Belgian mathematician, creator of the logistic function.
18 Nicholas Kaldor (1908–1986) Hungarian economist, advisee of John Maynard Keynes and Gunnar

Myrdal.
19 John Fraser Muth (1930–2005) American economist.
20 Irving Fisher (1867–1947) American economist and statistician, advisee of Josiah Willard Gibbs.
21 Robert Emerson Lucas Jr. (1937–) American economist, Nobel laureate in 1995.
22 Alban William Housego Philips (1914–1975) New Zealand economist.
23 Amos Nathan Tversky (1937–1996) Israeli psychologist.
24 Daniel Kahneman (1934–) Israeli psychologist and economist, Nobel laureate in 2002.
25 Robert James Shiller (1946–2013) American economist, Nobel laureate in 2013.
26 Richard H. Thaler (1945–) American economist, Nobel laureate in 2017.
27 Proposed by Herbert Alexander Simon (1916–2001) American economist, political scientist and psy-

chologist, Nobel laureate in 1978.


28 Jules Augustin Frédéric Regnault (1834–1894) French stock broker.
29 Louis Jean-Baptiste Alphonse Bachelier (1870–1946) French mathematician, advisee of Henri

Poincaré.
30 Benoit B. Mandelbrot (1924–2010) Polish mathematician. Adviser of Eugene Fama among others.
31 Eugene Francis Fama (1939–) American economist, Nobel laureate in 2013.
32 Paul Samuelson (1915–2009) American economist, Nobel laureate in 1970. Advisee of Joseph

Schumpeter and adviser of Robert Cox Merton.


33 Sanford Jay Grossman (1953–) American economist.
34 Joseph Stiglitz (1943–) American economist, advisee of Robert Solow. Stiglitz was awarded the No-

bel Memorial Prize in Economic Sciences in 2001.


Asset Return Statistics
2
The reported relationship between a security and another (typically fiat money) as a
function of time is known as ticker. A “tick” then is understood as the price change
the security undergoes and the ticker can include information about the volume ne-
gotiated, opening and closing prices among other information. A typical movement
of the price of a security is shown in Fig. 2.1. The top left graph shows a situation
where the price has an upward tendency and the closing price at the period is higher
than the opening price. We call this tendency a bull market, whereas the opposite
is known as a bear market. This happens in analogy with how these animals attack
their preys either upwards or downwards. We should also add a situation where the
opening and closing prices are very similar. Following the other analogies we shall
call this a crab market since crabs walk sideways.
In order to better represent the information contained in a particular period we
can use a candlesticks representation. Typically, the body part of a candlestick may
indicate a bullish market period if it is hollow or green, or it can indicate a bearish
market if it is solid black or red. Also the maximum and minimum prices reached
during the period are indicated by the points of maximum and minimum of the ver-
tical sticks on top and bottom of the body. A candlestick chart for longer periods can
be created in a way similar to a renormalization group procedure.
We will start this chapter discussing return rates and will move towards a math-
ematical description of the fluctuations found in these returns along time. We will
close this chapter studying time series and a set of stylized facts found in these se-
ries.

2.1 RETURN RATES


As an investor, would you be more willing to buy a security for 100 thousand dollars
expecting to sell it in a few days for 101 thousand dollars or buy another security for
10 dollars expecting to sell it for 100 dollars? Certainly absolute prices are important,
but in order for us to make better investment decisions, we must know what the
expected return rates for the investments are. A linear return rate is given by:

p(t + ∆) − p(t)
r(t) =
p(t)
(2.1)
p(t + ∆)
= − 1,
p(t)
where p(t) is the price of the security at time t and ∆ is some period. For the ex-
ample given, the first investment has a linear return rate of 1 % whereas the second
investment has a linear return rate of 900 %. Although the absolute prices for the
second investment are lower, the associated return is much higher than that of the
first investment.

DOI: 10.1201/9781003127956-2 13
14 Introduction to Econophysics

maximum
Price

Price
close
maximum

open

open
close
minimum minimum

time time
Price

time

Figure 2.1: Examples of a bullish market (top left) and a bearish market (top right).
A candlestick chart is shown in the bottom

This example also shows one problem. We are trying to compare two investments
with returns with orders of magnitude of difference. One strategy that is used to
deal with this situation is to use logarithmic returns instead. In order to obtain the
log-return, let us first add one to Eq. 2.1 and then take its log:
 
p(t + ∆)
log (r(t) + 1) = log . (2.2)
p(t)
The logarithmic is an analytic functiona and so it can be represented by a Taylor1
expansion around some r(t):

rn (t)
log (r(t) + 1) = ∑ (−1)n+1 n
n=1
r2 (t) r3 (t) (2.3)
= r(t) − + −...
2 3
≈ r(t) in a first order approximation.

a Basically, an infinitely differentiable function at any point in its domain.


Asset Return Statistics 15

0.30

0.25

Logarithmic Return
0.20

0.15

0.10

0.05

0.00
0.00 0.05 0.10 0.15 0.20 0.25 0.30
Linear Return

Figure 2.2: The logarithmic return (solid curve) as a function of the linear return. The
dashed line shows the linear return as a function of itself

Therefore, in first order, we can approximate:


 
p(t + ∆)
r(t) ≈ log
p(t) (2.4)
≈ log (p(t + ∆)) − log (p(t)) .
If we set ∆ so that t + ∆ is the time at the next immediate period of negotiation,
we can write the log-return as a finite difference equation:

rn ≈ log(pn+1 ) − log(pn ). (2.5)


This is a first order approximation and so it applies better for small return values.
Plotting the log-return as a function of the linear return as shown in Fig. 2.2 makes
it easy to see that there is a growing divergence for large values of the linear return.
Another way to look at log-returns is as a periodic compound rate. In order to observe
this, let’s rewrite the log-return as:
 rn m
pn+1 = ern pn = lim 1 + pn . (2.6)
m→∞ m
This is the total accumulated price for periodic compounding where the return was
chopped into infinite sub-periods (a continuous).
Let us now consider one investment where we buy a security for 100 dollars ex-
pecting to sell it for 101 dollars and a second investment where we buy another secu-
rity for 100,000 dollars expecting to sell it for 101,000 dollars. Both have exactly the
same return rate but different prices. Therefore, if we are interested in studying the
details of the return oscillations, it is a good idea to normalize the prices of different
assets to the same basis. We then define a normalized return as:
16 Introduction to Econophysics

rn − hri
r̃n = p . (2.7)
hr2 i − hri2
The expected value in the last expression is for the whole period under analysis.
Although many authors use E[x] for the expected value, we will use the notation hxi
here and throughout this book. This is because E can be easily confused for some
variable and the angle brackets notation is commonly used in physics.
The following snippet computes the log-returns in Python:

import numpy as np

def ret(x):
N = len(x)

y = []
for i in range(N-1):
r = np.log(x[i+1])-np.log(x[i])
y.append(r)

return y

The normalized returns can be computed with:

def nret(series):

m = np.average(series)
s = np.std(series)

return [(r-m)/s for r in series]

2.2 PROBABILITY THEORY


As it was shown in Fig. 2.1, prices and returns display irregular movements along
time. Here we will discuss the basics of random variables and study how we can
use them to better understand the dynamics of returns. We will adopt the axiomatic
approach introduced by Kolmogorov2 in 1933 [27].
The first concept that has to be introduced is the probability space [28, 29]. The
probability space is defined by the 3-uple (Ω, Σ, P). Ω is the sample space, a set of
Asset Return Statistics 17

all possible results of an experiment. Σ is a set of events called σ -algebra. Finally, P


is a probability measure that consists of probabilities assigned to the possible results.

Example 2.2.1. Finding the set of events for flipping a coin.

If the coin is not biased, we have Ω = {H, T }, where H is a mnemonic for


heads and T is a mnemonic for tails. The set of events for this example is: Σ =
{{}, {H}, {T }, {H, T }}, P ({}) = 0, P ({H}) = P ({T }) = 0.5 e P ({H, T }) = 1.


2.2.1 PROBABILITY MEASURE


The probability measure, as the name implies, is a measure3 . A measure, in turn, is
a function µ : Σ → R that satisfies:

1. µ(E) ≥ 0, ∀E ∈ Σ, non-negativity
/S = 0, null empty set, and
2. µ(0)
3. µ ( ∞ ∞
k=1 Ek ) = ∑k=1 µ(Ek ), ∀Ek ∈ Σ countable additivity.

Example 2.2.2. Lebesgue measure.

A Lebesgue measure of a set is defined as:


( )
∞ ∞
L (A) = inf
[
1
∑ (bi − ai ) : A ⊆ [an , bn ] , (2.8)
n=1 n=1

where in f is the infimum defined as the biggest element of an ordered set T that
is smaller or equal to all elements of the subset S for which it is being calculated.
Following the same rationale, the maximum can be defined as the smallest element
of T that is bigger or equal to all elements of S. For example, there is no minimum
in the positive real numbers (R+ ) since a number can always be divided in smaller
values. On the other hand, the infimum is 0. 

The probability measure P is a measure that also satisfies:

1. P : Σ → [0, 1] and
2. P(Ω) = 1.
The tuple (Ω, Σ) is known as measurable space (or Borel4 space) whereas the
tuple (Ω, Σ, µ) is known as measure space.

2.2.1.1 Conditional Probability


The probability for an event A to happen given that another event B has happened
is written as P(A|B). If P(A|B) = P(A), the events are independent. In this case,
having information about one event tells us nothing about the other. In the opposite
18 Introduction to Econophysics

case, we can write the probability as the ratio between the probability of both events
happening together and the probability of event B happening [29, 30]:

Pr (A ∩ B)
Pr (A|B) = . (2.9)
Pr (B)
One way of visualizing conditional probabilities is with an Euler5 diagram as
shown in Fig. 2.3.

Ω
0.5
A
0.1
B
0.2

C 0.2

Figure 2.3: An example of an Euler diagram for probabilities

Example 2.2.3. Extract the probabilities from an Euler diagram.

Given the Euler diagram shown in Fig. 2.3 we can obtain the following prob-
abilities:

P(A) = 0.5 + 0.1 = 0.6


P(B) = 0.1 + 0.2 = 0.3
(2.10)
P(A ∩ B) = 0.1
P(A|B) = 0.1/0.3 = 0.3333 . . .


2.2.2 σ -ALGEBRA
If we know the probability of something happening we also have to know the prob-
ability of nothing happening. Therefore, a σ -algebra must contain the empty set and
the sample space. Therefore, {0, / Ω} is the smallest σ -algebra.
Let us consider the sample space Ω = {H, T } given in the example of Sec. 2.2
for flipping a coin. Considering a set of events Σ = {0,
/ Ω, {H}} means that we know
the probability of nothing happening, anything happening and the probability of ob-
taining heads. This, however, implies that we would not know the probability of ob-
taining tails, which is an absurd. How can we know the probability of obtaining head
Asset Return Statistics 19

and not tails? Evidently, if we include H in the set of events, we must also include
its complement T . Therefore, a σ -algebra must be closed under the complement.
Let us now consider a sample space Ω = {1, 2, 3, 4, 5, 6} corresponding to the
throw of a dice. Contemplating a set of events Σ = {0,
/ Ω, {1}, {2}} would imply that
we know the probability of obtaining 1 or 2, which is again an absurd. If 1 and 2 are
in the set of events, then {1, 2} must also be present. Therefore, a σ -algebra must
also be closed under countable union. Therefore, the biggest possible σ -algebra is
the power set of the sample space. For the game of flipping a coin, that would be
Σ = {0,/ Ω, {H}, {T }}.
With these considerations, we can define a σ -algebra under a sample space Ω as
the set Σ of the subsets of Ω that include the empty set and the sample space itself.
Moreover, this set has to be closed under the complement and countable operations
of union and intersection.

Example 2.2.4. Finding a σ -algebra.

For the sample space Ω = {a, b, c, d}, one possible σ -algebra is Σ =


{0,
/ {a, b}, {c, d}, {a, b, c, d}}. 

2.2.3 RANDOM VARIABLES


A random variable [28,31,32] can be considered as an observable output of an exper-
iment that accounts for all of its outcomes according to certain probabilities if these
outcomes are on a finite domain or to a density function if they are on an infinite
domain.
More formally, a random variable in a probability space (Ω, Σ, P) is a function
X : Ω → Ω0 that is measurable in a Borel space (Ω0 , Σ0 ). This means that the inverse
of a Borel set in Σ0 is in Σ: {ω : X(ω) ∈ B} ∈ Σ, ∀B ∈ Σ0 .

Example 2.2.5. The probability of finding exactly two consecutive heads when
flipping three times the same coin.

The sample space in this case is Ω = {(H, H, H), (H, H, T ), (H, T, H),
(H, T, T ), (T, H, H), (T, H, T ), (T, T, H), (T, T, T )}. Let X be a random variable
associated with the number of H’s in this game. This random variable X maps Ω
to Ω0 = {0, 1, 2, 3}, such that, for instance X({T, H, H}) = 2 as shown in Fig. 2.4.
Therefore, P(X = 2) is given by:

P(X = 2) = P X −1 (2)


= P ({(H, H, T ), (T, H, H)}) (2.11)


= 2/8 = 1/4.

20 Introduction to Econophysics

Ω Ω'
X
(T,T,T) 0
(H,T,H)
(H,T,T)
(T,H,T) 1
(T,T,H)
(H,H,T)
(T,H,H) 2
(H,H,H) 3

Figure 2.4: Sample space and measurable space for tossing a coin three times

2.2.3.1 Conditional Expectation


Let’s consider six independent throws of two different and distinct coins P and Q: 1.
(H,H), 2. (T,T), 3. (H,T), 4. (T,H), 5. (H,T), and 6.(T,H). This forms a sample space
Ω = {(H, H), (T, T ), (H, T ), (T, H)} and a probability measure P(H, H) = P(T, T ) =
1/6 and P(H, T ) = P(T, H) = 1/3. Let’s also consider a random variable X : Ω →
[0, 1] such that X(H) = 0 and X(T ) = 1. The expected value of X for coin P is clearly
1/2, but what is the expected value of X for coin P given that coin Q is tails?
Mathematically, consider a probability space (Ω, Σ, P) and let A, a set of disjoint
events {A1 , A2 , . . .}, be a measurable partition of Ω ( Ak = {ω ∈ Ω : X(ω) = xk }).
Let ΣA be a σ -algebra generated by all unions and intersections of A. Then, the
conditional expectation of f (X) with respect to ΣA is given by:

h f (X)|ΣA i(ω) = ∑h f (X)|Ai i1Ai (ω), (2.12)


i

where

h f (X)1Ai i
h f (X)|Ai i(ω) = . (2.13)
P(Ai )
The latter can be interpreted as the center of mass of f (X) on Ai .
In our example, the events where coin Q is tails are {(T, T ), (H, T ), (H, T )}.
Therefore, a corresponding σ -algebra would be ΣA = {0, / Ω,Y, Ω ∩Y }, where Y =
{(H, T ), (T, T )}. The conditional expectation of X given that Q is tails is then:

hX1(H,T ),(T,T ) i 0 · 2/6 + 1 · 1/6 1


hX|Y i = = = . (2.14)
P ((H, T ), (T, T )) 3 · 1/6 3
It is also interesting to calculate the expected value of the conditional expectation:
Asset Return Statistics 21

 
hhX|Y ii = ∑ xP(X = x|Y )
x
 
=∑ ∑ xP(X = x|Y = y) P(Y = y)
y x

= ∑ xP(X = x,Y = y) (2.15)


y,x

= ∑ x ∑ P(X = x|Y = y) ← marginalization


x y

= ∑ xP(X = x) = hXi.
x

This is known as the law of total expectation.

2.2.4 DISTRIBUTION FUNCTIONS


Instead of a single probability measure, it is more common to work with distribu-
tions of probability [29]. The cumulative distribution function (CDF), for instance,
is defined as:

FX (x) := P[X ≤ x] = P ({ω ∈ Ω|X(ω) ≤ x}) . (2.16)


When we calculate integrals with respect to a Lebesgue measure λ :
Z
gdλ , (2.17)
B

in a Borel setb we are calculating the area under the curve given by the function g in
this set. This same integral can be written in all R if we include an indicator function:
Z
1B gdλ . (2.18)
R
It is also possible to move this restriction to the measure itself:
Z
gdµ. (2.19)
R
In this case, µ is a measure that behaves as λ for the Borel set B but it returns 0 for
Borel sets without an intersection with B. Thus, we can write:
Z Z
gdµ = 1B gdλ . (2.20)
R R
Therefore, we have:

b Any set that can be created through the operations of complement and countable union or intersection.

Therefore, the set of all Borel sets in Ω form a σ -algebra.


22 Introduction to Econophysics

dµ = f dλ , (2.21)
where f = 1B is the density of µ known as the Radon-Nikodym derivative6
with
respect to the Lebesgue measure.
Following this procedure, if the CDF is a distribution function, we must have:
Z
dF = 1. (2.22)

On the other hand, this equation can also be written as:
Z
f (x)dx = 1. (2.23)
If this density f (x) exists, it is called probability density function (PDF) and is given
by:

dF = f (x)dx
dF(x)
f (x) = (2.24)
Z dx
x
F(x) = f (t)dt.
−∞
Therefore, loosely speaking, the PDF gives the probability that a random variable
assumes a set of specific values. If the random variable is discrete, the PDF is called
probability mass function (PMF).
Example 2.2.6. Finding the CDF of the Gaussian distribution.

The Gaussian distribution is given by:

1 (x−µ)2

f (x) = √ e 2σ 2 . (2.25)
π2σ 2
Therefore, its CDF is given by:

1 x (y−µ)2
Z

F(x) = √ e 2σ 2 dy. (2.26)
π2σ 2 −∞
√ √
Substituting z = (y − µ)/ 2σ → dy = 2σ dz, we get:
√ Z (x−µ)/ √2σ
2σ 2
F(x) = √ e−z dz
π2σ 2 −∞
Z (x−µ)/ √2σ
"Z #
1 0
−z2 −z2
= √ e dz + e dz (2.27)
π −∞ 0
  
1 x−µ
= 1 + erf √ .
2 2σ

Asset Return Statistics 23

2.2.4.1 Moments of a Distribution


The expected value of a continuous random variable is found by integrating its pos-
sible values weighted by the probability that they happen. Mathematically:
Z ∞
hXi = x f (x)dx. (2.28)
−∞

We can define a moment generating function [31] as the expected value of etX for a
given statistical distribution:

MX (t) = hetX i
 
1 1
= 1 + tX + t 2 X 2 + t 3 X 3 + . . .
2! 3! (2.29)

t2
= ∑ hX n i n! .
n=0

With this definition we can find a specific moment:

d n MX
mn = hX n i = . (2.30)
dt n t=0
This is particularly useful for calculating the distribution function of the sum of
independent random variables. If we have Z = X +Y , for example, we can write the
moment generating function for Z as:
D E
MZ (z) = ez(X+Y ) = ezX ezY
(2.31)
= MX (z)MY (z).
Since the moment generating function can be interpreted as the bilateral Laplace7
transform of the random variable, the inverse transform of the product is the convo-
lution of the two distributions:
Z ∞
fZ (z) = fY (z − x) fX (x)dx. (2.32)
−∞

The nth central moment of a random variable X, another important definition, is


given by:
Z ∞
µn = h(X − hXi)n i = (x − µ)n f (x)dx. (2.33)
−∞

Therefore, the 0th central moment is 1, the first central moment is zero and the
third central moment is the variance.
The central moments ∀c ∈ R are translation invariant:

µn (X + c) = µn (X). (2.34)
24 Introduction to Econophysics

They are also homogeneous:

µn (cX) = cn µn (X). (2.35)

Furthermore, the three first central moments are additive for independent random
variables:

µn (X +Y ) = µn (X) + µn (Y ), n ∈ {1, 2, 3}. (2.36)


The same procedure that we adopted to normalize returns can also be applied to
moments so that we can define standardized moments. The nth standardized moment
is created dividing the nth central moment by the nth power of the standard deviation:
µn
µ̃n = ,
σn
D En/2 (2.37)
σ n = (X − hXi)2 .

The standardized moment of order 1 is always 0 and the second is always 1. The
third standardized moment is a measure of asymmetry and the fourth standardized
moment is a measure of kurtosis of the distribution. These standardized moments can
be used to study the shape of the distribution of returns. For instance, the kurtosis of
the normal distribution is 3 (mesokurtic). Therefore, distributions with a kurtosis
smaller than 3 are known as platykurtic, whereas distributions with kurtosis greater
than 3 are known as leptokurtic. This is a good indication about the chance of finding
extreme events in the distribution as we shall see ahead.

2.2.5 LÉVY PROCESSES


One of the most used stochastic processes to model financial systems is the Lévy pro-
cess [29,33–35]8 . A Lévy process is an indexed and ordered limited set of stochastic
variables {X} that obeys a set of propertiesc :

1. P(X0 = 0) = 1;
2. The increments Xt − Xs are independent;
3. The increments are also stationary, which implies that Xt − Xs has the same distri-
bution of Xt−s for t > s;
4. The probability measure related to this process is continuous. Therefore,
lim∆→0 P (|Xt+∆ − Xt | > ε) = 0, ∀ ε > 0 and t > 0;
If the distribution of increments is normal with zero mean and variance given by
σ 2 = t − s, then this process is known as a Wiener process [36]9 .

c A generalization of Lévy processes where the increments can have different distributions is known as

an additive process.
Asset Return Statistics 25

2.2.5.1 Infinitely Divisible Processes


One interesting property of Lévy distributions is that they can be infinitely divided10
[37,38]. Let’s take one stochastic variable Xt that follows this process. For any integer
N, according to property #2, this variable can be written as:
n  
Xt = ∑ X kt − X (k−1)t , ∀n ∈ N. (2.38)
n n
k=1

The Fourier transform of the distribution of the stochastic variables is called char-
acteristic function and can simply be written as:

FX (s) = heisX i. (2.39)


Thus, the characteristic function of Xt is:
*  + *  +
is ∑nk=1 X kt −X (k−1)t n is X kt −X (k−1)t
FX (s) = e n n = ∏e n n . (2.40)
k=1

Since the increments of a Lévy process are independent (property #2), we have:
*  +
n is X kt −X (k−1)t
FX (s) = ∏ e n n . (2.41)
k=1

Yet, according to property #3, we have:


n  n
FX (s) = ∏ FX1/n (s) = FX1/n (s) . (2.42)
k=1

Processes whose variables have the same distribution of the sum ∑nk=1 Xk , ∀n ∈
N+ are called infinitely divisible.

2.2.5.2 Stable Distributions


Given two random variables with the same distribution, if the sum of these variables
has the same distribution, then this distribution is called stable. As shown in Fig. 2.5,
stable distributions are a subset of infinitely divisible processes. Let’s see an example
with Gaussian variables X1 and X2 . The distribution of their sum can be computed
using the characteristic function:

FX (ω) = FX1 (ω)FX2 (ω)


2 2
   
− σ 2 ω2 +iµω − σ 2 ω2 +iµω
=e e (2.43)
2
 
−2 σ 2 ω2 +iµω
=e ,
26 Introduction to Econophysics

finite moments

infinitely
divisible

stable
distributions

infinite Ω
moments

Figure 2.5: Venn diagram for distributions with finite/infinite moments, infinitely
divisible processes and stable distribution. The point in the center shows the Gaussian
distribution

Paul Lévy [39, 40] found in 1925 the whole set of distributions that are stable.
These are given by:

   
iµω − γ|ω|α 1 − iβ ω tan π α para α  1,
 |ω| 2 
ln (F(ω)) = (2.44)
 iµω − γ|ω| 1 + iβ ω 2 ln |ω| para α = 1.
|ω| π

Some distributions are well known depending on specific values of α and β . For
instance, when α, β = 1, 0 we get the Cauchy-Lorentz distribution and when α = 2
we get the Gaussian distribution.
When α  1 and β = 0, the zero centered stable distribution can be written as:
 ∞
α
F(x) = eixω−γ|ω| dω. (2.45)
−∞
For the tail part of the distribution, the integral is dominated by small values of
the conjugate variable ω. Therefore, it is possible to write a first non-trivial order
approximation as:
 ∞
F(x) ≈ eixω (−γ|ω|α ) dω
−∞
 
sin πα
2 Γ(α + 1) (2.46)

|x|α+1
∝ |x|−α−1 .
Thus, asymptotic Lévy distributions can follow a power law. One consequence is that
Lévy distributions can have infinite moments. Indeed, the only stable distribution
that has all its moments finite is the Gaussian distribution. Another consequence is
the presence of self-similarity:
Asset Return Statistics 27

F(kx) ≈ |kx|−α−1
≈ k−α−1 |x|−α−1 p/ k > 0
(2.47)
≈ kH |x|−α−1
≈ kH F(x),
where H is a self-similarity level also known as Hurst coefficient. Let’s study the
tails of some distributions in more details next.

2.2.6 DISTRIBUTION TAILS


Let’s imagine a situation where we pick random people from a population. After we
sample a large number of individuals, the height of each new individual contributes
only slightly to the average height. Even if there is a giant in the population, the
average height is not much affected because the height of most individuals are located
around the population mean. In this case we say that the distribution has light tails.
Mathematicallyd11 , for a set of individuals X1 , X2 , . . ., we must havee :
( )!
N
P{max(X1 , X2 , . . . , XN ) > t)} = o P ∑ Xn > t . (2.48)
n

The Gaussian distribution is an example of a distribution that fulfills this requirement.


On the other hand, if we measure the average wealth of these individuals, we
notice that this average is dominated by the wealth of a few individuals. We can think
of a group of a thousand randomly picked individuals and some of them happens to
be very rich. The average wealth of this group might be around some value until
we include this rich person in the counting process. From this point forward, the
average wealth is dominated by his or her wealth. In this case, extreme events are
more frequent and we say that tail behavior of the distribution is heavy.

( )
N
lim Pr{max(X1 , X2 , . . . , XN ) > t)} ∼ lim Pr ∑ Xn > t
t→∞ t→∞ n
( )
N
1 − lim Pr {max(X1 , X2 , . . . , XN ) ≤ t} ∼ lim Pr ∑ Xn > t
t→∞ t→∞ n
( )
N
1 − lim Pr{X1 ≤ t}Pr{X2 ≤ x} . . . Pr{XN ≤ t} ∼ lim Pr ∑ Xn > t .
t→∞ t→∞ n

d The f (x)
small “o” notation means that if f (x) = o (g(x)), then limx→∞ g(x) = 0.
e Thisis known by some authors as a conspiracy principle [41] since many things have to go wrong in
a system so that we detect a problem.
28 Introduction to Econophysics

For independent and identically distributed random variables (i.i.d.):


( )
N
1 − lim Pr{X1 ≤ t}N ∼ lim Pr ∑ Xn > t
t→∞ t→∞ n
( )
N (2.49)
N
1 − lim (1 − Pr{X1 > t}) ∼ lim Pr ∑ Xn > t
t→∞ t→∞ n

lim NF(t) ∼ lim FN (t),


t→∞ t→∞

where we have used the binomial approximation, and FN indicates the distribution
of the sum. This is known as a tail preservation criterium [42]. This tells us that the
distribution of the sum is preserved (keeps the same format) under finite addition and
this defines a family of leptokurtic distributions. If the distribution of returns obeys
this criterion, an investor can expect, for example, a higher probability for extreme
gains and losses. Therefore, it implies more risk.
Heavy-tailed distributions can also be fat, long and subexponential as we shall see
below. But before discussing these subclasses, we must discuss two mathematical
tools that will help us analyze the tails: the Markov12 inequality and the Chernoff13
bound.
The expected value of a non-negative random variable can be calculated for two
portions of a distribution, one closer to the origin and another corresponding to the
tail: Z ∞
hXi = x fX (x)dx
−∞
Z ∞
= x fX (x)dx (2.50)
Z0 a Z ∞
= x fX (x)dx + x fX (x)dx.
0 a
However, it is also true that:
Z a Z ∞ Z ∞
hXi = x f (x)dx + x f (x)dx ≥ x f (x)dx
Z0 ∞ Za ∞ a
(2.51)
hXi ≥ x f (x)dx ≥ a f (x)dx = a.P(x ≥ a).
a a
Therefore,
P(x ≥ a) ≤ hXi/a. (2.52)
This is known as Markov inequality and gives us an important property of the distri-
bution tail. To understand its importance, let’s see how the exponential function of
the tail behaves:
Pr(X ≥ a) = Pr etX ≥ eta


etX
≤ (2.53)
eat
−at
≤ e MX (t),
Asset Return Statistics 29

This is known as the Chernoff bound for the distribution and imposes an upper bound
on the tail in terms of the moment generating function.

2.2.6.1 Subexponential Distributions


In order to understand subexponential distributions, let’s see what a sub-Gaussian
distribution is first. The moment generating function for a zero centered Gaussian
distribution is given by:
1 ∞ Z
2 2
MX (t) = √ etx e−x /2σ dx
2πσ 2 −∞
1
Z ∞
2 2 2 2 2
= √ e−(x−tσ ) /2σ +t σ /2 dx (2.54)
2
2πσ −∞
2 σ 2 /2
= et .
Therefore, we can define sub-Gaussian distributions as those that obey:

t 2σ 2
log(MX (t)) ≤ . (2.55)
2
Applying the Chernoff bound (Eq. 2.53) to this case, we find:
2 σ 2 /2−ta
Pr(t ≥ a) ≤ et . (2.56)
On the other hand, the Laplace distribution (double exponential distribution) has a
moment generating function given by:

1 0 x/λ tx 1 ∞ −x/λ tx
Z Z
MX (t) = e e dx + e e dx
2λ −∞ 2λ 0
Z 0 
1
Z ∞
x(t+1/λ ) x(t−1/λ )
= e dx + e dx
2λ −∞ 0
 
0 ∞
1 e(t+1/λ )x e(t−1/λ )x 
=  +
λ t + 1/λ t − 1/b
−∞ 0
 
1 1 1
= − , if |t| < 1/λ (2.57)
2λ t + 1/λ t − 1/λ
1 −2/λ
=
2λ t 2 − 1/λ 2
1
=
1 − λ 2t 2
1
≤ 2 2 , ← 1st order Taylor’s expansion in reverse.
−λ
e t /2
2 2
≤ eλ t /2 .
30 Introduction to Econophysics

Therefore, proceeding as we did for the sub-Gaussian distributions, we define


sub-exponential distributions as those that obey:

t 2λ 2
log (MX (t)) ≤ , ∀|t| < 1/λ . (2.58)
2
Or applying the Chernoff bound:

λ 2t 2
 
Pr(x ≥ a) ≤ exp − at = eg(t) . (2.59)
2
This, however, only applies to small values of a since the moment generating func-
tion is not defined for t ≥ 1/λ .
It is possible to find a stricter limit by calculating the minimum of g(t):

g(t) = 1/2λ 2t 2 − at
a
g0 (t) = λ 2t − a = 0 → tmin =
λ2 (2.60)
1 a 2 a 1 a2
g(tmin ) = λ 2 4 − a 2 = − .
2 λ λ 2 λ2
This also imposes a bound for a:

|t| < 1/λ


1 a (2.61)
> 2 → a < λ.
λ λ
At the boundary where t = 1/λ , we have:

λ2
 
1 a
g t= = 2

λ 2λ λ (2.62)
a
≤− .

Thus, according to Eq. 2.60, subexponential distributions resemble sub-Gaussian
distributions near the origin. On the other hand, whereas sub-Gaussian distributions
rapidly lose their tails, Eq. 2.62 shows that subexponential distributions have tails
that fall exponentially without a defined moment generating function.

2.2.6.2 Long and Fat Tails


A distribution is said to have a long tail if its tail probability have a tendency to
become constant for large values. Mathematically, we can say:
Asset Return Statistics 31

lim P [X > x + ∆|X > x] = 1, ∆ > 0


x→∞
P ((X > x + ∆) ∩ (X > x))
lim =1
x→∞ P(X > x)
P (X > x + ∆) (2.63)
lim =1
x→∞ P(X > x)
lim P(X > x + ∆) ∼ lim P(X > x),
x→∞ x→∞
∴ lim f (x + ∆) ∼ lim f (x).
x→∞ x→∞

Let’s see, for instance, a distribution function such as:


1
f (x) = , x ≥ 1. (2.64)
log(x)
Applying the definition of a long tail distribution we get:

log(x) log(x)
lim = lim 
x→∞ log(x + ∆) x→∞ log x 1 + ∆
x
log(x)
= lim  (2.65)
x→∞ log(x) + log 1 + ∆x
log(x)
= = 1.
log(x)
This means that for large values, the tail tends to flatten out and the expected fluctu-
ations resulting from this tail can be big.
Fat tails, on the other hand, are those distributions whose tails can be modeled
with a power law. One example of such distributions is the Pareto distribution that
is discussed next. We close this discussion by showing the tails of the Gaussian, the
exponential and the Pareto distributions in Fig. 2.6. It is instructive to note how the
tail of the Gaussian distribution falls rapidly and the tail of the Pareto distribution is
not limited by the exponential distribution.

2.2.7 PARETO DISTRIBUTION


We close this section studying the Pareto14 distribution, which is of particular impor-
tance in econophysics. For instance, it is a distribution commonly used to describe
the wealth distribution in a society.
The domain of this distribution is [x0 , ∞), where x0 is a constant. Its PDF is given
by:

x0α
f (x) = α . (2.66)
xα+1
Its CDF is then given by:
32 Introduction to Econophysics

4.0

3.5

3.0

2.5
f(x) × 10-3

2.0

1.5

1.0

0.5

0.0
2 4 6 8 10 12 14
x

Figure 2.6: The Gaussian distribution (light tail), the Lorenz distribution (exponen-
tial), and the Pareto distribution (heavy tail). All distributions are calculated to have
the same variance

Z z
P(Z ≤ z) = αx0α x−(α+1) dx
x0
α α −(α+1)+1 z
=− x x
α 0 x0 (2.67)
= −x0α z−α + 1
 α
x0
= 1−
z
and its complementary CDF (CCDF) is given by:
 α
x0
P̄(z) = P(Z > z) = 1 − P(Z ≤ z) = . (2.68)
z

The CCDF of the Pareto distribution leads to a special property. If we take the
logarithm of a Pareto distributed random variable:
 
X
Y = log , (2.69)
x0
we find for its CDF:
Asset Return Statistics 33

   
X
Pr(Y > y) = 1 − Pr ln ≤y
x0
= 1 − Pr (X ≤ x0 ey )
(2.70)
x0 α
 
=
x0 ey
= e−αy .
Therefore, the logarithm of a Pareto distributed random variable is exponentially
distributed.
The survival function (or reliability function) of a Pareto distributed random vari-
able holds another interesting property related to its expectation beyond a specific
value z. This is given by:

hX1X>z i
S(z) = . (2.71)
P̄(z)
Its numerator is given by:


x0α x1−α
Z ∞ Z ∞
hX1X>z i = xα dx = αx0α x−α dx = αx0α
z x α+1
z 1−α z (2.72)
α α 1−α
= x z if α > 1.
α −1 0
Therefore, the survival function is given by:
 α
α α 1−α z
S(z) = x z
α −1 0 x0 (2.73)
α
= z.
α −1
The additional expected survival is then:
α
z−z
S(z) − z =
α −1
z (2.74)
= .
α −1
For α = 2, for example, when the process survives z, it is expected that it will survive
another value z. This kind of behavior is known as Lindy effectf .
The kth standardized moment for a Pareto distributed random variable is not al-
ways defined:

f Not related to any scientist but to a restaurant in New York where comedians used to meet and make

predictions about how much longer their shows would last.


34 Introduction to Econophysics

∞ xk
D E Z
xk = αx0α dx
x xα+1
Z ∞0
= αx0k dxxk−α−1
x0

xk−α
= αx0k (2.75)
k−α x0
x0k−α
= αx0α , for k < α
α −k
α k
= x .
α −k 0
It is possible to estimate the tail index α of the distribution using maximum like-
lihood estimation. Its likelihood function is given by:
−(α+1)
L = α N x0Nα ∏ xn (2.76)
n

and its log is:

log L = N log(α) + Nα log(x0 ) − (α + 1) ∑ log(xn ). (2.77)


n

Minimizing it with respect to α we get:

∂ log L N
= + N log(x0 ) − ∑ log(xn )
∂α α n
N xn
0 = + ∑ log (2.78)
α n x0
N
α̂ =  ,
x
∑n log x̂n0

where x̂0 = mini xi . This is known as the Hill estimator15 [43].

2.2.7.1 Lorenz Curve


As we stated before, the Pareto distribution is widely used to model the wealth dis-
tribution in a society. A graphical representation of this distribution is given by the
Lorenz16 curve [44]. For a PDF given by f (x) and its equivalent CDF F(x), the
Lorenz curve is given by:
R x(F) F R
t f (t)dt x(G)dG
L (F(x)) = R−∞
∞ = R01 , (2.79)
−∞ t f (t)dt 0 x(G)dG
where x(F) is the inverse of the CDF. Thus, the Lorenz curve shows the normalized
expected value of a random variable as a function of its cumulative value. Usually,
Asset Return Statistics 35

economists use this curve to show the cumulative share of wealth as a function of the
cumulative share of people. A straight diagonal line implies perfect equality, whereas
the bending of the curve implies some level of inequality. For instance, if the tail
index is ≈ 1.16, approximately 80 % of the wealth would be held by 20 % of the
society, which is known as Pareto principle. Countries with the highest inequalities
in the world have tail indexes not smaller than 1.3, though.
For the Pareto distribution we get:
 x α x0
0
F(x) = 1 − → x(F) = . (2.80)
x (1 − F)1/α
Thus, the Lorenz curve becomes:
RF x0
0 (1−G)1/α dG
L(F) = R1 x0
. (2.81)
0 (1−G)1/α dG

The integral in the numerator is:


F
(1 − G)1−1/α
Z F
x0
dG = x0
0 (1 − G)1/α 1 − 1/α
0
(1 − F)1−1/α x0 (2.82)
= x0 −
1 − 1/α 1 − 1/α
x0 h i
= (1 − F)1−1/α − 1 .
1 − 1/α
Thus, the Lorenz curve becomes:

(1 − F)1−1/α − 1
L(F) =
−1 (2.83)
= 1 − (1 − F)1−1/α .
This curve is shown in Fig. 2.7 and can be plotted in Python using:

F = np.linspace(0,1,100)
L = [1-(1-Fn)**(1-1.0/alfa) for Fn in F]
pl.plot(F,L)

2.2.7.2 Gini Index


As discussed previously, a homogeneous wealth distribution would imply that x %
individuals would hold x % of the total wealth. Therefore, the Lorenz curve would
be a diagonal straight line with an inclination of π/4 rads. In order to quantify how
unequal the wealth distribution is, Gini17 developed the following measure [45]:
36 Introduction to Econophysics

0
3.
=
α 0
2.
=
α
1.5
=
α

Figure 2.7: Lorenz curve for different tail indexes. The dashed line corresponds to
α →∞

1
Z 
G = 1−2 L(F)dF . (2.84)
0

For the Pareto distribution, the Gini index is given by:


Z 1 
1−1/α
G = 1−2 1 − (1 − F) dF
0
 
1
(1 − F) 2−1/α
= 1 − 2  F|10 − 
2 − 1/α
0 (2.85)
 
1
= 1−2 1+
2 − 1/α
1
= .
2α − 1
Typically, countries with high inequality have Gini indexes around 60 %, whereas
countries with low inequalities have Gini indexes around 25 %. In these extreme
cases, the tail indexes are:
 
1 1
α= 1+
2 G
(2.86)
αmin ≈ 1.33,
αmax ≈ 2.50.
Asset Return Statistics 37

2.3 MODELS FOR FINANCIAL TIME SERIES


A time series is an indexed dataset ordered in time. Mathematically, we describe a
time series with a set X = {xm |m ∈ T }, where T is an indexed set given by T =
{1, . . . , M}. The same way we can use a time series to describe the rainfall amount
along a set of days, we can use a time series to model the price evolution of a financial
asset. It is possible to model a time series in different ways. Here we will study the
autoregressive model (AR), the moving average (MA) and the combination of both,
the autoregressive moving average (ARMA) [31].

2.3.1 AUTOREGRESSIVE MODEL (AR)


Let’s describe the price of an asset xt as:
p
xt = c + ∑ φi xt−i + εt , (2.87)
i=1

where c is a bias, φi are parameters that we can adjust to obtain a nice fit, and εt
is a component related to random shocks (or innovations). This random variable
typically has a zero expected value and unitary variance. A graphical representation
of this process is shown in Fig. 2.8

εn Σ xn
Delay

Φ1 xn−1
Delay

Φ2 xn−2

Delay

Φp xn−p

Figure 2.8: Graphical representation of an autoregressive process

This is the equivalent of an infinite impulse response (IIR) filter, where the current
price depends explicitly on previous values.
If we ignore the price history such that φi = 0, ∀i, then the current price depends
only on the random shock:
xt = c + εt . (2.88)
Since we used no information about the past, this model is known as AR(0). Its
expected value is given by:
38 Introduction to Econophysics

hxt i = c. (2.89)
The variance of an AR(0) process is given by:

VAR(xt ) = VAR(c) + VAR(εt )


(2.90)
σx2 = σe2 .
If we take only the previous price information, we obtain the AR(1) process given
by:

xt = c + φ xt−1 + εt . (2.91)
If φ = 1, then the AR(1) model is a random walk model around a value c. Let’s
explore a few properties of this model. For instance, the expected value of the AR(1)
process is:

hxt i = hci + hφ xt−1 i + hεt i


(2.92)
µ = c + φ hxt−1 i + hεt i.
Considering that the price of the asset is a wide-sense stationary process (hxt+n i =
hxt i, see more in Sec. 2.4.1), then:
c
µ = c+φµ → µ = . (2.93)
1−φ
The variance of an AR(1) process is given by:

σx2 = VAR(c) + VAR(φ xt−1 ) + VAR(εt )


= 0 + φ 2 σx2 + σe2
(2.94)
σe2
σx2 = .
1−φ2
Since the variance is always positive, we have that |φ | < 1.
The autocovariance is given by:

γs = COV(xt , xt−s ) = h(xt−s − hxt−s i)(xt − hxt i)i


= h(xt−s − hxt−s i) (c + φ xt−1 + εt − c − φ hxt−1 i)i
= h(xt−s − µ) (φ (xt−1 − µ) + εt )i (2.95)
= φ h(xt−s − µ) (xt−1 − µ)i
= φ γs−1 .

Therefore:

γs = φ γs−1 = φ 2 γs−2 = φ 3 γs−3 = . . . = φ s γ0 = φ s σx2 . (2.96)


The autocorrelation is given then by:
Asset Return Statistics 39

COV(xt , xt−s ) γs
ρ= = = φ s. (2.97)
STD(xt )ST D(xt−s ) σx2
Interestingly, this can also be written as:
2
σxx = φ s = es log φ = e−s/τ , (2.98)
where τ = −1/ log φ is a correlation time.
Finally, we can use the Wiener-Khinchin theorem (Sec. 2.4.1.1) to compute the
spectral density from the autocovariance:

σe2
S(ω) = ∑ 2
φ |s| e− jωs
s=−∞ 1 − φ
" #
σe2 ∞
− jωs s jωs s

= 1+ ∑ e φ +e φ (2.99)
1−φ2 s=1
" #
σe2 ∞
− jω
s ∞ jω s
= 1+ ∑ e φ +∑ e φ .
1−φ2 s=1 s=1
To proceed let’s use the result:
∞ ∞
1 x
∑ xn = ∑ xn − 1 = 1 − x − 1 = 1 − x . (2.100)
n=1 n=0

Therefore:

σe2 e− jω φ e jω φ
 
S(ω) = 1 + +
1−φ2 1 − e− jω φ 1 − e jω φ
σe2 (1 − e− jω φ )(1 − e jω φ ) + 1 − e jω φ e− jω φ + 1 − e− jω φ e jω φ
 
=
1−φ2 (1 − e− jω φ ) (1 − e jω φ )
σe2 1 − e jω φ − e− jω φ + φ 2 + e− jω φ − φ 2 + e jω φ − φ 2
=
1−φ2 (1 − e− jω φ ) (1 − e jω φ )
σe2 1−φ2
=
1 − φ 2 (1 − e− jω φ ) (1 − e jω φ )
σe2 σe2
= = .
1 − e jω φ − e− jω φ + φ 2 1 − 2φ cos(ω) + φ 2
(2.101)
The autocorrelation and the spectral density for an AR(1) process are shown in
Fig. 2.9. It is interesting to note that positive φ produces a nicely decaying auto-
correlation function and a spectral density that is dominated by low frequency com-
ponents. On the other hand, negative coefficients produce alternating autocorrela-
tions and spectral densities that are dominated by high frequency components. Thus,
negative φ produces signals in the time domain that are rougher than those signals
produced by positive φ .
40 Introduction to Econophysics

Figure 2.9: Left: Autocorrelation function and Right: Spectral density for an AR1
process

2.3.2 MOVING AVERAGE (MA)


The AR(1) process can be recursively modified such that it becomes an infinite his-
tory. In order to distinguish it from the standard AR process, let’s write the adjust-
ment parameter as θ :

xt = c + θ xt−1 + εt
= c + θ (c + θ xt−2 + εt−1 ) + εt
(2.102)
= c + θ (c + θ (c + θ xt−3 + εt−2 ) + εt−1 ) + εt
= c + θ c + θ 2 c + θ 3 xt−3 + θ 2 εt−2 + φ εt−1 + εt
If we continue this process indefinitely towards the past and considering that |θ | < 1
and the first element of this series is not much relevant, we get:
∞ ∞
xt = ∑ θ n c + ∑ θ n εt−n
n=0 n=0

c
= + ∑ θ n εt−n (2.103)
1 − θ n=0

xt = µ + ∑ θ n εt−n
n=0

This way, θ appears as a kernel and the price signal is a response to random shocks
at different time period. This is known as a moving average process. The graphi-
cal representation of this process is shown in Fig. 2.10. Although it can be a more
complicated process to work with because of the shocks, it is always stable.
It is often possible to make the opposite travel from an MA to an AR process. For
instance, for the MA(1) process we have:
Asset Return Statistics 41

εn Σ xn
Delay

εn−1 θ1

Delay

εn−2 θ2

Delay

εn−q θq

Figure 2.10: Graphical representation of a moving average process

xt = εt + θ εt−1
xt−1 = εt−1 + θ εt−2
xt−2 = εt−2 + θ εt−3 (2.104)
xt−3 = εt−3 + θ εt−4
..
.
Therefore,
xt = εt + θ xt−1 − θ 2 εt−2
= εt + θ xt−1 − θ 2 xt−2 + θ 3 εt−3
= εt + θ xt−1 − θ 2 xt−2 + θ 3 xt−3 − θ 4 εt−4 (2.105)

xt = ∑ (−1)n−1 θ n xt−n + εt .
n=1
The equivalence of adjustment parameters in this case is:

φn = (−1)n−1 θ n . (2.106)
Like the AR(0) process, the MA(0) is also trivial. Its expected value is just c and
its variance is σe2 . The MA(1) process is given by:

xt = µ + εt + θ εt−1 . (2.107)
Its expected value is given by:

hxt i = hµi + hεt i + hθ εt−1 i = µ. (2.108)


The variance of this process is:
42 Introduction to Econophysics

VAR(xt ) = VAR(µ) + VAR(εt ) + VAR(θ εt−1 )


= σe2 + θ 2 σe2 (2.109)
= (1 + θ 2 )σe2 .
Its autocovariance is given by:

γs = h(xt − hxt i)(xt−s − hxt−s i)i = h(εt + θ εt−1 )(εt−s + θ εt−s−1 )i


= εt εt−s + θ εt εt−s−1 + θ εt−1 εt−s + θ 2 εt−1 εt−s−1
(2.110)
= δ (s)σe2 + θ σe2 δ (s − 1) + θ 2 σe2 δ (s)
= σe2 (1 + θ 2 )δ (s) + θ δ (s − 1) .
 

Therefore, its autocorrelation is:

σe2 (1 + θ 2 )δ (s) + θ δ (s − 1)
 
ρx =
(1 + θ 2 )σe2
(2.111)
θ
= δ (s) + δ (s − 1).
1+θ2
The spectral density can be obtained once again using the Wiener-Khinchin theo-
rem with the covariance:

e− jωs σe2 (1 + θ 2 )δ (s) + θ δ (|s| − 1)

S(ω) = ∑
s=−∞
(2.112)
= σe2 1 + θ 2 + θ (e− jω + e jω )


= σe2 1 + θ 2 + 2θ cos(ω) .


Therefore, when θ is positive and the autocorrelation is positive, the spectrum is


dominated by low frequency components. In the opposite case, when θ is negative,
the spectrum is dominated by high frequency components. This behavior is shown in
Fig. 2.11.

2.3.3 AUTOREGRESSIVE MOVING AVERAGE (ARMA)


It is possible to combine an autoregressive process with a moving average to compose
an autoregressive moving average process:
N M
yt = ∑ φn yt−n + εn + ∑ θm εt−m . (2.113)
n=1 m=1

A graphical representation of an ARMA process is shown in Fig. 2.12.


The ARMA model is particularly appealing since a wide-sense stationary time
series with zero mean can be modeled as a sum of a stochastic (linear combination
of lags of a white noise process) component and an uncorrelated deterministic (linear
Asset Return Statistics 43

Figure 2.11: The spectral density for an MA1 process

εn Σ Σ xn
Delay Delay

εn−1 θ1 Φ1 xn−1
Delay Delay

εn−2 θ2 Φ2 xn−2

Delay Delay

εn−q θq Φp xn−p

Figure 2.12: Graphical representation of an ARMA process

combination of lags of a signal) component. This is known as Wold’s decomposition


[46]18 . In other words, Wold’s decomposition states that any wide-sense stationary
time series has an ARMA representation.
ARMA(p,0) processes are just AR(p) processes and ARMA(0,q) processes are
just MA(q) processes. For an ARMA(1,1) process we have:

yt = µ + φ yt−1 + εt + θ εt−1 . (2.114)


The expected value of yt is:
44 Introduction to Econophysics

µ
hyt i = µ + φ hyt−1 i → hyt i = . (2.115)
1−φ
The variance can be found by first computing yt yt and yt yt−1 :

hyt2 i = φ hyt−1 yt i + hεt yt i + θ hεt−1 yt i


(2.116)
hyt yt−1 i = φ hyt−1 yt−1 i + hεt yt−1 i + θ hεt−1 yt−1 i.
In order to solve these equations, first we need:

hyt εt i = φ hyt−1 εt i + hεt εt i + θ hεt−1 εt i


(2.117)
= σe2 ,
given that hyt−1 εt i = 0, since the signal is not correlated with the noise. We also
need:

hεt−1 yt i = φ hεt−1 yt−1 i + hεt−1 εt i + θ hεt−1 εt−1 i


= φ hεt yt i + θ σe2 (2.118)
= σe2 (φ + θ ),
With these results we can rewrite Eqs. 2.116:

γ0 = φ γ1 + σe2 + θ σe2 (φ + θ )
(2.119)
γ1 = φ γ0 + θ σe2 .
Therefore,

γ0 = φ (φ γ0 + θ σe2 ) + σe2 + θ σe2 (φ + θ )


= φ 2 γ0 + φ θ σe2 + σe2 + φ θ σe2 + θ 2 σe2
(2.120)
1 + 2φ θ + θ 2 2
= σe .
1−φ2

2.3.4 BOX-JENKINS APPROACH


Box19 and Jenkins20 created a popular approach to identify the parameters of ARMA
processes [47]. This approach is divided in three steps: i) identification: In this step,
the sizes of the AR and MA series are estimated, ii) estimation: here the φ and θ
parameters are estimated, and iii) diagnostics: in this last step, the residues of the
model are analyzed. All steps are undertaken in a cyclic fashion until convergence is
obtained.
In the identification phase, the autocorrelation function (ACF) and the partial au-
tocorrelation function (PACF) of the time series are plotted. The presence of a long
persistence in the ACF may indicate that a low frequency trend has to be removed
or the series could be differentiated. If the ACF decays, but the PACF drops quickly
after some value p, then an AR(p) model can be used. If the opposite situation oc-
curs with the PACF decaying and the ACF drops quickly after some value q, then an
Asset Return Statistics 45

MA(q) model can be used. On the other hand, if both functions decay without any
abrupt cut, then a mixed model has to be considered.
In the estimation phase, the φ and θ parameters are estimated using techniques
such as least squares, the Yule-Walker equations and maximum likelihood. We will
study some of these techniques next.
After the parameters are estimated, a diagnostic is performed doing a portmanteau
test with the ACF and the PACF of the residues. If the test fails, then we go back
to the first step. One test that is commonly used is the Box-Pierce test [48]. The
null hypothesis for this test is that the residues are i.i.d. The following statistics is
computed:
m
Q(m) = n ∑ rl2 , (2.121)
l=1
where m is the number of lags in the ACF, n is the number of terms in the series, and
n
∑t=l+1 at at−l
rl2 = n , (2.122)
∑t=1 at2
where an are the residues.
In the Box-Pierce test Q(m) is chi-square distributed with k degrees of liberty if
the residues are random. Therefore, the null hypothesis is rejected if Q > χ1−α,k with
level of significance α and k = m − p − q degrees of freedom.
Another test is the Box-Ljung [49], where the statistics Q is modified to:
m rl2
Q(m) = n(n + 2) ∑ . (2.123)
l=1 n − l
The Box-Ljung test is known to produce a Q statistics with a distribution closer to
the χ 2 distribution.

2.3.4.1 Partial Autocorrelation


The correlation function for a time series x is simply given by:

hxt xt−τ i
ACF(τ) = . (2.124)
σ2
The partial autocorrelation function is a conditional correlation that takes into ac-
count what we already known about previous values of the time series. For instance,
for the PACF(2) we get:

cov(xt , xt−2 |xt−1 )


ρx (2) = (2.125)
σ (xt |xt−1 )σ (xt−2 |xt−1 )
and the PACF(3) is given by:

cov(xt , xt−3 |xt−1 , xt−2 )


ρx (3) = . (2.126)
σ (xt |xt−1 , xt−2 )σ (xt−3 |xt−1 , xt−2 )
46 Introduction to Econophysics

In order to compute this conditional correlation, let’s write the elements of the
time series as a linear combination of lagged elements:

x̂t = α11 xt−1 + et


= α21 xt−1 + α22 xt−2 + et
= α31 xt−1 + α32 xt−2 + α33 xt−3 + et
.. (2.127)
.
k
= ∑ αki xt−i
i=1

Equation 2.124 shows that the ACF is the angular coefficient of a linear regression
of xt for an independent xt−τ . Therefore, the αkk coefficients are the PACF(k) since
they correspond to the correlation between xt and xt−k . It is possible to find the α
coefficients minimizing the square error:

∂ (xt − x̂t )2
0=
∂ αp
2
∂ xt − ∑ki=1 αki xt−k
=
∂ αkp
(2.128)
∂ xt2 − 2 ∑ki=1 αki xt xt−i + ∑i j αki αk j xt−i xt− j

=
∂ αkp
k
= −2xt xt−p + 2 ∑ αki xt−i xt−p .
i=1

Taking the expected value:


k
hxt xt−p i = ∑ αki hxt−i xt−p i
i=1
k
cov(p) = ∑ αki cov(i − p), divide by cov(0) (2.129)
i=1
k
ρx (p) = ∑ αki ρx (i − p).
i=1

In matrix format:

    
ρx (1) ρx (0) ρx (1) ... ρx (k − 1) αk1
ρx (2)  ρx (−1) ρx (0) ... ρx (k − 2)
 αk2 
 
 ..  =    ..  . (2.130)
  
.. .. .. ..
 .   . . . .  . 
ρx (k) ρx (k − 1) ρx (k − 2) ... ρx (0) αkk
Asset Return Statistics 47

Or in matrix notation:
rk = Rk ak,k . (2.131)
Once the PACF is calculated, a correlogram is computed as shown in Fig. 2.13.
The value after which the PACF shows a quick drop is an indication about the order
of the model. Under the supposition that the coefficients
√ follow a normal distribution,
the limits of significance are given by ±1.96/ N for a level of 5%, where N is the
size of the time series.

PACF(k)

0 1 2 3 4 5 6 7 8 9
k

Figure 2.13: Example of PACF where the limit of significance is given by the shaded
area. In this example, a second order model could be tested

2.3.4.2 Durbin-Levinson Recursive Method


According to Eq. 2.130 we must do a matrix inversion for each value of k and then
find the last element of ak,k . There is, however, a faster method to do this computation
devised by Durbin21 and Levinson22 [50, 51].
For a matrix:
 
0 0 ... 0 1
0 0 . . . 1 0
 
 
E =  ... ... . . . ... ...  , (2.132)
 
0 1 . . . 0 0
1 0 ... 0 0
it is possible to write Eq. 2.130 as:
    
rk−1 R Erk−1 ak−1,k
= T k−1 . (2.133)
ρx (k) rk−1 E ρx (0) αkk
48 Introduction to Econophysics

The first line of this matrix equation (using R−1


k rk = ak,k ) is given by:

rk−1 = Rk−1 ak−1,k + Erk−1 αkk


−1
Rk−1 rk−1 = ak−1,k + R−1
k−1,k Erk−1 αkk
ak−1,k−1 = ak−1,k + ER−1
k−1 rk−1 αkk
(2.134)
= ak−1,k + Eak−1,k−1 αkk
→ ak−1,k = ak−1,k−1 − Eak−1,k−1 αkk .
The second equation gives:

ρx (k) = rTk−1 Eak−1,k + ρx (0)αkk


= rTk−1 E ak−1,k−1 − Eak−1,k−1 αkk + ρx (0)αkk


= rTk−1 Eak−1,k−1 − rTk−1 EEak−1,k−1 αkk + ρx (0)αkk


(2.135)
= rTk−1 Eak−1,k−1 + ρx (0) − rTk−1 ak−1,k−1 αkk


ρx (k) − rTk−1 Eak−1,k−1


→ αkk = .
ρx (0) − rTk−1 ak−1,k−1
Thus, it is possible to find the coefficients αk,k recursively in a more computationally
effective way.

2.3.4.3 Yule-Walker Equations


Yule23 and Walker24 have independently developed a general method [52, 53] to find
the parameters of time series. This method is based on computing the ACF. Let’s
describe how this technique works applying it to an AR process:
p
xi = ∑ φ j xi− j + εi . (2.136)
j=1

Let’s multiply it for an element with a delay k:


p
xi−k xi = ∑ φ j xi−k xi− j + xi−k εi , (2.137)
j=1

and let’s take its expected value:


p
hxi−k xi i = ∑ φ j hxi−k xi− j i + hxi−k εi i. (2.138)
j=1

Since the innovations are now correlated with the signal, we have that:
p
2
σxx (k) = ∑ φ j σxx2 ( j − k). (2.139)
j=1
Asset Return Statistics 49

2 (0):
Dividing the whole expression by σxx
p
rxx (k) = ∑ φ j rxx ( j − k). (2.140)
j=1

If we remember that rxx (−a) = rxx (a) e rxx (0) = 1 we can write the previous equation
in matrix format:
    
rxx (1) 1 rxx (1) . . . rxx (p − 2) rxx (p − 1) φ1
 rxx (2)   rxx (1)
   1 . . . rxx (p − 3) rxx (p − 2)
  φ2 
 
.. .
.. .
.. .
.. .
.. .
=   .. 
     

 .    
rxx (p − 1) rxx (p − 2) rxx (p − 1) . . . 1 rxx (1)  φ p−1 
rxx (p) rxx (p − 1) rxx (p − 2) . . . rxx (1) 1 φp
(2.141)
Or in matrix notation:
r = RΦ (2.142)
Matrix R is known as dispersion matrix. It is a symmetric matrix with complete rank.
Therefore, it is invertible and we can write:

Φ = R−1 r. (2.143)

Thus we can directly obtain the values of the parameters φn .

2.3.5 HETEROSCEDASTICITY
So far we have only considered the case where time series have the same finite vari-
ance along their whole periods. This case is known as homoscedasticity. In financial
series, however, it is easy to find situations where this does not happen. As we will
see ahead in Sec. 2.4.2, variance tends to cluster in time and show some inertia. This
change in variance at different time periods is known as heteroscedasticity. There-
fore, not only it is important to develop models for the variance in time series as it is
also important to consider their histories. One way of detecting heteroscedasticity in
time series is with the Breusch-Pagan25 test where the variance of the residuals of a
linear regression depends on the independent variable.
In order to model heteroscedasticity, Engle26 proposed an autoregressive condi-
tional heteroskedasticity (ARCH) [26, 54, 55] process, for which he was awarded
the Nobel prize in 2003. Consider a stochastic variable for the log-returns given by
rt = σt εt , where εt is normally distributed ∼ N (0, 1). An ARCH process is then
given by:
q
2
σt2 = α0 + ∑ αn rt−n . (2.144)
n=1
50 Introduction to Econophysics

For the ARCH(1) process, given a history Ht = rt , rt−1 , rt−2 , . . ., we have:

VAR(rt |Ht−1 ) = hrt2 |Ht−1 i


= hσt2 εt2 |Ht−1 i
(2.145)
= σt2 hεt2 |Ht−1 i
= σt2 = α0 + α1 rt−1
2
.
The unconditional variance, though, can be found using the law of total expecta-
tion:

σu2 = hVAR(rt |Ht−1 )i = α0 + α1 σu2 → α0 = (1 − α1 )σu2 . (2.146)


Therefore, the conditional variance can also be written as:

σt2 = (1 − α1 )σu2 + α1 rt−1


2
= σu2 + α1 (rt−1
2
− σu2 ). (2.147)
From this equation we see that the conditional variance of the ARCH(1) model is a
linear combination of the unconditional variance and a deviation of the square error.
The ARCH(1) process has zero conditional expectation, though:

hrt |Ht−1 i = hσt εt |Ht−1 i = σt hεt |rt−1 , rt−2 , . . .i = 0. (2.148)


Using the law of total expectation again we see that the unconditional expectation is
also zero:

hhrt |Ht−1 ii = h0i = 0. (2.149)


We can use these results to obtain the covariance:

hrt rt−1 i = hhrt rt−1 |Ht−1 ii


= hrt−1 hrt |Ht−1 ii (2.150)
= hrt−1 0i = 0.
Since one cannot predict rt based on its history Ht−1 , the ARCH(1) model obeys the
EMH (see Sec. 1.3).

2.3.5.1 Generalized ARCH Model


A generalization of ARCH models (GARCH) in the form of:
p q
2
σt2 = α0 + ∑ αn rt−n + 2
∑ βn σt−m (2.151)
n=1 m=1

was proposed in 1986 by Bollerslev27 and Taylor28 [56, 57].


The GARCH(1,1) process is given by:

VAR(rt |Ht−1 ) = σt2 = α0 + α1 rt−1


2 2
+ β σt−1 . (2.152)
Asset Return Statistics 51

This can be written as an infinite ARCH process if we rewrite it back substituting


it in itself:
σt2 = α0 + α1 rt−1
2 2
+ β (α0 + α1 rt−2 2
+ β σt−2 )
2 2
= α0 + β α0 + α1 rt−1 + α1 β rt−2 + β 2 σt−2
2

2 2
= α0 + β α0 + α1 rt−1 + α1 β rt−2 + β 2 (α0 + α1 rt−3
2 2
+ β σt−3 ) (2.153)

α0 2
→ + α1 ∑ β n−1 rt−n , if |β | < 1.
1−β n=1

Its unconditional variance is given by:

σu2 = hσt2 i = hα0 + α1 σt−1


2 2
εt−1 2
+ β σt−1 i
= α0 + α1 σu2 + β σu2 (2.154)
α0
σu2 = .
1 − (α1 + β )
We can use the unconditional variance to compute the unconditional kurtosis. In
order to do this, first we must calculate the expected value of the fourth power of hεi:
1 ∞
Z
2
hε 4 i = √ ε 4 e−ε /2 dε
2π −∞
1 d
Z ∞
2
=−√ ε 3 e−ε /2 dε
2π −∞ dε (2.155)

1  3 −ε 2 /2 ∞ 2 d −ε 2 /2
Z ∞
=−√ ε e −3 x e dε
2π −∞ −∞ dε
= 3hε 2 i = 3.
The expected value of the fourth power of σu is:

σu4 = hσt4 i = h(α0 + α1 rt−1


2 2
+ β σt−1 )2 i
2 2 2
= h(α0 + α1 εt−1 σt−1 + β σt−1 )2 i
= hα02 + (α1 εt−1
2
+ β )2 σt−1
4 2
+ 2α0 (α1 εt−1 2
+ β )σt−1 i
= hα02 + (α12 εt−1
4
+ β 2 + 2β α1 εt−1
2 4
)σt−1 2
+ 2α0 (α1 εt−1 2
+ β )σt−1 i
= α02 + (3α12 + β 2 + 2α1 β )σu4 + 2α0 (α1 + β )σu2
2α02 (α1 + β )
= α02 + (3α12 + β 2 + 2α1 β )σu4 +
1 − (α1 + β )
α02 − (α1 + β )α02 + 2α02 (α1 + β )
= + (3α12 + β 2 + 2α1 β )σu4
1 − (α1 + β )
(1 + α1 + β )α02
= ,
(1 − α1 − β )(1 − 3α12 − β 2 − 2α1 β )
(2.156)
given that 1 − 3α12 − β 2 − 2α1 β > 0.
52 Introduction to Econophysics

The kurtosis of the GARCH(1,1) model is thus:

hrt4 i hσ 4 ε 4 i σ4
K= 2 2
= t2 t2 = 3 u2
hrt i hσt εt i σu
2
(1 + α1 + β )α02

1 − (α1 + β )
=3
(1 − α1 − β )(1 − 3α12 − β 2 − 2α1 β ) α0
(2.157)
(1 + α1 + β )(1 − α1 − β ) 1 − (α1 + β )2
=3 2
=3
2
1 − 3α1 − β − 2α1 β 1 − (α1 + β )2 − 2α12
6α12
= 3+ .
1 − 3α12 − β 2 − 2α1 β

Note that since 1 − 3α12 − β 2 − 2α1 β > 0, the excess kurtosis is always positive.
Therefore, the GARCH(1,1) model can model heavy tails.
ARCH and GARCH models can be easily handled in python. The following snip-
pet, for instance, fits previously obtained log-returns with a GARCH(1,1) model and
displays a summary of information related to this fitting.

from arch import arch_model

model = arch_model(log_returns,vol=‘GARCH’,p=1,q=1,dist=‘Normal’)
model_fit = model.fit()
estimation = model_fit.forecast()
print(model_fit.summary())

2.4 STYLIZED EMPIRICAL FACTS OF FINANCIAL TIME SE-


RIES
Econophysics as a science has the huge ambition of discovering specific dynamics
of economics systems that do not depend directly on the human will. This, however,
creates a huge problem. Given that economics deals with human beings and they act
subjectively, the conclusion that the human action is unpredictable is striking. Indeed
many sociologists have pointed out that even if one embarks on a mission to forecast
the human action, the very act of trying to forecast it would impact the measurement
itself [58]. Despite this burden, many regularities have been empirically observed in
the economic and social human activities when one deals with summaries of rele-
vant facts. These regularities have been called by Kaldor29 as stylized facts [59, 60],
but even before him, general tendencies of the economic activity had already been
observed [61].
It is important to point out that these stylized facts are just general tendencies
and may hide several details. For instance, it is observed a tendency for salaries
Asset Return Statistics 53

to correlate with the level of education. Nonetheless, it is not uncommon to find


graduate students having low incomes during their period in graduate school.
Thus, stylized facts behave for the social scientist the same way physical mea-
surements behave for the natural scientist. The econophysicist observes these regu-
larities as natural phenomena and tries to explain them using the mathematical frame-
work developed to explain similar physical phenomena. Furthermore, the existence
of these stylized facts implies that these regularities can be extracted and separated
from more holistic frameworks. This agrees with the approach of Brentano30 where
a phenomenon could be studied and understood apart from the whole. Moreover,
according to his view, specific historical and psychological details were not determi-
nant for the study of economic systems. This view influenced a legion of economists
such as Menger that used it to elaborate his theory of marginal utility.
Since stylized facts deal with tendencies, they are best analyzed with statistical
tools. However, in order to use many statistical tools, the time series has to be sta-
tionary and ergodic. If the dataset is not stationary, the statistical properties change
over time and no generalization can be obtained. Also, we expect that statistical av-
erages of the time series estimate real averages. Furthermore, finite size effects have
to be taken care of when necessary. Many statistical analyses are performed on small
time intervals and this may not represent a general tendency for longer periods.

2.4.1 STATIONARITY
A stochastic process is defined as an indexed collection of random variables
{X1 , X2 , X3 , . . . , XN }. If the unconditional joint probability of this process is time
invariant, then this process is stationary (or strictly or strongly stationary). Math-
ematically:

FX (xt1 +τ , . . . , xtN +τ ) = FX (xt1 , . . . , xtN ). (2.158)


Therefore, statistical parameters such as the average and variance are also time inde-
pendent.
This is, nonetheless, a very strict definition that can often complicate computa-
tions. We can relax this restriction by imposing that only the average and the autoco-
variance are time invariant and the second moment is finite. Under these restrictions,
the stochastic process is said to be wide-sense stationary (or covariance stationary).
Mathematically:

µ = hx(t)i = hx(t + ∆)i, ∀∆ ∈ R. (2.159)


The autocovariance is a function that tells us how much similar a function is to
itself when compared at two different time points. Mathematically it is given by:

CXX (t1 ,t2 ) = h(x(t1 ) − hx(t1 )i) (x(t2 ) − hx(t2 )i)i


= h(x(t1 ) − µ) (x(t2 ) − µ)i (2.160)
= CXX (t1 − t2 , 0) = CXX (∆, 0) = CXX (∆).
54 Introduction to Econophysics

−T T

Figure 2.14: Graphical representation of an autocovariance process. A copy of a


signal is translated in time while the product between them is computed at every
time shift

Indeed, we see that if we make:

CXX (t1 − t2 ,t2 − t2 ) = h(x(t1 − t2 ) − hx(t1 − t2 )i) (x(t2 − t2 ) − hx(t2 − t2 )i)i


= h(x(t1 − t2 ) − µ) (x(0) − µ)i (2.161)
∝ CXX (t1 − t2 , 0) = CXX (∆, 0),

since µ = hx(0)i is an average and , x(0) is the value at that point. Thus, we can
define an autocorrelation function indexed only by a time difference as graphically
shown in Fig. 2.14.
In time series, the stationarity of a stochastic process can be verified by the pres-
ence of a unit root. To see how the importance of the unit root, let’s take the MA
representation of an AR1 process:

yt = a · yt−1 + εt
= a(a · yt−2 + εt−1 ) + εt
= a [a(a · yt−3 + εt−2 ) + εt−1 ] + εt (2.162)

→ ∑ an εt−n .
n=0
The variance of this process is given by:

var{yt } = ∑ var{an εt−n }
n=0

σy2 = ∑ a2n var{εt−n } (2.163)
n=0
σe2
= , if |a| < 1.
(1 − a2 )
Asset Return Statistics 55

On the other hand, if a = 1, then

σy2 = t 2 σe2 (2.164)


and the variance not only depends but increases with time.
A popular method to check for the unit root in time series is using the Dickey-
Fuller31 test. This test considers an AR1 process:

yt − yt−1 = (a − 1)yt−1 + εt
(2.165)
∆yt = β yt−1 + εt .
Coefficient β is obtained with a linear regression between ∆yt and yt−1 . The process
is stationary when β < 0.

2.4.1.1 Fourier Transform


The autocorrelation function is actually a very important tool to access many styl-
ized facts in time series. Although the definition given above is accurate, it is much
simpler to calculate it using a Fourier32 transform. The Fourier transform pair used
in this book is given by:
Z ∞
F(ω) = F { f (t)} = f (t)e− jωt dt
−∞
(2.166)
1
Z ∞
f (t) = F −1 {F(ω)} = F(ω)e jωt dω.
2π −∞
Numerically, it is estimated by the discrete Fourier transform (DFT) given by:
N−1
Xm = ∑ xn e− jωm n , (2.167)
n=0
where
2πm
ωm = , m ∈ {0, 1, . . . , M − 1}. (2.168)
M
The variable m going from M/2 to M produces an angular frequency that goes from
π to 2π, which is equivalent of it going from −π back to 0. Therefore the first M/2
points correspond to positive frequencies whereas the last M/2 points correspond to
reflected negative frequencies. This mechanism is shown in Fig. 2.15.
The DFT is computed, though, using efficient algorithms such as Cooley-
Tuckey33 . When using such algorithms, the DFT is known as fast Fourier transform
(FFT).
The DFT assumes a periodic signal. If we simply ignore it, the Fourier transform
can show spectral leakage and have a reduced dynamical reserve. In order to circum-
vent this problem, the signal is typically multiplied by a window function such as the
Hann window:
 
2 nπ
wn = sin . (2.169)
N −1
56 Introduction to Econophysics

xn Xk 1/T
+f 2π/N −f
π,−π 0,2π

0 N−1 n 0 π=−π 2π=0 ω


0 T t 0 N/2 N−1 k

Figure 2.15: Left: A discretized signal containing N points within a period T . Right:
Its discrete Fourier transform. The inset depicts the Fourier circle showing the equiv-
alence between going from 0π to 2π and from −π back to 0

The autocorrelation function can nicely be computed from the Fourier transform
and take advantage from these fast algorithms. For this, let’s consider a signal given
by its Fourier transform:
1
Z ∞
x(t) = X(ω)e− jωt dω. (2.170)
2π −∞
The autocovariance function can be written as:

Z T /2   Z ∞ 
1 1 ∞ 1
Z
0
CXX (τ) = lim X(ω 0 )e− jω (t+τ) dω 0 X ∗ (ω)e jωt dω dt
T →∞ T −T /2 2π −∞ 2π −∞
 Z T /2 
1 1
Z ∞Z ∞
0 ∗ − j(ω 0 −ω)t 0
= X(ω )X (ω) lim e dt e− jω τ dω dω 0 .
(2π)2 −∞ −∞ T →∞ T −T /2
(2.171)
It is easy to show that the integral inside the parentheses gives a delta function δ (ω −
ω 0 ). We are then left with:

1 ∞ ∞
Z Z
0
CXX (τ) = 2
R(ω)R∗ (ω 0 )δ (ω − ω 0 )e− jω τ dω dω 0
(2π) −∞ −∞
1
Z ∞
= |R(ω)|2 e− jωτ dω (2.172)
(2π)2 −∞
1 −1
= F {R(ω)R∗ (ω)} .

The argument of the inverse Fourier transform is known as power spectral density
(PSD) and the main result is known as the Wiener-Khinchin theorem34 .
Asset Return Statistics 57

This can be implemented in Python according to the following snippet:

N = len(data)

# Hanning window
s = [w*d for w,d in zip(np.hanning(N), data)]

# FFT
F = np.fft.fft(s)
S = [f*np.conj(f)/N for f in F]

# Autocorrelation
z = np.fft.ifft(S).real
C = np.append(z[N/2:N], z[0:N/2])

2.4.2 COMMON EMPIRICAL FACTS


Figure 2.16 shows the price of Bitcoing and its normalized returns for approximately
7000 minutes from a random initial date.

Money

Money is the most liquid asset in an economy that: i) can be


generally accepted as a medium of exchange, ii) can be used as a
unit of accounting, and iii) can store value.

For instance, precious metals satisfy all these three requirements


and for a long time gold was used as currency. After the adoption of
the Bretton Woods system of monetary management in 1944, most
economies adopted the gold standard monetary system where the
value of a paper money is based on a fixed amount of gold. Since
1973 most economies (specially the US with the ‘Nixon shock’)
dropped the gold standard in favor of fiat money—a government
issued currency not backed by any precious metal.

Since Bitcoin does not meet the standard definition of money, we


prefer to call it just digital good.

The distribution of returns shown in Fig. 2.17 is clearly not Gaussian, but fits
much better with a heavy tail distribution such as the t-student distribution. This is

gA popular digital good based on blockchain technology.


58 Introduction to Econophysics

9.6

Price [103 USD]


9.5

9.4

9.3

9.2

9.1

Figure 2.16: Top: Price of Bitcoin in US$ for approximately 7000 consecutive min-
utes obtained at a random initial data, and Bottom: Respective normalized returns
for the same period
a known stylized fact: the distribution of log returns for many financial assets has a
tendency to form fat tails for high frequency data. It is important to emphasize that
this tendency occurs for high frequency data. If the returns are calculated for longer
time steps, this tendency disappears and the distribution approaches a Gaussian dis-
tribution. This is another stylized fact known as aggregational Gaussianity.

Figure 2.17: Left: The solid disks correspond to the estimated distribution of nor-
malized returns for the time series shown in Fig. 2.16. The dotted line is a Gaussian
fitting of the data, whereas the solid line is a fitting with a t-student distribution.
Right: Excess kurtosis for the distribution as a function of the time scale used to
calculate the log-returns
It is widely reported that price returns in liquid marketsh have either no correlation
or correlations that decay quickly to zero [62]. Since no periodicity can be found

hA market with a significant number of buyers and sellers and relatively low transaction costs.
NOTES 59

and no strategy can be developed using this information, the absence of correlation
is usually considered an indication of an efficient market. Although returns do not
show any significant correlation, the volatilityi usually does and is known as volatility
clustering. Therefore, volatility exhibits a memory effect and price variations tend to
show persistence over finite periods. This behavior is visualized in Fig. 2.18. Another
way to access whether the time series shows volatility clustering is fitting the time
series with a GARCH process.

Figure 2.18: The autocorrelation function of returns (stars) and returns squared (cir-
cles). Whereas the former does not show any significative correlation, the latter ex-
plicitly shows some memory

Financial assets, including Bitcoin, have many other stylized facts [62] such as
positive correlation between volume and volatility and fluctuation scaling [63]. The
latter is characterized by a power law between the average return and the correspond-
ing volatility. This is known in biology as Taylor’s law35 .

Notes
1 Brook Taylor (1685–1731) English mathematician.
2 Andrey Nikolaevich Kolmogorov (1903–1987) Russian mathematician.
3 Originally defined by Henri Léon Lebesgue (1875–1941) French mathematician; advisee of Émile

Borel.
4 Félix Édouard Justin Émile Borel (1871–1956) French mathematician advisor of Henri Lebesgue

among others.
5 Leonhard Euler (1707–1783) Swiss mathematician; advisee of Johann Bernoulli and advisor of

Joseph-Louis Lagrange, among others.


6 Johann Karl August Radon (1887–1956) Austrian mathematician and Otto Marcin Nikodym (1887–

1974) polish mathematician.

i The variance within a given period.


60 NOTES

7 Pierre-Simon, marquis de Laplace (1749–1827) French polymath. Advisee of Jean d’Alembert and

advisor of Siméon Denis Poisson.


8 Paul Pierre Lévy (1886–1971) French mathematician, advisee of Jacques Hadamard and Vito

Volterra. Adviser of Benoît Mandelbrot.


9 Norbert Wiener (1894–1964) North American mathematician and philosopher. Advisee of Josiah

Royce and adviser of Amar Bose.


10 Identified in 1929 by Bruno de Finetti (1906–1985) Italian statistician.
11 This notation was introduced in 1909 by Edmund Georg Hermann Landau (1877–1938) German

mathematician; advisee of Georg Frobenius and adviser of Niels Bohr’s brother Harald Bohr among oth-
ers.
12 Andrey Andreyevich Markov (1856–1922) Russian mathematician, advisee of Pafnuty Lvovich

Chebyshev and adviser of Aleksandr Lyapunov and Abraham Besicovitch among others.
13 Herman Chernoff (1923–) American mathematician, advisee of Abraham Wald.
14 Vilfredo Federico Damaso Pareto (1848–1923) italian polymath.
15 Bruce M Hill (1944–2019) American statistician.
16 Max Otto Lorenz (1876–1959) American economist.
17 Corrado Gini (1884–1965) Italian statistician.
18 Shown in 1938 para Herman Ole Andreas (1908–1992) Swedish statistician.
19 George Edward Pelham Box (1919–2013) British statistician, advisee of Egon Sharpe Pearson, son

of Karl Pearson. Box created the famous aphorism: “All models are wrong, but some are useful.”
20 Gwilym Meirion Jenkins (1932–1982) British statistician.
21 James Durbin (1923–2012) British statistician.
22 Norman Levinson (1912–1975) American mathematician, advisee of Norbert Wiener.
23 George Udny Yule (1871–1951) British statistician.
24 Sir Gilbert Thomas Walker (1868–1958) English physicist and statistician.
25 Trevor Stanley Breusch (1953–) Australian econometrician, and Adrian Rodney Pagan (1947–) Aus-

tralian economist.
26 Robert Fry Engle III (1942–) North American statistician.
27 Tim Peter Bollerslev (1958–) Danish economist, advisee of Robert F. Engle.
28 Stephen John Taylor (1954–) British economist.
29 Nicholas Kaldor (1908–1986) Hungarian economist, advisee of Lionel Robins.
30 Franz Clemens Honoratus Hermann Brentano (1838–1917) Prussian philosopher and psychologist,

adviser of Edmund Husserl and Sigmund Freud among others.


31 David Alan Dickey (1945–) advisee of Wayne Arthur Fuller (1931–) American statisticians.
32 Jean-Baptiste Joseph Fourier (1768–1830) French mathematician, advisee of Joseph-Louis Lagrange

and adviser of Peter Gustav Lejeune Dirichlet and Claude-Louis Navier among others.
33 James William Cooley (1926–2016) and John Wilder Tukey (1915–2000) American mathematicians.
34 Norbert Wiener (1894–1964) American mathematician, adviser of Amar Bose among others. Alek-

sandr Yakovlevich Khinchin (1894–1959) Russian mathematician.


35 Lionel Roy Taylor (1924–2007) British ecologist.
Stochastic Calculus
3
The book value of a company is defined as its assets subtracted from its liabilities.
Accountants use this information to build a consistent economic history of the com-
pany allowing investors to make forecasts about its future value.
In 2013, though, Apple had one of its highest sales ever, its balances were in
good shape and everything pointed to a bright future. Investors, on the other hand,
had a pessimistic view about the company and were trading its stocks at low prices.
This kind of mismatch between the economic health of a company and the nego-
tiated price of its stocks led regulators to push companies to use a fair-value type
accounting based on the value a company would worth if it were to be sold. One
of this accounting strategies, mark-to-market (MTM), is even part of the accounting
standards adopted by the U.S. Securities and Exchange Commission (SEC).
On the other hand, this kind of accounting, for example, pushed Enron, a company
spotted six consecutive years as the most innovative in America, to adopt fraudulent
accounting practices. For instance, it would build a power plant and adopt the pro-
jected profit as real and actual profit in order to elevate its public image. Had the
profit not materialized, it would transfer the asset to an off-the-books corporation
and hide the loss. After the fraudulent behavior was discovered, the company’s price
per share dropped from $90 to less than $1 in about one year, the company went
bankrupt, its employees lost $2 billions from their pensions, and shareholders lost
$74 billions.
What is a fair game? What is the probability for an event like this or a change of
expectations to happen? This chapter deals with random processes and their calcula-
tions. We will begin studying fair games, move to stochastic chains, mean reverting
processes, and then close with point processes.

3.1 MARTINGALES AND FAIR GAMES


Martingales [31, 64] are stochastic processes whose name is borrowed from the vo-
cabulary of gamblers from France. It was first used by Ville1 in 1939 [65], but the
theory dates back to 1934 with the works of Paul Lévy [66]. In a dÁlembert’s2 mar-
tingale, for instance, a gambler starts with one coin. He loses a bet and doubles the
next bet for two coins. He loses this bet again and accumulates a loss of three coins.
Once again, the gambler doubles the next bet for four coins but this time the gambler
wins. Thus, the gambler wins four coins and accumulates a net result of one coin. As
long as the gambler keeps this strategy, it is possible to end up with the net result of
one coin. For the nth bet, the gambler bets bn = 2n−1 coins. If he stops at this bet, he
accumulates a result of:
n−1 n−1
1 − 2n−1
Sn = bn − ∑ bk = 2n−1 − ∑ 2k−1 = 2n−1 − = 1.
k=1 k=1 1−2

DOI: 10.1201/9781003127956-3 61
62 Introduction to Econophysics

Martingales are associated with the concept of a fair game. This means that for
such game the chance of winning a certain amount is the same of losing this same
amount. If we apply this concept to the market we say that the current price can-
not depend on its history, the market price has no memory. Therefore, there is no
opportunity for arbitrage and, according to Fama (Sec. 1.3), this models an efficient
market. We can say that, independent of its history X1 , . . . , Xn , the expected value for
the next value of this stochastic process is exactly the present value. Mathematically,
this is described by:

hXn+1 |X1 , . . . , Xn i = Xn , (3.1)


given that the expected present value is finite:

h|Xn |i < ∞. (3.2)


The best way to grasp the mathematical usefulness of martingales is by studying
a set of examples. Let’s consider first a martingale bet (not to be confused with
a martingale process) where a random variable X can assume the value +1 if the
gambler wins or −1 if the gambler loses. Let’s also define a random variable B for
the current bet. For the nth bet, the wealth of the gambler is described by the random
variable Y as:
n
Yn = Y0 + ∑ Bi Xi , (3.3)
i=1
where Y0 is the initial wealth. The conditional expected value for the wealth at the
next bet is given by:

* +
n+1
hYn+1 |Y0 ,Y1 , . . . ,Yn i = Y0 + ∑ Bi Xi Y0 , . . . ,Yn
i=1
* +
n
= Y0 + ∑ Bi Xi + Bn+1 Xn+1 Y0 , . . . ,Yn
i=1
*
n
+ (3.4)
= Y0 + ∑ Bi Xi Y0 , . . . ,Yn + hBn+1 Xn+1 |Y0 , . . . ,Yn i
i=1
1
= hYn |Y0 , . . . ,Yn i + (Bn+1 − Bn+1 )
2
= Yn .

The fact that the conditional expected future value does not depend on the history
of the random variable is known as martingale property. It is also possible to define
processes in which current value of the random variable works as a limiter for the
expected conditional future value. If it works as a limiter for the lower bound:

hXn+1 |X1 , . . . , Xn i ≥ Xn , (3.5)


Stochastic Calculus 63

then this is known as a submartingale. On the other hand, if it is a limiter for the
upper bound:

hXn+1 |X1 , . . . , Xn i ≤ Xn , (3.6)


then this process is known as a supermartingale.
Let’s now consider a fair game where the gambler tosses an unbiased coin and
wins a constant amount ∆ depending on the side that is showing up when it lands.
If the wealth is described by the random variable Xn for the nth bet, the expected
conditional value is Xn + ∆ with a 50 % chance and Xn − ∆ with the same chance.
Therefore, hXn+1 |X1 . . . Xn i = 1/2(Xn + ∆) + 1/2(Xn − ∆) = Xn . However, if the coin is
biased towards winning, we have a supermartingale. Otherwise, it is a submartingale.
In a broader sense, martingales can be defined in terms of filtration3 . Consider Ft
as the set of all measurement elements up to time t (a σ -algebra). The finite sequence
F0≤t≤T such that F0 ⊆ F1 ⊆ . . . ⊆ Ft ⊆ . . . ⊆ FT is considered a filtration of a sam-
ple space Ω. If the filtration is composed of σ -algebras generated by {X1 , . . . , Xn },
then (Fn ) is the natural filtration of the sequence (Xn ). Thus, a random variable is
said to be adapted to the filtration Fn : n ∈ N if Xn ∈ Fn .
For instance, let’s assume a binary market where we only consider if the price of
an asset went up (+) or down (−). For a two period binary market, the sample space
is Ω = {++, +−, −+, −−}. The smallest σ -algebra is given by {0, / Ω} and will be
denoted by F0 . For the first period, in addition to the trivial σ -algebra, there are two
more possibilities: F+ = {++, +−} e F− {−+, −−}. Therefore, F1 = {F0 , F+ , F− }.
For the second period, we have all subsets of Ω.
With the definition of filtration, we can define a martingale Xn : n ∈ N with respect
to the filtration Fn : n ∈ N:

1. h|Xn |i < ∞;
2. Xn is adapted to the filtration Fn , i.e. Xn is Fn -measurable;
3. hXn+1 |Fn i = Xn , ∀n ∈ N.
Another widely used type of martingale is the Doob martingale [36,64]4 . For any
bounded function f : Ωn → R, f (X1 , . . . , Xn ) the Doob martingale is given by:

Zn = h f (X)|Fn i
(3.7)
Z0 = h f (X)i.
Such Doob process is a martingale because:

hZn |Fn−1 i = hh f (X)|Fn i|Fn−1 i


= h f (X)|Fn−1 i, law of total expectation (3.8)
= Zn−1 .
64 Introduction to Econophysics

3.1.1 RANDOM WALKS


Let’s analyze here some random walks. For instance, let X be a random variable such
that hXi = µ. The position of a particle after n steps is given by Zn = ∑ni=1 (Xi − µ).
The expected conditional value of its future position is given by:
* +
n+1
hZn+1 |Z1 . . . Zn i = ∑ (Xi − µ) Z1 . . . Zn
i=1
* +
n
= ∑ (Xi − µ) + Xn+1 − µ Z1 . . . Zn
i=1 (3.9)
= hZn + Xn+1 − µ|Z1 . . . Zn i
= hZn |Z1 . . . Zn i + hXn+1 − µ|Z1 . . . Zn i
= Zn + hXn+1 − µi
= Zn .
Therefore, the simple random walk is an example of a martingale.
Bachelier (Sec. 1.3) in his seminal work [21] assumes an efficient market where
successive prices are statistically independent. Also, he assumes a complete mar-
ket where there are buyers and sellers for assets marked at any price. Given these
hypotheses, he assumes that the prices undergo a movement composed of a deter-
ministic and a random component. The random component is a random walk that
can be described by a martingale, i.e. its expected future value does not depend on
its history.
Let’s now consider the geometric random walk given by Zn = ∏ni=1 Xi where the
random variables Xi are independent such that hXi i = 1 and Xi > 0. Its conditional
expected value is:
* +
n+1
hZn+1 |Z1 . . . Zn i = ∏ Xi Z1 . . . Zn
i=1
* +
n
= Xn+1 ∏ Xi Z1 . . . Zn (3.10)
i=1
= hXn+1 i hZn |Z1 . . . Zn i
= Zn .

Therefore, it is also a martingale.


The exponential random walk is another process with a multiplicative structure
that finds applications in stochastic finance where price changes are described with
n
respect to the current price. Let’s take Zn = eλ ∑i=1 Xi where the random variables Xi
are independent and can only assume the values ±1. The conditional expected future
value is given by:
Stochastic Calculus 65

D n+1
E
hZn+1 |Z1 . . . Zn i = eλ ∑i=1 Xi Z1 . . . Zn
D n
E
= eλ Xn+1 eλ ∑i=1 Xi Z1 . . . Zn
D E
= eλ Xn+1 Zn (3.11)
 
= 1/2 eλ + e−λ Zn
= cosh(λ )Zn ≥ Zn .
Therefore, it is a submartigale. Multiplicative processes have been used, for example,
to study the distribution of wealth in a society [67].

3.1.2 PÓLYA PROCESSES


A Pólya5 process is one where balls of different colors (red and green) are randomly
picked from an urn, returned, and additional c balls of the same color are added to
the urn. If c = 0, then we have a Bernoulli6 process with replacement, or if c = −1
then we get a hypergeometric process without replacement.
At the nth trial, there are a red balls and b green balls in the urn. For the next trial,
there are two possibilities for the fraction Y of red balls. We can get (a + c)/(a + b +
c) with probability a/(a + b) or a fraction a/(a + b + c) with probability b/(b + c):
a a+c b a
hYn+1 |Y1 , . . . ,Yn i = +
a+b a+b+c a+b a+b+c
a(a + c) + ab
=
(a + b)(a + b + c)
(3.12)
a(a + c + b)
=
(a + b)(a + b + c)
a
= = Yn .
a+b
Therefore, this fraction is a martingale.
This process has a very interesting property. In order to arrive at this property,
let’s calculate the probability of drawing green balls in the first and second trials, and
a red ball in the third trial:

P(G1 G2 R3 ) = P(G1 )P(G2 |G1 )P(R3 |G1 G2 )


b (b + c) a (3.13)
= .
(a + b) (a + b + c) (a + b + 2c)
Let’s compare this probability with that of picking first a red ball then two green
balls:

P(R1 G2 G3 ) = P(R1 )P(G2 |R1 )P(G3 |R1 G2 )


a b (b + c) (3.14)
= .
(a + b) (a + b + c) (a + b + 2c)
66 Introduction to Econophysics

Finally, let’s also compare those with the probability of obtaining a green ball fol-
lowed by a red and another green balls:

P(G1 R2 G3 ) = P(G1 )P(R2 |G1 )P(G3 |G1 R2 )


b a (b + c) (3.15)
= .
(a + b) (a + b + c) (a + b + 2c)
Note that the denominator is always the same and we have a permutable sequence.
This is valid for any choice of balls, since the number of balls increases linearly with
the period. Therefore, the probability of obtaining a sequence with k red balls and
N − k green balls is given by:

a(a + c) . . . (a + (k − 1)c)b(b + c) . . . (b + (N − k − 1)c)


p=
(a + b)(a + b + c)(a + b + 2c) . . . (a + b + (N − 1)c)
(3.16)
a(c,k) b(c,N−k)
= ,
(a + b)(c,N)
where

r(s, j) = r(r + s)(r + 2s) . . . (r + ( j − 1)s). (3.17)


It is possible to rewrite the probability p using a shorter notation:

∏ki=1 (a + (i − 1)c) ∏N−k i=1 (b + (i − 1)c)


p= N
∏i=1 (a + b + (i − 1)c)
∏i=1 c + i − 1 ∏N−k
k a b
 
i=1 c + 1 − 1
=
∏Ni=1 a+b

c +i−1
Γ ac + k Γ bc + N − k Γ−1 ac Γ−1 bc
   
= (3.18)
Γ a+b −1 a+b
 
c +N Γ c
Γ ac + k Γ bc + N − k Γ ac + bc
  
=
Γ ac + bc + N Γ ac Γ bc
  

B ac + k, bc + N − k

=
B ac , bc


Since we have a permutable sequence, there are Nk possibilities. Therefore, the




PDF of the sum Zn = ∑Ni Xi is:


  a
N B c + k, bc + N − k

P(Zn = k) = . (3.19)
B ac , bc

k
which can also be written as:

a b
 
Γ(N + 1) 1 Γ c +k Γ c +N −k
P(Zn = k) = a b a b
(3.20)
Γ(k + 1)Γ(N − k + 1) B c , c
 
Γ c + c +N
Stochastic Calculus 67

Using Stirling’s7 approximationa we get for x, k → ∞:

Γ(x + a) Γ ((x + a − 1) + 1)
=
Γ(x + b) Γ ((x + b − 1) + 1)
e−x−a+1 (x + a − 1)1/2+x+a−1

e−x−b+1 (x + b − 1)1/2+x+b−1 (3.21)
xx x−1/2 xa

xx x−1/2 xb
≈ xa−b .
Using this result in Eq. 3.20 we get a beta distribution:
1
P(Zn = k) = a b
 ka/c−1 (N − k)b/c−1 N 1−a/c−b/c
B c, c
  (3.22)
Zn 1
P =u =  ua/c−1 (1 − u)b/c−1 , u = k/N.
N B c , bc
a

Therefore, Pólya’s processes can potentially lead to distributions with heavy tails.
This finds parallels in many socioeconomic phenomena. For instance, Merton (Sec.
1) observed that fame and status can lead to cumulative advantage [68]. This is
known in social sciences as Matthew effect. In economics, it is often observed that
the growth rate of firms is independent of their sizes. This is basically because the
concentration of capital can lead to progressive more investments. This is known as
the law of proportionate effect or Gibrat’s law [69]8 .

3.1.3 STOPPING TIMES


From the definition of a martingale, we saw that for a stochastic process X = {Xn :
n ≥ 0}:

hXn+1 |X0 , X1 , . . . , Xn i = Xn
(3.23)
hXn+1 − Xn |X0 , X1 , . . . , Xn i = 0.
This implies that for a fair game, the expected values of the additions ∆X = Xn+1 −
Xn are independent on the history of the game. Thus, we infer that after N bets,
the expected value of XN must be the same as that at the beginning of the process.
Mathematically:

hXn |Fn−1 i = Xn−1


hhXn |Fn−1 i|Fn−2 i = hXn−1 |Fn−2 i (3.24)
hXn |Fn−1 i = hXn−1 |Fn−2 i
Continuing this procedure until we reach the first element of the series:


a Γ(x + 1) ≈ 2πe−x x1/2+x .
68 Introduction to Econophysics

hXn |Fn−1 i = hXn−1 |Fn−2 i = hXn−2 |Fn−3 i = . . . = hX1 |F0 i = X0 . (3.25)

But what happens if the process is suddenly interrupted after some period T? In order
to verify what happens, we need to use Lebesgue’s dominated convergence theorem:

Lebesgue’s Dominated Convergence Theorem

The Lebesgue dominated convergence theorem [64] states that for a


set of measurable functions { fn : R → R} that converge to a func-
tion f dominated by some other integrable function g, | fn (x)| ≤
g(x), ∀x ∈ R, then f is integrable and:
Z Z
lim fn dµ = f dµ, (3.26)
n→∞ R R
for a measure µ.

Thus, we must check whether the stochastic process that we are considering is
dominated. Let’s write it as a telescopic sum:
t∧T
Xt∧T = X0 + ∑ (Xn+1 − Xn ) , t ∈ N0 , (3.27)
n=1
where Xt∧T indicates that the process is stopped at an instant T .
If Xt∧T is limited, then:
t∧T
|Xt∧T − X0 | = ∑ (Xn+1 − Xn ) ≤ T sup |Xn+1 − Xn | < ∞, (3.28)
n=0 n∈N

if the increments are limited.


Applying, Lebesgue’s theorem:
Z Z
lim Xt∧T dP = X0 dP
t→∞
(3.29)
lim hXt∧T i = hX0 i.
t→∞
Since this result is valid for any t we arrive at the optional stopping theorem [31,36]:

hXT i = hX0 i. (3.30)

Example 3.1.1. Probability of winning after a stop

Let’s consider Xi as the gain that a gambler obtains in a bet, and Zi the accu-
mulated gain until the ith bet. If the gambler begins with a total of 0 coins and
Stochastic Calculus 69

ends with W gains or L losses, the gambler stops betting. What is the probability
q of ending up with W ? Applying Eq. 3.30:

hZT i = hZ0 i = 0
hZT i = qW − (1 − q)L = 0
q(W + L) − L = 0 (3.31)
L
q= .
L +W


3.1.4 WALD’S EQUATION


Let’s consider the following martingale:
n
Zn = ∑ (X j − hXi) (3.32)
j=1

with hZ1 i = 0. Its expected value at T is:


* +
T
hZT i = ∑ (X j − hXi)
j=1
* +
T
= ∑ X j − T hXi (3.33)
j=1
* +
T
= ∑ Xj − hT ihXi.
j=1

However, according to the stopping time theorem we have:

hZT i = hZ0 i = 0
* +
T
∑ Xj − hT ihXi = 0
j=1 (3.34)
* +
T
∑ Xj = hT ihXi.
j=1

This last expression is known as Wald’s equation [31]9 .

Example 3.1.2. Gambler’s ruin

Let’s consider a bet where the gambler starts with an amount x0 and wins
according to a random variable ξn such that Xn = ∑ni ξi . Thus, at the nth bet, the
gambler has an accumulated wealth of Wn = x0 + Xn . The gambler stops betting
if he or she is ruined obtaining Wn = 0 → Xn = −x0 or if the gambler reaches a
70 Introduction to Econophysics

certain amount Wn = a → Xn = a−x0 . The probability of the former is ρ0 whereas


the probability of the later is ρa . According to Wald’s equation:

hXT i = hT ihξ i
(3.35)
−x0 ρ0 + (a − x0 )ρa = hT i · 0 = 0
We also have that ρ0 + ρa = 1. Thus:
    
1 1 ρ0 1
=
−x0 a − x0 ρa 0
    
ρ0 1 a − x0 −1 1
= (3.36)
ρa a−x+x x0 1 0
 
1 a − x0
= .
a x0
From this last equation we see that the greedier the gambler is, the more likely it
is for him or her to be ruined. 

Example 3.1.3. Unbiased dice

We throw a six faced dice until obtaining an odd number. What is the expected
number of fives? To solve this problem we can use a random variable X that
assumes 0 if the number drawn is even or 1 if it is odd. The game stops when the
accumulated sum of outcomes of X is 1. According to Wald’s equation:
* +
T
∑ Xn = hT ihXi
n=1
1 (3.37)
1 = hT i
2
hT i = 2.
It takes on average two bets to end the game. Let’s now make X assume 1
when we reach number 5:
* +
T
∑ Xn = hT ihXi
n=1
1 (3.38)
= 2×
6
1
= .
3


Example 3.1.4. Sum of outcomes

A dice is thrown repeatedly until number 1 is reached. What is the expected


Stochastic Calculus 71

value of the sum of the numbers obtained until the game is stopped? We can
once again create a random variable X that assumes 1 when number 1 is drawn.
Applying Wald’s equation:
* +
T
1
∑ Xn = hT i 6 (3.39)
n=1
hT i = 6.
Let’s make now X be a random variable that is exactly the result of the dice:
* +
T
1
∑ Xn = 6 × 6 (1 + 2 + 3 + 4 + 5 + 6) (3.40)
n=1
= 21.


3.1.5 GALTON-WATSON PROCESS


A branching process10 [31, 70] is a stochastic process that starts with a single node.
A random variable Xn that admits only positive values is drawn and its result cor-
responds to the number of sub-nodes connected to this node. Thus, the number of
nodes in a step n of this process is given by:
Zn−1
Zn = ∑ Xn . (3.41)
k=1

This process is illustrated in Fig. 3.1. This kind of process is used to study, for
example, the evolution in the number of firms. Every innovation can be understood
as an opportunity to the development of other products and processes that lead to the
formation of new businesses (see, for instance [71]).

Z0=1
X=3

X=2 X=0 X=1 Z1=3

Z2=3

Figure 3.1: An example of a Galton-Watson ramification process


72 Introduction to Econophysics

The expected number of nodes is calculated as:

Zn = X1 + X2 + . . . + XZn−1 . (3.42)
Thus, it is possible to use Wald’s equation for the stopping time Zn−1 :

hZn i = hZn−1 i hXi (3.43)


However,
hZn−1 i = hZn−2 i hXi (3.44)
which leads to:
hZn i = hZn−2 i hXi2 . (3.45)
This can be repeated n times leading to:

hZn i = hZn−n i hXin


(3.46)
= µ n,
given that we start with one node (Z0 = 1).
This calculation can also be written as:

hZn |Z1 , Z2 . . . , Zn−1 i = hZn−1 |Z1 , Z2 , . . . , Zn−1 i hXi


(3.47)
= Zn−1 µ.
Since µ ≥ 1, Zn−1 µ ≥ Zn this is a submartingale.
It is possible now to create a stochastic process:
Xn
Wn = , (3.48)
µn
which is a martingale because:
 
Xn+1
hWn+1 |W1 ,W2 , . . . , Xn i = W1 ,W2 , . . . , Xn
µ n+1
1 1
= hXn+1 |W1 ,W2 , . . . ,Wn i (3.49)
µ µn
1 Xn Xn
= n
µ = n = Zn .
µµ µ

3.1.5.1 Extinction
Let’s consider a stochastic process given by Z = ∑Ni=1 Xi , where X are i.i.d random
variables. The stopping time N is also a random variable. The probability generating
function for this process is given by:

GZ (s) = ∑ P(Z = k)sk . (3.50)
k=0
The probability that appears in this equation can be written as:
Stochastic Calculus 73


P(Z = k) = ∑ P (Z = k ∩ N = n)
n=0
∞ (3.51)
= ∑ P (Z = k|N = n) P(N = n).
n=0

Therefore, the probability generating function can be written as:


∞ ∞
GZ (s) = ∑ Pr(N = n) ∑ Pr (Z = k|N = n) sk
n=0 k=0

(3.52)
= ∑ Pr(N = n)GX (s)n
n=0
= GN (GX (s)) .
Using Gn for the probability generating function for the Zn process:

Gn (s) = Gn−1 (GX (s))


Gn−1 (s) = Gn−2 (GX (s))
Gn−1 (GX (s)) = Gt−2 (GX (GX (s)))
 
(2) (3.53)
Gn (s) = Gn−2 GX (s)
 
(n)
Gn (s) = Gn−n GX (s)
(n)
= GX (s),
(n)
where GX is the nth interaction of GX . Going backwards we get:
(n)
Gn (s) = GX (s)
 
(n−1)
= GX GX (s)
(3.54)
(n−1)
Gn−1 (s) = GX (s)
Gn (s) = GX (Gn−1 (s)) .
The probability of extinction after the nth generation is:

en = Pr(Xn = 0). (3.55)


This probability has the property that en ≤ 1. Moreover, since Xn = 0 → Xn+1 = 0,
then en ≤ en+1 . Therefore, the sequence {en } is limited. The ultimate probability of
extinction is given by:

e = lim en . (3.56)
n→∞
74 Introduction to Econophysics

However,
en = Pr(Xn = 0)
= Gn (0)
(3.57)
= GX (Gn−1 (0))
= GX (en−1 ) .
Taking the limit:

e = lim en
n→∞
= lim GX (en−1 ) (3.58)
n→∞
= GX (e) .
For any nonnegative root r of this equation:

e1 = G(e0 ) = G(0) ≤ G(r) = r


e2 = G(e1 ) = e1 ≤ r
..
. (3.59)
en ≤ r.
e = lim ≤ r.
n→∞

Therefore, e is the smallest nonnegative root.


Since G is continuous, not decremental and convex, there are one or two fixed
points for e = GX (e). If G0 (1) > 1, then there are two fixed points, whereas if G0 (1) ≤
1 then there is only one solution. Nonetheless, G0 (1) = hXi. Therefore, there is only
one fixed point if the mean is smaller or equal to unity.
Thus, this process has two regimes. If hXi < 1, then e = 1 and this is known as a
subcritical process. On the other hand, if hXi > 1, then e < 1 and this is known as a
supercritical process. These two regimes are shown in Fig. 3.2.

3.1.6 AZUMA-HOEFFDING THEOREM


Let’s finish our discussion about martingales studying a concentration inequality
known as Azuma-Hoeffding inequality [31]11 .
Knowing that the exponential function is convexb and given a random variable
that satisfies the Lipschitz12 condition |Xn − Xn−1 | ≤ cn , it is possible to write:

bA function f : A → R is convex if ∀x, y ∈ A and ∀t ∈ [0, 1], f (tx + (1 − t)y) ≤ t f (x) + (1 − t) f (y).
Stochastic Calculus 75

supercritical subcritical

G(s)

s
Figure 3.2: A supercritical process (left) and a subcritical (right) process. The dashed
line indicates the trivial case G(s) = s and the dots are interaction points that converge
to the fixed points

     
1 Xn Xn
exp(tXn ) = exp + 1 cn t + 1 − (−cnt)
2 cn cn
   
1 Xn 1 Xn −cn t
≤ + 1 ecn t + 1− e , ∀t ∈ [0, 1]
2 cn 2 cn
ecn t + e−cn t ecn t − e−cn t Xn
≤ +
2 2 cn
Xn
≤ cosh(cnt) + sinh(cnt) (3.60)
cn

(cnt)2k Xn
≤∑ + sinh(cnt) ← Taylor expansion
k=0 (2k)! cn

(1/2(cnt)2 )k Xn
≤ ∑ + sinh(cnt), since 2k k! ≤ (2k)!
k=0 k! cn
(cn t)2 Xn
≤e 2 + sinh(cnt) ← Taylor expansion.
cn
Now, according to the Chernoff bound (Eq. 2.53):

* ( )+
n
−at t(Xn −X0 ) −at
P(Xn − X0 ≥ a) ≤ e he i=e exp t ∑ (Xk − Xk−1 )
k=1
* ( )+ (3.61)
n−1
= e−at et(Xn −Xn−1 ) exp t ∑ (Xk − Xk−1 ) .
k=1

Using the law of total expectation (Eq. 2.15) and considering that Xk for k ≤ n − 1 is
measurable with respect to a filtration Fn−1 :
76 Introduction to Econophysics

** ( ) ++
n−1
P(Xn − X0 ≥ a) ≤ e−at et(Xn −Xn−1 ) exp t ∑ (Xk − Xk−1 ) Fn−1
k=1
* ( )+
D E n−1
−at t(Xn −Xn−1 )
≤e e Fn−1 exp t ∑ (Xk − Xk−1 )
k=1 (3.62)
* ( )
n−1
≤ e−at exp ∑ (Xk − Xk−1 )
k=1
 
2 1
e(cn t) /2 + sinh(cnt) hXn − Xn−1 |Fn−1 i ,
cn
where we have used Eq. 3.60 in the last line. Also, the martingale on the right hand
side of the equation must be zero. Therefore:
* ( )+
n−1
2 /2
P(Xn − X0 ≥ a) ≤ e−at e(cn t) exp ∑ (Xk − Xk−1 ) . (3.63)
k=1
If we repeat the same procedure n times, we end up with:
( )
n
−at (ck t)2 /2
P(Xn − X0 ≥ a) ≤ e exp ∑e . (3.64)
k=1
We can now choose the value of t that produces the lowest bound:

( ) ! ( )
n n n
d −at (ck t)2 /2 −at (ck t)2 /2
e exp ∑e = −a + t ∑ c2k e exp ∑e
dt k=1 k=1 k=1
! (3.65)
n
a
0= −a + t ∑ c2k →t = .
k=1 ∑nk=1 c2k

Therefore,

a2
 
P(Xn − X0 ≥ a) ≤ exp − . (3.66)
2 ∑nk=1 c2k .
Doing the same calculations for a negative t:
a2
 
P(Xn − X0 ≤ −a) ≤ exp − . (3.67)
2 ∑nk=1 c2k .
Combining both results:
a2
 
P(|Xn − X0 | ≥ a) ≤ 2 exp − . (3.68)
2 ∑nk=1 c2k .
Stochastic Calculus 77

Example 3.1.5. Binary Bets

Let’s consider a binary option (also known as fixed return options) where the
gambler only wins a fixed amount if a call option expires in the money. Let’s
represent the outcomes of this bet by X1 , X2 , . . . , Xn . What is the chance that the
gambler finds a sequence B1 , B2 , . . . , Bk within X?
The number of possibilities of including a string of size k within another of
size n is given by:

N = n − k + 1. (3.69)
The probability of a sequence of size k in X be exactly B is:
 k
1
p= . (3.70)
2
Thus, the expected number of occurrences of B in X is:
 k
1
hFi = N p = (n − k + 1) . (3.71)
2

Let’s now create a Doob martingale:

Zn = hF|Fn i,
(3.72)
Z0 = hFi.
The function F is Lipschitz limited, since each character of X cannot be in
more than cn = k matches. The probability of |Zk − Z0 | being greater than some
value a is then given by:

a2
 
P(|Zk − Z0 | ≥ a) ≤ 2 exp − . (3.73)
2nk2
This equation states that this probability is concentrated on the expected value
of F, since the probability of finding excess values greater than a certain amount
decays exponentially fast.


3.2 MARKOV CHAINS


Markov13 chain [29–32, 72, 73] is a process widely used to describe the likelihood
of future events given a present state. In this process, the transition probability from
the current state to another depends only on the present state, a memoryless princi-
ple known as Markov property. More formally, given a probability space (Ω, F , P),
where Ω is discrete, finite or countable, a stochastic process Xn adapted to Fn is a
Markov chain if:
78 Introduction to Econophysics

P (Xn ∈ F|Fs ) = P (Xn ∈ F|Xs ) , F ∈ F , ∀n > s (3.74)


almost surely. An example of a Markov chain is illustrated by the toy model in
Fig. 3.3.

9%

87%

65% 7%

17% 18%

6% 73%

18%

Figure 3.3: A Markov chain as a toy model for the stock market. A crab market is
defined here as a market where the difference between the close and open price is not
greater than ±5 % of the open price. A bull/bear market is one where the difference
is greater/smaller then such value

Path Dependence

Many (if not most) economic and social phenomena, however, not
only have memory as they also show path dependence. For instance,
many inferior standards are still used today because of the legacy
they build in a positive feedback fashion [74–76].

The path dependence of the final state of a physical system in param-


eter space is known as nonholonomy. Nonholonomic systems are
also called nonintegrable (but may be solvable, nonetheless) since
there are less constants of motion than functions that govern their
dynamics. Hence, these systems may show interesting phenomena
such as chaotic behavior [77–79].

3.2.1 TRANSITION FUNCTION


For a probability space (Ω, F , P), the function P : Ω × F → R is known as prob-
ability transition function if P(x, ·) is a probability measure in the space (Ω, F ) for
all x ∈ Ω, and for all F ∈ F , the map s → P(s, F) is F -measurable.
For a discrete Markov chain that starts in a state i, the probability that it is in a
state j after an interval n + m is given by:
Stochastic Calculus 79

Pin+m
j = P(Xn+m = j|X0 = i) = P (Xn+m = j ∩ Ω|X0 = i)
!
[
= P Xn+m = j ∩ Xm = k|X0 = i
k
= ∑ P (Xn+m = j ∩ Xm = k|X0 = i)
k
= ∑ P (Xn+m = j ∩ Xm = k ∩ X0 = i) /P(X0 = i)
k
= ∑ P (Xn+m = j|Xm = k ∩ X0 = i) P(Xm = k ∩ X0 = i)/P(X0 = i) (3.75)
k
= ∑ P (Xn+m = j|Xm = k ∩ X0 = i) P(Xm = k|X0 = i)
k
= ∑ P (Xn+m = j|Xm = k) P(Xm = k|X0 = i)
k
= ∑ P (Xn = j|X0 = k) P(Xm |X0 = i)
k
n m
= ∑ Pjk Pki .
k
For a continuous Markov chain, we have the equivalent formulation:
Z
Pn+1 (x, F) = Pn (y, F)P(x, dy), (3.76)

where the integration is performed over the measure P(x, ·). This equation is known
as Chapman-Kolmogorov equation [29–32, 36, 64, 73, 80, 81]14 .
Example 3.2.1. Markov chain for the stock market

The transition matrix for the Markov chain in Fig. 3.3 is given by:

Pr (crab → crab) Pr (crab → bear) Pr (crab → bull)


 

P = Pr (bear → crab) Pr (bear → bear) Pr (bear → bull)


Pr (bull → crab) Pr (bull → bear) Pr (bull → bull)
  (3.77)
0.87 0.06 0.07
= 0.65 0.17 0.18
0.73 0.09 0.18

Had any element pii = 1 and pi j = 0, ∀i , j, then it would be impossible for


the chain to leave this state and it would be called an absorbent state. 

3.2.2 STATIONARY DISTRIBUTION


For any initial condition x0 , after one transition we reach:
x1 = x0 P. (3.78)
80 Introduction to Econophysics

For the next interactions we get:

x2 = x1 P
= x0 PP (3.79)
0 2
=x P .

For the nth operation, the state of the chain is:

xn = x0 Pn . (3.80)
At the limit, the transition probability is:

P∞ = lim PN . (3.81)
N→∞

For the transition matrix of the previous example, after only five interactions we get:
 
0.842 0.070 0.087
P∞ → 0.842 0.070 0.087 . (3.82)
0.842 0.070 0.087
If the initial state was x0 = 1 0 0 , for
 
0
 example, the limit distribution
 (stationary
distribution [30, 31, 73]) would be x = 0.842 0.070 0.087 , which tells us that
84 % of the days the market would be crabish, 7 % bearish, and 8.7 % bullish.
It is possible to obtain the stationary distribution π in a more elegant way using
the Chapman-Kolmogorov equation:

pn+1 n
i j = ∑ pik pk j
k
p∞ ∞
i j = ∑ pik pk j
k (3.83)
π j = ∑ πk p k j
k
π = πP,
which tells us that π is an invariant measure for P. This is also a matrix formulation
of the detailed balance principle: λi pi j = λ j p ji , ∀i, j, where λ is any measure. This
can also be written as:

π = πP
π T = (πP)T = PT π T (3.84)
T T T
P π =π .
Therefore, the stationary distribution is the eigenvector of PT that corresponds to the
eigenvalue 1, if it exists.
Stochastic Calculus 81

Since π is a distribution, it also has to satisfy πJ = e, where J is a unit matrixc


where all its elements are 1, and e is a unit vector. Doing some algebra:

πP − πJ = π − e
(3.85)
π = e (I + J − P)−1 .

Example 3.2.2. Stationary distribution for the Markov chain in Fig. 3.3

  
  −1
  1 0 1 0 1
0.87 1 0.06 0.07
π= 1 1 1 0 1 1 − 0.65
0 + 1 1 0.17 0.18
0 0 1 1 1
0.73 1 0.09 0.18
 
= 0.84229209 0.07036004 0.08734787
 
≈ 84.23% crab 7.04% bear 8.73% bull .
(3.86)


3.2.2.1 Detailed Balance


Let’s study the detailed balance in more detail. Let (Xn , n ≥ 0) be a Markov chain and
consider a process that moves back in time: Xn → Xn−1 → . . . → X0 . The probability
of finding the chain in a state xn given that it was in the states xn+1 , xn+2 , . . . is given
by:

P(Xn = xn |Xn+1 = xn+1 ∩ Xn+2 = xn+2 ∩ . . .) =


P(Xn = xn ∩ Xn+1 = xn+1 ∩ Xn+2 = xn+2 ∩ . . .)
=
P(Xn+1 = xn+1 ∩ Xn+2 = xn+2 ∩ . . .)
P(Xn+2 = xn+2 ∩ . . . |Xn+1 = xn+1 ∩ Xn = xn )P(Xn+1 = xn+1 ∩ Xn = xn )
= .
P(Xn+2 = xn+2 ∩ . . . |Xn+1 = xn+1 )P(Xn+1 = xn+1 )
(3.87)
According to the Markov property:

P(Xn = xn |Xn+1 = xn+1 ∩ Xn+2 = xn+2 ∩ . . .) =


P(Xn+2 = xn+2 ∩ . . . |Xn+1 = xn+1 ) P(Xn+1 = xn+1 ∩ Xn = xn )
= (3.88)
P(Xn+2 = xn+2 ∩ . . . |Xn+1 = xn+1 ) P(Xn+1 = xn+1 )
= P(Xn = xn |Xn+1 = xn+1 ).

Therefore this process is also a Markov chain.

c Not to be confused with the identity matrix.


82 Introduction to Econophysics

Let’s now compute the probability pi j of finding the chain in state j given that it
came from state i:

P(Xn = j ∩ Xn+1 = i)
P(Xn = j|Xn+1 = i) =
P(Xn+1 = i)
P(Xn+1 = i|Xn = j)P(Xn = j)
= (3.89)
P(Xn+1 = i)
π nj
pnij = pnji n+1 .
πi
Therefore, the reverse transition is not homogeneous in time since it is a function of
n. Nonetheless, π does not depend on n if it is the stationary distribution. The chain
becomes homogeneous in time in this situation:

p ji π ∗j
pi j == p̃ ji . (3.90)
πi∗
In this case, the chain is reversible and we obtain a detailed balance equation:

πi∗ pi j = π ∗j p ji , ∀i, j, (3.91)


Which leads to:

πi∗ pi j = π ∗j p ji
∑ πi∗ pi j = ∑ π ∗j p ji = π ∗j ∑ p ji = π ∗j (3.92)
i i i
∴ π ∗j =∑ πi∗ pi j , ∀ j.
i

Example 3.2.3. A three-state market

Suppose that the chance the market depicted in Fig. 3.3 stays in the same state
is zero. If it is in a crab state, it can move to a bear state with probability a or
it can move to a state bull with probability 1 − a. The same applies to the other
configurations. If it is in a bear state, it can move to a bull state with probability
a and to a crab state with probability 1 − a. Finally, if it is in a bull state it can
move to a crab state with probability a and to a bear state with probability 1 − a.
Therefore, the transition matrix is given by:
 
0 a 1−a
P = 1 − a 0 a . (3.93)
a 1−a 0
From the detailed balance equation (Eq: 3.92) we can write:

π1∗ p12 = π2∗ p21 → π1∗ a = π2∗ (1 − a)


π2∗ p23 = π3∗ p32 → π2∗ a = π3∗ (1 − a). (3.94)
π3∗ p31 = π1∗ p13 → π3∗ a = π1∗ (1 − a)
Stochastic Calculus 83

This can be recast in matrix formulation:


   ∗
a a−1 0 π1
 0 a a − 1 π2∗  = 0. (3.95)
a−1 0 a π3∗

From this we can compute the parameter a:

a a−1 0 a a−1
0 a a−1 0 a =0
a−1 0 a a−1 0 (3.96)
a3 + (a − 1)3 = 0
a = 1/2.

Let’s now suppose that the stationary state is π ∗ = (bull = 1/6, crab =
4/6, bear = 1/6) and we want to find the transition matrix. From the detailed
balance equation we have:

P(bull → crab) π2∗


= = 4 → P(bull → crab) = 4P(crab → bull),
P(crab → bull) π1∗
P(bear → crab) π2∗
= = 4 → P(bear → crab) = 4P(crab → bear), (3.97)
P(crab → bear) π3∗
P(bull → bear) π2∗
= = 1 → P(bull → bear) = P(bear → bull).
P(bear → bull) π1∗

We know that the sum of the columns must be one. Therefore, we initially choose
P(crab → bull) = P12 = 1, P(crab → bear) = P32 = 1 e P(bear → bull) = P13 =
1. From this we have P(bull → crab) = P21 = 4, P(bear → crab) = P23 = 4 and
P(bull → bear) = P31 = 1.
 
0 1 1
1
P= 4 3 4 . (3.98)
5
1 1 0


The detailed balance is the basis for the Markov chain Monte Carlo simulations
(MCMC - see Sec. B).

3.2.3 FIRST PASSAGE TIME


The expected number of interactions needed to reach a state j departing from a state
i is known as first passage time [29, 31, 73] µi j . In order to find it, let’s start with the
probability measurement of a random variable A:
84 Introduction to Econophysics

!
[
P(A) = P(A ∩ Ω) = P A ∩ Bn
n
= ∑ P(A ∩ Bn ) (3.99)
n
= ∑ P(A|Bn )P(Bn ).
n
Therefore, the expected time of first passage is given by:

µi j = hnumber of steps from i to ji


= ∑ hnumber of steps to j|X0 = i, X1 = ki P(X0 = i, X1 = k)
k (3.100)
= ∑ hnumber of steps to j|X0 = i, X1 = ki Pik .
k

If k = j, the number of steps is 1. On the other hand, if k , j, then the number of


steps is µk j added by the number of steps from i to k. Thus:

µi j = 1 · Pi j j=k + ∑ 1 + µk j · Pik
k, j

= ∑ Pik + ∑ µk j Pik (3.101)


k k, j

= 1 + ∑ Pik µk j
k, j
In matrix notation:

µ = J + P(µ − µ d )
(3.102)
(I − P)µ + Pµ d = J,
where µ d is the diagonal component of µ.
Example 3.2.4. First passage time for the Markov chain in Fig. 3.3

Assigning crab=0, bull=1 and bear=2, Eq. 3.102 gives:

µ00 = 1 + P01 µ10 + P02 µ20


µ01 = 1 + P00 µ01 + P02 µ21
µ10 = 1 + P00 µ02 + P01 µ12
µ10 = 1 + P11 µ10 + P12 µ20
µ11 = 1 + P10 µ01 + P12 µ21 (3.103)
µ12 = 1 + P10 µ02 + P11 µ12
µ20 = 1 + P21 µ10 + P22 µ20
µ21 = 1 + P20 µ01 + P22 µ21
µ22 = 1 + P20 µ02 + P21 µ12 .
Stochastic Calculus 85

After some calculation:

i\ j crab bull bear


 
crab 1.19 16.04 12.92
µ = bull  1.51 14.22 11.32 . (3.104)
bear 1.38 15.49 11.45


If it is possible to reach any state departing from any state, than the chain is said
to be irreducible. If µii is finite, then the state is known as positive recurrent. On the
other hand, it is known as null recurrent. Also, we say that a state is ergodic if it
is aperiodic and positive recurrent. If the probability of taking finite steps to reach
a state after departing itself is less than one, then we say that the state is transient.
Otherwise, we say that the state is periodic.
One interesting result shows up when we compute:

µ = J + P(µ − µ d )
π µ = πJ + πP(µ − µ d )
π µ = e + π(µ − µ d ) (3.105)
π = eµ d−1
 
= 1/µ00 1/µ11 . . . 1/µNN .
This implies that the faster the chain returns to a specific state, the more likely it
is that this state is in the stationary distribution.

3.2.4 BIRTH-AND-DEATH PROCESS


The birth-and-death15 process [30, 31] is a Markov chain in which the next state
corresponds to a unitary increase or decrease in the number of objects under study.
Its diagram is illustrated in Fig. 3.4 wherein λ and µ are birth and death rates per
unit time respectively, and ∆t is a short period. During this period, the population
can increase by one individual, decrease by one individual, or it may remain with the
same population.
The transition matrix for this process is given by:

 
1 − (λ0 )∆t λ0 ∆t
 µ1 ∆t 1 − (λ1 + µ1 )∆t λ1 ∆t ... 
P=  . (3.106)
 
.. ..
 . . λN−1 ∆t 
µN ∆t 1 − (λN + µN )∆_t

For the first and following transitions we get for the probability Xn of finding the
system in state n:
86 Introduction to Econophysics

1−(λ1+μ1)Δt 1−(λ2+μ2)Δt
Δ tλ 0 Δ tλ 1
1−λ0Δt

0 1 2

Δ tμ 1 Δ tμ 2

Figure 3.4: Diagram for the birth-and-death process. λ and µ are the birth and death
rates per unit time and ∆t is a short period

X0 (t + ∆) = X0 (t)(1 − λ0 ∆t ) + X1 (t)µ1 ∆t
(3.107)
Xn (t + ∆) = Xn (t)(1 − [λn + µn ]∆t ) + Xn+1 (t)µn+1 ∆t + Xn−1 (t)λn−1 ∆t .

In the limit of very short periods ∆ → 0:

dX0 (t)
= −λ0 X0 (t) + X1 (t)µ1
dt (3.108)
dXn (t)
= −(λn + µn )Xn (t) + Xn+1 (t)µn+1 + Xn−1 (t)λn−1 .
dt

3.2.4.1 Pure Birth Process


It is not simple to find a closed-form solution to generic birth-and-death processes.
Nonetheless, it is possible to study a system with a negligible death rate. In this case
the Markov chain consists of only transient states and the previous set of equations
can be written as:

dX0 (t)
= −λ0 X0 (t)
dt (3.109)
dX1 (t)
= −λ1 X1 + X0 (t)λ0 .
dt
From the first equation we get for X0 (0) = 1:

X0 (t) = e−λ0 t , (3.110)


and from the second:

dX1 (t)
= −λ1 X1 (t) + X0 (t)λ0
dt (3.111)
= −λ1 X1 (t) + λ0 e−λ0 t .
Stochastic Calculus 87

We can proceed a bit further considering the situation where the birth rate does not
depend on the population (λn = λ , ∀n):

X10 (t) + λ X1 (t) = λ e−λt . (3.112)


This is a non-homogeneous differential equation. In order to solve it, we create:
R
λ dt
u=e = eλt , (3.113)
and multiply the whole equation by this integrating factor:

eλt X10 (t) + eλt λ X1 (t) = λ


 0
eλt X1 (t) = λ
(3.114)
λt
X1 (t)e = λt + ξ
X1 (t) = (λt + ξ )eλt .
At the beginning of the process Xn (t) = 0, n , 0. Therefore, ξ = 0 and we get:

X1 (t) = λteλt . (3.115)

Following the same procedure for the next terms we get:

(λt)n −λt
Xn (t) = e , (3.116)
n!
which is a Poisson16 distribution, which is expected for a model of successive events.
Therefore, hXn (t)i = VAR (Xn (t)) = λt.

3.2.4.2 Yule-Furry Process


In a Yule-Furry17 process [82] the birth rate is proportional to the population size:
λn = nλ . In this situation, we have:

dXn (t)
= −nλ Xn (t) + (n − 1)λ Xn−1
dt (3.117)
dX0 (t)
= 0.
dt
As initial conditions, let’s assume only one individual: X1 (0) = 1 and Xi (0) =
0, i , 1. For n = 1:

dX1 (t)
= −λ X1 → X1 (t) = e−λt . (3.118)
dt
For n = 2:
88 Introduction to Econophysics

dX2 (t)
= −2λ X2 + λ X1
dt
X20 (t) + 2λ X2 (t) = λ e−λt
e2λt X20 (t) + 2e2λt λ X2 (t) = λ eλt (3.119)
 0
e2λt X2 (t) = λ eλt

X2 (t) = e−2λt (eλt + ξ )


Since X2 (0) = 0 we get ξ = −1. Therefore:
 
X2 (t) = e−λt 1 − e−λt . (3.120)

If we continue this procedure, we obtain:


 n−1
Xn (t) = e−λt 1 − e−λt , n ≥ 1. (3.121)

This is a geometric distribution with p = e−λt .


If the initial population consists of m individuals, we can say that each of them
obeys an independent Yule process. Since each process has a geometric distribution,
the sum will have a negative binomial distribution:
 
n − 1 −λt  n−m
Xn,m (t) = e 1 − e−λt , n > m. (3.122)
m−1
One simulation of the Yule-Furry process is shown in Fig. 3.5. It is instructive to note
that as time progresses, the tail of the distribution becomes longer.

3.2.4.3 Pure Death Process


In a pure death process we get:

dXn (t)
= −µn Xn (t) + µn+1 Xn+1 (t). (3.123)
dt
Let’s start from the end of the chain setting XN+1 (t) = 0, XN (0) = 1, and µn = µ:

XN0 (t) = −NµXN (t) → XN (t) = e−Nµt . (3.124)


Going backwards in the chain:

0
XN−1 (t) + (N − 1)µXN−1 (t) = Nµe−Nµt
0
e(N−1)µt XN−1 (t) + e(N−1)µt (N − 1)µXN−1 (t) = Nµe(N−1)µt e−Nµt
 0
e(N−1)µt XN−1 (t) = Nµe−µt (3.125)

e(N−1)µt XN−1 (t) = −Ne−µt + ξ


XN−1 (t) = −Ne−µt + ξ e−(N−1)µt .

Stochastic Calculus 89

Figure 3.5: Probability Xn of finding the system in state n for a Yule-Furry process
with λ = 0.08, m = 2

At the end of the chain, XN−1 (0) = 0. Therefore, ξ = N and we get:

XN−1 (t) = N 1 − e−µt e−(N−1)µt .



(3.126)
Proceeding recursively, one obtains:
 
N −nµt N−n
Xn (t) = e 1 − e−µt , (3.127)
n
which is a binomial distribution with a survival probability of e−µt . From this equa-
tion, it is easy to infer that the probability of extinction increase exponentially fast to
one:

X0 (t) = (1 − e−µt )N . (3.128)

3.2.4.4 Linear Birth and Death Process


In a linear birth-and-death process we set λn = nλ and µn = nµ. Therefore,

dX0 (t)
= µX1 (t)
dt (3.129)
dXn (t)
= −(λ + µ)nXn (t) + (n + 1)µXn+1 (t) + (n − 1)λ Xn−1 (t).
dt
In steady state, the time derivatives are zero and we get X1 (t → ∞) = 0. If X0 (t →
∞) = 1, then the ultimate extinction is certain. On the other hand, we still have that
90 Introduction to Econophysics

Xn (t → ∞) = 0 even if X0 (t → ∞) = P < 1. This implies that the population grows


without bounds with probability 1 − P. Either way, in steady state, the population
either goes to zero or increases indefinitely.
The expected population is:


M(t) = ∑ nXn (t)
n=1

dM(t) dXn (t)
= ∑n
dt n=1 dt
∞ ∞ ∞
= −(λ + µ) ∑ n2 Xn (t) + µ ∑ n(n + 1)Xn+1 (t) + λ ∑ n(n − 1)Xn−1 (t).
n=1 n=1 n=1
(3.130)
Changing variables m = n + 1 and k = n − 1:

∞ ∞ ∞
dM(t)
= −(λ + µ) ∑ n2 Xn (t) + µ ∑ (m − 1)mXm (t) + λ ∑ (k + 1)kXk (t)
dt n=0 m=0 k=0

λ −n2 + n(n + 1) + µ −n2 + n(n − 1) Xn (t)
  
= ∑
n=0

= (λ + µ) ∑ nXn (t) = (λ − µ)M(t).
n=0
(3.131)
Therefore,

M(t) = M(0)e(λ −µ)t , (3.132)


which goes asymptotically to zero if µ > λ or to infinite otherwise.

3.3 ORNSTEIN-UHLENBECK PROCESSES


The Ornstein-Uhlenbeck18 [28–31, 36, 55, 64, 73, 83] process (OU) is widely used
in physics to model problems that show reversion to the mean. An OU process X is
described by:

dV = γ(V0 −V )dt + β dWt , (3.133)


where dWt is a Wiener process (see Sec. 2.2.5), V0 , γ and β are constants.
In this section we will study general properties of OU processes as well as two
important processes that are used in finances: the Vašíček and CIR models.

3.3.1 LANGEVIN EQUATION


Let’s begin this study with a simple example from physics. According to Newton’s
laws, the speed of a particle is given by the simple equation:
Stochastic Calculus 91

dx(t)
= v(t). (3.134)
dt
If we assume that the position of the particle is a random variable X, then it has
to satisfy the Markov property since its current position depends only on its previous
position. This also has to be a continuous process lim∆→0 X(t + ∆) = X(t) and

X(t + ∆) − X(t)
V (t) = lim (3.135)
∆→0 dt
is the velocity of the particle.
We can rewrite Eq. 3.134 for the stochastic case as:

lim [X(t + ∆) − X(t)] = dX = V (t)dt = G[X(t), dt], (3.136)


∆→0

where G[X(t), dt] is a Markov propagator that generalizes classical dynamics to the
stochastic domain. For instance, Einstein [84]19 in his work on diffusion considered
a propagator:

G[X(t), dt] = θ 2 dtN (0, 1), (3.137)
where N (0, 1) indicates a zero centered normal distribution with unitary variance.
In this situation we get:

dX = θ 2 dtN (0, 1) = θ dWt
hdXi = hdW i = 0 (3.138)
VAR(dX) = θ 2 dt.
This, however, does not take Newton’s second law into consideration. Langevin20
[28, 32, 55, 73] fixed this problem doing:

dV F(t)
= A(t) = , (3.139)
dt m
where F is the resulting force including the viscous drag created by the other parti-
cles. Given a linear drag F(t) ∝ −V (t), we get:
p
lim [V (t + ∆) −V (t)] = dV = −γV (t)dt + β 2 dtN (0, 1). (3.140)
∆→0

Adding an additional force created by an external field, we get the OU process:

dV = γ(V0 −V )dt + β dW. (3.141)


92 Introduction to Econophysics

3.3.1.1 Solution
In order to find an analytical solution for a general OU process, we make:

f (V,t) = V (t)eγt
(3.142)
d f = eγt dV +V γeγt dt.
Placing this in the OU process:

d f = eγt [γ(V0 −V )dt + β dW ] +V γeγt dt


= eγt γV0 dt −V γeγt dt + β eγt dW +V γeγt dt (3.143)
= eγt V0 γdt + β eγt dW.
Integrating from 0 to t:
Z t Z t
f (t) = f (0) +V0 γ eγs ds + β eγs dWs
0 0
Z t
Ve γt
= V (0) + V0 eγs |t0 + β eγs dWs
0
Z t (3.144)
V (t) = V (0)e−γt +V0 eγt − 1 e−γt + β eγs dWs e−γt

0
Z t
−γt −γt
e−γ(t−s) dWs .

V (t) = V (0)e +V0 1 − e +β
0
We can now calculate the expected value of V (t):
Z t
−γt −γt
e−γ(t−s) hdWs i

hV (t)i = V (0)e + V0 1 − e +β
0 (3.145)
= V (0)e−γt +V0 1 − e−γt .


For a long period:

lim hV i = V0 . (3.146)
t→∞

This verifies the main property of OU processes. In the long run, the expected veloc-
ity converges to a specific value.
In order to calculate the variance of V (t), we must use the Ito isometry21 .
Stochastic Calculus 93

Ito’s Isometry

An elementary process adapted to a filtration Ft has the form:

Ft = ∑ e j 1(t j ,t j+1 ] (t), (3.147)


j

where e j is a random variable measurable with respect to the filtra-


tion.
The Ito integral [29, 36, 55, 64, 73, 85, 86] of an elementary process
F is given by:
Z t h i
It [F] = Fs dWs = ∑ e j Wt j+1 ∧t −Wt j ∧t ,
0 i≥0
(3.148)
= ∑ e j ∆W j ,
i≥0

where Wt is a Wiener process adapted to the filtration such that


(Wt , Ft ) is a Markov process.
According to Fubini’s theorem22 , the expected value of an integral
has to be the same as the integral of the expected value. Since, the
expected value of Wt2 = 1, we have, considering independent Wiener
processes ∆Wi and ∆W j :
* +
D E
2
(It [F]) = ∑ ei e j ∆Wi ∆W j
ij

= ∑he2i i(t j+1 − t j )δi j (3.149)


ij
t
Z 
= Fs2 ds .
0

This is known as Ito’s isometry [36, 73, 86].

Therefore, the variance of the OU process is given by:

VAR{V (t)} = (V (t) − hV (t)i)2


* Z 2 +
t
Z t 
−γ(t−s) 2 −2γ(t−s)
= β e dWs =β e ds
0 0 (3.150)
β2
Z t
= β2 e−2γ(t−s) dt = 1 − e−2γt .

0 2γ
94 Introduction to Econophysics

Again, for a sufficiently long period:

β2
lim VAR{V (t)} = . (3.151)
t→∞ 2γ
OU processes are used to model, for example, the interest rate. High interest rates
hamper the economic activity as the propensity to borrow and invest is reduced. On
the other hand, if the interest rate is low, financial institutions do not have incentives
to land money. As a result, the interest rate typically stays within a band. Thus,
interest rates may oscillate in the short term but tend to be stable in the long term.
The Vašíček23 model [87] captures this idea making V the instantaneous interest
rate, γ the speed of reversion, V0 the long term level, β the instantaneous volatility.

3.3.1.2 Dissipation-Fluctuation Theorem


In OU processes there is a competition between damping (γ parameter) and fluctu-
ations (β 2 parameter). However, in the long term, the average kinetic energy of a
particle is given by:

m β2
EK = lim VAR{V (t)} = m . (3.152)
2 t→∞ 4γ
At this limit, the particle reaches equilibrium with the medium. Thus, according to
the energy equipartition theorem [88], for one degree of freedom we have:

kB T β2
EK = =m , (3.153)
2 4γ
where T is the temperature of the medium. Therefore, there is a clear relationship
between fluctuation and dissipation. Knowing one of the parameters, it is possible to
obtain the other:

β 2 = 2γkB T /m. (3.154)


In the limit where the inertial effects are minimized with respect to the randomized
component, the OU process is reduced to a Wiener process (see Sec. 2.2.5). This is
captured by considering a zero differential velocity:

β
0 = −γV dt + β dWt → V dt = dX = dWt . (3.155)
γ
The diffusion parameter, in this case, is given by δ 2 = β 2 /γ 2 . This is known as
the Smoluchowski limit24 .

3.3.2 LIMITED OU PROCESS


One big limit of the Vašíček model is that it allows for negative oscillations of the
interest rate. One way to circumvent this problem is by making:

dV = γ(V0 −V )dt + β V dW. (3.156)
Stochastic Calculus 95

With this modification, the closer the interest rate approaches zero, the smaller is
the random component. A detailed analysis [89] indicates that if 2γV0 > β 2 then the
interest rate will never reach zero. This is known as the Cox-Ingersoll-Ross25 (CIR)
model [26, 29, 55, 90].
Following the same procedure, it is simple to verify that√the expected value of
the interest rate is the same as for the Vašíček model since V only appears in the
random component. For calculating the variance, Eq. 3.150 becomes:
* Z 2 +
t √
−γ(t−s)
VAR{V (t)} = β Vs e dWs . (3.157)
0

Applying Ito’s isometry:


t
Z 
VAR{V (t)} = β 2 Vs e2γ(s−t) ds
0
Z t (3.158)
2 2γ(s−t)
=β hVs ie ds.
0
We can now use Eq. 3.145 to obtain the expected value of Vs . Therefore:

Z t
VAR{V (t)} = β 2 V (0)e−γs +V0 1 − e−γs e2γ(s−t) ds

0
Z t
2
V (0)eγs +V0 e2γs − eγs e−2γt ds


0
t
!
t t
−2γt 2 V (0)eγs V0 e2γs V0 eγs
=e β + −
γ 0 2γ 0 γ 0

β2
 
−2γt γt V0 2γt  γt

=e V (0)(e − 1) + e − 1 −V0 e − 1
γ 2
β2
 
V0
V (0)e−γt −V (0)e−2γt + 1 − e−2γt −V0 e−γt − e−2γt
 
=
γ 2
V (0)β 2 2
β V0 2
e−γt − e−2γt + 1 − e−γt .

=
γ 2γ
(3.159)
For a long period, the variance becomes:

β 2V0
lim VAR{x} =, (3.160)
t→0 2γ
which is the same long term variance obtained in the Vašíček model multiplied by
V0 .

3.4 POINT PROCESSES


A point process [30, 32, 64, 91] is defined as an ordered sequence of non-negative
random variables {ti |ti < ti+1 , i ∈ N∗ }, such that ti can indicate, for instance, the
96 Introduction to Econophysics

Events N(t) λ(t)

τ1 τ2 τ3 τ4

T1 T2 T3 T4 T5 t T1 T2 T3 T4 T5 t T1 T2 T3 T4 T5 t

Figure 3.6: Left: a set of discrete events, Middle: a counter of these events, and Right:
an intensity function related to these events

time it takes for an order to reach the stock broker. A pictorial representation of point
processes is shown in Fig. 3.6.
One type of point process is the duration process that is described by:

τi = ti − ti−1 . (3.161)
This process basically describes the time period between events. Related to these
discrete events, it is also possible to define a counting process that counts the total
number of them. We can formalize a counting process as a stochastic process {Nt }t≥0
such that Nt ∈ Z+ , t belongs to an ordered set T , the additions Nt+∆ −Nt ≥ 0, ∀∆ > 0,
and N0 = 0. Thus, the one dimensional counting process is given by:

N(t) = ∑ 1ti ≤t . (3.162)


i∈N∗

If this counting process is adapted to a filtration Ft with independent increments


such that:

λ n (t − s)n
P (N(t) − N(s) = n|Fs ) = e−λ (t−s) n ∈ N, (3.163)
n!
then we say that it is a Poisson process.
It is also possible to associate an intensity jump process to these events. This is
defined, with respect to a filtration Ft , as a measure of the change rate of the counting
process:
 
N(t + h) − N(t)
λ (t|Ft ) = lim Ft
h→0 h
(3.164)
1
= lim Pr [N(t + h) > N(t)|Ft ] .
h→0 h

Example 3.4.1. Intensity of a Poisson process


Stochastic Calculus 97

 
1
lim [N(t + ∆) − N(t)] Ft =
∆→0 ∆
1 1 λ n ∆n
lim ∑ nP (N(t + ∆) − N(t) = n|Ft ) = lim ∑ ne−λ ∆
∆→0 ∆ n=0 ∆→0 ∆ n=1 n!
(3.165)
1 ∞
λ n−1 ∆n−1 ∞
λ m ∆m
= lim e−λ ∆ (λ ∆) ∑ = lim e−λ ∆ λ ∑
∆→0 ∆ n=1 (n − 1)! ∆→0 m=0 m!
= lim λ e−λ ∆ eλ ∆ = λ ∴ hdN(t)|Ft i = λ dt.
∆→0

A counting process {N(t),t ∈ [0, ∞)} is a non-homogeneous Poisson process if


N(0) = 0, the increments are independent, and:

λ (t)∆ + o(∆) if n = 1
P (N(t + ∆) − N(t) = n|F (t)) = o(∆) if n > 1 , (3.166)
1 − λ (t)∆ if n = 0

where λ (t) : [0, ∞) 7→ [0, ∞) is an integrable function.


A self-excited process is an intensity jump process such that:
Z t
λ (t|Ft ) = µ + φ (t − u)dN(u)
0
(3.167)
= µ + ∑ φ (t − tu , )
tu <t

where µ is the exogenous intensity and φ : R+ 7→ R+ is a kernel that takes into


account the positive influence of past events.

3.4.1 HAWKES PROCESS


A Hawkes26 process is a self-exciting process where the kernel is given by [92]:
P
φ (t) = ∑ α j e−β j t 1t∈R+ . (3.168)
j=1

Thus, the Hawkes process can be written as:


Z t P
λ (t|Ft ) = λ0 (t) +
0 j=1
∑ α j e−β j (t−s) dNs
(3.169)
P
−β j (t−ti )
= λ0 (t) + ∑ ∑ α je .
ti <t j=1

For P = 1, the Hawkes process can be written as:


98 Introduction to Econophysics

Z t
λ (t|Ft ) = λ0 (t) + α e−β (t−u) dNu
0
(3.170)
= λ0 (t) + α ∑ e−β (t−tu ) .
tu <t

In the differential form, the Hawkes process is given by:

dλt = β (λ ∗ − λt )dt + αdNt . (3.171)

3.4.1.1 Solution
It is possible to solve this equation using an approach similar to that we used for
solving OU processes. Setting x(t) = λ (t|Ft )eβt and using a simpler notation:

dx = dλt eβt + λt β eβt dt


= β (λ ∗ − λt )eβt dt + αdNt eβt + λt β eβt dt
= β λ ∗ eβt dt + αteβt dN
Z t Z t (3.172)
∗ βs βs
x = x0 + β λ e ds + α e dNs
0 0
  Z t

= x0 + λ e − 1 + α eβ s dNs .
βt
0

Multiplying the whole equation by e−βt , we get:


  Z t
−βt ∗ −βt
λ (t|Ft ) = λ (0)e +λ e e − 1 + α eβ (s−t) dNs
βt
0
Z t (3.173)
−β (t−s)
= λ0 (t) + α e dNs ,
0

where λ0 (t) = λ (0)e−βt + λ ∗ (1 − e−βt ).


The expected value of a Hawkes process is given by:
 Z t 
µ = hλ (t)i = λ0 + φ (t − s)dNs
0
Z t 
= λ0 + φ (t − s)λ (s)ds
0
Z t
= λ0 + φ (t − s)µds (3.174)
0
Z t
= λ0 + µ φ (x)dx
0
λ0
µ= Rt ,
1− 0 φ (x)dx
where x = t − s. For a Hawkes kernel:
NOTES 99

Z ∞ P ∞
P P
−β j t αj αj
∑ α je dt = − ∑ e−β j t = ∑ βj . (3.175)
0 j=1 j=1 β j 0 j=1

Thus, Eq. 3.174 becomes:

λ0
µ= P
. (3.176)
1 − ∑ j=1 α j /β j
From this equation, we can see that for a stationary process, it is necessary that:
P
αj
∑ βj < 1. (3.177)
j=1

Hawkes processes have been used, for instance, to model the Epps27 effect. This
is an inverse relationship between the empirical correlation between two assets and
the interval for which their prices are measured [93]. Coupled Hawkes processes can
adequately capture the mean reversion of the microstructure of noise and reproduce
the period depending correlation [94].

Notes
1 Jean-André Ville (1910–1989) French mathematician.
2 Jean le Rond dÁlembert (1717–1783) French philosopher, mathematician and physicist.
3 Concept introduced by Joseph Leo Doob (1910–2003) American mathematician, advisee of Joseph

Leonard Walsh and adviser of Paul Halmos among others.


4 Joseph Leo Doob (1910–2004) American mathematician, advisee of Joseph Leonard Walsh and ad-

viser of Paul Hamos, among others.


5 Georege Pólya (1887–1985) Hungarian mathematician, adviser of Albert Einstein’s son Hans Ein-

stein among others.


6 Jacob Bernoulli (1655–1705) Swiss mathematician, advisee of Gottfried Wilhelm Leibniz and adviser

of his nephew Nikolaus I Bernoulli and his brother Johan Bernoulli among others.
7 James Stirling (1692–1770) Scottish mathematician.
8 Robert Gibrat (1904–1980) French engineer.
9 Abraham Wald (1902–1950), Romanian mathematician advisee of Karl Menger, son of Carl Menger;

adviser of Herman Chernoff among others.


10 Developed by the Sir Francis Galton (1822–1911) English polymath, adviser of Karl Pearson, and

Henry William Watson (1827–1903) English mathematician.


11 Named after Kazuoki Azuma (1939–) Japanese mathematician, and Wassily Hoeffding (1914–1991)

Finnish statistician.
12 Rudolf Lipschitz (1832–1903) German mathematician, advisee of Gustav Dirichlet and Martin Ohm

(younger brother of Georg Ohm), adviser of Christian Felix Klein.


13 Andrei Andreyevich Markov (1856–1922) Russian mathematician, advisee of Pafnuty Chebyshev

and adviser of Abram Beicovitch and Georgy Voronoy among others.


14 Sydney Chapman (1888–1970) British mathematician and geophysicist, advisee of Godfrey Harold

Hardy.
15 Created by William Feller (1906–1970) Croatian mathematician.
16 Siméon Denis Poisson (1781–1840) French mathematician and physicist, advisee of Joseph-Louis

Lagrange and Pierro-Simon Laplace, adviser of Joseph Liouville among others.


17 Wendel Hinkle Furry (1907–1984) American physicist.
18 Leonard Salomon Ornstein (1880–1941) Dutch physicist, advisee of Hendrik Lorentz; George Eu-

gene Uhlenbeck (1900–1988) Dutch physicist, advisee of paul Ehrenfest.


100 NOTES

19 Albert Einstein (1879–1955) German physicist, Nobel laureate in 1921.


20 Paul Lagenvin (1872–1946) French physicsit, advisee of Pierre Curie, Joseph Thomson and Lipp-
mann, adviser of Louis de Broglie and Léon Brillouin and Iréne Joliot-Curie.
21 Kiyoshi Ito (1915–2008) Japanese mathematician.
22 Guido Fubini (1879–1943) Italian mathematician.
23 Oldřich Alfons Vašíček (1942–) Czech mathematician.
24 Marian Smoluchowski (1872–1917) Polish physicist, advisee of Joseph Stefan.
25 John Carrington Cox (1943–), Jonathan Edwards Ingersoll Jr. (1949–) advisee of Robert C. Merton,

and Stephen Alan Ross (1944–2017) American economists.


26 Alan Geoffrey Hawkes (1938–) British mathematician.
27 Thomas Wake Epps, American economist.
Options Pricing
4
In the early 2000’s, the Federal Reserve lowered interest rates in order to counter
increasing government deficits and the financial effects of the dot-com bubble. This,
however, flooded the market with funds, which in turn encouraged predatory lend-
ing to many who could not afford to pay it back. On the other hand, those debts
were backed by houses used as collateral in a process called securitization in which
mortgage-backed securities were bundled into structured-investment vehicles. The
house prices, however, had been severely elevated due to the Community Reinvest-
ment Act from 1977 that supported affordable housing to low-income citizens. When
payments started to vanish, it was already too late. The housing bubble had popped,
confidence in financial institutions had already disappeared, and panic spread world-
wide. Banks lost more than $1 trillion on toxic assets and, by the end of 2007, the
world experienced the biggest financial recession since the great depression of 1929.
Between October of 2007 and February of 2008, the S&P 500 index dropped
from 1500 to about 700 points. Those who had investments in gold, however, saw
its price move from $783 to $969 in the same period in the London bullion market.
Also, many investors who were skilled in operating options made literally billions in
profit.
When investing, it is usually a good idea to buy an insurance and make a hedge to
avoid possible losses. As described in Chapter 1, this can be accomplished not only
with gold, but with options. But how can one tell whether the price of the option
is high, low or fair? In this chapter we will look at some strategies to value options
starting with the binomial tree and then progressing to the famous Black-Scholes
model. Both strategies are based on a Wiener process, so before describing them we
will take a look at random walks and see how the Wiener process emerges as we
consider very small steps in a random walk.

4.1 FROM A RANDOM WALK TO A WIENER PROCESS


Let’s consider a random walk in which the agent can either move to the left or to the
right after some small period. If it starts at an arbitrary position x, after a period ∆t , it
can move either to x + ∆x with probability 1/2 or to x − ∆x with the same probability.
This is clearly a martingale since hx(t + ∆t )|F i = x(t).
If after a period 2∆t we find the walker at an arbitrary position x, we can say that
there is a probability 1/2 that it had come from x + ∆x and the same probability that
it had come from x − ∆x as depicted in Fig. 4.1. On the other hand, in order to find
it at x + ∆x after a period ∆t , it must have come from x with probability 1/2 or from
x + 2∆x with the same probability. The same happens if, after a period ∆t , the walker
is at x − ∆x . It must have come from x with probability 1/2 or from x − 2∆x with the
same probability. Mathematically, we can write the probability of finding the walker
at position x after a period 2∆t as:

DOI: 10.1201/9781003127956-4 101


102 Introduction to Econophysics

t x−2Δx x x+2Δx

1/2 1/2 1/2 1/2

t+Δt x−Δx x+Δx


1/2 1/2

t+2Δt x

Figure 4.1: A random walker moving in constant finite steps

p(x,t + 2∆t ) = 1/4 · p(x + 2∆x ,t) + 1/2 · p(x,t) + 1/4 · p(x − 2∆x ,t)
p(x,t + 2∆t ) − p(x,t) = 1/4 · p(x + 2∆x ,t) − 1/2 · p(x,t) + 1/4 · p(x − 2∆x ,t)
p(x,t + 2∆t ) − p(x,t) [p(x + 2∆x ,t) − 2 · p(x,t) + p(x − 2∆x ,t)]
(2∆t ) = 1/4 · (2∆x )2 .
(2∆t ) (2∆x )2
(4.1)
At the limit where ∆x → 0 e ∆t → 0:

∂ p(x,t) 1 ∆2x ∂ 2 p(x,t)


= lim
∂t ∆x →0 2 ∆t ∂ x2
∆t →0 (4.2)
∂ p(x,t) ∂ 2 p(x,t)
=D ,
∂t ∂ x2
where D is the diffusion coefficient given by D = lim∆x →0 1/2∆2x /∆t .
∆t →0
The kernel of this diffusion equation (the impulse response, or Green’s function1 )
can be found by taking its Fourier transform:
   2 
∂ p(x,t) ∂ p(x,t)
F = DF
∂t ∂ x2
∂ P(k,t) (4.3)
= −k2 DP(k,t)
∂t
2 Dt
P(k,t) = P(k, 0)e−k .
Since we want to find the response to a point source excitation, we set p(x, 0) =
δ (x) → F {p(x, 0)} = P(k, 0) = F {δ (x)} = 1. Therefore:
2 Dt
P(k,t) = e−k . (4.4)
Taking the inverse Fourier transform:
Options Pricing 103

n 2 o
p(x,t) = F −1 e−k Dt
x2
r  
1 π
= exp −
2π Dt 4Dt (4.5)
(  2 )
1 1 x
= √ √ exp − √ .
2Dt 2π 2 2Dt
This is a zero-centered Gaussian distribution with variance 2Dt. Assuming a scaling
limit lim∆x →0 ∆2x /∆t = 1, we obtain a Wiener process (Wt ) with variance VAR(Wt ) =
∆t →0
t. This limit is also known as Brownian motion2 and is formalized by Donsker’s3
theorem [95].
Thus, a Wiener process has an equivalent Fokker-Planck equation (Appendix C):

∂ p(x,t) 1 ∂ 2 p(x,t)
= , (4.6)
∂t 2 ∂ x2
that leads to a probability density function:
 2
1 x
p(x,t) = √ exp − . (4.7)
2πt t

4.2 BINOMIAL TREES


Let’s consider a situation where we hold ∆ shares of a specific stock that is currently
being traded for $100 and buy one call option for that stock with a strike of $99
for a price of f . The current value of our portfolio is then 100∆ − f . We expect that
the price of the shares after one month will either increase or decrease by 5 %. If
the former happens, then the price of the option will be $1 and the payoff of the
operation is 105∆ − 1. On the other hand, if the latter happens, then the option has
no value and the payoff of the operation is 95∆. This tree, neglecting dividends, is
illustrated in Fig. 4.2.
In order to achieve the same result in any situation, it is necessary to have 105∆ −
1 = 95∆ → ∆ = 1/10. This strategy of creating a portfolio free of uncertainty is
called delta hedging.
Now, if we consider a risk-free investment, it is possible to go backwards and
find the value of f using the compound rate (Eq. 2.6). In this example, the future
value of our portfolio is, in either case, PT = $9.5. Discounting the value in the
period with a risk-free rate of 5%, the present value of the portfolio is P0 = PT e−rT =
9.5e−5/100×1/12 ≈ $9.46. Equating this value to 100∆ − f , we find that the price of
the option has to be f ≈ $0.54 so that no arbitrage opportunities exist.
It is possible to generalize this process. The stock price can go up by a percentage
u > 1 and the value of the option can be described by fu . This creates a payoff
S0 u∆ − fu . On the other hand, the stock price can move down by a percentage 0 ≤
104 Introduction to Econophysics

S0uΔ − fu
(
$100 1+
5
100 (Δ −1

S0
$100

S0dΔ − fd
(
$100 1 −
5
100 Δ
−0 (
Figure 4.2: An one-step binomial tree

d < 1 and the value of the option is described by fd . This creates a payoff S0 d∆ − fd .
In order to obtain a risk-free portfolio we equal both payoffs and get:
fu − fd 1−0
∆= = = 0.1. (4.8)
S0 (u − d) 100(1.05 − 0.95)
The delta for a one step binomial tree [96, 97] is given by the ratio between the
difference of payoffs and the difference of stock prices at time T .
In this scenario, the value of the portfolio at the end of period T is given by:

( fu − fd )
PT = S0 u∆ − fu = S0 u − fu
S0 (u − d)
(4.9)
d fu − u fd 1.05 × 1 − 0.95 × 0
= = = $9.5.
u−d 1.05 − 0.95
Again, we can discount this portfolio to the present:

P0 = e−rT PT = S0 ∆ − f
d fu − u fd
e−rT = S0 ∆ − f
u−d
fu − fd (d fu − u fd )
f= − e−rT (4.10)
u−d u−d
 rT
erT + u

−rT e − d
=e fu − fd
u−d u−d
= e−rT [p fu + (1 − p) fd ] ,
where
erT − d
p= . (4.11)
u−d
In the example we are considering, for a period of 1 month, that we have T =
1/12, r = 5/100, u = 1.05, d = 0.95, and fu = 1, fd = 0. Therefore:
Options Pricing 105

e5/100×1/12 − 0.95
p= ≈ 0.54
1.05 − 0.95 (4.12)
f = e−5/100×1/12 [0.54 × 1 + 0] ≈ $0.54,
which is exactly what we obtained before. It is interesting to note that the valuation
of the option does not depend on the probability that the stock moves up or down.
This happens because the valuation of the option is calculated with respect to the
underlying stock, and this carries together the probability of price movement.
Another interesting point is the following. If erT > u, it might be interesting to
short the stock, invest the whole amount in a risk-free investment, buy the stock back
at the end of the period for a smaller value, and cash in the difference. In order to
avoid this arbitrage opportunity, we must impose that u ≤ erT ≤ d. This, however,
implies that:

d ≤ erT ≤ u
0 ≤ erT − d ≤ u − d
erT − d (4.13)
0≤ ≤1
u−d
0 ≤ p ≤ 1.
Thus, p is a probability measure corresponding to an upward price movement of the
stock price. Therefore, Eq. 4.10 states that the price of the option is its expected
future price discounted at the risk-free rate.
We considered a one-step binomial tree. But this process can continue to many
more steps as shown in Fig. 4.3. For each point in the binomial tree there are two
possibilities, the stock price moving up with probability p or down with probability
1 − p, which corresponds to a Bernoulli trial. Therefore, we can assign to every step
of the tree a random variable Xi which assumes only two values 0 and 1 correspond-
ing, respectively, to a downwards and an upwards price movement. For each individ-
ual (and independent) trial there is a state space Ω2 = {up, down} such that the state
space for a process with N trials is given by Ω = ΩN2 . The process starts with X(0) = 0
and the probability measure for each step n is given by P(X(n) = x) = px (1 − p)n−x .
A Bernoulli counting process is defined as an additive random walk Nn = ∑ni=1 Xi
n s
with an associated probability measure P(Nn = s) = s p (1 − p)n−s . Inspecting Fig.
4.3 we see that the stock price in this model is given by St = S0 uNn d t−Nn , which is a
multiplicative random walk.

Example 4.2.1. Two period stock market

In a two period stock market, the sample space is given by Ω =


{(d, d), (d, u), (u, d), (u, u)}. Therefore, the σ -algebras are given by Σ0 = {0,
/ Ω},
Σ1 = {Σ0 , Ωd , Ωu }, where Ωd = {(d, d), (d, u)} and Ωu = {(u, u), (u, d)}. Σ2 is
the power set of Ω.
106 Introduction to Econophysics

S 3 S 0u 3
S2 p
S 0u 2
S1
p
1−p
S 0u
p p
1−p S0ud S 0u 2d
S0
p
1−p 1−p

S 0d p
S0ud2
1−p

S 0d 2
1−p

S 0d 3

Figure 4.3: Multistep binomial tree

Note, however, that {S2 = S0 ud} = {(u, d), (d, u)} and this set is not in Σ2 .
Therefore, the lattice representation of the Bernoulli process is not the informa-
tion tree of the partitions. 

4.2.1 COX-ROSS-RUBINSTEIN MODEL


What determines u and d? Certainly, they must account for the mean and variance
of the stocks. The Cox-Ross-Rubinstein4 (CRR) model [96–98] proposes a link be-
tween discrete binomial trees and geometric random walks and a strategy to value
options.
Bachelier argued that, in the continuous-time limit, prices followed a random
walk. However, an investor is interested in returns despite the underlying price of
the asset. Therefore, if we consider a compound interest rate:

lim S(t + ∆t ) = lim S(t)er∆t = lim S(t)(1 + r∆t )


∆t →0 ∆t →0 ∆t →0
lim [S(t + ∆t ) − S(t)] = lim rS(t)∆t (4.14)
∆t →0 ∆t →0
dS(t) = rS(t)dt.
The same is expected for the volatility of the asset. Therefore, one should expect a
stochastic component ∝ S(t)dW . Thus, the price variation can be written as geomet-
ric random walk:

dS = µSdt + σ SdW. (4.15)


In order to solve this equation, we must use Ito’s lemma.
Options Pricing 107

Ito’s Lemma
For a doubly differentiable function f , its Taylor’s expansion is:

∂f ∂f 1 ∂2 f 2
df = dt + dS + dS + . . . (4.16)
∂t ∂S 2 ∂ S2
Substituting the differential dS by a stochastic differential equation
of the form dS = a(S,t)dt + b(S,t)dW , we get:

∂f ∂f
df = dt + (a(S,t)dt + b(S,t)dW ) +
∂t ∂S
1 ∂2 f 2
a (S,t)dt 2 + b2 (S,t)dW 2 + 2a(S,t)b(S,t)dtdW + . . .

+
2 ∂ S2
(4.17)
Eliminating high order terms we obtain Ito’s lemma:

∂f ∂f 1 ∂2 f
df ≈ dt + (a(S,t)dt + b(S,t)dW ) + b2 (S,t) 2 dt
∂t ∂S 2 ∂S
2
 
∂f ∂f 1 2 ∂ f ∂f
= + a(S,t) + b (S,t) 2 dt + b(S,t) dW.
∂t ∂S 2 ∂S ∂S
(4.18)
The term inside the parenthesis:

∂f 1 2 ∂2 f
A f = a(S,t) + b (S,t) 2 (4.19)
∂S 2 ∂S
is known as the infinitesimal generator for the process S.

For a geometric random walk, a(S,t) = µS and b(S,t) = σ S. For f = log(S), we


have that ∂ f /∂t = 0, ∂ f /∂ S = 1/S, and ∂ 2 f /∂ S2 = −1/S2 . Therefore:
 
1 2
d log(S) = µ − σ dt + σ dW. (4.20)
2
Thus, the variance of the infinitesimal log-return is simply σ 2 dt.
Let’s now match the variance of the binomial tree to the variance of the geometric
random walk:
σ 2 ∆t = X 2 − hXi2
= pu2 + (1 − p)d 2 − (pu + (1 − p)d)2
= p u2 − d 2 − pu2 − pd 2 + 2d 2 − 2ud + 2pud

(4.21)
= p (u − d)2 − p(u − d)2


= (u − d)2 p(1 − p)
108 Introduction to Econophysics

Using the probability given in Eq. 4.11:

ert − d u − ert
σ 2 ∆t = (u − d)2 . (4.22)
u−d u−d
Let’s assume that u = 1/d = ex . Therefore:

σ 2 ∆t = ert − e−x ex − ert


 
(4.23)
= ert+x − e2rt − 1 + ert−x .

Doing a Taylor expansion up to second order and keeping only terms up to o(t):

σ 2 ∆t ≈ 1 + rt + x + 1/2(rt + x)2 − 1 − 2rt − 1 + 1 + rt − x + 1/2(rt − x)2


= 2rtx + 1/2x2 − 2rtx + 1/2x2 (4.24)
2
=x .

Thus: √
u = eσ ∆t
√ (4.25)
d = e−σ ∆t
.
In the example we are considering in this section, indeed u = 1.05 ≈ 1/0.95 = 1/d.
For the period of one month, we get:

1.05 = eσ → σ ≈ 0.05$. (4.26)

4.3 BLACK-SCHOLES-MERTON MODEL


Let’s consider i) an European option that ii) pays no dividends, iii) operates in an
efficient market, and iv) has no associated transactions costs to be bought or sold
(also known as a frictionless market). Let’s also assume that v) the underlying asset
has normally distributed homoscedastic returns, and that vi) there exists a known
risk-free investment.
It is important to point out that these assumptions are difficult to be met in real
trading scenarios. It is known that assets can have fat tail distributions, transactions
are hardly costless, trading does not occur in a continuous time and markets are not
perfectly liquid.
Under these assumptions, nonetheless, the price of the underlying asset follows a
geometric Brownian motion:

dS = µSdt + σ SdWt . (4.27)


Since the price of the option G depends on the price of the underlying asset, we
can apply Ito’s lemma:

∂ F σ 2 ∂ 2G
 
1 ∂G ∂G
dG = +µ + S Sdt + σ SdW. (4.28)
S ∂t ∂G 2 ∂ S2 ∂S
Options Pricing 109

Let’s make a delta hedging and build a portfolio with ∆ units of the underlying
asset and on call option. Its value is:

P = ∆S − G. (4.29)
We must make the assumption of a self-financing portfolio. This means that there is
no exogenous net flux of funds and the purchase of an asset can only be done with
the sale of another asset. Thus, we can write:

dP = ∆dS − dG. (4.30)


Combining the previous equations:

∂ F σ 2 ∂ 2G
 
1 ∂G ∂G
dP = ∆µSdt + ∆σ SdWt − +µ + S 2 Sdt + σ SdW
S ∂t ∂G 2 ∂S ∂S
(4.31)
σ 2 ∂ 2G
     
∂G 1 ∂G ∂G
= ∆− σ SdWt − +µ −∆ + S Sdt.
∂S S ∂t ∂S 2 ∂ S2

We can now eliminate the stochastic component making:

∂G
∆= . (4.32)
∂S
The value of the portfolio becomes:

∂ G σ 2 2 ∂ 2G
 
dP = − + S dt. (4.33)
∂t 2 ∂ S2
The compound interest rate for a risk-free investment, though, is given by (see
Sec. 4.2.1):
dP = rPdt, (4.34)
where r is the risk-free interest rate.
Combining equations 4.29, 4.32, 4.33, and 4.34 we get an equation for the price
of the option in a manner corresponding to a risk-free investment:

∂ G σ 2 2 ∂ 2G
   
∂G
− + S dt = r S−G (4.35)
∂t 2 ∂ S2 ∂S
Rearranging terms we obtain the famous Black-Scholes5 equation [99] (BSE):

∂G ∂ G σ 2 2 ∂ 2G
+ rS + S − rG = 0. (4.36)
∂t ∂S 2 ∂ S2
110 Introduction to Econophysics

4.3.1 DIFFUSION-ADVECTION
Let’s create a risk-neutral BSE by making a change of variables:
1
S = eX → X = ln(S), dX = dS. (4.37)
S
Immediately we verify that:

∂G ∂G ∂X 1 ∂G
∆= = =
∂S ∂X ∂S S ∂X
∂ 2G ∂ 2G ∂ X ∂ G ∂ 2X
 
∂ ∂G ∂X
Γ= 2
= = + (4.38)
∂S ∂S ∂X ∂S ∂ S∂ X ∂ S ∂ X ∂ S2
∂ 2G ∂ X 2 1 ∂ G 1 ∂ 2G ∂ G
   
= − 2 = 2 − .
∂ X2 ∂ S S ∂X S ∂ X2 ∂ X
∆ and Γ are some of the Greeks and represent risk measures. Other Greeks are Θ =
∂ G/∂t, ρ = ∂ G/∂ r anda ν = ∂ G/∂ σ .
Applying these results in the BSE:

σ 2 ∂ G σ 2 ∂ 2G
 
∂G
+ r− + − rG = 0, (4.39)
∂t 2 ∂X 2 ∂ X2
which is an advection-diffusion equation. To see this, let’s consider Fick’s6 law for
some concentration C:

∂C
JD = −D
, (4.40)
∂x
where D is a diffusion constant and JD is the flux generated by the gradient of the
concentration.
In advective transport, the flux is proportional to the concentration since it carries
matter. A good example would be a stream of water carrying grains of sand. If ∆x is
the distance traveled by the particles in a period ∆t , then the number of particles Q is
given by C∆x A, where A is the cross sectional area of the flow. Doing a little algebra:
Q ∆x
lim = C lim
∆t →0 ∆t A ∆t →0 ∆t
∆x →0 (4.41)
∂x
JA = C .
∂t
The total flow is then given by:
∂x ∂C
J = JA + JD = C −D . (4.42)
∂t ∂x
Applying the continuity equation:

a Although, ‘nu’ is used, it is read as ‘vega’, which is not really a Greek letter.
Options Pricing 111

∂C ∂J
=−
∂t ∂x  
∂ ∂x ∂C
=− C −D
∂x ∂t ∂x
    (4.43)
∂ ∂x ∂ ∂C
=− C + D
∂x ∂t ∂x ∂x
∂C ∂ 2C
= −u +D 2 ,
∂x ∂x
where u is the velocity ∂ x/∂t. The time derivative corresponds to an accumulation,
whereas the first spatial derivative corresponds to advection and the second one to
diffusion.
If chemical reactions also occur, then it is also necessary to include a kinetic term
directly proportional do the concentration kC and another term related to sources and
drains F. Therefore we finally obtain:

∂C ∂C ∂ 2C
= −u + D 2 + kC + F. (4.44)
∂t ∂x ∂x

4.3.2 SOLUTION
There are many ways to solve the BSE. We will, however, show the elegant martin-
gale measure approach [26, 55].
Let’s discount the price of the underlying asset for the risk-free rate using dP =
rPdt (Eq. 4.34) so that S∗ = S/P:
PdS − SdP dS
dS∗ = = − S∗ rdt. (4.45)
P2 P
Considering that the price of the underlying asset follows a geometric Brownian
motion, we get:
µSdt + σ SdWt
dS∗ = − S∗ rdt
P
= µS∗ dt + σ S∗ dWt − S∗ rdt (4.46)
= (µ − r)S∗ dt + σ S∗ dWt .
Let’s now change the probability measure using Girsanov’s theorem (see Ap-
pendix D) so that we use a Brownian motion with drift. To make it explicit that
Wt is a Brownian motion under the probability measure P let’s change the notation
to WtP . Thus:
µ −r µ −r
WtQ = WtP + t → dWtP = dWtQ − dt. (4.47)
σ σ
The term (µ − r)/σ is known as Sharpe ratio [100]7 or the market price of risk.
Substituting this last expression in the discounted Brownian motion:
112 Introduction to Econophysics

dS∗ = σ S∗ dWtQ . (4.48)


WtP ,in the interval 0 ≤ t ≤ T , is a standard Wiener process on the probability space
(Ω, ΣT , P), whereas WtQ is a standard Wiener process on (Ω, ΣT , Q). Under the risk-
neutral measure Q, the discounted price is clearly a martingale under (Ω, ΣT , Q).
Since it is a martingale, we can write:

hST∗ |Ft iQ = St∗ , (4.49)


where Ft is a Brownian filtration generated by the Wiener process. For a discount of
ert , we get:
St = e−r(T −t) hST |Ft iQ , (4.50)
which is basically the Feynman-Kac formula (see Appendix E).
At the exercise date T , the price of the call option c is given by the difference
between the price of the underlying asset S(T ) and the strike k. If this difference is
negative, then the price of the option is zero. Therefore, we can write the exercise
price of the option as:

c(S, T ) = max (ST − k, 0) . (4.51)


The call price is then given by:

c(S,t) = e−r(T −t) hmax (ST − k, 0)iQ


= e−r(T −t) hST 1ST ≥k iQ − ke−r(T −t) h1St ≥k iQ (4.52)
−r(T −t) −r(T −t)
=e hST 1ST ≥k iQ − ke PQ (ST ≥ k).
In order to continue, we must know the distribution of ST . We can find it adapting
the geometric Brownian for the measure Q using the result of Eq. 4.47:
dS
= µdt + σ dWtP
S
= µdt + σ dWtQ − (µ − r)dt (4.53)

= rdt + σ dWtQ .
We can solve this equation applying Ito’s lemma to f = ln(S). For this, we use
a(S,t) = rS, b(S,t) = σ S, ∂ f /∂t = 0, ∂ f /∂ S = 1/S, and ∂ 2 f /∂ S2 = −1/S2 . Then:

  
1 1 2 2 1 1
d ln(S) = 0 + rS + σ S − 2 dt + σ S dWtQ
S 2 S S
 
1 2
= r − σ dt + σ dWtQ (4.54)
2
 
1 2  
ln(ST ) − ln(St ) = r − σ (T − t) + σ WTQ −WtQ .
2
Options Pricing 113

Its expected value is:


 
1 2
µ̃ = hln(ST )i = ln(St ) + r − σ τ (4.55)
2

and the variance is:


VAR (ln(ST ))Q = σ 2 τ, (4.56)
where τ = (T − t). The PDF of the log-return is therefore:
 2 
    
ST 1 2
1 ln St − r − 2 σ τ 

1 
f (ST ) = √ exp − . (4.57)
ST σ 2πτ  2
 σ 2τ 

We can now resume Eq. 4.52. Considering some properties of the log-normal distri-
bution and the fact that the log is a monotonic function, we get:

c(S,t) = e−rτ hST 1ln(ST )≥ln(k) iQ − ke−rτ PQ (ln(ST ) ≥ ln(k))


µ̃ − ln(k) + σ 2 τ
   
1
= e−rτ exp µ̃ + σ 2 τ Φ √
2 σ τ
  (4.58)
µ̃ − ln(k)
− ke−rτ Φ √
σ τ
= St Φ(d1 ) − ke−rτ Φ(d2 ),
where:
µ̃ − ln(k) + σ 2 τ
d1 = √
σ τ (4.59)

d2 = d1 − σ τ,
and Φ is the CDF (see Sec. 2.2.4) of the standard normal distribution.
As described in Sec. 1.3.1.1 and in Fig. 1.3, it is expected that the option payoff
will vary linearly with the price of the underlying asset after it reaches the strike
price. It is fair to say that the option price given by the Black-Scholes model takes
into account the premium related to the risk of the operation. Eq. 4.58 is composed
of two terms. The first one is given by the price of the underlying asset weighted
by its probability. Therefore, this product gives the expected value of the option if
the exercise was right now. The second term gives the expected value of the stock
being above the strike price discounted for the time value of money. Thus, the differ-
ence between both components indicates the price of the option as of today. Figure
4.4 shows the option price for a stock with a strike price of $125 at different expiry
times. A snippet used to generate Fig. 4.4 is given below.
114 NOTES

Option price

Price of underlying asset

Figure 4.4: Call option payoff as a function of the price of the underlying asset for
different expiry times

for tau in tau_space:


price = []
for S in S_space:
mu = np.log(S) + (r-0.5*sigma2)*tau
d1 = (mu-np.log(k) + sigma2*tau)/(sigma*np.sqrt(tau))
d2 = d1 - sigma*np.sqrt(tau)

c = S*phi(d1)-k*np.exp(-r*tau)*phi(d2)
price.append(c)

pl.plot(S_space,price)

Despite providing a limited description of reality, one may assign aesthetic beauty
to the mathematical simplicity of the Black-Schole formula. Also, many efforts have
been undertaken to improve the model [101–103]. Indiscriminate use of the model,
however, has even been attributed as one of the causes of the financial crisis of 2008
[104, 105].

Notes
1 George Green (1793–1841) British mathematical physicist.
2 In reference to Robert Brown (1773–1858) Stottish botanist who observed the random motion of
pollen in water in 1827.
NOTES 115

3 Monroe David Donsker (1924–1991) American mathematician.


4 Mark Edward Rubinstein (1944–2019) American economist.
5 Fischer Sheffey Black (1938–1995) American economist; Myron Samuel Scholes (1941–) Cana-

dian economist, advisee of Eugene Fama, Nobel laureate in 1997; The model was expanded by: Robert
Cox Merton (1944–) American economist, son of Robert King Merton. Merton was the advisee of Paul
Samuelson and adviser of Jonathan Edward Ingersoll. He received the Nobel prize of economics in 1997
together with Scholes. Black did not receive the Nobel price since it is not given posthumously.
6 Adolf Eugen Fick (1829–1901) German physician.
7 William Forsyth Sharpe (1934–) American economist, advisee of Harry Markowitz. Sharpe won the

Nobel prize in economics in 1990.


Portfolio Theory
5
“[Economics] is the philosophy of human life...” L. von Mises1

Right after entering the Eurozone in 2001, the expectations for the economy of
Greece were high. Attraction of private investors, backing by the European central
bank, and a lowering of transaction costs were only a few of the beliefs at the time.
Nonetheless, the government of Greece defaulted 1.6 billions of euros to the Inter-
national Monetary Fund (IMF) in 2015 after openly admitting that it had distorted
some of its budget figures in order to facilitate its acceptance in the Eurozone. That
resulted in the bankruptcy of hundreds of thousands of Greek companies, a fall of 26
% in gross domestic product (GDP), and an explosion in the unemployment rate.a
Risk! Given the intrinsic stochastic nature of the financial activity, economists
have been devising sophisticated methods to reduce the exposition of investors to
risk. Options are used for hedging and the Black-Scholes model studied in the previ-
ous chapter is a tool that can be used (under a lot of restrictions) to assess the correct
price of options. In this chapter we will study a different strategy to mitigate risk us-
ing portfolios of assets. We will begin studying the modern portfolio theory (MPT)
and then move to more elaborated analyses such as the random matrix theory.

5.1 MARKOWITZ MODEL


Let’s begin our study creating a portfolio consisting of N assets. If each asset has a
return Rn (t) at time t, then a vector of returns is given by:
 T
R(t) = R1 (t) R2 (t) . . . RN (t) (5.1)
and their expected returns are given by:
 T
hRi = α = α1 α2 . . . αN . (5.2)
One may think that assets are completely uncorrelated, but in practice prices often
show some level of correlation. In some markets, assets can be strongly correlated as
for example in the market of digital goods. Thus, we create a covariance matrix:
D E
COVR = S = (R − α) (R − α)T (5.3)

Let’s now create a portfolio by adding Wn fractions of each asset:


 T
W = W1 W2 . . . WN , (5.4)

a See [106] and [107] for some ways a central authority may afflict the economy.

DOI: 10.1201/9781003127956-5 117


118 Introduction to Econophysics

such that
W · e = 1, (5.5)
since it is a distribution. This restriction is called budget equation.
The return of this portfolio is given by:
RW = W · R, (5.6)
which is known as reward equation. The expected return of this portfolio, on the
other hand, is given by:

αW = hRW i = W · α. (5.7)
The variance of this portfolio is given by:

VAR(RW ) = VAR (W · R)
D T E
= WT (R − α) WT (W − α)T


= WT (R − α)(R − α)T W (5.8)


= WT (R − α)(R − α)T W
= WT SW.
Markowitz2 proposed a strategy to find a locus of points (αW × σW2 ) that produce
an efficient frontier [108]. This is a set of points where each return is maximized for
a given level of risk. It can be found creating a Lagrangian3 function for minimizing
the variance given the restrictions given by Eqs. 5.5 and 5.7:

Λ = 1/2WT SW + λ (1 − W · e) + µ (α0 − W · α) , (5.9)


where λ and µ are Lagrange multipliers.
From matrix calculus:

∂Λ
= 1/2WT (S + ST ) − λ eT − µα T . (5.10)
∂W
Since, the covariance matrix is symmetric, we get:

∂Λ
= WT0 ST − λ eT − µα T = 0
∂W
−1 −1 (5.11)
WT0 = λ eT ST + µα T ST
W0 = λ S−1 e + µS−1 α,
where S−1 is known as the precision matrix.
Minimizing the Lagrangian function with respect to the multipliers, we get:

α0 = W0 · α
= λ S−1 e + µS−1 α · α
 
(5.12)
= λ (S−1 e) · α + µ (S−1 α) · α
   
Portfolio Theory 119

and
1 = W0 · e
= λ S−1 e + µS−1 α · e
 
(5.13)
= λ (S−1 e) · e + µ (S−1 α) · e .
   

We can put these two equations in a matrix form:


 −1
(S e) · e (S−1 α) · e λ
   
1
=
(S−1 e) · α (S−1 α) · α µ α0
    (5.14)
λ −1 1
=M ,
µ α0
where
eT S−1 e α T S−1 e
 
M= . (5.15)
eT S−1 α α T S−1 α
T
Note that eT S−1 α = α T S−1 e, and consequently the matrix M is symmetric.
Once the Lagrange multipliers are found, the Markowitz portfolio can be con-
structed with Eq. 5.11. The weights, however, can assume negative values. Some
investors use this information as a signal to sell shares. But what if the investor does
not have these shares? In order to obtain only positive weights, the following nor-
malization [109] can be used:
max(0,Wn )
Wn∗ = . (5.16)
∑m max(0,Wm )

5.1.1 RISK ESTIMATION


In order to obtain the risk associated to the Markowitz portfolio, we first rewrite Eq.
5.11 as:
 
 −1 −1
 λ
W0 = S e S α (5.17)
µ
In the Markowitz model, the risk is given by the variance of the portfolio (Eq.
5.8):

σw2 = WT0 SW0


 λ T
     
 −1 −1
 −1 −1
 λ
= S e S α S S e S α
µ µ
 T −1   
  e S   λ
= λ µ e α
α T S−1 µ (5.18)
 T −1 T −1
 
  e S e e S α λ
= λ µ
α T S−1 e α T S−1 α µ
 
  λ
= λ µ M .
µ
120 Introduction to Econophysics

Using the result of Eq. 5.14:


 
−1 1
 −1
σw2

= 1 α0 M MM
α0
  (5.19)
1
= 1 α0 M−1
 
.
α0
It is possible to use this last equation to plot the locus of the standard deviation-
expected return pairs. This is known as Markowitz bullet or efficient frontier. Figure
5.1 shows the efficient frontier calculated for daily returns of IBM, AMD and Intel.
Expected Return [%]

IBM
AMD

INTEL

Standard Deviation [%]

Figure 5.1: Standard deviation-expected return space with the Markowitz bullet cal-
culated for daily returns of IBM, AMD, and Intel

For a code that calculates the Markowitz bullet, we will use NumPy for array han-
dling, MatPlotLib for plotting, Pandas for obtaining the time series and DateTime for
handling datetime data:

import numpy as np
import matplotlib.pyplot as pl
import pandas_datareader as pdr

from datetime import datetime

Next, we must define functions for the matrix multiplication of three elements
(tri) and the covariance of two series (cv):
Portfolio Theory 121

def tri(a,b,c):
return np.dot(a,np.dot(b,c))

def cv(x,y):
return np.cov(x,y)[0][1]

Time series can be obtained with Pandas:

ibm = pdr.get_data_yahoo(symbols=‘IBM’,start=datetime(2011,1,1),
end=datetime(2012,1,1))
amd = pdr.get_data_yahoo(symbols=‘AMD’,start=datetime(2011,1,1),
end=datetime(2012,1,1))
itl = pdr.get_data_yahoo(symbols=‘INTC’,start=datetime(2011,1,1),
end=datetime(2012,1,1))

# Select Close Prices


pibm = ibm[‘Adj Close’]
pamd = amd[‘Adj Close’]
pitl = itl[‘Adj Close’]

# Get Returns
ribm = ret(pibm)
ramd = ret(pamd)
ritl = ret(pitl)

The alpha vector, M and covariance matrices are computed with:


122 Introduction to Econophysics

a = np.array([[np.average(ribm)],[np.average(ramd)],[np.average(ritl)]])
aT = np.transpose(a)

# Covariance Matrix
cii = cv(ribm,ribm)
caa = cv(ramd,ramd)
ctt = cv(ritl,ritl)

S = np.array([[cii, cv(ribm,ramd), cv(ribm,ritl)],


[cv(ramd,ribm), caa, cv(ramd,ritl)],
[cv(ritl,ribm), cv(ritl,ramd), ctt]])
Si = np.linalg.inv(S)

# M Matrix
e = np.array([[1.0] for i in range(3)])
eT = np.transpose(e)

M = np.array([[ tri(eT,Si,e)[0][0], tri(aT,Si,e)[0][0]],


[ tri(eT,Si,a)[0][0], tri(aT,Si,a)[0][0]]])
Mi = np.linalg.inv(M)

Finally, the bullet is computed with:

a_space = np.linspace(-0.002,0.005,100)
s_space = []
for ao in a_space:
m = np.array([[1],[ao]])
mT = np.transpose(m)

s = tri(mT,Mi,m)[0][0]
s_space.append(s)

s_space = [np.sqrt(s)*100 for s in s_space]


a_space = [a*100 for a in a_space]

pl.plot(s_space,a_space)
Portfolio Theory 123

5.1.2 RISK-FREE ASSET


What happens if we include one risk-free asset in our portfolio? Although such asset
does not really exist, one can use the safest assets in the market, such as a certifi-
cate of deposit (CD) or savings bondsb . Let’s, however, consider that its variance is
negligible and its expected value is r0 .
Our portfolio is then constructed with M risky assets such that W · e is the fraction
of such assets and 1 − W · e is the fraction allocated in risk-free assets. The expected
value of the portfolio is then:

α0 = W · α + (1 − W · e) r0
α0 − r0 = W · (α − e r0 ). (5.20)

Let’s once again minimize the risk associated with this portfolio with a Lan-
grangian function:

Λ = 1/2WT SW + λP (α0 − r0 + W · (e r0 − α)) . (5.21)


Minimizing this function with respect to W we get:

= WTP ST + λP eT r0 − α T = 0

dW
WTP ST = λP α T − eT r0
 (5.22)

WP = λP S−1 (α − e r0 ) .
From Eq. 5.20 we get:

α0 − r0 = λP S−1 (α − e r0 ) · (α − e r0 )
 

α0 − r0 (5.23)
λP = .
(α − e r0 ) · [S−1 (α − e r0 )]
The risk associated with this portfolio is given by:

σP2 = WTP SWP


= λP2 (α − er0 )T S−1 (α − er0 )
(α − er0 )T S−1 (α − er0 )
= (α0 − r0 )2 (5.24)
[(α − er0 )T S−1 (α − er0 )]2
(α0 − r0 )2
= .
(α − er0 )T S−1 (α − er0 )

b This class of asset is usually protected by insurance corporations such as the Federal Deposit Insur-

ance Corporation (FDIC) in the United States.


124 Introduction to Econophysics

5.1.2.1 Market Portfolio


Let’s define a market portfolio as the optimal portfolio (which lies on the efficient
frontier) fully invested in risky assets. According to this definition, we must take the
portfolio from Eq. 5.22 and apply W · e = 1. Thus, we get:

λM S−1 (α − e r0 ) · e = 1
 

1 (5.25)
λM = −1 .
[S (α − e r0 )] · e
The expected value of this portfolio, according to Eq. 5.22, is:

hRM i = WM · α = λM S−1 (α − e r0 ) · α
 −1 
S (α − e r0 ) · α
= r0 − r0 + −1
[S (α − e r0 )] · e
 −1
S (α − er0 ) · α − S−1 (α − e r0 ) · e r0
  
= r0 + (5.26)
[S−1 (α − e r0 )] · e
(α − e r0 )T S−1 (α − e r0 )
= r0 + .
[S−1 (α − e r0 )] · e

The risk associated with this portfolio is:


2
σM = WTM SWM
T 
= λM2 S−1 (α − e r0 ) S S−1 (α − e r0 )
 

(α − e r0 )T S−1 (α − e r0 )
=
([S−1 (α − e r0 )] · e)2 (5.27)
(hRM i − r0 )2
= .
(α − er0 )T S−1 (α − e r0 )

5.1.3 TOBIN’S SEPARATION THEOREM


According to Eqs. 5.22 and 5.26, we can write:

λP
WP = WM . (5.28)
λM
The ratio between lambdas can be computed as:
Portfolio Theory 125

λP
γ=
λM
 −1 
S (α − er0 ) · e
= (α0 − r0 )
(α − e r0 ) · [S−1 (α − e r0 )]
" #−1 (5.29)
S−1 (α − e r0 ) · (α − e r0 )

= (α0 − r0 )
[S−1 (α − er0 )] · e
α0 − r0
= .
hRM i − r0
On the other hand, according to the relation above it is also possible to write:

VAR(WP ) = γ 2 VAR(WM )
σp (5.30)
γ= .
σM
Matching both expressions and considering that α0 is the expected return of the op-
timal portfolio:
σP α0 − r0
=
σM hRM i − r0
  (5.31)
hRM i − r0
hRP i = r0 + σP .
σM
This is known as the capital market line (CML). The slope within parenthesis (known
as Sharpe4 ratio [110], [100], [111]) describes a normalized risk premium and is
exactly the slope corresponding to a tangent portfolio. We can see this by working
with Eq. 5.27:

hRM i − r0
σM = → K(R)σM = hRM i − r0
K(R)
dK(R)σM + K(R)dσM = dhRM i
dhRM i dK(R) (5.32)
= K(R) + σM
dσM dσM
hRM i − r0
= K(R) = .
σM
Therefore, we can say that these efficient portfolios can be written as a linear com-
bination of risk-free assets and a tangent portfolio and this is known as Tobin’s5
separation theorem [112].
It is possible to add the Markowitz bullet as shown in Fig. 5.2 with the following
snippet:
126 Introduction to Econophysics

Expected Return [%]

L IBM
CM AMD

INTEL

Standard Deviation [%]

Figure 5.2: Markowitz bullet (dotted curve) and the capital market line (CML) for a
risk-free asset with an expected return of 0.01%

ro = 0.01/100
d = (tri(np.transpose(a-e*ro),Si,a-e*ro))[0][0]
Rm = (ro + d/tri(np.transpose(a-e*ro),Si,e))[0]
sigma_m = (np.sqrt(((Rm-ro)**2)/d))[0]

R_space = []
n_space = np.linspace(0,np.sqrt(max(s_space)),100)
for n in n_space:
Rp = ro + n*(Rm-ro)/sigma_m
R_space.append(Rp)

n_space = [n*100 for n in n_space]


R_space = [r*100 for r in R_space]
pl.plot(n_space,R_space)

The modern portfolio theory is usually criticized with respect to the assumption of
risk. Indeed, variance can be a poor estimator of risk and some distributions may not
even have a well-defined variance. We have seen, for instance, that many returns have
fat tail distributions. Furthermore, there can also be non-quantifiable risksc [113]. On
the other hand, the modern portfolio theory has some results that are very appealing
such as composing a diversified portfolio do reduce risk.

c Also known as Knightian6 uncertainty.


Portfolio Theory 127

5.1.3.1 CAPM
Equation 5.31 can also be written as:

hRM i − r0
= hRP i − r0 . (5.33)
βM
The term on the left hand side of the equation is known as the Treynor7 index [114]
and quantifies a risk-adjusted excess return of the investment. This equation can be
slightly modified to value assets in the capital asset pricing model [110, 114–116]
(CAPM):

hRi i = r0 + βi (hRm i − r0 ) , (5.34)


where Rm is the expected return of the market and Ri is the expected return of a
new asset. The locus of the expected return of an investment as a function of βi in
this equation is known as security market line (SML). Here, the angular coefficient
βi quantifies the systematic risk of such investment. The latter can be given by the
linear regression:

COV(hRi i, hRm i)
βi = . (5.35)
VAR(hRi i)
Equation 5.33 assumes that the ratio between excess returns is given by β . How-
ever, it is not uncommon to find an extra abnormal return given by α added to the
expression. Therefore, we can generalize this equation to:

(hRi it − r0 ) = αi + βi (hRm it − r0 ) + εit , (5.36)


where εit is an idiosyncratic risk. The locus of the excess return of the asset as a
function of the excess return of the portfolio is known as security characteristic line
(SCL). If the abnormal return is positive, then the investment is paying an extra price
for the assumed risk.
Based on this model, it is possible to check whether an asset is under- or over-
valued. In order to do this we find its β and plot the pair (βi , hRi i) together with the
SML. If the point is below the SML, then the asset is paying less than the market
for an assumed risk. On the other hand, if the point is above the SML, then the asset
pays more than the market for the assumed risk. This, however, is a violation of the
EMH (see Sec. 1.3) that states that it should not be possible to beat the market. An
example, nonetheless, is given in Fig. 5.3 for the daily returns of stocks of some tech-
nology companies between 2013/1/1 and 2014/1/1. The NASDAQ-100 Technology
Sector (NDXT) is used as an estimator for the market.

5.2 RANDOM MATRIX THEORY


Let’s take a set of assets and organize the time series of their normalized returns in
rows:
128 Introduction to Econophysics

undervalued Intel
Apple
stocks
Expected Return

market portfolio
overvalued
stocks

Systematic Risk - β

Figure 5.3: Pricing of stocks under CAPM. The solid line is the SML estimated from
the NDXT index, whereas the market portfolio has β = 1 by definition

 
r̃1 (t1 ) r̃2 (t1 ) ... r̃N (t1 )
 r̃1 (t2 ) r̃2 (t2 ) ... r̃N (t2 ) 
A= . (5.37)
 
.. .. 
 .. . . 
r̃1 (tN ) r̃2 (tN ) ... r̃N (tN )
A random matrix [117–119] is a matrix whose all elements are random variables.
If matrix A is unitary and its elements are i.i.d. and uniformly distributed, then we
say that this matrix belongs to the Circular Ensemble. If, on the other hand, we lift
the restriction of A being unitary but require that its elements are i.i.d. and follow a
Gaussian distribution, then we say that this matrix belongs to a Gaussian ensemble.
Considering that  A belongs to the Gaussian ensemble, symmetric matrices created
as 1/2 A + AT belong to the Orthogonal Gaussian Ensemble (GOE). In this case,
the diagonal elements of such matrix are N (0, 1) distributed, whereas non-diagonal
elements are N (0, 1/2) distributed.
If a new matrix is created as 1/2 A + AH , then it belongs to the Gaussian

 Unitary
Ensemble (GUE). Furthermore, if the matrix is created as 1/2 A + AD , where the
subscript D indicates the quaternion dual transpose, then this new matrix belongs to
the Gaussian Sympletic Ensemble (GSE).
It is also possible to create a new matrix A0 A, where 0 is T, H or D depending if
the matrix A is real, complex or quaternion. In this case, the new matrix belongs to
the Wishart Ensemble8 . The covariance matrix, for instance, follows this ensemble.
Matrices that belong to these ensembles have a set of properties and have been
used to study, for instance, quantum chaos [120]. Here, we are particularly interested
in the covariance matrix and that can follow the Wishart ensemble. In order to explore
some of its properties, let’s use Green’s functions to obtain its density of eigenvalues.
Portfolio Theory 129

5.2.1 DENSITY OF EIGENVALUES


For a square matrix H, its resolvent (or, equivalently, the retarded Green’s function)
can be written as:

GR (ε) = [(ε + iη)I − H]−1 . (5.38)


The resolvent can be decomposed in the base of the eigenstates of H:

GR (ε) = ∑ |ni Cn . (5.39)


n
Substituting this decomposition in the definition of the resolvent:

[(ε + iη)I − H] G(ε) = I


[(ε + iη)I − H] ∑ |ni Cn = I
n (5.40)
∑ [(ε + iη) − λn ] |ni Cn = I.
n
Applying an eigenstate on the left side:
hm| ∑ [(ε + iη) − λn ] |ni Cn = hm|
n
[(ε + iη) − λm ] Cm = hm| (5.41)
hm|
Cm = .
(ε + iη) − λm
Using this result in Eq. 5.39:
|ni hn|
GR (ε) = ∑ |niCn = ∑ . (5.42)
n n (ε + iη) − λn
Let’s now use this eigenexpansion of the resolvent to obtain the density of eigenval-
ues of H:

1 N
ρ(λ ) = ∑ δ (λ − λα ).
N α=1
(5.43)

Therefore, using the eigenexpansion of the Green’s function:


|αi hα|
GR (ε) = ∑
α ε + iη − εα
1
hm| GR (ε) |mi =
(ε − εm ) + iη
(ε − εm ) − iη (5.44)
=
(ε − εm )2 + η 2
 R η
Im Gmm (ε) = −
(ε − εm )2 + η 2
lim Im GRmm (ε) = −πδ (ε − εm ).

η→0
130 Introduction to Econophysics

Thus, from Eq. 5.43, the spectral density of H is:


1
lim Im Tr GR (ε)
 
ρ(ε) = − . (5.45)
Nπ η→0
This is sometimes stated as the Plemelj-Sokhotski9 formula.

5.2.2 WIGNER’S SEMI-CIRCLE LAW


In the light of Dyson’s equation, we can write matrix H as:

h11 τ †1
 
H= . (5.46)
τ 2 H0

Dyson’s Equation

It is possible to simplify many problems related to the resolvent by


using Dyson’s10 equation. Let’s begin with an unperturbed matrix
H0 , apply a perturbation V and compute its resolvent:

GR (ε) = [(ε + iη)I − H0 − V]−1


−1
= G−1

0 −V
−1
= G−1

0 (I − G0 V) (5.47)
= (I − G0 V)−1 G0
(I − G0 V) GR (ε) = G0
GR (ε) = G0 + G0 VGR (ε),
where G0 is the resolvent for the unperturbed matrix H0 . Using the
completness relation, we can find an expression for its elements:

ha| GR (ε) |bi = ∑ ha| G0 |mi hm| V |ni hn| GR (ε) |bi (5.48)
m,n

or simply:
GRab (ε) = G0ab + ∑ G0amVnm GRnb (ε). (5.49)
n,m

Applying Dyson’s equationd , we get:

G11 = G0 11 + G0 11 τ †1 G21
(5.50)
G21 = G0 22 τ 2 G11

d We changed the notation for the bare resolvent from a subscript to a superscript 0.
Portfolio Theory 131

Solving this system:


G11 = G011 + G011 τ †1 G022 τ 2 G11
−1 0
= I − G011 Σ2

G11 (5.51)
= [(ε + iη) − h11 − Σ2 ]−1 ,
where Σ2 = τ †1 G022 τ 2 is known as the self-energy. Let’s inspect the expected value of
the self-energy:

hb| τ † G022 τ |bi = ∑ hb| τ †1 |ni hn| G022 |mi hm| τ 1 |bi
n,m
(5.52)
= ∑ τ †bn G022nm τ mb .
n,m

Let’s now consider that the elements of τ †1 and τ 2 are random variables with zero

mean and variance σ 2 . Thus, hτbn τmb i = (σ 2 /N)δn,m and:

σ2
hb| Σ2 |bi = ∑ δn,m G022nm
n,m N
(5.53)
σ2  0
= Tr G22 .
N
Therefore, from Eq. 5.51:
1 1
Tr {G11 } = 2 . (5.54)
N ε + iη − h11 − σN Tr G022


Given that the eigenvalues of a matrix and its minor interlace, their traces are similar.
Therefore:
1
t= → σ 2t 2 − at + 1 = 0
ε + iη − h11 − σ 2t
√ (5.55)
a ± a2 − 4σ 2
t= ,
2σ 2
where t = (1/N)Tr(G) and a = ε + iη − h11 .
The spectral density is obtained from Eq. 5.45:
1
ρ(ε) = − lim Im(t)
π η→0
(5.56)
1 p 2 2.
= 4σ − ε
2πσ 2
Therefore, the locus of the spectral density of the Gaussian ensemble is a semi-
circle. This result is indeed known as Wigner’s semi-circle law11 .
In order to simulate this law we can follow the snippet below. We need NumPy for
numerical calculations and Matplotlib for plotting. We also define a few constants:
132 Introduction to Econophysics

import numpy as np
import matplotlib.pyplot as pl

eta = 0.005
N = 100
e_space = np.linspace(-2,2,100)
DOS = []

We then sample Wigner matrices from the normal distribution, calculate the re-
solvent and take averages:

for sample in range(300):


H = [[np.random.normal(0,1.0/np.sqrt(N)) for i in range(N)]
for j in range(N)]
H = 0.5*np.sqrt(2)*(H + np.transpose(H))

g_space = []
for e in e_space:
G = np.linalg.inv((e+1j*eta)*np.eye(N)-H)
r = -(1.0/(N*np.pi))*np.trace(G.imag)
g_space.append(r)

DOS.append(g_space)

DOS = np.average(DOS,axis=0)

Finally we plot the result together with the Wigner semi-circle law:

W = [(1.0/(2*np.pi))*np.sqrt(4-z**2) for z in e_space]

pl.plot(e_space,DOS,’.’,color=’gray’)
pl.plot(e_space,W,’k’)
pl.show()

The result of a simulation for 300 100 × 100 square matrices from the Gaussian
orthogonal ensemble is shown in Fig. 5.4.
Portfolio Theory 133

Figure 5.4: Spectral density for 300 100 × 100 square matrices from the Gaussian
orthogonal ensemble. Gray dots are obtained from the resolvent, whereas the solid
line is the Wigner semi-circle law

5.2.3 MARČENKO-PASTUR LAW


The density of eigenvalues for the Wishart ensemble is greatly modified if compared
to that of Gaussian ensembles. In order to see that, we must use Marčenko-Pastur12
theorem.

Marčenko-Pastur Theorem
Let’s take a matrix of normalized returns X as a Wigner n × N ma-
trix where hXi j i = 0 and hXi2j i = 1. Also, let’s take Tn as an n × n
diagonal matrix with elements τi such that the distribution of eigen-
values converge to some distribution H(τ). Finally, let’s consider an
N × N matrix BN = AN + (1/N )X† Tn X, where AN is an N × N ma-
trix. If these three matrices are independent, then Marčenko-Pastur
theorem [121] states that:
 Z 
τdH(τ)
GB (z) = GA z − c , (5.57)
1 + τGB (z)
where c = n/N and GY is the Stieltjes13 transformation of matrix Y.

The Stieltjes transformation of a matrix AN×N is defined as:

1
Z Z
ρ(t)
GA (ε) = dt = dF A (t), (5.58)
t −ε t −ε
134 Introduction to Econophysics

where the measure F A (ε) of matrix AN×N is the density of eigenvalues described
intuitively by the ratio between the number of eigenvalues smaller than ε and N.
The density of eigenvalues for a null matrix A = 0 is given by δ (t). Therefore, its
Stieltjes transformation is given by:

δ (t) 1
Z
GA (ε) = dt = − . (5.59)
t −ε ε
In this picture, matrix B is given by 1/N X∗ TX and its Stieltjes transformation is given
by:
1
GB (z) = − R τdH(τ)
z−c 1+τGB (z)
(5.60)
1
Z
τdH(τ)
z=c − .
1 + τGB (z) GB (z)
If we use the distribution T = I then dH(τ) = δ (τ − 1)dτ, and we get:

τδ (τ − 1)dτ 1
Z
z=c −
1 + τGB (z) GB (z)
c 1 (5.61)
= −
1 + GB (z) GB (z)
zG2B (z) + (z + 1 − c)GB (z) + 1 = 0.
To find the density of eigenvalues, we must make z = ε + iη:

(ε + iη)G2B (z) + (ε + iη + 1 − c)GB (z) + 1 = 0


 2
εGB (z) + (ε + 1 − c)GB (z) + 1 + iη G2B (z) + GB (z) = 0
  
p
ε +1−c 4ε − (ε + 1 − c)2
GB (z) = − ±i
p 2ε 2ε (5.62)
1 4ε − (ε + 1 − c) 2
− Im {GB (ε + i.η)} = .
π 2πε
The element in the square root can be factored:

4ε − ε 2 + (1 − c)2 + 2ε(1 − c) = ε 2 + 2ε(1 + c) + (1 − c)2



p
2(1 + c)2 ± 4(1 + c)2 − 4(1 − c)2
ε=
2 (5.63)
2 √
= (1 + c) ± 2 c

= (1 ± c)2 .
Therefore, the density of eigenvalues can be written as:
p
(ε − εa )(εb − ε)
ρB (ε) = , (5.64)
2πε
√ 2
where εab = (1 ± c) .
Portfolio Theory 135

5.2.3.1 Correlation Matrix


Matrix BN = 1/NX† TX is not a correlation matrix. We can make it a correlation
matrix doing:
1 1/2 † 1/2
Cn = Tn XX Tn
N (5.65)
1
= FG,
N
1/2 1/2
where F = Tn Xn and G = X†n Tn . Since Tn is an n × n matrix and Xn is an n × N
matrix, we have that F is an n × N matrix, and G is an N × n matrix. Thus, Cn is an
n × n matrix.
On the other hand, we can write:
1 1 1/2 1/2
GF = X†n Tn Tn Xn
N N
1 (5.66)
= X†n Tn Xn
N
= BN .
Since Cn = (1/N)FG and BN = (1/N)GH, we can state that C has all eigenvalues
of B and its remaining n − N eigenvalues are zero. Since we are assuming that n > N,
we have the measure:
 
C n−N N
F (t) = I(0,∞] (t) + F B (t)
n n
 
1 1
= 1− I (t) + F B (t)
c (0,∞] c
 
1 1
dF C (t) = 1 − δ (t)dt + dF B (t) (5.67)
c c
 Z
1 1 1 1 1
Z Z
dF C (t) = 1 − δ (t)dt + dF B (t)
z−t c z−t c z−t
1 − 1c

1
GC (z) = + GB (z).
z c
The density of eigenvalues of the correlation matrix is then:
136 Introduction to Econophysics

 
1 1 1 − 1/c 1 1
− Im {GC (ε + iη)} = − Im − · Im {GB (ε + iη)}
π π ε + iη c π
1
1− c
 
ε − iη 1
ρC (ε) = − Im + · ρB (ε)
π ε2 + η2 c
  (5.68)
1 1
= 1− δ (ε) + · ρB (ε)
c c
 
1 c p
= max 0, 1 − δ (ε) + (ε − εa )(εb − ε).
c 2πε

Here we have used the maximum function because negative densities do not exist.
Generalizing for a variance σ 2 , the Marčenko-Pastur law becomes [118]:
p
(ε − εmin )(εmax − ε)
ρ(ε) = , (5.69)
2πεσ 2
where
√ 2
εmax,min = σ 2 1 ± c . (5.70)
The Marčenko-Pastur distribution for different values of c is shown in Fig. 5.5.

Figure 5.5: Theoretical Marčenko-Pastur distributions for different values of c

To simulate the Marčenko-Pastur law in Python, we must include the NumPy and
the Matplotlib libraries. Also, we define a few constants:
Portfolio Theory 137

import numpy as np
import matplotlib.pyplot as pl

n = 77
M = 100
eta = 1E-3
c = n/M

The theoretical curve can be calculated with:

ea = (1+np.sqrt(c))**2
eb = (1-np.sqrt(c))**2

esp = np.linspace(eb,ea,100)
rsp = []

for e in esp:
r = (float(c)/(2*np.pi*e))*np.sqrt((e-ea)*(eb-e))
rsp.append(r)

The experimental density can be calculated with:

DOS = []
for it in range(300):
R = np.array([[np.random.normal(0,1) for cn in range(n)]
for cm in range(M)])
H = np.dot(R,np.transpose(R)); N = len(H)
H = np.dot(1.0/N,H)

gsp = []
for e in esp:
G = np.linalg.inv((e+1j*eta)*np.eye(N)-H)
gsp.append(-(1.0/(N*np.pi))*np.trace(G.imag))
DOS.append(gsp)

DOS = np.average(DOS,axis=0)
138 Introduction to Econophysics

The result of this simulation is shown in Fig. 5.6.

Figure 5.6: Marčenko-Pastur distribution for a random n × N correlation matrix. The


solid line is the theoretical prediction and the dots are obtained with an ensemble of
300 random matrices

5.2.4 WIGNER’S SURMISE


In 1957 during a conference on neutron physics [122], a question about the distri-
bution of eigenvalue spacings of heavy nuclei appeared. Wigner, who was attending
the conference stepped up to the blackboard and guessed the following result:
Consider a 2 × 2 matrix:
 
x x
H= 1 3 , (5.71)
x3 x2
in which elements x1 and x2 are N (0, 1)-distributed random variables and x3 is a
N (0, 1/2)-distributed random variable.
The eigenvalues of this matrix are given by:

x1 − λ x3
= x1 x2 − x1 λ − x2 λ + λ 2 − x32 = 0
x3 x2 − λ
λ 2 − (x1 + x2 )λ + x1 x2 − x32 = 0 (5.72)
q
2λ = x1 + x2 ± (x1 + x2 )2 − 4x1 x2 + 4x32 .
Therefore, the spacings between eigenvalues are given by:
Portfolio Theory 139

q
s = λ1 − λ2 = (x1 − x2 )2 + 4x32 . (5.73)
The probability measure s is given by:

 
1 1 2 1
Z ∞ q
2 2
p(s) = √ e−1/2x1 √ e−1/2x2 √ e−x3 δ s − (x1 − x2 )2 + 4x32 dx
−∞ 2π 2π π
 
1
Z ∞ q
exp −(1/2x12 + 1/2x22 + x32 ) δ s − (x1 − x2 )2 + 4x32 dx

= 3/2
2π −∞
(5.74)
Making the following change of variables:

x1 − x2 = r cos(θ )
2x3 = r sin(θ ) (5.75)
x1 + x2 = φ ,
we get:
    
1 −1 0 x1 r cos(θ )
0 0 2 x2  =  r sin(θ )  (5.76)
1 1 0 x3 φ
and
      
x1 1 0 1 r cos(θ ) 1/2 (r cos(θ ) + φ )
1
x2  = −1 0 1  r sin(θ )  = 1/2 (φ − r cos(θ )) . (5.77)
2 1/2r sin(θ )
x3 0 1 0 φ

We must also change the differential volume of integration. Therefore, we make


dx = |J|dy, where J is the Jacobian14 matrix given by:
 dx1 dx1 dx1   
dr dθ dφ 1/2 cos(θ ) −1/2r sin(θ ) 1/2
J =  dx
 2 dx2 dx2   1
dφ  = − /2 cos(θ )
1/2r sin(θ ) 1/2 (5.78)
dr dθ
dx3 dx3 dx3 1/2 sin(θ ) 1/2r cos(θ ) 0
dr dθ dφ

Its determinant is −r/4. Therefore, the probability measure becomes:


Z 2π
1
Z ∞ Z ∞
p(s) = 3/2 drδ (s − r) dθ dφ eβ (r,θ ,φ ) , (5.79)
8π −∞ 0 −∞
140 Introduction to Econophysics

where

β (r, θ , φ ) = −(1/2)(1/4) (r cos(θ ) + φ )2 − (1/2)(1/4) (φ − r cos(φ ))2 − 1/4r2 sin2 (θ )


 2
r φ2 φ 2 r2
= − /4
1 cos2 (θ ) + + rφ cos(θ ) + + cos2 (θ ) − rφ cos(θ )
2 2 2 2
2 2

+r sin (θ )
= −1/4 r2 cos2 (θ ) + r2 sin2 (θ ) + φ 2


φ2
= −1/4r2 − .
2·2
(5.80)
The probability measure finally becomes:

φ2
1 √ e− 2·2
Z ∞ Z ∞ Z 2π
2
dθ e− /4r
1
p(s) = 3/2 2π2 dφ √ dr · rδ (s − r)
8π −∞ 2π2 −∞ 0
2 −1/4s2 (5.81)
= 2πs · e

1 1 2
= s · e− /4s .
2
It is convenient, though, to express it as p̄(s) = hsip (hsis), where:
Z ∞
hsi = sp(s)ds
0
1 ∞
Z
2
s2 e− /4s ds
1
=
2 0 (5.82)

1 π23 (2 − 1)!!
=
2√ 22
= π.
Consequently,

p̄(s) = hsip (hsis)


√ √
= π p( πs) (5.83)
π −1/4πs2
= se .
2
The spacing distribution shown in Fig. 5.7 implies that the eigenvalues “repel”
each other since the distribution goes to zero for small values.
More generally, Gaussian ensembles have spacing distributions given by:

pβ (s) = aβ sβ exp −bβ s2 ,



(5.84)
where β = 1, 2 and 4 for GOE , GUE and GSE respectively, and [117–119]:
Portfolio Theory 141

h  iβ +1
2 Γ 2+β
2 π 32 218
aβ = h  iβ +2 = 2 , π 2 , 36 π 3 , . . .
Γ 1+β
2
  2+β  2 (5.85)
Γ 2 π 4 64
bβ =    = , , ,...
1+β
Γ 2 4 π 9π

GSE

Poisson GUE

GOE

Figure 5.7: Spacing distribution for the GOE, GUE and GSE ensembles. The Poisson
distribution exp(−s) is shown for comparison

5.3 OTHER PORTFOLIO MEASURES


Modern portfolio theory has some deficiencies. For instance, taking the variance of
the portfolio as a measure of risk penalizes undesired high losses the same way as
small losses. In order to compensate for this and other problems, it is possible to
diversify the variance instead of the securities. This is known as risk parity portfolio
[123, 124].
Let’s take a volatility defined as:

σ = WT SW. (5.86)
According to Euler’s homogeneous functions theorem [125], we can also write this
standard variation as:
N   N
∂σ
σ = ∑ Wi = ∑ σi , (5.87)
i=1 ∂W i i=1
142 Introduction to Econophysics

where the summand is the partial volatility. The derivative is given by:

∂σ ∂ √ T
= W SW
∂W ∂W
1 1
= √ 2SW (5.88)
2 WT W
SW
= .
σ
Therefore, the individual volatilities are given by:
 
∂σ (SW)i
σi = Wi = Wi . (5.89)
∂W i σ
The strategy is now to compose a risk budget b = [b1 , b2 , . . . , bN ] such that b · 1 =
1. Thus, we get a portfolio where each security contributes to a specific proportion
of the total risk σ :

(SW)i
σi = bi σ → Wi = bi σ . (5.90)
σ
Example 5.3.1. Uncorrelated Portfolio

In the simplest case where the covariance matrix is diagonal and the assets are
uncorrelated, we get:

Wi SiiWi = bi σ 2

bi (5.91)
Wi = √ σ 2 .
Sii
Normalizing it such that ∑n Wn = 1, we obtain:

√ bi σ 2
Sii
wi = √
b
∑n Snnn σ 2

!−1 (5.92)
r
bn Sii
= ∑ .
n bi Snn

For assets that show some level of correlation we can write the risk budget equa-
tion as [126]:

(SW)i bi
= σ. (5.93)
σ Wi
Or in matrix notatione :

ea b is the Hadamard15 product between vectors a and b.


Portfolio Theory 143

SW
=b Mσ , (5.94)
σ
where:
T
M = W1−1 W2−1 . . . WN−1 ,

 T (5.95)
b = b1 b2 . . . bN .
Making X = W/σ e Y = Mσ , it is possible to write:

SX = b Y. (5.96)
This, however, is the result of:

∇X 1/2XT SX − b · log(X) = 0
 

bn (5.97)
(SX)n − = 0. 
Xn
Therefore, the weights Xn can be found minimizing the function:

f (X) = 1/2XT SX − b · log(X), (5.98)


where the logarithmic term can be understood as a ‘weighted entropy’ [127] correc-
tion to the portfolio [128].
More recently, the hierarchical structure of portfolios has also been studied. This
is performed calculating the ultrametric ordering, a concept that is borrowed from the
theory of frustrated disordered systems [129, 130]. In short, an ultrametric space is a
metric space (see Sec. 8.1.1) where the triangle inequality is restricted to d(x, y) ≤
max{d(x, y), d(y, z)} for any two points x and y, where d(x, z) is the distance function
between x and z. This implies that there is no intermediate points between x and z, and
a random walk in an ultrametric space is non-ergodic [131]. This is an appropriate
way to describe hierarchical structures since the concept of ultrametricity is tightly
related to the concept of hierarchy.
Hierarchical trees can be used to represent ultrametric sets by calculating the dis-
tances between nodes. Computing the distances between all assets creates a complete
graph. This carries redundant information that can be eliminated if one uses a sub-
dominant ultrametric structure such as the minimum spanning tree (MST) [132–134].
The distance between assets is typically computed as the Euclidean distance between
their time series and the MST is computed using Prim’s algorithm [135].
Finally, agglomerative hierarchical clustering algorithms are used to create hierar-
chical clusters (dendrograms) [136]. In this algorithm, two clusters with the smallest
distance are permanently joined together forming a new one. This new cluster k has
a distance to the remaining clusters m given by:

dkm = αi dim + α j d jm + β di j + γ|dim − d jm |. (5.99)


144 NOTES

BCH
XLM XMR ETC

ADA
XTZ

DASH NEO
ETH
BTC

DOGE IOTA

EOS
XEM
TRX
ZEC LTC

1.384
1.080

0.980

0.764
0.665

0.460
ETH

BCH

DASH

XLM

XEM

DOGE
EOS

NEO
BTC

LTC

ZEC
ETC

XTZ
TRX

XMR

ADA

IOTA
Figure 5.8: Minimum spanning tree (top) and dendrogram (bottom) calculated for 17
different digital goods for a period of 105 minutes ending on 2019-08-12

The MST and the equivalent dendrogram calculated for a set of different digital
goods are shown in Fig. 5.8. We can see in this case that the MST separates the
digital goods in two major groups, one dominated by BTC and another dominated
by ETH.

Notes
1 Ludwig Heinrich Edler von Mises (1881–1973) Austrian economist, advisee of Eugen Böhm von

Bawerk, adviser of Oskar Morgenstern and Israel Kirzner among others.


2 Harry Max Markowitz (1927–) American economist, advisee of Milton Friedman and Nobel laureate

in 1990.
3 Giuseppe Ludovico de la Grange Tournier (1736–1813) Italian mathematician, advisee of Leonhard

Euler and adviser of Joseph Fourier and Siméon Poisson, among others.
4 William Forsyth Sharpe (1934–) American economist, unofficially advised by Harry Markowitz,

awarded the Nobel prize in 1990.


5 James Tobin (1918–2002) American economist, advisee of Joseph Schumpeter, adviser of Edmund

Phelps among others. He was awarded the Nobel prize in economics in 1981.
6 Frank Hyneman Knight (1885–1972) American economist, adviser of Milton Friedman, George

Stigler and James Buchanan among others.


7 Jack Lawrence Treynor (1930–2016) American economist.
8 John Wishart (1898–1956) Scottish mathematician, advisee of Karl Pearson.
9 Julian Karol Sochocki (1842–1927) Russian mathematician, and Josip Plemelj (1873–1967) Slovene

mathematician.
10 Freeman John Dyson (1923–2020) British mathematical physicist, advisee of Hans Bethe. Dyson was

awarded many prizes such as the Henri Pincaré Prize in 2012.


NOTES 145

11 Eugene Paul Wigner (1902–1995) Hungarian physicist, advisee of Michael Polanyi and adviser of

John Bardeen among others. Wigner was awarded many prizes, including the Nobel in physics in 1963.
12 Vladimir Alexandrovich Marčenko (1922–) and Leonid Andreevich Pastur (1937–) Ukranian mathe-

maticians.
13 Thomas Joannes Stieltjes (1856–1894) Dutch mathematician, advisee of Charles Hermite.
14 Carl Gustav Jacob Jacobi (1804–1851) German mathematician, adviser of Ludwig Otto Hesse among

others.
15 Jaques Salomon Hadamard (1865–1963) French mathematician, adviser of Maurice Fréchet and Paul

Lévy among others.


Criticality
6
By the end of the XVIII century, the French monarchy lead by Louis XIV was es-
sentially insolvent. His mandate was characterized by a concentration of power that
resulted in lengthy wars and financial misconducts. The Palace of Versailles, for in-
stance, costed billions to be built and that helped to deepen the country’s debt. In
order to finance these debts, Louis XIV endorsed the monetary ideas of John Law1 .
Law proposed to substitute gold, which was used as currency, for the creation of
paper money as a method to stimulate the economy and create revenue to cover the
monarchy’s debt. Although, his ideas were rejected in Scotland, Louis XIV embraced
them in France and created a central bank (Banque Générale Privée) to issue paper
money. Moreover, Law established the Mississippi company (the Company of the
West and the Company of the Indies) to monopolistically trade minerals and then
sold shares of this company in France to back the central bank.
The price of the shares rose quickly under the promise of high profits in Amer-
ica and this was working towards reducing the monarchy’s debt. However, investors
eventually perceived that the exploration of minerals in Mississippi was not so simple
and many tried to convert their shares in gold. Law adopted many restrictive policies
such as suspending the operation of banks for a few days and criminalized the sale
of gold. This only increased concerns that eventually created panic, bank run, stam-
pedes and riots. The end result was a massive crisis that made Law leave Paris in the
cover of the night leaving all his properties behind to pay creditors [137].
This is known today as the Mississippi bubble and is one of the first examples of
an economic bubble. One may ask, though, if all crises show any universality, or if
it is possible to predict when an economic collapse is approaching. We will try to
answer some of these questions in the following sections.

6.1 CRISES AND CYCLES


In order to study crises, first we must turn our attention to the production-possibility
frontier (PPF). This is a tool that allows us to see the relationship between the pro-
duction of two goods or the relationship between consumption and investment as
shown in Fig. 6.1.
The line shown in the figure indicates the efficient possibility. For example, con-
sider that production is at point X and a company wants to increase the production
of a good B. The production of a good A will have to be reduced because resources
will have to be taken and allocated to the production of good B. This illustrates the
definition of opportunity costa2 . Moreover, capital will be taken from the production
of an item to another according to a marginal rate of transformation.
Any point outside the efficient frontier (such as point q) is impossible to
be reached since it requires the overproduction of both items. Points inside the

a The total potential benefit of all alternatives that are discarded when one chooses some option.

DOI: 10.1201/9781003127956-6 147


148 Introduction to Econophysics

Consumption
y
Qty. A q
p

Qty. B Investment

Figure 6.1: Production-possibility frontier for the (left) production of two goods A
and B, and (right) relationship between consumption and investment
Consumption

Consumption

B'
A'

A A
B

Investment Investment

Figure 6.2: Production-possibility frontier for consumption × investment comparing


the growth of an economy where the agents (left) do not increase their savings vs.
(right) one where the agents increase their savings

possibility region (such as point p) are inefficient because it would be possible to


produce more of a good B for the production of the same quantity of a good A and
vice-versa.
The relationship between investmentb and consumption is also shown in Fig. 6.1.
The curves indicate an efficient frontier that expands due to economic growth. The
curve on the right hand side of Fig. 6.2 shows the dynamics of an economy where
the agents choose to consume less and increase their savings. When this happens,
the economy moves from point A to point B. The immediate consequence is that the
net savings available to investment increase and the economy grows at progressive
higher rates. This contrasts with the curve on the left hand side of the figure where
the economic growth is smaller due to less investment capital available.
The loanable funds model is a complementary tool that helps us understand the
dynamics of economic growth. This model is illustrated by a plot of interest rate as
a function of the volume of investment as shown in Fig. 6.3. The demand for funds
with high interest rates must be low, therefore the curve must decay as the volume
increases. On the other hand, the supply of funds with high interest rates must have
the opposite behavior.

b gross investment = depreciation + net investment.


Criticality 149

Supply of
funds

Interest rate
O1 Demand
O2 for funds

Investment Vol.
Figure 6.3: Loanable funds market: the shift from O1 towards O2 happens when the
agents adjust their temporal preference towards the future

Let’s see what happens when the agents adjust their temporal preference towards
the future. In order for the agents to be able to sell funds, they must lower interest
rates. This lowering of interest rates sends a signal to companies saying that funds
are affordable and consumers have savings. Investment is thus stimulated and the
effect in the model is a shift of the supply curve from O1 towards O2 because the
interest rate has to be lower for the same volume of funds. As it can be seen in the
figure, the quantity of loanable funds available for investment increases in agreement
with the previous analysis using the PPF.
Hayek’s triangles [138] is one last tool that we will use to explain this dynamics.
This is a graphical representation of the intertemporal production structure of an
economy. In order to understand the triangle shown in Fig. 6.4, consider a productive
system segmented in four stages: i) mining, ii) ore refining, iii) manufacturing of the
ore in a metallic part, and iv) selling of the metallic parts. The horizontal axis of the
triangle indicates the production stage of the productive arrangement, whereas the
vertical axis indicates the quantity of products produced at each stage.
When consumers adjust their temporal preference towards the future, the present
consumption drops and investment increases. We see a corresponding drop in the
price of money and an increase in the quantity of loanable funds in the loanable
funds model. Accordingly, this implies in the Hayek’s triangle that consumption has
lowered. Consequently sellings also drop and the capital is transferred to the initial
stages of production that are more immediate. Hence, the triangle shrinks vertically
and expands horizontally.
More funds available for investment signals the companies that consumers have
savings. Hence, investments are made and the economy grows. The increase in in-
vestment leads to an increase in the demand for funds, forcing the interest rate to
go back to a position near its original value. The overall effect is higher production
and consumption expanding the triangle both horizontally and vertically. This echoes
Say’s3 market law, which states that the value of goods that individuals can purchase
150 Introduction to Econophysics

3
Production 3

Consumption
1
1
2
Stage

Investment
Mi

Re

Ma

Se
nin

llin
nu
nin
g

fac

g
g

tu
r

Interest rate
ing
Consumption

3 1 3
O1
D2
1
2
O2
2 D1

Time Investment vol.

Figure 6.4: Hayek’s triangle relating to the production-possibility frontier and the
loanable funds model

equals the market value of those goods that these individuals can previously offer, or
in simpler words, in order to consume, people must produce first.
What happens if a government injects money in the economy through a monetary
stimulus? Initially, two things happen [139] as depicted in Fig. 6.5. Firstly, even if
there is no actual savings, the supply curve shifts towards the right because of the
credit expansion. Having more affordable credit, companies invest and expand their
businesses. This produces a shift in the demand curve. Consumers, for their part, stay
in the unaltered savings curve moving to a point of lower consumption.
This produces two competing effects in the production-possibility model. There
is a tendency of a clockwise movement because of the increase in production by the
companies that took credit. However, there is also a tendency for a counterclockwise
movement because of consumers that have less savings. The result is a point outside
the region of production possibility, which makes the economy unstable.
In Hayek’s triangle we see an expansion in the initial production stages because
of lower interest rates. On the other hand, higher consumption increases the height
of the triangle while keeping its base unaltered. This discrepancy causes the capital
not being allocated in the final production stages.
This situation becomes unsustainable since many enterprises do not find capi-
tal to complete their productions and many expanded businesses do not find buyers
once they complete their productions. What was initially a boom becomes a bust,
the economy becomes uncoordinated and goes into recession. This is known as the
Austrian business cycle theory (ABCT) [140]. Although there is some empirical ev-
idence (see, for example [141]) supporting this theory, it is also the object of many
Criticality 151

tion
ump
Production over
cons
ion tm e n
t
2

Consumption
pt inves
um over
ns
1

rco
2
e
ov
Stage

nt 3
tme
ves
rin
ove

Investment
Mi

Re

Ma

Se
nin

fin

llin
nu
ing
g

fac

g
tu
rin

Interest rate
g
Consumption

2 boom 1

2
1 3 bust 1 2

O1
O2 D1

Time Investment vol.

Figure 6.5: Austrian business cycle theory illustrated with Hayek’s triangle, the
production-possibility frontier and the loanable funds model

criticism. For instance, are crises always the result of malinvestment? Some early
agent-based models, for instance state that even portfolio insurance strategies have
the potential to cause crises [142]. Let’s see what physics has to tell us by analyzing
two topics: catastrophe theory and self-organized criticality.

6.2 CATASTROPHE THEORY


Most of the models we have seen so far are based on a normal distribution of returns,
but how can we model abrupt changes that happen in real situations? Here we will
discuss the catastrophe theory based on the works of Stewart4 [143] but developed
by Thom5 [144] and Zeeman6 . This theory gives a broad mathematical background
for physical theories that explain phase transitions such as that of Landau7 .
Consider a mapping f : M → R, where M is a smooth manifoldc . Consider also a
family of mappings F : M × N → R, where the parametrization N is a k-dimensional
smooth manifold. If F(x, 0) = f (x), ∀x, then we say that f is unfolded by the family
F.
A fold catastrophe is given by the unfolding:

V f (x) = x3 − ax, (6.1)

c An infinitely differentiable manifold, where manifold is a topological space (a set of points and their

neighborhoods that satisfy the axioms of emptiness, union and intersection) that is locally homeomorphic
to an Euclidean space.
152 Introduction to Econophysics

Vf Vf
a<0 a>0
unstable

x
x x

stable

Figure 6.6: Equilibrium points of the fold catastrophe as a function of the control
space. The two insets show the potential function for both a < 0 and a > 0

where V : C × X → R is a potential function (Lyapunov function8 ), C = {a : a ∈ R}


is a control space, and X = {x : x ∈ R} is a state space. Its catastrophe manifold is
the gradient of the potential function:

∇xV f (x) = 3x2 − a. (6.2)


The equilibrium points of the cusp catastrophe can be found by making its catastro-
phe manifold equal to zero:
r
a
∇xV f (x) = 3x2 − a = 0 → x = ± . (6.3)
3
For positive values of the control variable a there are two solutions, one stable
and another unstable. When a = 0 both solutions collapse into a single point called
bifurcation point or tipping point. For negative values of the control variable a, there
is no equilibrium point for the fold catastrophe and a physical system would exhibit
unpredictable behavior. This behavior is shown in Fig. 6.6.

6.2.1 CUSP CATASTROPHE


Let’s now consider the cusp catastrophe that is given by the unfolding:

Vc (x) = x4 − bx2 + ax, (6.4)


where the control space is given by C = {(a, b) : a, b ∈ R}. This is a stable potential,
since it is topologically invariant for any perturbation ε:

Vc (x; a, b, ε) = x4 − bx2 + ax + εx = Vc (x; a + ε, b, 0). (6.5)


Criticality 153

sta
M ble

unstable F x
sta
ble

â b

C
B

Figure 6.7: Catastrophe manifold (top) and the projection of the fold curve B in
the control space C (bottom); the dotted line shows a discontinuous path that jumps
between two stable states

Its catastrophe manifold, shown in Fig. 6.7, is given by:

∇xVc (x) = 4x3 − 2bx + a, (6.6)


which is a depressed cubic function. By moving on this manifold it is possible to
move between two stable states through a hysteresis loop.
The fold curve is the edge of a surface when the latter is observed from a given
direction. Mathematically, the fold curve for some direction z is the set of points on a
surface such that the tangent plane to the surface at some point contains the direction
z. The tangent plane to a point p, in turn, is the set of vectors tangent to this point
for curves on the surface that contain this point. Since, the catastrophe manifold is a
depressed cubic function, we can find the fold curve using Cardano’s9 discriminant:

D = 8b3 − 27a2 . (6.7)


The equilibrium frontier (bifurcation set) is found when D = 0. Also, when D < 0
there are three equilibrium points (two stable points and one unstable), whereas when
D > 0, there is only one stable solution. This behavior is illustrated in Fig. 6.8. Path
#2 shows a spontaneous symmetry breaking behavior where the system moves from
one to two stable solutions.
Since parameter a controls the obliquity of the potential, it is known as asymme-
try factor. Parameter b determines the bifurcation, hence, it is known as bifurcation
factor.

6.2.2 CATASTROPHIC DYNAMICS


The cusp catastrophe has been used to model many socioeconomic phenomena, such
as the failure of tax systems [145] and economic crises [146, 147]. Consider, for
instance, the closing values of the S&P500 index shown in Fig. 6.9. Until approxi-
mately the end of February/2019, the movement of the closing price seemed to follow
154 Introduction to Econophysics

Path #2

a
3 C

Vc(x)
b

1
2 B

x
Path #1 Path #3
Vc(x)

Vc(x)
x x

Figure 6.8: Solid black line B: the projection of the fold line on the control space
C. There are three paths indicated on this surface. The first one follows exactly the
projection of the fold curve. The second path starts at (0, 0) and moves towards b̂
always within the bifurcation set. The third path moves in the direction from −â to
â. Five potentials are stacked vertically from bottom to top for each path

a geometric Brownian motion, but suddenly it dropped more than a thousand points
in less than a month. It is intuitive then to try to model this movement with:

dX = −∇X Vc (X)dt + σ dW
(6.8)
= −(4X 3 − 2bX + a)dt + σ dW,
where Vc is the cusp potential function and σ 2 is the variance per time unit.
The asymmetry and bifurcation factors can be written as a function of exogenous
parameters Yn :
N
a = a0 + ∑ anYn
n=1
(6.9)
N
b = b0 + ∑ bN Yn ,
n=1

where an and bn are parameters that can be estimated using the method of moments
[148]. Observe that Eq. 6.8 is a gradient flow subject to white noise. We can use C.23
to find the equivalent Fokker-Plank representation:
 
∂t P(X,t) = ∇X (P(X,t)∇X Vc (X)) + 1/2∇2X P(X,t)σ 2 (6.10)
In order to find the steady state solution, let’s try the ansatz:
Criticality 155

Closing Values

Trend
1 2 1 2 3 4 5
–1 –1 –0 –0 –0 –0 –0
19 19 20 20 20 20 20
20 20 20 20 20 20 20

Date

Figure 6.9: Dark curve: Closing values of the S&P500 index between 2019/10/10
and 2020/05/17, light curve: Trends obtained from Google Trends for the keyword
‘coronavirus’ for the same period

P(X) = ekVC (X) . (6.11)


For this density we have:

∂ P(X) ∂VC (X)


= kekVC (X)
∂X ∂X
∂VC (X)
= kP(X)
∂X
2 (6.12)
∂ P(X) ∂VC (X) ∂V (X) ∂ 2VC (X)
2
= k2 ekV (X) + kekV (X)
∂X ∂X ∂X ∂ X2
∂VC (X) ∂VC (X) 2
∂ VC (X)
= k2 P(X) + kP(X) .
∂X ∂X ∂ X2
The time-independent Fokker-Planck equation is:

σ 2 ∂ 2 P(X)
 
∂ ∂VC (X)
P(X) =−
∂X ∂X 2 ∂ X2
(6.13)
∂ P(X) ∂VC (X) ∂ 2VC (X) σ 2 ∂ 2 P(X)
+ P(X) 2
=− .
∂X ∂X ∂X 2 ∂ X2
Substituting the results from Eq. 6.12 in Eq. 6.13:
156 Introduction to Econophysics

∂VC (X) ∂VC (X) ∂ 2VC (X)


kP(X) + P(X) =
∂X ∂X ∂ X2
σ2 2 ∂ 2VC (X)
 
∂VC (X) ∂VC (X)
− k P(X) + kP(X)
2 ∂X ∂X ∂ X2
∂VC (X) ∂VC (X) ∂ 2VC (X) σ 2 2 ∂VC (X) ∂VC (X) ∂ 2VC (X)
 
k + 2
=− k +k
∂X ∂X ∂X 2 ∂X ∂X ∂ X2
(6.14)
Therefore, by comparing both sides we see that k = −2/σ 2 and obtain:

   
1 2VC (X) 1 2
Z
P(X) = exp − = exp − 2 ∇X VC (X)dX , (6.15)
Z σ2 Z σ

where Z is the partition function. This steady state solution is the known canonical
Gibbs10 distribution [73]:
Consider now a polynomial function g(x, y). We can write:
"
hX iY j g(X,Y )i = xi y j g(x, y) fX,Y (x, y)dxdy
" (6.16)
= xi y j g(x, y) fY |X (y|x) fX (x)dxdy,

where fA is the density of variable A.


Let’s also consider that the conditional density can be written as:
 Z 
fY |X (y|x) = ϕ(x) exp − g(x, y)dy , (6.17)

where ϕ(x) is a normalizing function. Note that this is exactly the situation that we
have if we make g(x, y) = 2∇X VC (X)/σ 2 .
It is possible to rewrite Eq. 6.17 as:

 ∇Y fY |X (y|x)
g(x, y) = −∇Y log fY |X (y|x) = . (6.18)
fY |X (y|x)
Therefore, we can rewrite Eq. 6.16 using Fubini’s theorem as:
Z Z 
i j i j
hX Y g(X,Y )i = x fX (x) y ∂ fY |X (y|x) dx. (6.19)

The integral within brackets can be solved by parts:


Z Z

y j ∂ fY |X (y|x) = y j fY |X (y|x) −∞
− j y j−1 fY |X (y|x)dy. (6.20)

If fY |X (y|x) → 0 for y → ±∞, then:


Criticality 157

Z Z
y j ∂ fY |X (y|x) = − j y j−1 fY |X (y|x)dy, (6.21)

and Eq. 6.19 becomes:


"
hX iY j g(X,Y )i = − j xi y j−1 fX (x) fY |X (y|x)dydx
"
(6.22)
= −j xi y j−1 fX,Y (x, y)dxdy

= − jhX iY j−1 i.
For a = a0 + a1Y and b = b0 + b1Y , we have:
2  3 
g(X,Y ) = 4X − 2(b0 + b1Y )X + a0 + a1Y . (6.23)
σ2
Applying this result into Eq. 6.22, we get:

hX iY j ia0 + hX iY j+1 ia1 − 2hX i+1Y j ib0 − 2hX i+1Y j+1 ib1 +
j (6.24)
+ hX iY j−1 iσ 2 = −4hX i+3Y j i
2
Applying Eq. 6.24 to different (i, j) pairs, it is possible to obtain five different
equations. The following snippet shows how to implement this in Python. For this
code, we need some extra libraries such as pandas for data handling and datetime:

import numpy as np
import matplotlib.pyplot as pl
import pandas_datareader as pdr
import pandas as pd

from datetime import datetime


from scipy.stats import norm

We start by obtaining the datasets and interpolating the missing values:


158 Introduction to Econophysics

s = pdr.get_data_yahoo(symbols=“^GSPC”,start=datetime(2019,10,4),
end=datetime(2020,5,27))
idx = pd.date_range(‘10-04-2019’,‘05-27-2020’)
s.index = pd.DatetimeIndex(s.index)
s = s.reindex(idx)
s = s.interpolate()

dt = pd.read_csv(“coro.csv”,parse_dates=[‘Dia’])

Next, we normalize the data for better numerical accuracy. Also, we create some
variables that will be used to compute Eq. 6.24:

ts = s[‘Adj Close’]
tc = dt[‘coronavirus’]

m = np.mean(ts)
s = np.std(ts)
ts = [(e-m)/s for e in ts]

m = np.mean(tc)
s = np.std(tc)
tc = [(e-m)/s for e in tc]

m = [[0 for a in range(5)] for b in range(5)]


p = [[0 for a in range(5)] for b in range(5)]
n = [0 for a in range(5)]
c = [0,0,1,1,0,3] # coefficients on X^(i+c)
d = [0,1,0,1,-1,0] # coefficients on Y^(j+d)

i = [0,0,1,1,0]
j = [0,1,0,1,2]

The averages hX aY b i are then computed:


Criticality 159

ac = 0
for X,Y in zip(ts,tc):
for a in range(5):
n[a] = n[a] + (X**(i[a]+3))*(Y**j[a])

for b in range(5):
m[a][b] = m[a][b] + (X**(i[a]+c[b]))*(Y**(j[a]+d[b]))

ac = ac + 1

# Compute averages
for a in range(5):
p[a] = [1,1,-2,-2,0.5*j[a]]
n[a] = n[a]/ac

for b in range(5):
m[a][b] = m[a][b]/ac

The coefficients a and b can now be found. We also obtain the fitting:

M = [[m[a][b]*p[a][b] for b in range(5)] for a in range(5)]


b = [[-4*n[a]] for a in range(5)]

coef = np.linalg.solve(M,b)

X = ts[0]
xsp = []
dt = 1E-3
for Y in tc:
a = ao + a1*Y
b = bo + b1*Y
X = X + (4*X**3 - 2*b*X + a)*dt + norm.rvs(scale=np.sqrt(sg)*dt)
xsp.append(X)

pl.plot(idx,ts)
pl.plot(idx,xsp)
pl.show()

The result for our example is shown in Fig. 6.10. Once the fitting is obtained, it
160 Introduction to Econophysics

Normalized Values

11 12 01 02 –0
3 04 05
19– 19– 20– 20– 20 20– 20–
20 20 20 20 20 20 20
Date

Figure 6.10: Closing values of the S&P500 index and a fitting using catastrophic
dynamics

is possible to study different dynamics by comparing their coefficients. The good


visual fitting observed in this particular example suggests that crises can be induced
exogenously by variables other than monetary policies.

6.3 SELF-ORGANIZED CRITICALITY


We have just seen that crises may be induced exogenously. However, can a market
walk by itself towards a crisis? In order to try to answer this question, we will analyze
a sketch model that exaggerates this effect producing a self-organized criticality. But
first, we must take a look at cellular automata, which is the tool that allows us to
study this model.

6.3.1 CELLULAR AUTOMATA


An automaton is a tuple A = (Z, S, N, f ), where Z is a lattice of dimension d com-
posed of discrete cells, S = {s1 , . . . , sr } is a finite set of cell states (or values),
f : Sm → S p is a transition function (or update rule), and N = (n1 , . . . , nm ) is a fi-
nite neighborhood. The two 11
r
 mostd common neighborhoods are the von Neumann 12
given the set NV N (n0 ) = nk : ∑i=1 |(nk )i − (n0 )i | ≤ r , and the Moore given by
the set NMr (n ) = {n : |(n ) − (n ) | ≤ r, ∀i = 1, . . . , d}. These two neighborhoods
0 k k i 0 i
are shown in Fig. 6.11.
The configuration of the automaton is described by a function c : Z → S that
assigns a state to each cell. The future state of a cell is given by c(n0 )t+1 =
f ({nm |nm ∈ N(n0 )}),
Criticality 161

Figure 6.11: Left column: Von Neumann neighborhood, right column: Moore neigh-
borhood, top row: r = 1, bottom row: r = 2; in all cases n0 is the block at the center

One of the most celebrated automaton is Conway’s13 game of life [149]. Given a
short set of simple rules, this automaton is capable of producing elaborated emergent
self-organized patterns [150, 151]. Moreover, it allows us to start thinking physics in
terms of computable information [152].
The Bak14 -Tang15 -Wiesenfeld16 (BTW) model [153] for self-organized criticality
consists of an automaton equipped with a Z ⊂ Z2 lattice, states S = {1, 2, 3, 4} and a
von Neumann neighborhood. The transition rule consists of randomly picking a cell
n0 and increasing its state by one:

c(n0 )t+1 = c(n0 )t + 1. (6.25)


Alternatively, one can start with a single pile of all elements that will be processed
by the automaton and let it relax to its stable configuration.
If a cell has a state bigger than a threshold T corresponding to the coordination
number of the lattice, the cell is said to become unstable and its state is reduced by
the coordination number. Hence,

c(n0 )t+1 = c(n0 )t − T


(6.26)
c (n)t+1 = c (n)t + 1, where n ∈ NVr N (n0 ).
When this situation occurs, the states of each of its neighbors are increased by
one in a process known as toppling. If these neighbors also become unstable then
the same procedure is executed to their neighbors recursively in a process referred to
as avalanche. If a cell topples to the boundary of the lattice, it is lost. As illustrated
in Fig. 6.12, the order in which the cells are chosen to topple does not change the
final stable configuration of the grid. Hence, this model is known as Abelian sandpile
162 Introduction to Econophysics

1
1 5
1 1 1
4 4 or 1 1 1 1
1 1 1
5 1
1

Figure 6.12: Starting with two unstable cells, the final stable grid configuration does
not depend upon the order in which the cells are toppled in the Abelian sandpile
model

model.

Abelian Group

A group can be defined as a set A equipped with a binary operation


 such that for any two elements a, b ∈ A → a  b ∈ A (closure).
Also, this operation has to satisfy three axioms:

Associativity: ∀a, b, c ∈ A → (a  b)  c = a  (b  c)
Identity: ∃e ∈ A|∀a ∈ A, e  A = A  e
Invertibility: ∃b ∈ A|∀a ∈ A, a  b = b  a = e

if this operation also satisfies:

Commutativity: ∀a, b ∈ A → a  b = b  a,

then we say that this is an Abelian groupa .

a Niels Henrik Abel (1802–1829) Norwegian mathematician.

6.3.2 SIMULATIONS
The Abelian sandpile model can be simulated with the following snippet:
Criticality 163

L = 500
grid = np.zeros((L,L))

xo = L » 1
yo = L » 1
grid[yo,xo] = 3E5

while(np.max(grid) >= 4):


# Find unstable cells
to_topple = (grid >= 4)

# Toppling
grid[to_topple] -= 4
grid[1:,:][to_topple[:-1,:]] += 1
grid[:-1,:][to_topple[1:,:]] += 1
grid[:,1:][to_topple[:,:-1]] += 1
grid[:,:-1][to_topple[:,1:]] += 1

# Spillover
grid[0,:] = 0
grid[L-1,:] = 0
grid[:,0] = 0
grid[:,L-1] = 0

The result of this simulation is shown in Fig. 6.13. It is interesting to observe the
recurring patterns in the figure. The system spontaneously evolves (self-organizes)
to this critical state where the correlation length of the system diverges producing
a fractal geometry. The correlation as a function of the interaction step is shown in
the data collapse of Fig. 6.14. The finite size scaling was performed dividing the
correlation length by LC , where C was estimated to be around 2. Exactly the same
was done with the x-axis. Until a certain number of interaction steps, the grid is
dominated by the initial column. After that point, the correlation length depends on
the interaction step as a power law until it eventually reaches a stable value (ξo )
because of the finite size of the grid. The stable correlation length as a function of
the grid size is shown in the inset and is also a power law, which indicates that it
diverges for infinite grid sizes.
The correlation length can be calculated with the following snippet using the
Wiener-Khinchin theorem (see Sec. 2.4.1.1):
164 Introduction to Econophysics

Figure 6.13: Simulation of the Abelian sandpile model on a 500×500 grid and an
initial pile of 3 × 105 elements

L
Correlation Length - ξ

Occurrences
104
ξo

103

102 3 4 5 6 7 8 9
L×10

Interaction Step Size of Avalanche

Figure 6.14: Left: Data collapse for the correlation length (ξ ) as a function of the
interaction step for different lattice sizes. The inset shows the stable correlation (ξo )
as a function of the lattice size. Right: Number of occurrences as a function of the
size of avalanches using a grid size of 80 units
Criticality 165

def cor(M):
L = np.shape(M)[0]»1

F = np.fft.fft2(M)
S = F*np.conj(F)/np.size(M)
T = np.fft.ifft2(S).real

y = np.log(T[L,1:L])
x = range(len(y))

return 1.0/abs(np.cov(x,y)[0][1]/np.var(x))

Another elegant way to simulate this automaton is using recurrence as shown in


the following snippet:

def place(array,x,y,L):
ac = 0
if (x >= 0 and x < L) and (y >= 0 and y < L):
array[x][y] = array[x][y] + 1

# Toppling
if array[x][y] >= 4:
ac = ac + 1
array[x][y] = array[x][y] - 4
array,t1 = place(array, x+1, y, L)
array,t2 = place(array, x-1, y, L)
array,t3 = place(array, x, y+1, L)
array,t4 = place(array, x, y-1, L)
ac = ac + t1 + t2 + t3 + t4
return array, ac

Using this approach, it is possible to easily find the number of avalanches and the
mass they move. Also, the snippet considers a constant pouring of grains distributed
according to a binomial distribution:
166 Introduction to Econophysics

def dist(L):
sand = [[0 for n in range(L)] for m in range(L)]
massa = []
tops = [0 for n in range(50000)]

N = 500*L+100
for it in range(N):
x = np.random.binomial(L,0.5)
y = np.random.binomial(L,0.5)
sand,t = place(sand, x, y, L)

massa = np.append(massa, np.mean(sand))


tops[t] = tops[t] + 1

return massa, tops

The result of this simulation is shown in Fig. 6.14 for a grid size of 80 units.
The dotted line indicates that the distribution of avalanches also follows a power
law. This resembles experimental evidence found in earthquakes. For instance, it has
been observed that the rate of secondary quakes (or replicas) after a main seismic
event follows Omori’s17 law [154]:
k
n(t) = , (6.27)
c+t
where k and c are adjustable constant. The quake counting is then given by:
Z t Z t
k
N(t) = n(t)dt = dt
0 0 c+t
= k log(c + t)|t0 = k [log(c + t) − log(c)] (6.28)
 t
= k log 1 + .
c
Omori’s law is generalized by Utsu’s18 law [155] as:
k
n(t) = , (6.29)
(c + t) p
where p ranges between 0.7 and 1.5. The accumulated number of events is given by:

c1−p − (t + c)1−p
N(t) = k , (6.30)
p−1
for p , 1. For p > 1, N(t → ∞) = k/ (p − 1)c p−1 , and for p ≤ 1, N(t → ∞) → ∞.
 
NOTES 167

Another power behavior that appears in seismology is the Gutenberg19 -


Richter’s20 [156] law. This law relates the number N of events with magnitude equal
or higher than a value M:

N = 10a−bM , (6.31)
where a and b are constants.
You might be asking yourself what seismology has to do with economics, but,
surprisingly, many economic crises seem to mimic the behavior of earthquakes and
follow these laws! (see for instance: [63], [157], and [158]) In other models, the
returns are assumed to follow the size s of avalanches caused by agents responding
to some stimulus:

log (Pt ) − log (Pt−1 ) ∝ εt s(t), (6.32)


where εt is a Wiener process. Hence, the distribution of returns follows the distribu-
tion of avalanches. The latter has a power-law behavior and, consequently, shows an
absence of autocorrelation.

Notes
1 John Law (1671–1729) Scottish economist.
2 Term developed by Friedrich Freiherr von Wieser (1851–1926) Austrian economist, advisee of Eugen

Böhm Bawerk and adviser of Luwig von Mises, Friedrich Hayek and Joseph Schumpeter.
3 Jean-Baptiste Say (1767–1832) French economist.
4 Ian Nicholas Stewart (1945–) British mathematician.
5 René Frédéric Thom (1923–2002) French mathematician.
6 Erik Christopher Zeeman (1925–2016) British mathematician.
7 Lev Davidovich Landau (1908–1968) Russian physicist, advisee of Niels Bohr and adviser of Alexei

Alexeyevich Abrikosov and Evgeny Lifshitz. Landau won many prizes including the Nobel prize in
physics in 1962.
8 Aleksandr Mikhailovich Lyapunov (1857–1918) Russian mathematician, advisee of Pafnuty Cheby-

shev.
9 Geronimo Cardano (1501–1576) Italian polymath.
10 Josiah Willard Gibbs (1939–1903) American polymath, adviser of Irvin Fisher and Lee de Forst,

among others.
11 John von Neumann/Margittai Neumann János Lajos (1903–1957) Hungarian mathematician.
12 Edward Forrest Moore (1925–2003) American mathematician.
13 John Horton Conway (1937–2020) English mathematician winner of many prizes including the Pólya

Prize in 1987.
14 Per Bak (1948–2002) Danish physicist who coined the term self-organized criticality.
15 Tang Chao (1958–) Chinese physicist, advisee of Leo Kadanoff.
16 Kurt Wiesenfeld, American physicist.
17 Fusakichi Omori (1868–1923) Japanese seismologist.
18 Tokuji Utsu (1928–) Japanese geophysicist.
19 Beno Gutenberg (1889–1960) German seismologist.
20 Charles Francis Richter (1900–1985) American physicist.
Games and Competitions
7
Games are mathematical models that describe the interactions among rational play-
ers that try to maximize their utility functions. Game theory, the study about those
models, finds applications in many fields such as economics, political science, so-
ciology, and even philosophy. This is an old field that dates back to the XVIII cen-
tury, but a more formal description was only given in 1838 by Cournot in a treatise
about duopolies [10]. On the other hand, the unification of many concepts in game
theory appears only recently in 1928 in books by von Neumann [159] and Morgen-
stern1 [160]. In this chapter we will study some aspects of game theory that can be
applied to economic problems through the study of some examples.

Utility

Consider the game of flipping a coin. If it falls tails you double the
prize (you start with $1) and the game continues until you obtain
heads. How much would you be willing to pay to play this game?
Considering that the agents are perfectly rational, they would choose
to pay any amount because the expected prize of this game is:
∞  n
1 1 1
P = 2× +4× +... = ∑ 2n → ∞. (7.1)
2 4 i=1 2
Nonetheless, only a few individuals would pay more than a few
dollars to play it. This is known as the Saint Petersburg paradox2 .

The explanation for this behavior lies, according to Daniel


Bernoulli, in the utility that the good or service renders, instead of
its rational price. Certainly, people value money, hence the utility
function has to increase as a function of quantity. Also, it would be
strange if a small extra amount of money would suddenly lead to a
jump in utility. Therefore, it also has to be continuous. Finally, after
you have a significant quantifiable wealth, a few extra dollars would
not cause a significant increase in utility and the curve must flatten
for sufficient big amounts. This is known as diminishing marginal
utility. Functions like the logarithm show those properties.

Based on this description, von Neumann and Morgenstern stated


that, in the presence of risk, rational agents act to maximize their
expected value of utility [160].

DOI: 10.1201/9781003127956-7 169


170 Introduction to Econophysics

7.1 GAME THEORY THROUGH EXAMPLES


7.1.1 THE EL FAROL BAR PROBLEM
This is a problem proposed in 1994 by William Arthur3 [161]. Suppose that N people
go out to a bara regularly every Thursday night. If many people decide to go to the
same bar at a specific night, the experience of these agents will not be so great (let’s
consider that their experiences are solely dictated by the number of people at the
bar).
Given a significant big number of agents, it is not possible for them to communi-
cate with each other to check who is going to the bar. Furthermore, the agents cannot
know all direct and indirect consequences of their actions. One player deciding to go
to the bar, may affect another player’s decision. As Hayek pointed out, knowledge is
dispersed [5]. Therefore, they do not have complete access to the information about
the optimization task (logical omniscience) [162], hence a perfect rational strategy
cannot be composed. Conversely, the agents can make some inductive reasoning and
use their experience to judge whether it is a good strategy to go to the bar or not.
Friedman4 argued that the agents behave as if [163] they were rational trying to
maximize their utility but under a set of constraints that force the adoption of imper-
fect rational choices.
This breaks the concept of homo economicus developed by many neoclassical
authors such as Mill5 [164], Jevons6 [165] and Knight [113]. They considered self-
interested agents trying to maximize their utility functions that was perfectly known
by all agents. Rather, they have a bounded rationalityb [16]. Their actions still have
some level of rationality, but are mostly based on heuristics. Even worse, some of
these heuristics may include biases such as imitation, preferential attachment and
satisficing. The latter, for instance, consists of trying different options until finding
one that reaches a specific threshold.
Kahneman and Tversky developed a cumulative prospect theory [166] which tries
to clarify how humans make choices under this complex scenario. According to this
theory, humans may adopt references and compare possible results of their actions
against this reference. The further the outcomes of a strategy deviates from these
references (for good or worse) the more the sensitivity of these agents reduces. Also,
the agents tend to be more sensitive to losses than gains of the same magnitude, and,
often, underweight high-probability events and overweight low-probability events.
We will proceed with a mathematization of the El Farol problem, known as minor-
ity game. From there, we will formalize game theory and apply it to some economic
problems. The chapter will then close with another approach for competitions known
as the prey-predator model.

a The bar chosen by Arthur was the El Farol located in Santa Fe, NM. Hence, this problem was popu-

larized as ‘the El Farol Bar problem’.


b Proposed by Herbert Simon as described in Chapter 1.
Games and Competitions 171

7.1.1.1 Minority Game


The minority game7 [167] is a mathematization of the classic El Farol Bar problem.
Here, however, we will map the same game structure to the spot market [168], where
the agents can either buy (−1) or sell (+1) a specific stock.
As in earlier models [169], the game begins with an odd number N of agents that
have a memory about the past m events related to that stock. Therefore, there is a
combination of N m arrangements for their past actions. Furthermore, since they can
m
only either buy or sell the stock, there are 2N possible strategies. Each agent have
a repertoire of s strategies. Thus, we will create a class for these agents with a con-
structor that initializes the board under this scenario:

class agent:
def __init__(self,m,s):
self.m = m
self.s = s
self.r = [rd.choices([-1,1],k=2**m) for a in range(s)]
self.p = [rd.random() for a in range(s)]

def update_points(self,pos,W,A,N):
for strategy in range(self.s):
r_a = self.r[strategy]
self.p[strategy] = self.p[strategy] - (r_a[pos]*A)/(2**self.m)

def a(self,pos):
winning_strategy = np.argmax(self.p)
r_beta = self.r[winning_strategy]
return r_beta[pos]

We will use NumPy for numerical calculations, PyPlot for plotting, and Random
for pseudo-random numbers. Therefore, we must include:

import numpy as np
import random as rd
import matplotlib.pyplot as pl

At each round t, each agent i takes an action ai [t] = +1 ∨ −1 based on the


memory about the past winning groups and his or her strategy book. For example,
if the strategy book of an agent is given by Tab. 7.1 and the past winning groups
172 Introduction to Econophysics

Table 7.1
A Possible Strategy Book for an Agent with Two Strategies

History Strategy #1 Strategy #2


−1,−1,−1 −1 −1
−1,−1,+1 −1 +1
−1,+1,−1 +1 −1
−1,+1,+1 −1 −1
+1,−1,−1 +1 +1
+1,−1,+1 −1 +1
+1,+1,−1 −1 +1
+1,+1,+1 +1 −1

were −1, +1, −1, then the agent will either sell the stock (ai [t] = +1) according to
his strategy #1 or buy the stock (ai [t] = −1) according to his strategy #2. Let’s say
that his strategy #2 has been giving better predictions. Therefore, the ith player buys
the stock (ai [t] = −1). This is executed by the function a in the agent class. In our
code, self.p is a vector whose elements are the points accumulated by each strategy
and rβ is the strategy with the best performance. The variable pos gives the line in
the strategy book corresponding to the memory. The overall scheme of the minority
game is shown in Fig. 7.1.
After all agents have placed their bids, the minority group is elected as the win-
ning group. For instance, if most agents decide to sell the stock but a minority decides
to buy it, the latter will benefit from low prices resulting from the competition among
sellers. This is computed in the function game below as W [t] = −sign (∑i ai [t]). This
function is initialized with the agents and some random memory bits. Then 500
rounds are executed wherein µ is the line position of the memory, Aspace is a space
with the action of all players, and A is their sum. After the winning group is com-
puted, it is pushed to the memory, and the scores of all strategies of all players are
updated. This is done by the function update_points in the agent class. It uses the
linear payoff scheme: pi,s [t + 1] = pi,s [t] − ai,s [t] · A[t]/2m , where the ‘s’ index indi-
cates the strategy while ‘i’ indicates the agent. This constitutes a reinforced learning
structure where the agents adjust their behaviors to recent events.
Games and Competitions 173

memory

−1 +1 −1 −1 +1

A[t]

feedback
ai[t] −1 +1 −1

+1
minority rule

Figure 7.1: Overall scheme of a minority game: Agents take actions based on the
memory of the game; the minority group wins and this information is fed back to the
history of the game

def game(N,numStrategies,memory):
player = [agent(memory,numStrategies) for i in range(N)]
bits = rd.choices([-1,1],k=memory)

# Loop over interactions


At = []
S = [0 for i in range(2**memory)]
P = [0 for i in range(2**memory)]
for it in range(500):
# Calculate attendance
mu = val(bits)
A_space = [player[i].a(mu) for i in range(N)]
A = np.sum(A_space)
At.append(A)

# Winning Group
W = -np.sign(A)
bits = push(bits,W)

# Update virtual score


for i in range(N):
player[i].update_points(mu,W,A,N)
174 Introduction to Econophysics

Finally, we calculate the information still inside this function and return the re-
sults:

# Calculate information
for nu in range(2**memory):
if (mu == nu):
S[nu] = S[nu] + A
P[nu] = P[nu] + 1

# Complete calculation of information


H=0
for n in range(2**memory):
if (P[n] > 0):
H = H + (S[n]/P[n])**2

return np.var(At), H/2**memory

In this snippet, we used a function val that returns an integer for a binary sequence:

def val(x):
r=0
for i in range(len(x)):
if (x[i] == 1):
r = r + (1 << i)
return r

Also, we need to keep a memory of the winning group. Data is entered into this
list via a push function:
Games and Competitions 175

N=31 50 m=7
N=51
-50
N=71
m=2
100

-100

Better-than-random regime

Figure 7.2: Normalized variance of A as a function of the control parameter α for


different number of agents; the inset shows typical progressions of A for different
memory sizes

def push(v,x):
for i in range(len(v)-2,-1,-1):
v[i+1]=v[i]
v[0] = x

return v

The variance of A (fluctuations of A around its mean) normalized by the number


of agents calculated at the end of a game with 500 rounds is shown in Fig. 7.2 for
agents with only two strategies. The independent variable is the control parameter
α = 2m /N, which produces the data collapse shown in the figure for any number of
agents.
If the agents took
 completely random choices, we would expect a volatility of A
always around 1/2 (−1 − 0)2 + (1 − 0)2 = 1. For low values of the control parame-
ter, though, the volatility is very large, implying that the losing group is much larger
than N/2. However, as α increases, the volatility goes below the perfect random
regime, suggesting that the agents are capable of achieving coordination and reach
a point where the least resources are wasted (around αc ≈ 0.5). Large values of α
leads asymptotically to the perfect random regime.
In the region where α < αc , the minority group is unable to predict the outcome
of the game based on its history. Therefore, this corresponds to an efficient market
176 Introduction to Econophysics

Symmetric Asymmetric
Phase Phase

Figure 7.3: Normalized information for minority games with different number of
agents as a function of the control parameter. Data was averaged with 20 samples. A
dotted line is an interpolation of the data added to guide the eye

regime. The opposite happens for α > αc . In this region, the agents can use effec-
tively the information available to them to coordinate and predict the outcome of
the game. This corresponds to an inefficient market regime. It is possible to further
explore this phase transition by studying its predictability [170], defined as the nor-
malized sum of conditional expectations:
m
1 2
H= ∑ hA|µ = νi2 ,
2m ν=1
(7.2)

where µ is the memory of the past m results.


In the efficient market regime, the conditional expectation of A must be zero in-
dependent on µ since both minority groups have the same likelihood. Therefore, this
regime is also known as the symmetric phase. In the inefficient market regime, one
minority group is more likely than another. Therefore, H , 0 and this implies that
there is information available for the agents in A. Accordingly, this is known as the
asymmetric phase. In case any new agent enters the game, he can exploit, and con-
sequently reduce the information contained in A. As the control parameter increases,
though, the system is carried towards the perfect random regime and we should see
the information moving towards zero. This behavior is shown in Fig. 7.3.

7.1.2 COOPERATIVE GAMES


A game can be cooperative (or coalitional) if binding agreements are possible and
the agents can benefit by cooperating. A game G is described by the ordered set
Games and Competitions 177

Table 7.2
A Cooperative Game Where Agents Want to Buy the Biggest Field in
the Market, but They Have a Fixed Money Supply

Field size [acres] Price Player Money


5 $70,000 1 $40,000
7.5 $90,000 2 $30,000
10 $110,000 3 $30,000

(N, v) where N = {1, . . . , number of players} is the set of agents and v : 2N → R is a


characteristic function that maps every coalition of agents to a payoff.
Let’s consider, for instance, a game with three agents. The power set of N is
given by {0,/ {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}. The characteristic func-
tion maps each subset to a specific value. Let’s say these three players decide to
buy a common good, the biggest field available in the market to cultivate lemons, for
example. There are also three small fields being advertised on the market with sizes
and prices described in Tab. 7.2. On the other hand, the players have a limited money
supply also shown in the table. Alone, no player can purchase any of these fields.
Players #1 and #2 together can afford field #1 and so does player #1 together with
player #3. Player #2 together with player #3 cannot purchase any field. All players
together can purchase the second field. Therefore, we have the results indicated in
Eq. 7.3.

/ = v({1}) = v({2}) = v({3}) = 0


v(0)
v({1, 2}) = v({1, 3}) = 5
(7.3)
v({2, 3}) = 0
v({1, 2, 3}) = 7.5.
We say that the game is monotone if v(C2 ) ≥ v(C1 ), ∀ C1 ⊆ C2 , as in our example.
Also, a game is said to be superadditive if v(C1 ∪C2 ) ≥ v(C1 ) + v(C2 ), ∀ C1 ∩C2 = 0, /
again as in our example. In this case, two coalitions can merge without any loss and
form a grand coalition. For example, {2} can merge with {1, 3} to form {1, 2, 3}. The
payoffs before merging were 0 and 7.5. After merging, however, the grand coalition
has a payoff of 7.5.
The outcome of the game is given by the ordered pair (S, x), where S =
(C1 , . . . ,Ck ) is the coalition structure, the partition of N into coalitions such that
∪ki=1Ci = N and Ci ∩ C j = 0, / ∀ i , j, and x = (x1 , . . . , xn ) is the payoff vec-
tor, which distributes the value of each partition such that xi ≥ 0, ∀ i ∈ N, and
∑i∈C xi = v(C), ∀ C ∈ S.
In our example, an outcome could be (({1, 2, 3}, {1, 3}), (2, 3, 2.5, 2, 3)). Note that
2 + 3 + 2.5 = 7.5 = v({1, 2, 3}) and 2 + 3 = 5 = v({1, 3}). If xi ≥ v({i}), ∀ i ∈ N
178 Introduction to Econophysics

Table 7.3
Possible Permutations for the Cooperative Game of Table 7.2

π Sπ (1) Sπ (2) Sπ (3)


π 1 = (1, 2, 3) 0/ {1} {1, 2}
π 2 = (1, 3, 2) 0/ {1, 3} {1}
π 3 = (2, 1, 3) {2} 0/ {2, 1}
π 4 = (2, 3, 1) {2, 3} 0/ {2}
π 5 = (3, 1, 2) {3} {3, 1} 0/
π 6 = (3, 2, 1) {3, 2} {3} 0/

then the agents are being rational in being part of this coalition and we say that this
outcome is an imputation.
How should the players divide the field after purchasing it? What if the field
is split as (2, 2, 3.5)? Clearly, players #1 and #2 could profit more from forming
a coalition, purchasing the field with 5 acres and dividing it equally. Therefore,
(2, 2, 3.5) is not a stable solution. We can search those stable outcomes that no
coalition would like to deviation from. These are known as the core of the game.
Mathematically, it is given by the core(G) = {(S, x)|x(C) ≥ v(C), ∀ C ⊆ N} . The
distribution (2.5, 2.5, 2.5) is in the core since the players cannot get more on their
own.
Although a stable distribution may appear in the core, it may not be fair. A fair
payment would reward each player according to his or her contribution. Let’s take,
for instance, the distribution (7.5, 0, 0). It is in the core, however it is as unfair as it
can get.
In order to find a fair distribution, we must look for a solution that ensures that all
profit is distributed among the players. The marginal contribution of player i to the
coalition is given by v({1, . . . , i − 1, i}) − v(1, . . . , i − 1). This, however, is sensitive to
the order at which the player appears in the coalition. The average marginal contribu-
tion fixes this problem by considering all possible orderings. The latter can be found
with the set Sπ (i) = { j ∈ N|π( j) < π(i)} of the predecessors of i in the permutation
π of N. For instance, for π = (1, 4, 2, 5), then Sπ (2) = {1, 4}. Therefore, the marginal
contribution can be written as ∆π (i) = v (Sπ (i) ∪ i) − v (Sπ (i)). The average marginal
contribution is known as Shapley8 value given by Eq. 7.4 [171].
1
φi = ∑ ∆π (i). (7.4)
N! π∈Π n

In our example, we have the permutations listed in Tab. 7.3 giving the marginal
contributions shown in Eq. 7.5. Hence, the average marginal contributions are φ =
(4.17, 1.67, 1.67), which means that in a fair division of the field, player #1 receives
4.17 acres and the other players receive 1.67 acres each.
Games and Competitions 179

∆π1 (1) = v({1}) − v({0})


/ = 0, ∆π2 (1) = v({1}) − v({0})
/ = 0,
∆π1 (2) = v({1, 2}) − v({1}) = 5, ∆π2 (2) = v({1, 2, 3}) − v({1, 3}) = 2.5,
∆π1 (3) = v({1, 2, 3}) − v({1, 2}) = 2.5, ∆π2 (3) = v({1, 3}) − v({1}) = 5,

∆π3 (1) = v({1, 2}) − v(2) = 5, ∆π4 (1) = v({1, 2, 3}) − v({2, 3}) = 7.5,
∆π3 (2) = v({2}) − v({0})
/ = 0, ∆π4 (2) = v({2}) − v({0})
/ = 0,
∆π3 (3) = v({1, 2, 3}) − v({1, 2}) = 2.5, ∆π4 (3) = v({2, 3}) − v({2}) = 0,

∆π5 (1) = v({1, 3}) − v({3}) = 5, ∆π6 (1) = v({1, 2, 3}) − v({2, 3}) = 7.5,
∆π5 (2) = v({1, 2, 3}) − v({1, 3}) = 2.5, ∆π6 (2) = v({2, 3}) − v({3}) = 0,
∆π5 (3) = v({3}) − v({0})
/ = 0, ∆π6 (3) = v({3}) − v({0})
/ = 0.
(7.5)
It is known that the Shapley value is the only payoff scheme that is efficient
(∑i φi = v(N)), accommodates null players (v(C ∪ i) = v(C) ∀ C ∈ 2Ω ), is symmetric
(v(C ∪i) = v(C ∪ j) ∀ C ∈ 2Ω ), and is additive (φi (G1 +G2 ) = φ (G1 )+φ (G2 )) [171].

7.1.3 ULTIMATUM GAME


This is a game proposed in 1982 [172]9 . In this one-shot game, a player (proposer)
proposes to split an amount of money with another player (receiver) upon the accep-
tance of some consequence of either accepting or rejecting the offer. The money is
split in case the receiver accepts the proposal, but both players receive nothing if the
receiver does not agree with the deal. This game tries to capture the human behavior
under specific circumstances and hence is an example of behavioral game theory,
other examples include the dictator game and the public goods game. Let’s explore
more of this game using the extensive form shown in Fig. 7.4.

f air un f air
R R

accepts re jects accepts re jects

5, 5 0, 0 8, 2 0, 0

Figure 7.4: Example of an extensive form for the ultimatum game

The extensive form shown in the figure is commonly used to model sequential (or
dynamical) games where one player takes action before the others. It is basically a
decision tree that begins with the proposer offering a fair or unfair deal. The receiver
can either accept or reject the proposal. For each of these possibilities there are util-
ities associated with the outcome of the game. For instance, if the receiver rejects
the deal, both players receive no money and this is displayed as 0, 0. If the proposer
180 Introduction to Econophysics

proposes a fair deal and the receiver accepts it, then both profit equally 5, 5. On the
other hand, if the deal is unfair and the receiver accepts it, the proposer receives a
greater amount 8, 2.
We say that the extensive-form presented is complete since it shows all players,
their every possible actions, what they know for every move, and the payoffs of
each player as a result of their actions. Also, the receiver only takes action after
knowing exactly the proposer’s action. When this happens, we say that the game has
perfect information. The opposite case would be a game where the receiver cannot
differentiate between the proposer’s actions. This would happen, for instance, if they
would take decisions simultaneously or if the proposer would hide his actions and
demand a move from the receiver. This imperfect information could be denoted by a
dashed line between both R nodes and this would constitute an information set.

7.1.3.1 Nash Equilibrium


Let’s analyze some outcomes of this game. First, let’s assume that the proposer made
a fair proposal and the receiver only accepts a fair proposal. In this case each one
would have a payoff of 5. Now that all players know each other’s strategies, if the re-
ceiver changes his mind, his payoff would be zero. The same happens if the proposer
changes his mind. Therefore, the proposer proposing a fair deal and the receiver only
accepting a fair deal is an equilibrium situation where no player profit by changing
strategies. The same happens if the proposer proposes an unfair deal and the receiver
only accepts an unfair offer, and if the proposer proposes an unfair deal and the re-
ceiver accepts any offer.
Nash10 developed this equilibrium concept in 1950 for non-cooperative games,
hence it is known today as Nash equilibria. These situations are different from one
where a player chooses the optimal move no matter how the other players act. The
latter is known as dominant strategy. Nash equilibria correspond to optimal states
where all players make optimal moves considering the moves of their opponents.
We can formalize Nash equilibria by defining a game as a triple G =
(N, {Si }, {ui }) , i ∈ N, where N = {1, 2, . . . , n} (with n ≥ 2) is a set of players, Si
is the strategy set for the ith player, and ui : ∏i Si → R is the payoff (or utility func-
tion, a non-empty and finite set) for each strategy profile. Under this formalization,
the pure Nash equilibria corresponds to strategy profiles s∗ ∈ S such that:

ui (s∗i , s∗−i ) ≥ ui (si , s∗−i ), ∀si ∈ Si , i ∈ N, (7.6)


where s−i corresponds to a strategy set where the ith component is removed: s−i ≡
(s1 , s2 , . . . , si−1 , si+1 , . . . , sn ), or S−i ≡ × j∈N\{i} S j . Also, we used the substitution
(yi , x−i ) = (x1 , x2 , . . . , xi−1 , yi , xi+1 , . . . , xn ).
In economics, we can say that the Nash equilibria is equivalent to a self-enforcing
contract where no agent has rational incentives to break the agreement. On the other
hand, Nash equilibria correspond to zero-temperature solutions where fluctuations
are frozen [173]. This is a deterministic result where stochasticity is neglected and it
is assumed that all agents have complete and perfect knowledge about the game.
Games and Competitions 181

Notwithstanding, experimental results in the ultimatum game deviate from these


equilibrium points [174, 175]. Similar deviations are observed in the public goods
game [176] and in the dictator game [177].

7.1.4 PRISONER’S DILEMMA


Imagine a situation where two prisoners that committed some crime together are
placed in different cells and are unable to communicate with one another. As a pros-
ecution strategy, the law enforcement agency offers some reward for each of them
if they give some evidence that helps to convict the fellow prisoner (defect). If both
defect, both stay two years in prison. If one defects but the other cooperate (remain
silent), then the informer is released and the other is sentenced to three years in jail.
But if both cooperate, then each stays one year in prison since there is no sufficient
evidences to convict either. This game, invented in 1950 by Flood11 illustrates the
loss that might happen in a cooperation between rational players [178]c .
In order to explain how this game operates, let’s translate it to an economic setting.
Let’s consider two countries that decide to undertake international trade. They have
a similar dilemma: if they levy taxes on imported goods (defect) they protect their
domestic companies, but the whole population loses with higher prices. Therefore,
the best situation for both is a free market situation where they cooperate and do not
impose taxes on each other. But what if one of them levy import taxes but expects
the other to cut import taxes? This would be a dominant strategy for the former, but a
terrible scenario for the other. Finally, both can impose taxes on each other trying to
protect their local businesses, but this implies higher prices for both populations and
possibly worse products. The payoff matrix (or normal form) for this game is shown
in Tab. 7.4. Note that it is exactly the same payoff described by the case with two
prisoners with a bias of 4. The first element inside each parenthesis is the payoff for
country A whereas the second is the payoff for country B.

Table 7.4
Payoff Matrix for the Prisoner’s Dilemma Adapted to the Case of
International Trade

Country B
coop. de f .
coop. (3, 3) (1, 4)
Country A
de f . (4, 1) (2, 2)

Nash equilibrium in this case is a situation where both defect and levy taxes.
Knowing that country B is imposing taxes, it makes no sense for country A to lower

c The term Prisoner’s Dilemma was coined and popularized by Tucker12 in 1992 [179].
182 Introduction to Econophysics

its import taxes, since this would produce a payoff of 1. The reciprocal is true. Know-
ing that country A is imposing taxes, it makes no sense for country B to lower taxes
since it also produces a lower payoff. Here is the dilemma: the Nash equilibrium is
both defecting and there is no rational reason why each country should change its
strategy. However, it would be much better for both countries if they cooperated!
This illustrates the concept of coordination failure where players could achieve a
better result but fail because they are unable to cooperate [180].
This game also illustrates an interesting concept: This is a non-zero-sum game. It
is actually a positive sum game! In zero-sum games, each participant’s gain or loss
is matched by those of other participants so that the net result is zero. In a fair trade,
however, one player values more a good than money whereas the other player values
more money than a good. After the interaction, both players increased their utility
and the game has a positive outcome for all players.
The prisoner’s dilemma can also be used to illustrate another popular concept in
economics. Imagine that a company has high expenditures with marketing. If this
company stops advertising, the competitor can continue its marketing campaign and
win a bigger share of the market. If both, however, stop advertising, both can re-
duce their costs with marketing. The Nash equilibrium corresponds to both keeping
their advertisements despite the fact that both would save money if they cut it. This
may lead to what was coined by Stigler13 as regulatory capture [181]. This is a
phenomenon where companies push for state regulations that actually benefit them
instead of the population in general. In our example, the companies could lobby for
a regulation prohibiting advertisement for the whole industry segment under the pre-
tense of being better for the people (see for instance [182]).

7.1.4.1 Pareto Optimum


If the game reaches a configuration where no player can change its strategy without
reducing another player’s payoff, we then say that this is a Pareto optimum. In the
international trade example, the Pareto optima are all options except the Nash equi-
librium. If the game is the Nash equilibrium, then both players can cooperate and
both economies are improved.
Mathematically, for a set of feasible allocations Ω, an allocation ω ∈ Ω is a strong
Pareto optimum if @ ω ∗ ∈ Ω | ui (ω ∗ ) ≥ ui (ω) for at least one player. A weak Pareto
optimum is reached applying the restriction to all players.
For instance, if the best allocation of resources is the free and dispersed arrange-
ment created by the market, then why do small central planning institutions (firms)
exist and why do they succeed? Firms marginally profit from central planning at
the cost of incremental knowledge problems that originate from dispersed informa-
tion [183]. There are transaction costs in making economic trades such as agent’s
commissions or the cost of transporting goods across long distances. The central
planning of firms helps to reduce those costs, at least internally. On the other hand,
as transaction costs are reduced, the economy becomes more efficient and more cap-
ital can be allocated to the development of new goods and services. Coase14 theorem
states that if property rights are well defined and transaction costs are sufficiently
Games and Competitions 183

low, then direct bargaining is a Pareto optimum regardless the initial allocation of
property [184].
Transaction costs are also associated with the lock-in phenomenon [76, 185]. It is
often possible to move to more efficient economic allocations, but transaction costs
present a barrier through which, many actors are unwilling to pay. Therefore, the eco-
nomic system remains in a state of lower efficiency. For instance, regulatory capture
tends to persist because changing laws have non-pecuniary costs. Also, quite often
customers are locked to a company because there are costs to switch the service to
another provider.
In political science, this is known as political entrenchment [186]. For example,
the incumbent is usually protected from the process of change because changes can
be costly.

7.1.4.2 Walrasian Equilibrium


Consider two agents with limited amount of resources that want to consume two
goods A and B. If they want to consume more of a good A, necessarily they need to
reduce their consumption of good B. The ratio between variations in the amount of
goods is known as marginal ratio of substitution (see Sec. 6.1), and the locus of all
points with combinations of goods for which the agent has the same utility is known
as indifference curve. The set of all indifference curves is known as indifference map.
Let’s now take the indifference map of the second agent, rotate it π radians and
overlap it with the indifference map of the first agent. This is known as the Edge-
worth15 box and helps us visualize concepts of the general equilibrium theory of
economics16 such as the price formation.

Walras’s Law
Walras’s law, based on his general equilibrium theory [187], states
that any excess demand in one market must be matched by some
excess supply in another market. This leads to the concept of
Walrasian tâtonment, a process of trial and error through which
agents coordinate towards equilibrium.

Walras’ general equilibrium theory contrasts with Lachman’s17 idea


of an evolutive economy guided by non-stable processes, dispersed
knowledge, and subjective expectations.

The shaded region shown in Fig. 7.5, known as exchange lens due to its shape,
shows a region where both agents would be better off if they engage in trade. Each
individual would be able to obtain more goods than those limited by their indiffer-
ence curves. A Pareto optimal (see Sec. 7.1.4.1) situation, though, happens when
the curves are tangent to each other representing the situation where no Pareto
184 Introduction to Econophysics

Qty. B2

Qty. A1

Qty. A1

Qty. A2
Qty. B1 Qty. B1

Figure 7.5: The indifference map for agent #1 (left) and the Edgeworth box (right)
illustrating the exchange lenses (shaded regions), the Pareto optima (discs), and the
contract curve (dashed curve)

improvement can be made. The locus of all Pareto optima constitutes a contract
curve and shows a Walrasian equilibrium where the marginal rate of substitution is
the same for both agents.
This also illustrates the first fundamental theorem of welfare economicsd (see, for
instance: [188]) that states that in a complete (see Sec. 3.1.1) and efficient market
(see Sec. 1.3), market equilibria are Pareto efficient. The second theorem asserts that
if the agents have convex indifference curves, then Pareto efficiency can be achieved.
This decouples efficiency from distribution, and states that the market can achieve
Pareto efficiency by itself. For instance, we see in Fig. 7.5 two Pareto optima in the
contract curve resulting from different initial endowments. Thus, efficient allocations
can be achieved if the agents face the social consequences of their actions and make
choices accordingly. On the other hand, incoordination may occur if there are exter-
nal attempts to correct the economy, since no agent may have perfect information
about the society [5].

7.1.5 (ANTI-)COORDINATION GAMES


Let’s take a scarce economic resource, ice cream for example, and let’s assume that
there is a group of people who want to consume it during summer. The offer of
ice cream is limited, hence there is competition among these people for ice cream.
Therefore, we say that this good is rival. Also, the ice cream shop will only give you
an ice cream in exchange for money. Those who do not pay are excluded. Thus, we
say that this good is excludable. Items that are rival and excludable are known as
private goods.
Depending on the levels of rivalry and excludability, we may have other types of
goods. For instance, a movie theater has low rivalry since it can accommodate a large
number of people. Nonetheless, those who do not pay are excluded. Goods that are
non-rivalrous (or have low rivalry) but are excludable are known as club goods. It is

d It dates back to Adam Smith but had contributions from Walras, Edgeworth, and Pareto, among others.
Games and Competitions 185

even possible that the common use of a club good creates positive externalities. For
instance, many people prefer to go to a movie theater with friends rather than going
alone. Coordination games capture this concept where players coordinate into the
same strategy.
Consider the payoff matrix given in Tab. 7.5. Clearly, we have that A > B and
D > C for player 1, and a > c and d > b for player 2. Therefore, the main diagonal
corresponds to two Nash equilibria: both players choosing together the same strategy.
This example is actually known as the conflicting interest coordination game, or
more popularly, the battle of sexes game. This can be applied, for instance, for bank
runs [189], currency crises [190], and debt restructuring [191]. For bank runs, for
instance, the best option for all players is to keep their money at the bank. However,
if a bank run begins, then it is also the best option for all players to withdraw their
money.

Table 7.5
Payoff Matrix for the Conflicting Interest Coordination Game

Player 2
option 1 option 2
option 1 (A = 3, a = 2) (C = 0, c = 0)
Player 1
option 2 (B = 0, b = 0) (D = 2, d = 3)

One interesting point of this game is that, in a pure Nash equilibria, when one
player chooses his or her favorite option, the other player does not, which is an
inefficient outcome. In addition to these pure Nash equilibria, though, this game also
has mixed Nash equilibria. In fact, using a fixed-point theorem [192]18 , Nash showed
in 1950 that every finite game has at least one mixed strategy equilibrium [193].
Mixed Nash equilibria are probability distributions on the strategy set Si . This
means that the player adopts some strategies with specific h probabilities.i Mathemat-
ically, we can express these solutions with a vector pi = p1i . . . pki i ∈ Rki such
that pni ≥ 0, ∀n ∈ 1 . . . ki and pi · e = 1. The support of a mixed strategy is
 

given by {n|pni > 0}.


The mixed Nash equilibria is then given by:

ui (σ ∗ , σ−i
∗ ∗
) ≥ ui (σi , σ−i ) ∀σi ∈ Σi , (7.7)
n o
ki
where Σi is the space of mixed strategies given by Σi = pi ∈ R+ |pi · e = 1 .
Therefore, in order to compute the mixed Nash equilibria for this game, first we
must find the individual payoff matrices for each player:
   
3 0 2 0
P1 = , P2 = . (7.8)
0 2 0 3
186 Introduction to Econophysics

The expected payment for player 1 is given by:


    
3 0 q 3q
P1 p2 = = . (7.9)
0 2 1−q 2 − 2q
Hence, Nash equilibrium is achieved when:

3q = 2 − 2q
(7.10)
q = 2/5.
The payment for player 2 is given by:
    
T 2 0 p 2p
P2 p1 = = (7.11)
0 3 1− p 3 − 3p
Nash equilibrium is reached when:

2p = 3 − 3p
(7.12)
p = 3/5.
Thus, we get:
   
3/5 2/5
p1 = , p2 = . (7.13)
2/5 3/5
Consequently, mixed Nash equilibria is given when the players choose their pre-
ferred options with a probability of 60 %.
Returning to our discussion about types of economic goods, let’s consider a
good that is rivalrous but non-excludable. Such goods are known as common-pool
resources (or ‘CPR’). Take, for instance a small pond shared by two fishermen.
Given that it is a natural resource, it may be difficult to exclude a player from us-
ing it. Nonetheless, one player can abuse the pond creating a negative externality
for the other. In fact, given that the costs associated in maintaining the pond are
distributed to all players but the benefits of overfishing are concentrated in one, it
is actually expected that this situation may occur. This is known as tragedy of the
commons [194, 195]19 . The best way to avoid the tragedy of the commons may be
privatizing the good. This way, the pond is well maintained so that the owner can
profit from it. Nonetheless, Ostrom [196]20 and Axelrod [197]21 showed that, un-
der some circumstances, small groups can spontaneously circumvent the tragedy of
the commons without any regulation. This happens because maintaining the good
functional is of common interest.
Anti-coordination games capture this scenario where the best strategy for both
players is to adopt different strategies. In a general anti-coordination game we have
B > A and C > D for player 1, and b > d and c > a as happens in the game of
‘chicken’ shown in Tab. 7.6. If both players adopt option 2 (overexploit the common
resource), then both lose. If one of them overexploits the resource but the other does
not, then the former wins some amount, whereas the latter loses. If both decide to
cooperate, however, then none has any advantage.
Games and Competitions 187

Table 7.6
Payoff Matrix for the Game of Chicken
Player 2
option 1 option 2
option 1 (A = 0, a = 0) (C = −5, c = 5)
Player 1
option 2 (B = 5, b = −5) (D = −100, d = −100)

There are two pure Nash equilibria where players adopt opposing strategies. Ac-
cording to Nash’s theorem, there must be at least one mixed Nash equilibrium. The
individual payoff matrices are given by:
   
0 −5 0 5
P1 = , P2 = . (7.14)
5 −100 −5 −100
The expected payment for player 1 is given by:
    
0 −5 q −5(1 − q)
P1 p2 = = . (7.15)
5 −100 1 − q 5q − 100(1 − q)
Nash equilibrium is reached when:
−5(1 − q) = 5q − 100(1 − q)
−5 + 5q = 5q − 100 + 100q
(7.16)
95 = 100q
q = 95/100.

The expected payment of player 2 is exactly the same since PT2 = P1 . Therefore,
mixed Nash equilibrium happens when both players choose option 1 (cooperate)
with a probability of 95%. In real life situations, though, choosing to dare may result
in one being excluded from any future game forever. For instance, if the game of
chicken consists of two cars heading straight towards one another, it may result in
both players dying. In fact, this game has been used to study, for instance, brinkman-
ship [198]22 .
There is a third possibility when A > B and C < D for player 1, and a < b and
c > d for player 2 as shown in Tab. 7.7 for the matching pennies game. In this game
each player takes a penny and chooses head or tails. After revealing the choice si-
multaneously, if both pennies match, player one takes both pennies. If they do not
match, then player 2 takes both pennies. In this situation there is no pure Nash strat-
egy, since either player is better off switching options no matter what side of the coin
is chosen. This is a case of discoordination game.
The mixed Nash equilibrium can be computed by first identifying the individual
payoff matrices:
188 Introduction to Econophysics

Table 7.7
Payoff Matrix for the Matching Pennies Game
Player 2
option 1 option 2
option 1 (A = +1, a = −1) (C = −1, c = +1)
Player 1
option 2 (B = −1, b = +1) (D = +1, d = −1)

   
1 −1 −1 1
P1 = , P2 = . (7.17)
−1 1 1 −1
The expected payment for player 1 is given by:
    
1 −1 p 2p − 1
P1 p2 = = . (7.18)
−1 1 1− p −2p + 1
Nash equilibrium is given when:

2p − 1 = −2p + 1
(7.19)
p = 1/2.
Thus, the mixed Nash equilibrium happens when each player chooses heads or tails
with a 50% probability.

7.1.5.1 Ratchet Effect


Another illustration of the tragedy of the commons can be found in the ratchet effect.
This effect is found in the social domain where the reversal of human processes are
restricted after some limiting point is reached [199]. For instance, controllers tend to
base their policies based on the results of the previous year (theory of adaptive ex-
pectations in Ch. 1.1). Another example is the difficulty in dismantling bureaucratic
structures once they are provisionally created. In the tragedy of the commons, the
rational incentive is for the agents to progressively deplete the common without the
possibility of returning to a better state.
This ratchet effect is also used to illustrate the Parrondo23 paradoxe . Consider
the problem illustrated in Fig. 7.6. Game A consists of applying a small clockwise
rotation to a line that supports a set of disks, whereas game B consists of transferring
these disks to the sawtooth structure maintaining their horizontal position. We play
game A until the disks get close to valley number 1 and then switch to game B. Some
disks will then fall to valley number 2 and the remaining disks will fall to valley

e The original idea, called “How to cheat a bad mathematician” was not published, but an early refer-

ence to this game is given in [200].


Games and Competitions 189

number 0. If we continue playing this sequential pattern repeatedly, eventually the


disks will move to the left of the figure.
Thus, even two losing games, such as the tragedy of the commons, can produce
positive outcomes when they are coupled and played together. A good description of
the Parrondo paradox using Brownian ratchets is given in [201].

2 0 1
Figure 7.6: Illustration of the Parrondo paradox

7.2 EVOLUTIONARY GAME THEORY


Let’s now abandon the premise that the agents are rational. In fact, let’s consider
that once an agent is born with some behavior, it will last forever and cannot be
changed. Although this can be more evident, for instance, to the genetic component
of biological species, it has being adapted to some economic problems [202–206].
Indeed, the adapted game theory for this situation was first proposed24 to explain
evolutionary biological behaviors [207]. Hence, it is known as evolutionary game
theory.
Given an efficient market, the price of a security already impounds all relevant
information about it. But what would happen to this market if all agents stopped
trying to forecast prices? This is exactly what gives information to prices, so the
market would be ceased.
In order to find an answer to this problem, we may consider a liquid market with
two types of players: agents that either analyze or not (at some fixed cost) the price of
a security being traded. In this scenario, two agents randomly meet and start a trade.
Also, given the size of the market, it is unlikely that the same pair is picked more
than once. If one agent is of the category that analyzes the prices and the other is not,
then the former receives a return discounting transaction costs and expenditures to
acquire the information. If the analysis of a player belongs to this category but the
other does not, then the former has an advantage. Thus, it receives a return multiplied
by a premium discounting only transaction costs.
If the situation is the opposite, then the trader receives the return divided by this
multiplicative premium. If, however, neither player belongs to the category that ana-
lyzes prices, then the players receive a return discounting only transaction costs. This
190 Introduction to Econophysics

is exactly the situation where two agents dispute a resource (the premium of finding
a good deal) at some cost (of acquiring information) that appears in the biological
literature as the Hawk-Dove game [207]. In this analogy, a ‘hawk’ behavior would be
assigned to those traders that are willing to pay for information, whereas the ‘dove’
behavior would be assigned to those that are not. The payoff matrix for this game is
shown in Tab. 7.8.

Table 7.8
Fitness Function for the Hawk-dove Game

Player 2
Hawk Dove
V −C V −C

Player 1
Hawk 2 , 2 (V, 0)
V V

Dove (0,V ) 2, 2

Instead of a payoff, we need a fitness function that describes the aptitude of each
strategy. Let’s consider that the market is composed mostly of individuals with hawk
behavior (a fraction of 1 − x individuals) and some individuals start to show a dove
behavior (a fraction of x individuals).
According to the payoff matrix in Tab. 7.8, when a player with a hawk behavior
encounters another player with a hawk behavior, the hawk behavior receives an apti-
tude score of (V −C)/2. If the player with a hawk behavior encounters a player with
a dove behavior, the former receives an aptitude score of V . Therefore, the fitness
function for the hawk behavior is:
V −C
Fh (hawk) = (1 − x) + xV
2 (7.20)
V −C x
= + (V +C).
2 2
A player with a dove behavior can meet a player with a hawk behavior and scores
0 aptitude points for the dove behavior. Or, a player with a dove behavior can meet
another player with the same behavior and scores V /2 aptitude points for the dove
behavior. Therefore, the fitness function for the dove behavior is:
V
Fh (dove) = x . (7.21)
2
The hawk strategy has a higher fitness than the dove strategy when:
Fh (hawk) > Fh (dove)
V −C x V
+ (V +C) > x (7.22)
2 2 2
V
x > 1− .
C
Games and Competitions 191

Since x is a fraction, C > V . The fraction x is a small fraction of individuals that


begin to behave differently. Therefore, when x → 0 we get V ≥ C, which is false.
Therefore, the hawk market cannot withstand a dove emergence and we say that
the hawk behavior is not an evolutionary stable strategy (ESS). Let’s analyze the
opposite behavior when a fraction x of individuals begin to adopt a hawk behavior in
a dove market. The fitness function for a hawk behavior is:
V −C
Fd (hawk) = x + (1 − x)V
2 (7.23)
x
= V − (V +C).
2
Similarly, the fitness function for a dove behavior is:
V
Fd (dove) = (1 − x)
2 (7.24)
V V
= −x .
2 2
The dove behavior has a higher fitness than the hawk behavior when:

Fd (dove) > Fd (hawk)


V V x
− x > V − (V +C) (7.25)
2 2 2
x > V /C.
Again, taking the limit when x → 0, we get V < 0, which is again false. Therefore,
the dove market cannot withstand a hawk emergence either, and consequently is not
an ESS.

7.2.1 MIXED STRATEGY


Although this game does not have a pure evolutionary stable strategy, it may have a
mixed strategy, similar to what we have seen with Nash equilibria. In order to look
for a mixed strategy let’s consider the case of a market where individuals have a hawk
behavior with probability p and, consequently, also a dove behavior with probability
1 − p (a p-market). Another group of traders begin to display a hawk behavior with
probability q and a dove behavior with probability 1 − q (a q-market). The payoff
matrix is shown in Tab. 7.9.
In this case, the probability of pairing two individuals with hawk behaviors is pq
and this gives a aptitude points to player 1. The probability of pairing hawk and dove
behaviors is p(1 − q) and this gives b aptitude points to player 1. Symmetrically, the
probability of pairing dove and hawk behaviors is (1 − p)q giving c aptitude points
to player 1. Finally, the probability of pairing two dove behaviors is (1 − p)(1 − q)
and it gives d aptitude points to player 1. The expected payoff for player 1 is then:

W (p, q) = pq · a + p(1 − q) · b + (1 − p)q · c + (1 − p)(1 − q) · d, (7.26)


192 Introduction to Econophysics

Table 7.9
Payoff Matrix for a Generic Hawk-dove Game Considering Mixed Strate-
gies

Player 2
Hawk, q Dove, 1 − q
Hawk, p (a, a) (b, c)
Player 1
Dove, 1 − p (c, b) (d, d)

which can be written in matrix notation as:

W (p, q) = pT Aq, (7.27)


 T
where p = p 1 − p and A is the individual payoff matrix given in Tab. 7.9. For
arbitrary p and q, the expected payoff is:

W (p, q) = pq · a + p(1 − q) · b + (1 − p)q · c + (1 − p)(1 − q) · d


V −C V
= pq + p(1 − q)V + (1 − p)(1 − q)
(7.28)
2  2
V C
= 1 + p − q − pq .
2 V
Let’s now consider that a fraction x of q-individuals begin to appear in a p-market
(1 − x). The fitness function for the p and q-individuals are:

F p (p) = (1 − x)W (p, p) + xW (p, q)


(7.29)
F p (q) = (1 − x)W (q, p) + xW (q, q).
For p to be an ESS, we must have:

F p (p) > F p (q). (7.30)


For small fractions x, this happens when W (p, p) > W (q, p) or when W (p, p) =
W (q, p) and W (p, q) > W (q, q).
The mixed Nash equilibrium for this game can be calculated by first finding the
individual payoff matrices:
 V −C   V −C 
2 V 2 0
P1 = V , P2 = V . (7.31)
0 2 V 2
Since the payoff matrix is symmetric, the expected payment for either player is
given by:  V −C    V −C 
2 V p p 2 +V (1 − p)
P1 p2 = V = V . (7.32)
0 2
1− p 2 (1 − p)
Games and Competitions 193

Nash equilibrium is reached when:


V +C V V
− p +V = − p
2 2 2 (7.33)
V
p=q= .
C
For p = V /C we get:
V V
W (p, p) = (1 − p2 /p) = (1 − p),
2 2 (7.34)
V V
W (q, p) = (1 + q − p − pq/p) = (1 − p).
2 2
Therefore, in order for the Nash equilibrium be an ESS, we must have:
W (p, q) > W (q, q)
1 + p − q − pq/p > 1 − q2 /p

q2 − 2pq + p2 > 0. (7.35)


This is a parabola whose point of minimum touches p. Therefore, it is always pos-
itive (as long as q , p), and the Nash equilibrium point p = V /C is an ESS, which
implies that, for this probability, individuals that begin to use another strategy will
not succeed in flipping this market.

7.2.2 REPLICATOR DYNAMICS


Consider the population of a particular species Ni . It takes, on average, a period τ
for each individual to generate an offspring. Therefore, after a short period ∆, the
population of this species will increase by (∆/τ)Ni (t) and we get:

Ni (t + ∆) = Ni (t) + Ni (t)
τ (7.36)
Ni (t + ∆) − Ni (t) = fi Ni (t)∆,

where fi = 1/τ is the frequency at which the population of that species is increased.
Taking the limit of a very short interval:
dNi (t) = fi Ni (t)dt. (7.37)
We identify the Markov propagator G [Ni (t), dt] = fi Ni (t)dt. We can always add
a stochastic term to account for fluctuations on this frequency, which leads to
G [Ni (t), dt] = Ni (t) ( fi dt + σi dWi ), where dWi is an uncorrelated Wiener process.
Under this new scenario, the evolution of the population is given by the geometric
Brownian motion:
dNi (t) = fi Ni (t)dt + σi Ni (t)dWi (t). (7.38)
Considering a total population of N = ∑i Ni individuals of all species, we can make
questions about the dynamics of the fractions xi (t) = Ni /N. To find this dynamics we
194 Introduction to Econophysics

must use the multidimensional Ito’s lemma (Eq. 7.42) with:

∂ xi
=0
∂t
∂ xi δi j x i
= −
∂ Nj N N
∂ 2 xi
 
∂ δi j 1 ∂ xi (7.39)
=− 2 − 2 N − xi
∂ N 2j N N ∂ Nj
δi j xi
= −2 2
+2 2.
N N

Multidimensional Ito’s Lemma

For a doubly differentiable function f (t, S1 , S2 , . . . , SN ), its Taylor’s


expansion is:

N
∂f ∂f 1 N N ∂2 f
df = dt + ∑ dSi + ∑ ∑ dSi dS j + . . . (7.40)
∂t i=1 ∂ Si 2 i=1 j=1 ∂ Si ∂ S j

Substituting the differential dSi by a stochastic differential equation


of the form dSi = ai (S,t)dt + bi (S,t)dWi , we get:

N
∂f ∂f
df = dt + ∑ (ai dt + bi dW ) +
∂t i=1 Si

(7.41)
1 N N ∂2 f
+ ∑ ∑ ∂ Si ∂ S j (ai dt + bi dWi ) (a j dt + bi dW j ) + . . .
2 i=1 j=1

Eliminating high order terms, we obtain the multidimensional obtain


Ito’s lemma:

N
∂f ∂f 1 N N ∂2 f
df ≈ dt + ∑ (ai dt + bi dWi ) + ∑ ∑ bi b j ρi j dt
∂t i=1 ∂ Si 2 i=1 j=1 ∂ Si ∂ S j
!
N
∂f ∂f 1 N N ∂2 f
= + ∑ ai + ∑ ∑ bi b j ρi j (S,t) dt
∂t i=1 ∂ Si 2 i=1 j=1 ∂ Si ∂ S j
N
∂f
+ ∑ bi dWi ,
i=1 ∂ Si
(7.42)
where ρi j is the correlation between both Wiener processes.
Games and Competitions 195

Using these results in the multidimensional Ito’s lemma, we get:


" #
N   N 
δi j xi 1 δi j xi
dxi = ∑ f j N j − + ∑ σ 2j N 2j −2 2 + 2 2 dt+
j=1 N N 2 j=1 N N
N  
δi j xi
+ ∑ σ jNj − dW j (7.43)
j=1 N N
! !
N N N
= xi fi − ∑ f j x j − σi2 xi + ∑ σ 2j x2j dt + xi σi dWi − ∑ σ j x j dW j ,
j=1 j=1 j=1

which is the stochastic replicator dynamics equation. The deterministic replicator


dynamics equation is found by setting σk = 0:

ẋi = xi [ fi − φ (x)] , (7.44)


where φ (x) = ∑Nj=1 f j x j .
In evolutionary game theory, the frequency fi is given by the expected payoff
(Ax)i . Therefore, we get:
ẋ = x Ax − xT Ax e .
  
(7.45)
We can consider the population of individuals with a hawk behavior to be p.
Therefore, the population of individuals with a dove behavior is 1 − p. For the payoff
matrix given in Tab. 7.8 we have:
     V −C   
ṗ p p 2 + (1 − p)V 1 2
 1
= − V−p C . (7.46)
− ṗ 1− p (1 − p) V2 2 1
From the second line of this matrix equation we get:
ṗ = 1/2 p(p − 1) (pC −V ) . (7.47)
In steady state, setting ṗ = 0 we get the trivial solutions p = 0, 1 and p = V /C,
which is also an ESS. These are known as evolutionary stable states. This behavior
is illustrated in Fig. 7.7. For values of V > C the final population consists only of
individuals with hawk-behavior. For other values, the final population consists of a
population of V /C individuals with a hawk behavior and 1 −V /C individuals with a
dove behavior.
This dynamics can be simulated with the following Runge-Kutta25 code. The
function to be simulated is given by:

def fun(p,V,C):
return 0.5*p*(p-1)*(p*C-V)
196 Introduction to Econophysics

V/C=2/3

V/C=1/2

Figure 7.7: Fraction p of individuals with a hawk behavior as a function of time for
different values of V/C

The Runge-Kutta itself is calculated with:

def RK(po,V,C):
h = 0.1
p = po

x = []
for i in range(1000):
k1 = fun(p,V,C)
k2 = fun(p + 0.5*h*k1,V,C)
k3 = fun(p + 0.5*h*k2,V,C)
k4 = fun(p + h*k3,V,C)
p = p + (h/6)*(k1+2*k2+2*k3+k4)
x.append(p)
return x

7.3 LOTKA-VOLTERRA EQUATIONS


A concept similar to the replicator dynamics is given by the famous Lotka26 -
Volterra27 equations. This is a model initially conceived to study autocatalytic re-
actions [208], organic systems [209] and prey-predator systems [210].
Games and Competitions 197

Lotka-Volterra equations have also been used to model many socioeconomic mod-
els such as the competition between oppressive governments and opposing rebels
[211]. One situation where the Lotka-Volterra equations are used in economics is
given by the Goodwin28 model [212]. This is a model that tries to capture endoge-
nous fluctuations in an economic system.
Aggregate output (q) is defined in Keynesian29 economics as the total amount
of goods and services produced and supplied in an economy during a specific pe-
riod. The economic activity coordinates these goods in order to achieve good alloca-
tions. Therefore, it is not trivial to sum the contribution of heterogeneous good [213].
Nonetheless, the Goodwin model assumes that the aggregate output is given by the
ratio between a homogeneous capital stock (k) and a constant capital-output ratio
(σ ). In the model, this capital is fully used by the labor to produce these goods.
Therefore, q = k/σ = al, where a is the productivity of the labor. For wages wl,
profits q − wl are generated, but since l = q/a, we get a profit q(1 − w/a) that leads
to a profit rate 1 − w/a. Hence, the growth rate of the aggregate output is given by:
q̇ 1 w
= 1− . (7.48)
q σ a
Philips observed that in the short term, as the economy grows, companies expand
and need more workers. In order to attract a good labor force, companies increase
wagesf [214]. Therefore, the growth of wages ẇ/w must be a function of the unem-
ployment rate. Note, however, that this relationship only holds for short periods. For
instance, the Phillips curve fails to explain stagflationg . In the long-run, the unem-
ployment rate seems to converge to a natural rate of unemployment. As pointed by
Friedman [215] and Phelp30 [216, 217], that is unaffected by changes in wages and
rises of price levelsh . This is known as Non-accelerating inflation rate of unemploy-
ment (NAIRU) [215]. In the Goodwin model, a linear approximation of the Philips
for the employment curve is used:
ẇ l
= ρ − η, (7.49)
w n
where l is the employment of labor, n is the total labor force such that v = l/n is the
employment rate. Also ρ and η are positive constants.
The growth rate of the employment level (l = q/a) is given by:
q̇ q
l˙ = − 2 ȧ
a a
(7.50)
l˙ q̇ ȧ
= − .
l q a

f Economists call it a tight labor market because it is difficult to find new labor.
g Increase of prices and unemployment at the same time.
h This does not imply that the natural rate should be pursued, as it could lead to other phenomena such
as a high increase of price levels [218].
198 Introduction to Econophysics

Assuming that the productivity grows at a constant rate λ and using the result of Eq.
7.48 we get:

l˙ 1  w
= 1− −λ (7.51)
l σ a
The growth rate of the employment rate (v = l/n) is given by:

l˙ l
v̇ =− 2 ṅ
n n (7.52)
v̇ l˙ ṅ
= − .
v l n
Assuming that the labor force grows at a constant rate θ and using the result of
Eq. 7.51, we get:
v̇ 1 w
= 1− −λ −θ. (7.53)
v σ a
The wage share u is defined in Keynesian economics as the ratio between wages
and the output (w/q)l = w/a. Its growth rate is given by:
ẇ w
u̇ = − ȧ
a a2 (7.54)
u̇ ẇ ȧ
= − .
u w a
Using the result of Eq. 7.49 we get:

= ρv − η − λ . (7.55)
u
Equations 7.53 and 7.55 are exactly the Lotka-Volterra equations:
v̇ 1
= (1 − u) − λ − θ
v σ (7.56)

= ρv − η − λ ,
u
that can be generalized as:

= α −βy
x
ẏ (7.57)
= δ x − γ,
y
where:

x = v, α = σ1 − λ − θ , δ = ρ
(7.58)
y = u, β = σ1 , γ = η +λ.
It is possible to find an analytical solution dividing one equation by the other and
then integrating:
Games and Competitions 199

dx x(α − β y)
=
dy y(δ x − γ)
α −βy δx−γ
dy = dx
y x
α −βy δx−γ
Z Z
dy = dx
y x
α log y − β y = δ x − γ log x +V
V = α log y + γ log x − β y − δ x. (7.59)
The fixed points correspond to those values of x and y that produce constant solu-
tions ẋ = ẏ = 0:
αx − β xy = 0 → x(α − β y) = 0
(7.60)
δ xy − γy = 0 → y(δ x − γ) = 0.
Therefore:  
γ α
(x, y) = (0, 0) and , . (7.61)
δ β
In order to check whether these solutions are stable, we can use Hartman31 -
Grobman32 theorem.

Hartman-Grobman Theorem
The Hartman-Grobman linearization theorem [219, 220] states that
a diffeomorphisma is topologically equivalent to its linearization
around a hyperbolic fixed pointb (x∗ , y∗ ) with the form:
   
u̇ u
=A , (7.62)
v̇ v
where u = x − x∗ , v = y − y∗ and A is the Jacobian matrixc evaluated
at the equilibrium point.

The set of eigenvectors for which the corresponding eigenvalues


Re{λ } < 0 define a stable manifold, whereas those eigenvectors
whose corresponding eigenvalues Re{λ } > 0 define an unstable
manifold. Finally, those eigenvectors whose corresponding eigen-
values Re{λ } = 0 define a center manifold.

a A differentiable map between manifolds for which the inverse map is also differ-

entiable.
b The fixed point of a map is a hyperbolic fixed point (HFP) if the stability matrix

(the Jacobian matrix evaluated at these points) has no eigenvalues in the unit circle.
HFPs receive this name because the orbits of the system around these points resemble
hyperbolas. HFPs are also known as saddle points [77].
c Also known as community matrix by the mathematical biology community.
200 Introduction to Econophysics

The Jacobian matrix for the Lotka-Volterra equations is given by:


"∂ f ∂ f1
# 
1

∂x ∂y α − β y −β x
J = ∂ f2 ∂ f2 = . (7.63)
δy δx−γ
∂x ∂y

Its eigenvalues are:

α −βy−λ −β x
=0
δy δx−γ −λ
(7.64)
[(α − β y) − λ ] [(δ x − γ) − λ ] + β xδ y = 0
λ 2 − λ [δ x − γ + α − β y] + αδ x − αγ + β yγ = 0.
For (x∗ , y∗ ) = (0, 0) we have λ 2 − λ (α − γ) − αγ = 0. Therefore:
p
(α − γ) ± (α − γ)2 + 4αγ
λ=
2
α − γ ± (α + γ) (7.65)
=
2
= α, −γ.
Since both parameters α and γ are positive, this is an unstable saddle point. On
the other hand, when (x∗ , y∗ ) = (γ/δ , α/β ), we have λ 2 − λ [γ − γ + α − α] + αγ −

αγ + αγ = 0. Therefore λ = ±i αγ. Since the eigenvalues are purely complex, the
center subspace is composed √ of closed orbits. This corresponds to periodic oscilla-

tions with frequency ω = λ1 λ2 = αγ in the time domain.
The Lotka-Volterra equations can be solved numerically using the symplectic Eu-
ler method:

xn+1 = xn + hxn+1 (α − β yn )
xn (7.66)
xn+1 =
1 − h(α − β yn )
and
yn+1 = yn + hyn (δ xn+1 − γ)
(7.67)
yy+1 = yn [1 + h(δ xn+1 − γ)] ,
where h is the time step for the simulation.
In Python we can define a function:
Games and Competitions 201

def LV(xo,yo,p):
alpha = p[0]
beta = p[1]
delta = p[2]
gamma = p[3]
h = 0.04

x = xo
y = yo
xsp = []
ysp = []
for i in range(750):
x = x/(1-h*(alpha-beta*y))
y = y*(1+h*(delta*x-gamma))
xsp.append(x)
ysp.append(y)

return xsp,ysp

This function can be invoked in the main function with:

sigma = 0.5
lbd = 0.8
theta = 0.3
rho = 0.5
eta = 0.6

alpha = 1.0/sigma - lbd - theta


beta = 1.0/sigma
delta = rho
gamma = eta + lbd

p = [alpha,beta,delta,gamma]

xi,yi = 0.25,0.37
x,y = LV(xi,yi,p)
pl.plot(x,y)

A simulation for the Goodwin model showing endogenous oscillatory behavior is


shown in Figs. 7.8 and 7.9.
202 Introduction to Econophysics

V=−3.70
V=−3.36
V=−3.21

Figure 7.8: The phase diagram for the Goodwin model with different initial values
leading to the values of V shown in the legend. The black dot indicates the attractor
of the system

Figure 7.9: The time evolution of employment rate and wage share exhibiting oscil-
latory behavior in the Goodwin model
NOTES 203

Figure 7.10: Phase space of wage shares as a function of employment rate with real
data obtained from the Federal Reserve Bank of St. Louis between 1948 and 2019
for the United States (the triangles indicate the direction of the curve)

It is interesting to contrast the model with real data as shown in Fig. 7.10. The fig-
ure shows the share of gross domestic income as a percentage of the gross domestic
product as a function of the employment-population ratio for the US between 1948
and 2019. For short periods, the phase space produces Goodwin-like oscillations cor-
responding to the employment rate lagging behind the wage share, but this tendency
is completely lost for long periods.
The increase in outsourcing, the stagnation of productivity and the shift to more
specialized jobs has increased mono- and oligopsonyi power leaning the bargaining
balance towards the companies, which forced a reduction of wage shares over the
past four decades [221]. On the other hand, this does not capture the emergence of
better and more efficient products, the increase of consumer choice and other benefits
directly paid by companies to retain workers [222]. All this factors have actually
increased economic well being.

Notes
1 Oskar Morgenstern (1902–1977) Austrian economist, advisee of Ludwig von Mises.
2 Term coined by Daniel Bernoulli (1700–1782) Swiss mathematician and physicist. Bernoulli, the son
of Johann Bernoulli, used to live in the eponymous city. The problem, though, was firstly proposed by his
nephew Nicolaus Bernoulli (1687–1759) Swiss mathematician.
3 William Brian Arthur (1945–) Irish economist.
4 Milton Friedman (1912–2006) American economist, adviser of Harry Markowitz among others.

Friedman was awarded many prizes, including the Nobel memorial prize in economic sciences in 1976.

i Mono/oligo-psony: A market structure where one/a few buyer(s) control(s) most of the market.
204 NOTES

5 John Stuart Mill (1806–1873) British philosopher and economist.


6 William Stanley Jevons (1835–1882) English economist and logician, advisee of Augustus de Mor-
gan.
7 Proposed by Damien Challet (1974–) Swiss physicist and his adviser of Yi-Cheng Zhang from the

Université de Fribourg.
8 Lloyd Shapley (1923–2016) American mathematician, advisee of Albert Tucker. Shapley was

awarded many prizes including the Nobel prize in 2012 for his contribution to cooperative games.
9 Developed by Werner Güth (1944–) German economist.
10 John Forbes Nash Jr. (1928–2015) American mathematician, advisee of Albert Tucker. Nash won

many prizes including the Nobel Memory Prize in Economic Sciences in 1994.
11 Merrill Meeks Flood (1908–1911) American mathematician.
12 Albert William Tucker (1905–1995) Canadian mathematician, adviser of John Nash among others.
13 George Joseph Stigler (1911–1991) American economist, advisee of Frank Knight and adviser of

Thomas Sowell, among others. Stigler received the Nobel memorial prize in economic sciences in 1982.
14 Ronald Harry Coase (1910–2013) British economist, awarded the Nobel prize in economics in 1991.
15 Francis Ysidro Edgeworth (1845–1926) Irish political economist, awarded the gold Guy Medal by

the Royal Statistical Societyl in 1907.


16 Conceptualized by Marie-Esprit-Léon Walras (1834–1910) French economist.
17 Ludwig Lachmann (1906–1990) German economist.
18 Nash originally used Brouwer’s fixed-point theorem stated by Luitzen Egbertus Jan Brouwer (1881–

1966) Dutch mathematician and philosopher.


19 Conceptualized by William Forster Lloyd (1794–1852) British economist, and popularized by Garrett

Hardin (1915–2003) American ecologist.


20 Elinor Claire Ostrom (1993–2012) American economist. Ostrom won several prizes including the

Nobel Memorial Prize in economics in 2009.


21 Robert Marshall Axelrod (1943–) American political scientist.
22 Thomas Crombie Schelling (1921–2016) American economist, awarded the Nobel memorial prize in

economics in 2005 has been called it “the threat that leaves something to chance”.
23 Juan Manuel Rodríguez Parrondo (1964–) Spanish physicist.
24 Proposed by John Maynard Smith (1920–2004) British mathematician and biologist and George

Robert Price (1922–1975) Americn geneticist. Smith was awarded many prizes including the Royal Medal
in 1995.
25 Carl David Tolmé Runge (1856–1927) German mathematician, advisee of Karl Weierstrass and ad-

viser of Max Born among others. Martin Wilhelm Kutta (1867–1944) German mathematician.
26 Alfred James Lotka (1880–1949) American mathematician.
27 Vito Volterra (1860–1940) Italian mathematician and physicist. Advisee of Enrico Betti and adviser

of Paul Lévy among others.


28 Richard Murphey Goodwin (1913–1996) American mathematician and economist.
29 John Maynard Keynes (1883–1946) English economist.
30 Edmund Strother Phelps (1933–) American economist, advisee of Arthur Okun. Phelps won many

awards including the Nobel Memorial Prize in Economic Sciences in 2006.


31 Philip Hartman (1915–2015) American mathematician.
32 Vadim Matveevich Grobman, Russian mathematician.
Agent-Based Simulations
8
“There’s no love in a carbon atom, no hurricane in a water molecule, and no
financial collapse in a dollar bill.” P. Dodds1

The word complex comes from the Latin com, which means “together” and
plectere, which means “to weave”. The real meaning of the word complex, though,
is more complex than that. Complex systems can partially be understood as collec-
tions of agents that interact non-trivially among themselves and their environments
producing novel and rich phenomena that, typically, cannot be anticipated from the
study of their individual units [223, 224]. Some topics related to complexity were
already studied in the previous chapters without an explicit reference to it. For in-
stance, cellular automata was already studied in Sec. 6.3.1 and game theory was
seen in Chapter 7.
As stated in the first chapter, economics is a discipline that deals with interacting
people that are subject to emotions, conformity, collective motion, and many other
complex phenomena. As Wolfram2 once put it, in order to develop models that cap-
ture these complex behaviors, one must look for novel tools beyond the standard
mathematical descriptions that we are used to [225].
This chapter deals exactly with the interaction of agents and the emergence that
appears in these processes. It begins exploring the intricate connections that agents
make and then moves towards some socioeconomic models of opinion dynamics and
segregation. The book ends with a study of kinetic models, linking trade and wealth
to the Boltzmann3 equation.

8.1 COMPLEX NETWORKS


If you paid attention to the endnotes so far, you probably noticed that many impor-
tant authors make networks of collaboration. The same is valid for banks interacting
through credit or firms interacting through trade. Depending on the topology of the
network, some behaviors may emerge and affect properties such as performance and
fragility. In this section we will study these networks, some of their metrics and ap-
plications in econophysics.
In order to study networks, we must study graphs. These are ordered pairs
G = (V, E) where V is a set of points called vertices (or nodes), and E ⊆
{{x, y}|x, y ∈ V, x , y}} is a set of lines called edges (or links) that connect those
nodes. The graph may be weighted if there is a function w : E → R associated with
all edges of the graph. On the other hand, if the graph is unweighted, then w : E → B,
where B is the Boolean4 domain B = {0, 1}. We say that the graph is undirected if
the edges are comprised of unordered vertices, and directed otherwise. All graphs
presented here will be unweighted and undirected, unless explicitly stated otherwise.

DOI: 10.1201/9781003127956-8 205


206 Introduction to Econophysics

A graph can be simple if it allows only one edge between a pair of nodes or
multigraph otherwise. A multigraph with loops is known as pseudograph. Finally, a
graph can be complete if all pair of nodes are connected by edges.
A graph can be represented by an adjacency matrix whose elements are the num-
ber of edges that directly connect two nodes. In the case of a simple graph, the ad-
jacency matrix is a Boolean matrixa . We can also define the neighborhood NG (v)
of a node v as a subgraph of G induced by the neighbors (adjacent nodes, or nodes
connected by an edge to v) of v.
A walk of length n is defined as an alternating sequence of nodes and edges
v0 , e1 , v1 , e2 . . . , ek , vk such that edge ei = {vi−1 , vi }, for 1 ≤ i ≤ n. In Fig. 8.1, a walk
could pass sequentially through nodes abacd. This walk can be closed if the first and
last nodes are the same. An example would be a walk through the sequence abca. It
is considered open otherwise. An example would be abc. Also, a trail is defined as a
walk with no repeated edges such as abcd. A path is defined as an open trail with no
repeated nodes such as abcd. Furthermore, a cycle is defined as a closed trail with
no repeated vertices except the first and last nodes such as acd f a. Finally, a circuit
is a closed trail with no repeated edges that may have repeated nodes. An example
would be abc f dca.
Observe that the number of 1-walks between nodes is given by the adjacency
matrix. The number of 2-walks between two nodes is given by ∑n ain an j but this
leads to the product AA. Therefore, we find by induction that the elements of the nth
power of the adjacency matrix gives the number of n-walks between these nodes.
For instance, for the graph in Fig. 8.1 the adjacency matrix is given by Eq. 8.1. The
2-walks between a and a are aba, aca, and a f a and this is captured by the element
A211 = 3. Also note that the number of triangles in a graph can be found from the
diagonal of A3 . Since a triangle has three nodes and every node is counted, we must
divide the trace of A3 by 3. Also, both clockwise and counterclockwise walks are
computed. Therefore the number of triangles is given by Tr A3 /6.


   
0 1 1 0 0 1 3 1 2 2 2 1
1 0 1 0 1 0 1 3 1 1 0 3
   
1 1 0 1 0 1 2 2 1 4 1 2 2
A= 0 0 1 0 0 1
, A = 
2 1 1 2 1 1
 (8.1)
   
0 1 0 0 0 1 2 0 2 1 2 0
1 0 1 1 1 0 1 3 2 1 0 4
The degree matrix, a related concept, is a diagonal matrix whose elements are the
node degrees. A Laplacian matrix can be constructed as L = D − A.
A graph can be regular if all nodes have the same number of connections (have
the same number of neighbors, or the same degree, or even the same coordination
number, depending the audience) as shown in Fig. 8.2. If the regular graph (dis-
counting its external nodes, or leaves, that have degree 1) contains no cycles and is
connected, then it is a Cayley5 tree. If this tree has an infinite number of nodes (no

aA matrix whose elements are in the Boolean domain B.


Agent-Based Simulations 207

b b b b
a c a c a c a c

f d f d f d f d
e e e e

Figure 8.1: A random graph used to illustrate the concepts of (from left to right)
walk, trail, cycle, and circuit
leaves), then it is a Bethe6 lattice. A spanning tree of a graph G is a subgraph of G
that is a tree and contains all nodes of G.

0-regular 1-regular 2-regular 3-regular

Figure 8.2: Graphs with the same number of nodes but with different regularities

If a graph has non-trivial topological properties, then we call it a complex network.


A non-trivial topological property could be, for instance, a degreeb distribution with
a long tail. In order to explore these properties we must study some graph metrics.

8.1.1 METRICS
A metric space is a tuple (X, d) where X is a set, and d : X × X → R+ is a function
(called metric or distance) such that for any x, y, z ∈ X, d satisfies:

1. Leibniz’s7 law of indiscernibility of identicals: d(x, y) = 0 ⇐⇒ x = y,


2. The symmetry axiom: d(x, y) = d(y, x), and
3. The triangle inequality: d(x, z) ≤ d(x, y) + d(x, z).
Considering graphs, the shortest path (or geodesic) between nodes is a metric that
can be found in different algorithms such as Dijkstra’s8 [226], Bellman9 -Ford10 [227]
and Floyd11 -Warshall12 [228, 229]. The number of edges in a geodesic is known
as distance between two nodes. The eccentricity of a node is the longest distance
between this node and any other in the graph. The radius of a graph is the minimum
eccentricity of any node. On the other hand, the diameter of a graph is the maximum
eccentricity of any node.

b Number of connections of a node makes with other nodes.


208 Introduction to Econophysics

8.1.1.1 Clustering Coefficient


The node neighborhood of a node vi is defined as:

Ni = v j : ei j ∈ E ∨ e ji ∈ E . (8.2)
The local clustering coefficient for a node measures the propensity of the neigh-
borhood of a node to form a cliquec , or cluster together. It is defined as the ratio
between the existing number of edges among its neighbors (or similarly, the number
of triangles that they form) and the total number of edges that there could be among
them:

e jk : v j , vk ∈ Ni , e jk ∈ E
Ci = 2 . (8.3)
|Ni |(|Ni | − 1)
In terms of the adjacency matrix, it can be computed as:

∑ j,k Ai j A jk Aki
Ci = . (8.4)
∑ j Ai j ∑ j Ai j − 1
The global clustering coefficient, on the other hand, is the ratio between the num-
ber of closed tripletsd (or three times the number of triangles) and the number of all
triples in the graph. In terms of the adjacency matrix, it is given by:

∑ Ai j A jk Aki Tr(A3 )
C=  i, j,k  = , (8.5)
∑i ∑ j Ai j ∑ j Ai j − 1 ∑i ki (ki − 1)
where
ki = ∑ Ai j . (8.6)
j

Figure 8.3 shows three graphs with the same number of nodes but with different
topologies. The local clustering coefficients for node 1 are C1 = 1, 1/3, and 0 for the
graphs a, b, and c, respectively. On the other hand, the global clustering coefficients
are C = 1, 0.44, and 0, respectively.

a) b) c)
2 2 2

1 3 1 3 1 3

4 4 4

Figure 8.3: Three graphs with the same number of nodes but with distinct topologies

cA subgraph where every two distinct nodes are adjacent.


d An undirected subgraph consisting of three nodes connected by either two edges (open) or three edges

(closed).
Agent-Based Simulations 209

A snippet to compute the global clustering coefficient is given bellow.

import numpy as np:

def gclust(A):
N = np.shape(A)[0]

num = np.trace(np.linalg.matrix_power(A,3))

k = [0 for j in range(N)]
for i in range(N):
for j in range(N):
k[i] = k[i] + A[i,j]

den = 0
for i in range(N):
den = den + k[i]*(k[i]-1)

return num/den

Some models link the clustering of agents with respect to their demands to many
stylized facts such as the fat tails observed in the distribution of returns in the stock
market [230].

8.1.1.2 Centrality
How important is a node compared to all others in the network? This is quantified
by the centrality [231] of a node. The degree centrality is simply defined as the ratio
between its degree and the total number of nodes subtracted by one. Figure 8.4 shows
a centralized network where a central node works as a hub, a decentralized network
with multiple hubs, and a distributed network with a few or no hubs.
It is also possible to define a closeness centrality [232] as the reciprocal of the
farness, or the sum of the distances d between a specific node and all other nodes of
a network:

|V | − 1
Cc (p) = . (8.7)
∑(p,q)∈V d(p, q)
There are many other centrality metrics such as betweenness centrality [233] and
eigenvector centrality [234].
The concept of centrality helps us understand some interesting phenomena such
as the friendship paradox. Consider a network made of symmetrical friendships. The
average number of friends a person has is the average degree of the network:
210 Introduction to Econophysics

a) b) k=1
c)
C=0.1 k=4
C=0.33

k=4
C=0.4

k=10, C=1

k=3
k=1, C=0.1 C=0.25

N=11 N=11 N=13

Figure 8.4: a) Centralized network, b) decentralized network, and c) distributed net-


work. k indicates the degree of a node, and C is its degree centrality

∑v∈V d(v)
µ= . (8.8)
|V |
The average number of friends that a friend of a person has, though, can be found
by randomly choosing an edge and one of its endpoints. One endpoint is the original
person, while the other is a friend. The average degree of the latter node is the value
we seek. The probability of selecting a node with a specific degree is:

d(v) d(v)
p(v) = = . (8.9)
2|E| ∑v∈V d(v)
Hence, the average number of friends of friends is:

d 2 (v)
µf f = ∑ p(v)d(v) = ∑ ∑v∈V d(v)
v∈V v∈V
(8.10)
|V |
= ∑ d 2 (v).
|V | ∑v∈V d(v) v∈V
Agent-Based Simulations 211

Cauchy-Schwarz Inequality

Consider the polynomial function f : R → R+ :

f (x) = ∑(ai x − bi )2
i
! ! (8.11)
= ∑ a2i 2
x −2 ∑ ai bi x + ∑ b2i .
i i i

Since it is a nonnegative function, its determinant has to be less than


or equal to zero:
!2 ! !
∆x = 4 ∑ ai bi −4 ∑ a2i ∑ b2i ≤0
i i i
! ! !2 (8.12)

∑ a2i ∑ b2i ≥ ∑ ai bi .
i i i

This is known as the Cauchya -Schwarzb inequality.

a Augustin-Louis Cauchy (1789–1857) French polymath.


b KarlHermann Amandus Schwarz (1853–1921) Prussian mathematician, advisee
of Karl Weierstrass.

According to the Cauchy-Schwarz inequality, we get:


! ! !2
1 1
µf f = ∑ 12 ∑ d 2 (v) ≥ |V | (∑v∈V d(v))
|V | ∑v∈V d(v) v∈V ∑ d(v)
v∈V v∈V
∑v∈V d(v)
µf f ≥ =µ
|V |
µf f ≥ µ.
(8.13)
This implies that, on average, people tend to make friends with people who already
have a number of friends higher than the average centrality. This appears to be a
paradox since the original person that we picked could now be a friend’s friend. The
solution, however, is in the fact that we are talking about averages. This problem,
related to structure of the social network, also illustrates the class size paradox where
a person can experience a much more crowded environment than it really is.

8.1.1.3 Assortativity
In many networks, there is often a tendency of similar nodes to preferentially attach
to each other. The assortativity (or homophily) quantifies this tendency through the
correlation of nodes.
212 Introduction to Econophysics

Let’s define ei j as the probability that an edge connects a node of type i to another
node of type j, such that ∑i j ei j = 1. Also, let ai = ∑ j ei j be the probability that an
edge comes from a node of type i and b j = ∑i ei j be the probability that an edge
connects to a node of type j. The assortativity coefficient is then given as:

∑i eii − ∑i ai bi Tr(e) − ke2 k


r= = , (8.14)
1 − ∑i ai bi 1 − ke2 k
where kak is the sum of all elements of a. If there is no assortative mixing, then
ei j = ai b j and, according to Eq. 8.14, r = 0. On the other hand, if there is perfect
assorativity, then ∑i eii = 1 and r = 1. If the network is perfectly disassortative (every
node connects to a node of a different type), then eii = 0 and:

∑i ai bi ke2 k
r= = 2 . (8.15)
∑i ai bi − 1 ke k − 1
The graph in Fig. 8.4a is not assortative, whereas the graphs in Fig. 8.4b and c
have assortativity coefficients of −0.6 and −0.2, respectively, implying some level
of disassortativeness. A regular graph, on the other hand, is perfectly assortative. The
following snippet computes the assortativity.
Agent-Based Simulations 213

import numpy as np

def assort(A):
# Degree matrix
D = np.sum(A,1)

# Total number of edges


T = int(np.sum(D)/2)

# Number of nodes
N = np.shape(A)[0]

# Prob. edge from


e = np.array([[0.0 for i in range(max(D)+1)] for j in range(max(D)+1)])
for i in range(N-1):
for j in range(i+1,N):
e[D[i],D[j]] += A[i,j]/T

p = np.sum(np.dot(e,e))
num = np.trace(e)-p
den = 1-p

if (np.trace(e) >= 0.9999):


r=1
else:
r = num/den

return(r)

8.1.2 RANDOM NETWORKS


One of the first attempts to understand social networks was given by the random
network model proposed by Erdös-Rényi [235]13 . In this model, we start with N un-
connected nodes and pick pairs randomly, connecting them by an edge with constant
probability p.
The probability of finding a node with degree k is given by the product of three
terms: i) the possibility of selecting k links among the total number N − 1, ii) the
probability that k nodes are present, and iii) the probability that the remaining nodes
are not chosen. Mathematically, this gives us a binomial distribution:
 
N −1 k
P(k) = p (1 − p)N−k . (8.16)
k
214 Introduction to Econophysics

The expected degree of the network can be found expanding the binomial expres-
sion:
 
N N k N−k−1
(p + q) = ∑ pq
k k
 
∂ N
(p + q)N = ∑ kpk−1 qN−k−1
∂p k k
 
N−1 1 N k N−k−1 (8.17)
N(p + q) = ∑k pq
p k k
 
N k
Np = ∑k p (1 − p)N−k−1 , where q = 1 − p
k k
hki = N p.
Similarly, we can find the variance of this degree:

∂2
 
N N
2
(p + q) = ∑ k(k − 1)pk−2 qN−k−1
∂p k k
   
N 2 k−2 N−k−1 N
=∑ k p q −∑ kpk−2 qN−k−1
k k k k
p2 N(N − 1)(p + q)N−2 = hk2 i − hki (8.18)
2 2
hk i = p N(N − 1) + N p
hk i − hki2 = p2 N(N − 1) + N p − N 2 p2
2

σk2 = N p − N p2
= N p(1 − p).

Therefore, the bigger the network is, the more the distribution shifts and spreads
towards larger values. Social networks, though, do not empirically show this behavior
[236].

8.1.2.1 Average Path Length


It is fair to say that between two near nodes there can be, on average, hki paths. For
second neighbors, there may be hki2 paths, and so on. Therefore, for a distance d,
the number of paths is:
d
hkid+1 − 1
N(d) = 1 + hki + hk2 i + . . . + hkd i = ∑ hki i = . (8.19)
i=0 hki − 1
However, the maximum path length (diameter of the network) cannot be longer than
the number of nodes. Therefore, N(dmax ) ≈ N and we deduce that:
Agent-Based Simulations 215

hkidmax ≈ N
dmax log (hki) ≈ log(N)
(8.20)
log(N)
dmax ≈ .
log (hNi)
This sublinear relationship between the diameter and the number of nodes is known
as small world phenomenon. This was initially measured in 1967 by Milgram14 using
letters [237,238]. In short, a recipient would receive a letter addressed to some person
and then forward this letter to a friend who was likely to know him or her. After the
letter was received by the final contact person, the researcher would count how many
steps were necessary for completing this path. The result average path length was
about six, which gave rise to the popular expression six degrees of separation.

8.1.2.2 Clustering Coefficient


The ki neighbors of a node i can make a maximum number of connections among
themselves:
 
ki ki ! ki (ki − 1)
= = . (8.21)
2 2(ki − 2)! 2
Its neighbors, however, are connected with probability p, creating p k2i connections.


Hence, the expected number of links among the neighbors of node i is:

ki (ki − 1)
hLi i = p . (8.22)
2
The clustering coefficient is exactly this probability:

2hLi i hki
Ci = p = = , (8.23)
ki (ki − 1) N

as previously derived in Eq. 8.17.


This implies that the clustering coefficient should be inversely proportional to
the size of the network. However, this is not observed experimentally either. Rather,
social networks show a high clustering coefficient nearly independent on the size of
the network.

8.1.3 SCALE-FREE NETWORKS


A network is considered scale invariant if its degree distribution follows a power law
P(k) ∝ k−γ with no characteristic scale. Thus, when rescaling its distribution, we get
the same distribution (except for a multiplicative factor):

P(ak) ∝ a−γ k−γ ∝ P(k). (8.24)


This distribution can be normalized as:
216 Introduction to Econophysics

P(k) = Ck−γ . (8.25)


Since, it is a distribution:
!−1
∑ P(k) = C ∑ k−γ = 1 → C = ∑ k−γ = ζ −1 (γ), (8.26)
k k k

where ζ (γ) is the Riemann15 zeta function.


One way of producing scale-free networks is using a preferential attachment pro-
cedure such as the Yule-Simon’s urn process [239, 240] in which the probability of
adding a ball to a growing number of urns is linearly proportional to the number
of balls already in an urn. In the preferential attachment process in networks pro-
posed by Barabasi16 and Albert17 [241, 242] we start with m0 nodes and a node with
m < m0 links is progressively added to the network. Every new node is connected
to an existing node with probability proportional to the number of connections it
already has:
ki
pi = . (8.27)
∑n kn

8.1.3.1 Degree Distribution


The sum in the denominator of the last equation can be computed with the degree
sum formulae .

Degree sum formula

Consider a pair (v, e), where v is a node and e is an edge. The number
of edges that connect to a node v is simply its degree: deg(v). There-
fore, the sum of all degrees is the sum of all incident pairs (v, e).
Each edge, though, is connected to two nodes. Therefore, the total
number of pairs is twice the number of edges. Since both sums are
the same, we conclude that the sum of all degrees of a graph is twice
the number of edges:

∑ deg(v) = 2|E|. (8.28)


v

This implies that the sum of degrees of all nodes (even if they are
odd) is always even. Consequently, if we imagine a group of people,
the number of those who have shaken hands with people from a
subgroup with an odd number of individuals is always even. Hence,
this is also known as the handshaking lemma.

eA nice derivation of the properties of scale-free networks can be found in [243].


Agent-Based Simulations 217

If a new node makes m connections at every instant, then the number of edges is
mt. If we discount this new node and use the degree sum formula, we find that the
denominator gives:

∑ kn = 2mt − m. (8.29)
n

The temporal change of the degree of a node has to be propotional to the number
of connections that are added and the probability that we find a node with this degree:
dki mki
= mpi ≈ for large t
dt 2mt
Z t Z t
dki dt
=
t k i ti 2t
i    (8.30)
ki 1 t
ln = ln , since ki (t) = m
m 2 ti
 1/2
t
ki (t) = m .
ti
The probability of finding a node with degree smaller than k is:

 1/2 !
t
P(ki (t) < k) = P m < k , from the previous equation.
ti
m2 t
 
= P ti > 2 (8.31)
k
m2 t
 
= 1 − P ti ≤ 2 .
k

Since we are adding a node at fixed time steps, the number of nodes with degree
2
smaller than k is just N< = t mk2 . On the other hand, the total number of nodes grows
linearly as NT = m0 + t ≈ t for t → ∞. Therefore, the probability of finding a node
with a degree smaller than k is:

m2
P (ki (t) < k) = 1 − . (8.32)
k2
Therefore, the probability of finding a node with degree k is:

∂ P(ki (t) < k)


p(k) = = 2m2 k−3 . (8.33)
∂k
Most of real social networks show a power-law behavior similar to this.
218 Introduction to Econophysics

8.1.3.2 Clustering Coefficient


Let’s define the preferential attachment of a new node j to an existing node i with
degree ki as:

ki ( j)
Π (ki ( j)) = . (8.34)
∑n kn ( j)
If the new node makes m connections, then:

ki ( j) ki ( j)
pi j = mΠ (ki ( j)) = m = . (8.35)
∑l kl ( j) 2j
Considering that the arrival time of the ith node is i and using the result from Eq.
8.30:  1/2
m ij m
pi j = = (i j)−1/2 . (8.36)
2j 2
Assuming now a continuum, the number of connections among neighbors is given
by:
Z N Z N
N4 = P(i, j)P(i, l)P( j, l)did j
i=1 j=1
m3 N N
Z Z
= (i j)−1/2 (il)−1/2 ( jl)−1/2 did j
8 i=1 j=1
(8.37)
m3
Z N
di N d j
Z
=
8l i=1 i j=1 j
m3
= (ln(N))2 .
8l
Therefore, the clustering coefficient is given by:
2N4
Cl =
kl (kl − 1)
m3
(8.38)
4l(ln(N))2
= .
kl (kl − 1)
Using once again the result from Eq. 8.30:
 1/2
N
kl = m
l (8.39)
N
kl (kl − 1) ≈ kl2 = m2 ,
l
we get:
m
Cl ≈ (ln(N))2 . (8.40)
4N
Agent-Based Simulations 219

Therefore, the Barabasi-Albert network has a higher clustering coefficient when


compared to the random network. The clustering behavior found in real social net-
works, on the other hand, tends to be higher.

8.1.4 SMALL WORLD NETWORKS


The small world property of social networks is well captured by the Watts18 -
Strogatz19 model [244].
This network can be constructed from a regular ring network composed of N
nodes connected to K neighbors symmetrically to each side. A node is picked ran-
domly and K/2 neighboring nodes are reconnected with any other node of the ring
with probability β f . Hence, for β = 0, we end up with a regular network, whereas
for β = 1 the resulting network is random, as shown in Fig. 8.5. Intermediate values
of β generate networks with high clustering coefficients, small diameter, and small
world property. The degree distribution for this model, however, does not reflect that
of real social networks.

Regular Small-World Random

Randomness (β)

Figure 8.5: Varying parameter β in the Watts-Strogatz model, it is possible to gener-


ate regular, small-world, and random networks

8.2 SOCIOECONOMIC MODELS


The Ising20 model [245, 246] is a popular tool in statistical mechanics used to study
ferromagnetic systems. In this model, we have a Hamiltonian21 given by:

H = −h ∑ si − ∑ Ji j si s j , (8.41)
i i, j

where h and J are coupling constants, and s is a spin state. Typically Ji j , which
represents a spin-spin interaction, is such that it is a constant for nearest neighbors
and 0 otherwise. The constant h can represents the presence of an external field, and
the first sum is related to this field trying to align the spins in a specific direction.

f This model is also known as the beta model because of this parameter.
220 Introduction to Econophysics

In a typical algorithm to find the equilibrium state of a Ising model, single spin
states are randomly created and tested in a Monte Carlo approach (see Appendix B).
This is generally a slow process, but alternatives such as the Swendsen22 [247] and
Wolff23 algorithms [248] are available. In the latter, for example, we create clusters
of spins as test states.
In this section we will study how similar ideas using agents instead of spins can
be used to model some socioeconomic models. We will start with a model for social
segregation and then move to opinion dynamics and will finish the chapter with a
simple, yet elegant, model for the formation of prices in a market.

8.2.1 SCHELLING’S MODEL OF SEGREGATION


The Schelling24 model [249] is an Ising-like agent-based model [250–252] proposed
to study social segregation. It is based on an automaton with a Z ⊂ Z2 lattice of
size N and a neighborhood (originally Moore). The states of the automaton are S =
{A, B, 0}, where A and B are two types of agents that may occupy a grid cell, and 0
indicates an empty one. Only one agent may occupy a grid cell at a time.
The simulation starts with a fraction ρ = N0 /N 2 of unoccupied cells. The re-
maining fraction 1 − ρ is randomly occupied by agents of either group with equal
probability. This can be created with the following snippet:

def createGrid(rho,N):
return np.array([[np.random.choice([0,-1,1],p=[rho,(1-rho)/2,(1-rho)/2]) \
for i in range(N)] for j in range(N)])

At each round, the agents study their neighborhoods and check the fraction of
neighbors that are of the same type:

def neighborhood(t):
p = np.zeros(np.shape(t))

# Von Neumann neighborhood


p[:,:-1] = t[:,1:]
p[:,1:] = p[:,1:] + t[:,:-1]
p[:-1,:] = p[:-1,:] + t[1:,:]
p[1:,:] = p[1:,:] + t[:-1,:]

p = np.where(t != 0, p*t,0)

return p
Agent-Based Simulations 221

If this fraction is below a certain threshold f , then the agent is unsatisfied and
relocates to an empty grid cellg . If only unsatisfied agents are allowed to migrate,
then we say that is a constrained (or solid) simulation, whereas if all agents are
allowed to migrate (as long as they do not worsen their situations), then we say that
it is an unrestricted (or liquid) simulation. Note that the agents can improve their
satisfaction even if their migration may reduce the satisfaction of their neighbors
(see Pareto efficiency—Sec. 7.1.4.1). Also, even though the global polarization of
the lattice is preserved, the local polarization is not.
We can define two other functions, one for moving an agent to a new destination
and another one that finds a new destination:

def move(t,frm,to):
k = t[frm]
t[frm] = 0
t[to] = k

def destination(t):
unoccupied = np.where(t == 0)
l = len(unoccupied[0])
p = np.random.randint(l)

m = unoccupied[0][p]
n = unoccupied[1][p]

return(m,n)

Given these functions, the simulation itself is performed by:

grid = createGrid(0.3,80)

for it in range(50000):
nbr = neighborhood(grid)
frm = np.unravel_index(nbr.argmin(),nbr.shape)
to = destination(grid)
move(grid,frm,to)

g See homophily in Sec. 8.1.1.3.


222 Introduction to Econophysics

Type A Type B Empty

Figure 8.6: Initial grid configuration (left) and steady state grid configuration (right)
for the Schelling model with ρ = 0.3 on a 80 × 80 lattice

The result of this simulation is shown in Fig. 8.6. It is clear that the steady state
solution exhibits the formation of clusters with agents of different types.
In order to quantify the formation of clusters, we can use the segregation coef-
ficient S [253]. This is an order parameter corresponding to the weighted average
cluster size:

S = ∑ ni pi , (8.42)
{i}

where pi = ni /M is the probability of finding a cluster of mass ni , and M = N 2 (1−ρ)


is the total number of agents. A normalized segregation coefficient is often calculated
as:
S 2 ni 2
s= = ∑ ni =
M/2 M {i} M ∑ n2i ,
[N 2 (1 − ρ)]2 {i}
(8.43)

where we have used the fact that the biggest cluster can only be M/2. In the extreme
situation where there are only two clusters, the normalized segregation coefficient is
1, whereas it is 1/M if there is no cluster formation.
Clusters can be identified with the following flood fill algorithm:
Agent-Based Simulations 223

def cluster(t,y,x,c):
L = np.shape(t)[0]
mass = 0

candidates = [(y,x)]
while(len(candidates)>0):
y,x = candidates.pop()
if (t[y,x] == c):
if (y > 0):
candidates.append((y-1,x))
if (y < L-1):
candidates.append((y+1,x))
if (x > 0):
candidates.append((y,x-1))
if (x < L-1):
candidates.append((y,x+1))

mass = mass + 1
t[y,x] = 3

return mass

The segregation coefficient can be found with:

def segregation(t):
L = np.shape(t)[0]
n = []

for j in range(L):
for i in range(L):
mass = cluster(t,j,i,1)
if (mass > 0):
n = np.append(n,mass)
mass = cluster(t,j,i,-1)
if (mass > 0):
n = np.append(n,mass)

return 2*np.sum(n**2)/np.sum(t!=0)**2
224 Introduction to Econophysics

Segregation Coefficient

0.25 0.50 0.75 1.00

Tolerance Level

Figure 8.7: Single shot simulation of the segregation coefficient as a function of the
tolerance level for the Schelling model on a 80 × 80 grid and different values of ρ

A single shot simulation of the segregation coefficient as a function of the tol-


erance levelh is shown in Fig. 8.7. The tolerance level can only assume four values
when using von Neumann neighborhood: 1/4, 2/4, 3/4, and 4/4. It is interesting to
note that a tolerance level higher than 1/4 is enough to cause a significant lowering
of the segregation coefficient.
Although Schelling model does not capture many restrictions such as financial
barriers, it is supported by many empirical evidence (see [254, 255], for instance).

8.2.2 OPINION DYNAMICS


In 1951 Asch25 proposed the following experiment [256]: given a card A with a
single line drawn on it and another card B with three lines, a college student would
have to answer which of the three lines in card B had the same length as the one
in card A. The participant would be in a group with seven confederates that would
purposefully choose a wrong answer. Asch also had a control condition where the
participant would be tested alone. The experiment showed that approximately 75 %
of the participants conformed at least once with the group even if the answer was
completely wrong, whereas less than 1 % of the participants gave wrong answers in
the control condition. This is a classic experiment that shows the tendency of humans
to conform with a group.
When the coordination of behaviors occurs spontaneously without a central au-
thority, we call it herd behavior. This is widely seen in nature as a form of collective
behaviori . This happens, for example, during an information cascade when investors

h The fraction of neighbors of a different type one tolerates before moving.


i One of the most popular models for collective motion is the Vicsek26 model.
Agent-Based Simulations 225

tend to follow the investment strategies of other agents rather then their own [257].
This partially explains the dot-com bubble of 2001, for example. After seeing the
commercial potential of the internet, investors put aside their personal believes and
conformed with a common tendency of investing in e-commerce start-ups. Between
1995 and 2000, the Nasdaq index rose more than 400 %, but after this irrational
exuberance27 , the index lost all its gains leading to the liquidation of a vast number
of companies and a general glut in the job market for programmers.
The Hegselmann28 -Krause29 (HK) is an agent-based model [258] that tries to
capture this behavior. The simulation starts with an opinion profile xi ∈ [0; 1], i =
1, . . . , N, where N is the number of agents:

import numpy as np
import matplotlib.pyplot as pl

NA = 50
NI = 10

x = np.zeros((NA,NI))
x[:,0] = [np.random.uniform() for i in range(NA)]

At each simulation step, a neighborhood for each individual is formed with agents
that have similar opinions:

Nt (n) = {m : |xt (m) − xt (n)| ≤ ε}, (8.44)


where ε is a confidence level. Therefore, the neighborhood is bounded by this level
and the model is often known as a bounded confidence model. The following snippet
finds the neighborhood and calculate the average opinion:

def neighborhood(S,el):
ac = 0
z = 0.0
for y in S:
if abs(y-el) <= 0.05:
z=z+y
ac = ac + 1

return z/ac
226 Introduction to Econophysics

Final Number of Clusters


Opinion Profile

Simulation Step Confidence Level

Figure 8.8: The evolution of the opinion profile in the HK model (left) and the final
number of clusters as a function of the confidence level

The opinion profile is updated by the average opinion of the neighborhood of each
agent:

1
xt+1
n = ∑ xtm . (8.45)
|Nt (n)| m∈N (n)t

for t in range(NI-1):
for i in range(NA):
x[i,t+1] = neighborhood(x[:,t],x[i,t])

The result for a simulation with 50 agents in shown in Fig. 8.8. Regardless of the
initial distribution, clusters of agents tend to be formed and opinions tend to a small
set. The final number of clusters approximately depends on the confidence level as
N f inal ∼ ε −1 . In other words, more groups are formed as the agents restrict their
neighborhood of individuals with similar opinions.
A variant of the HK is the Deffuant30 model [259]. There, pairs of agents are
picked randomly and adjust their opinions if they are relatively close. Otherwise,
communication is believed not to be possible and they keep their old believes. The
update rule is given by:

xi (t + ∆) = xi (t) − µ [xi (t) − x j (t)]


(8.46)
x j (t + ∆) = x j (t) − µ [x j (t) − xi (t)] ,
where µ ∈ [0, 1/2] is a convergence parameter.
The initialization for this simulation is identical to that of the HK model, but the
dynamics is now given by:
Agent-Based Simulations 227

Final Number of Clusters


Opinion Profile

Simulation Step Confidence Level

Figure 8.9: The evolution of the opinion profile in the Deffuant model (left) and the
final number of clusters as a function of the confidence level

for t in range(NI-1):
i = np.random.randint(NA)
j = np.random.randint(NA)

x[:,t+1] = x[:,t]
if abs(x[i,t]-x[j,t]) < 0.1:
x[i,t+1] = x[i,t] - mu*(x[i,t]-x[j,t])
x[j,t+1] = x[j,t] - mu*(x[j,t]-x[i,t])

The result of a simulation with 50 agents and µ = 0.35 is shown in Fig. 8.9.
As in the HK model, the final number of clusters approximately depends on the
confidence level as N f inal ∼ ε −0.9 .

8.2.2.1 Kirman Model


Imagine two nearly identical securities. It is not uncommon that a large majority of
investors end up choosing one rather than the other. The same happens, for instance,
with ants presented with two sources of similar foods. Instead of the ants exploring
both sources equally, one source is consumed first. The Kirman31 model [260] is a
Markov chain agent-based model created to answer this kind of problem.
Let’s start with two distinct sources A and B and a total population of N agents.
At each simulation step, two random agents meet and one is converted to the other’s
opinion with a chance 1 − δ . There is also a probability ε that an agent changes its
opinion independently of meeting another agent. This could happen, for instance, as
a reaction to an exogenous information.
228 Introduction to Econophysics

The state of the system k ∈ (0, 1, . . . , N) is defined as the number of agents that
prefer source A. Therefore, the probability p1 that k increases by one agent is given
by:
  
k k
p1 = p(k, k + 1) = 1 − ε + (1 − δ ) , (8.47)
N N −1
whereas the probability that k is decreased by one agent is given by:
 
k N −k
p2 = p(k, k − 1) = ε + (1 − δ ) . (8.48)
N N −1
There is also a probability p3 = 1 − p1 − p2 that k remains unchanged. Note that
this model resembles a Polya urn process (see Sec. 3.1.2). If ε = 1/2 and δ = 1 then
it is just an Ehrenfest32 urn process where the agents change opinions without any
interaction. Also, when ε = δ = 0, the expected value of k is:

hkn+1 |Fn i = (kn + 1)p0 + (kn − 1)p0 + kn (1 − 2p0 ) = kn , (8.49)


where  
k k k N −k
p0 = 1 − = . (8.50)
N N −1 N N −1
Therefore, under these parameters, the process becomes a martingale (see Sec. 3.1).
The Kirman model can easily be simulated with the following snippet:

N = 100
eps = 0.15
delta = 0.3
k = N/2
x = []

for it in range(10000):
p1 = (1-float(k)/N)*(eps+(1-delta)*float(k)/(N-1))
p2 = (float(k)/N)*(eps+(1-delta)*(N-k)/(N-1))

r = np.random.rand()

if (r <= p1):
k=k+1
if (r > p1 and r <= p1+p2):
k=k-1

x.append(k)
Agent-Based Simulations 229

100

80

60

40

20

0 20 40 60 80 100 0 20 40 60 80 100 10 20 30 40 50 60 70 80

Figure 8.10: The number of agents k that prefer source A as a function of the sim-
ulation step (top) and their respective histograms for ε = 5 × 10−3 , δ = 10−2 (left),
ε = 10−2 , δ = 2 × 10−2 (center), and ε = 0.15, δ = 0.3 (right)

Some results of this simulation are shown in Fig. 8.10. It is interesting to note that
it is possible to adjust the type of distribution of k by changing the values of ε and δ .

8.2.3 MARKET SPIN MODELS


The Bornholdt model33 [261] is another Ising-like automaton on a Z ⊂ Z2 lattice
of size N and a Von Neumann neighborhood. The states of this automaton are S =
{+1, −1}, where +1 corresponds to a buyer, and −1 corresponds to a seller state.
The simulation starts with a random field and the dynamics is given by a stochastic
transition function that assigns the state +1 to a cell with probability pi , and the state
−1 with a probability 1 − pi . The probability pi is given by:

pi = [1 + exp (−2β hi (t))]−1 , (8.51)


where β is the inverse temperature. hi (t) is a local field representing the influence
to conform with the majority of nearest neighbors in accordance with earlier models
[262, 263]:

hi (t) = J ∑ S j (t) − αCi (t)hSi, (8.52)


j∈NV1 N (i)

where J is a disagreement constant that indicates the tendency for the agent to con-
form, and α > 0 is a demagnetizing constant that indicates the tendency for the agent
to seek an anti-ferromagnetic order. This latter term represents the preference to-
wards the minority group (see Sec. 7.1.1.1). Ci is a second spin available to each
cell that relates to the strategy of the agent with respect to the global magnetization.
230 Introduction to Econophysics

Ci = 1, for instance, designates a desire for the agent to join the global minority
group that is interested in future returns, a fundamentalist behavior. The other situ-
ation Ci = −1 points to the desire to follow the majority group, a chartist behavior.
Thus, the dynamics of the strategy spin is given by:

−Ci (t) if αSi (t)Ci (t) ∑ j S j (t) < 0,
Ci (t + 1) = (8.53)
Ci (t) otherwise.
If, however, the strategy spin is allowed to change instantaneously, then Eq. 8.52
becomes:

hi (t) = J ∑ S j (t) − αSi (t) |hS(t)i| . (8.54)


j∈NV1 N (i)

The magnetization of the system M(t) = hS(t)i is identified as the price, from
which it is possible to obtain the logarithmic returns.
To simulate the Bornholdt model we start with the following snippet:

import numpy as np
import random as rd
import matplotlib.pyplot as pl

N = 32
J=1
beta = 1.0/1.5
alpha = 4

S = np.array([rd.choices([1,-1],k=N) for i in range(N)])


Sn = np.zeros((N,N))

r = []
M=1

The simulation itself is an update loop:


Agent-Based Simulations 231

for it in range(2000):
Ml = M
M = np.average(S)
for i in range(N):
for j in range(N):
sm = 0
for x in neig(i,j,N):
sm = sm + S[x[0],x[1]]
h = J*sm - alpha*S[i,j]*abs(M)
p = 1.0/(1+np.exp(-2*beta*h))

if (rd.random() < p):


Sn[i,j] = 1
else:
Sn[i,j] = -1

S = Sn
r = np.append(r,np.log(abs(M))-np.log(abs(Ml)))

In the snippet, neig is a function that returns the Von Neumann neighborhood:

def neig(i,j,N):
z = []
if (i > 0):
z.append([i-1,j])
if(i < N-1):
z.append([i+1,j])
if (j > 0):
z.append([i,j-1])
if (j < N-1):
z.append([i,j+1])

return np.array(z)

The result of the simulation shows metastable phases as shown in Fig. 8.11. More-
over, the log-returns in Fig. 8.12 show fat tails as indicated by the CCDF. Bornholdt
also showed that his model also shows some stylized facts such as volatility cluster-
ing.
232 Introduction to Econophysics

Figure 8.11: Grid configuration on a 32 × 32 lattice at undercritical temperature after


t=100, 200, and 300 simulation steps (from left to right)
Log-return

CCDF

2.00 2.25 2.50 2.75 3.00 3.25 3.50 3.75 4.00

Simulation step x 103 Log-return

Figure 8.12: Left: Log-returns for the Bornholdt model with α = 4.0, J = 1.0, and
β = 2/3. Right: The corresponding complementary cumulative distribution function
(CCDF)
Agent-Based Simulations 233

8.3 KINETIC MODELS FOR WEALTH DISTRIBUTION


In the case of socioeconomic problems, we can use ad hoc models [264] where
particles maps to agents, energy maps to wealthj , and the binary collisions map to
trade interactions. Under this scheme, we can invoke the famous Boltzmann equation
to model the interaction among agents (see Appendix F).
In simulations of wealth distribution, for instance, two traders with initial posses-
sions v1 , v2 ∈ Ω ⊆ R meet randomly and are distributed as:
 0    
v1 (t) p1 q1 v1 (t)
= , (8.55)
v02 (t) p2 q2 v2 (t)
where v01 , v02 ∈ Ω as well.
In order to work with the framework of random processes, we can adopt associ-
ated independent random variables X and Y that are distributed in accordance with:
Z
P(X ∈ S) = P(Y ∈ S) = f (v,t)dv, ∀S ⊆ Ω. (8.56)
S
Their interaction rules are:
 0    
X (t) p q1 X(t)
= 1 , (8.57)
Y 0 (t) p2 q2 Y (t)
After a small period ∆, the random variables are updated to X(t + ∆) = X 0 (t) if
there was a binary interaction and X(t + ∆) = X(t) otherwise. The probability of
interaction can be assigned to a Bernoulli distributed random variable T such that
P(T = 1) = 1 − P(T = 0) = µ∆, where µ is an interaction kernel.
Therefore, we can write:

X(t + ∆) = T X 0 (t) + (1 − T )X(t)


(8.58)
Y (t + ∆) = TY 0 (t) + (1 − T )Y (t).

For any linear observable ϕ we can calculate expected values:

hϕ (X(t + ∆))i = T ϕ X 0 (t) + h(1 − T )ϕ (X(t))i



. (8.59)
hϕ (Y (t + ∆))i = T ϕ Y 0 (t) + h(1 − T )ϕ (Y (t))i


This can be rewritten as:

hϕ (X(t + ∆)) − ϕ (X(t))i = µ∆ ϕ X 0 (t) − hϕ (X(t))i


  
. (8.60)
hϕ (Y (t + ∆)) − ϕ (Y (t))i = µ∆ ϕ Y 0 (t) − hϕ (Y (t))i
 

Taking the limit when ∆ → 0:


hϕ (X(t)) + ϕ (Y (t))i = µ ϕ X 0 (t) + ϕ Y 0 (t)
  
∂t (8.61)
− hϕ (X(t))i − hϕ (Y (t))i] .

j Not to be confused with income, which is an inflow of resources.


234 Introduction to Econophysics

We are assuming that the possessions are uncorrelated (Stosszahlansatz). There-


fore, we take the joint probability distribution as the product of the individual ones
(see Appendix G). Thus,

Z 
2∂t ϕ(v) f (v,t)dv =

" 
ϕ(v01 ) + ϕ(v02 ) − ϕ(v1 ) − ϕ(v2 ) f (v1 ,t) f (v2 ,t)dv1 dv2
 
=µ .
Ω×Ω p1 ,q1
p2 ,q2

(8.62)
It is possible to obtain a more physics-friendly equation considering a constant in-
teraction kernel and a Dirac34 delta observable ϕ(?) = δ (v − ?) in this weak form of
the Boltzmann equation:

" 
1
∂t f (v,t) = [δ (v − v1 ) + δ (v − v2 )] f (v1 ,t) f (v2 ,t)dv1 dv2 − f (v,t).
2 Ω×Ω
(8.63)
This equation can be written as:

∂t f + f = Q+ ( f , f ), (8.64)
where Q+ ( f , f ) is the collision operator given by:

" 
1
Q+ ( f , f ) = [δ (v − v1 ) + δ (v − v2 )] f (v1 ,t) f (v2 ,t)dv1 dv2 . (8.65)
2 Ω×Ω

8.3.1 CONSERVATIVE MARKET MODEL


Some models assume that trade is conservative [265, 266], implying that the wealth
is preserved in a transaction. This considers wealth as having an objective nature
quantifiable by the stock of some scarce resource such as gold. In this case we have:
Z
f (v,t)dv = m, (8.66)

where m is a finite and constant wealth. Also, we have that the collisions are perfectly
elastic: hp1 + p2 i = hq1 + q2 i = 1. In the Chakraborti-Chakrabarti35 model [265], for
example, the distribution of wealth is given by:
 0   
v1 1 + λ 1 − λ v1
= 1/2 , (8.67)
v02 1 − λ 1 + λ v2
where λ ∈ [0, 1] is a parameter that relates to the saving tendency of the agents.
According to this rule, we have conservation since v01 + v02 = v1 + v2 .
Agent-Based Simulations 235

The variance of the wealth in this model can be found using the observable ϕ(v) =
(v − m)2 in the weak form (Eq. 8.62):

Z 
2
∂t (v − m) f (v,t)dv =

"
1  0
(v1 − m)2 + (v02 − m)2 − (v1 − m)2 − (v2 − m)2

=
2 Ω×Ω
f (v1 ,t) f (v2 ,t)dv1 dv2 i
2 "

1−λ

=− (v1 − v2 )2 f (v1 ,t) f (v2 ,t)dv1 dv2
4 Ω×Ω
1−λ2
 " 
2
=− [(v1 − m) − (v2 − m)] f (v1 ,t) f (v2 ,t)dv1 dv2
4 Ω×Ω
2 "

1−λ
(v1 − m)2 + (v2 − m)2 − 2(v1 − m)(v2 − m)
 
=−
4 Ω×Ω
f (v1 ,t) f (v2 ,t)dv1 dv2 i .

Since the two processes are uncorrelated, we end up with:

1−λ2
Z Z
2
∂t (v − m) f (v,t)dv = − (v − m)2 f (v,t)dv. (8.68)
Ω 2 Ω
Hence, the variance of the distribution approaches zero at an exponential rate −(1 −
λ 2 )/2. This implies that every agent ends up with the same wealth, which is not what
is observed in real scenarios.

8.3.2 NON-CONSERVATIVE MARKET MODEL


If wealth is preserved in a transaction, why would anyone engage in trade? People
trade because they give more value to the good they are receiving rather than the one
that is being given. This imposes big limitations to the use of conservative models
(see, for instance: [267]).
Value is subjectivek [268]. Thus, making a cardinal measurement of wealth trou-
blesome. Rather, one usually resorts to ordinal descriptions, or in a wider context,
wealth could be defined as the ability to have one’s desires fulfilled. Therefore, trade
can only occur if there is an increase in wealth for both players, producing a positive
sum game. The quantification of marginal utility and possession, nonetheless, has to
be accepted and some non-conservative models that try to incorporate an increase of
wealth in economic transactions have been devised [269, 270].
Slalina’s36 model, for instance, is a model inspired by dissipative gases where the
exchange rule is given by:

k Consider this famous paradox attributed to Adam Smith: What would the values of water and diamond

be for a person who is dying of dehydration in a desert?


236 Introduction to Econophysics

Real GDP per capita - Log

Year

Figure 8.13: Real global GDP per capita adjusted for the value of money in 2011-
US$ (created with data from [1] through ourworldindata.org; the dashed line is an
exponential fit)

 0    
v1 (t) 1−β +ε β v1 (t)
= , (8.69)
v02 (t) β 1−β +ε v2 (t)
where ε is a positive growth rate parameter, and β ∈ [0, 1] plays the role of the saving
propensity.
The evolution of the average wealth can be found using ϕ(v) = v in Eq. 8.62:

Z 
2∂t v f (v,t)dv =

"
[(1 − β + ε)v1 + β v2 + β v1 + (1 − β + ε)v2 − v1 − v2 ]
Ω×Ω
f (v1 ,t) f (v2 ,t)dv1 dv2 i
" 
∂ v̄ 1
= ε(v1 + v2 ) f (v1 ,t) f (v2 ,t)dv1 dv2
∂t 2 Ω×Ω
Z 
∂ v̄
=ε v f (v,t)dv = ε v̄.
∂t Ω
(8.70)
Consequently, the average wealth grows as v̄ = v̄0 eεt . The GDPl per capita indeed
shows an exponential growth as illustrated in Fig. 8.13.
Since the wealth grows exponentially, there is no steady state solution. Nonethe-
less, it is possible to seek self-similar solutions rescaling the wealth distribution as:
 
1 v
f (v,t) = g ,t . (8.71)
v̄(t) v̄(t)

l Gross domestic product, a measure of all goods and services produced during a specific period in an

economy.
Agent-Based Simulations 237

The temporal derivative of this equation is given by:


 
df 1 d v̄ 1 ∂ g ∂ g ∂ x ∂ v̄ v
= − 2 g+ + , x=
dt v̄ dt v̄ ∂t ∂ x ∂ v̄ ∂t v̄
 
ε 1 ∂g ∂g  v 
= − g+ + v̄ − 2 ε v̄
v̄ v̄ ∂t ∂v v̄
 
ε 1 ∂g ∂g
= g+ − εv (8.72)
v̄ v̄ ∂t ∂v
  
1 ∂g ∂g
= −ε g+v
v̄ ∂t ∂v
 
1 ∂g ∂
= − ε (vg) .
v̄ ∂t ∂v
Using this result in Eq. 8.64 we get:
 
1 ∂g ∂
− ε (vg) + f = Q+ ( f , f )
v̄ t ∂v
(8.73)
∂g ∂
= Q+ (g, g) − g + ε (vg),
∂t ∂v
which now shows a drift term related to the growth of wealth.
Following the steps showed at the beginning of this section backwards, we get the
equation:

 Z  Z 
∂ ∂
ϕ(v)g(v,t)dv − ε ϕ(v) (vg)dv =
∂t Ω Ω ∂v
Z 
1
ϕ(v01 ) + ϕ(v02 ) − ϕ(v1 ) − ϕ(v2 ) g(v1 ,t)g(v2 ,t)dv1 dv2 .
 
=
2 Ω×Ω
(8.74)
Making ϕ(v) = e−sv/v̄ Θ(v)m , the integrals become Laplace transforms and we
get, according to the transition rule (Eq. 8.69):

∂ ∂
G(s) + εs G(s) = G ([1 − β + ε]s) G(β s) − G(s). (8.75)
∂t ∂s
In steady state:

εs G(s) = G ([1 − β + ε]s) G(β s) − G(s). (8.76)
∂s
By expanding the parameters β and ε in Taylor series and taking the inverse
Laplace transform, Slalina showed that the asymptotic wealth distribution for the
tails displays a Pareto power-law behavior [264, 269]. This is observed in real data
(see for instance [271]).


mΘ 1 if x > 0
is the Heaviside37 function defined as Θ(x) =
0 otherwise.
238 NOTES

Notes
1 Peter Sheridan Dodds, Australian mathematician.
2 Stephen Wolfram (1959–) British physicist.
3 Ludwig Eduard Boltzmann (1844–1906) advisee of Josef Stefan, Gustav Kirchhoff and Herman von

Helmholtz among others. Boltzmann advised Paul Ehrenfest among others.


4 George Boole (1815–1864) British philosopher.
5 Arthur Cayley (1821–1895) British mathematician winner of many awards, including the De Morgan

Medal in 1884.
6 Hans Albrecht Bethe (1906–2005) German physicist winner of many awards, including the Nobel

Prize in Physics in 1967. Bethe was advised by Arnold Sommerfeld and advised many notable students
including Jun John Sakurai, David James Thouless, and Freeman Dyson.
7 Gottfried Wilhem von Leibniz (1646–1716) German polymath advised by Christian Huygens (among

others) and adviser of Jacob Bernoulli.


8 Edsger Wybe Dijkstra (1930–2002) Dutch computer scientist.
9 Richard Ernest Bellman (1920–1984) American mathematician winner of many prizes including the

John vou Neumann Theory Prize in 1976.


10 Lester Randolph Ford Jr. (1927–2017) American mathematician.
11 Robert W. Floyd (1936–2001) American computer scientist, winner of the Turing Award in 1978.
12 Stephen Warshall (1935–2006) American computer scientist.
13 Paul Erdös (1913–1996) and Alfréd Rényi (1921–1970) Hungarian mathematicians.
14 Stanley Milgram (1933–1984) American social psychologist.
15 Georg Friedrich Bernhard Riemann (1826–1866) German mathematician, advisee of Carl Friedrich

Gauss.
16 Albert-László Barabási (1967–) Romanian physicist advisee of Eugene Stanley and Tamás Vicsek.
17 Réka Albert (1972–) Romanian physicist.
18 Duncan James Watts (1971–) Canadian physicist, advisee of Steven Strogatz.
19 Steven Henry Strogatz (1959–) American mathematician, adviser of Duncan Watts.
20 Ernst Ising (1900–1998) German physicist.
21 William Rowan Hamilton (1805–1865) Irish mathematician.
22 Robert Swendsen, American physicist.
23 Ulli Wolff, German physicist.
24 Thomas Crombie Schelling (1921–2016) American economist winner of the Nobel Memorial Prize

in Economic Sciences in 2005.


25 Solomon Eliot Asch (1907–1996) Polish social psychologist, adviser of Stanley Milgram.
26 Tamás Vicsek (1948–) Hungarian physicist, adviser of Albert-László Barabási.
27 Phrase firstly used by Alan Greenspan (1926–) American economist, chair of the Federal Reserve of

the United States between 1987 and 2006.


28 Rainer Hegselmann (1950–) German philosopher.
29 Ulrich Krause, German mathematician and economist.
30 Guillaume Deffuant, French complexity scientist.
31 Alan Kirman (1939–) British economist.
32 Paul Ehrenfest (1880–1933) Austrian physicist, advisee of Ludwig Boltzmann and adviser of George

Uhlenbeck among others.


33 Stefan Bornholdt, German physicist.
34 Paul Adrien Maurice Dirac (1902–1984) English physicist, adivisee of Ralph Fowler. Dirac was the

recipient of the Nobel Prize in Physics in 1933.


35 Anirban Chakraborti and Bikas Kanta Chakrabarti (1952–), Indian physicists.
36 František Slanina, Czech physicist.
37 Oliver Heaviside (1850–1925) English polymath.
A Simulation
Processes
of Stochastic

Here we will see how to numerically solve stochastic differential equations of the
type:

dXt = a(Xt ,t)dt + b(Xt ,t)dWt , (A.1)


where W is a Wiener process.
Let’s first divide an interval I = [0, T ] in N subintervals such that each has a
temporal width ∆t = T /N that begins in Xn and ends in Xn+1 . Therefore, the solution
of Eq. A.1 within an interval is given by:
Z tn+1 Z tn+1
Xtn+1 = Xtn + a(Xs )ds + b(Xs )dWs . (A.2)
tn tn

In Milstein’sa method, we apply Ito’s lemma to the functions a(Xs ) e b(Xs ):

∂f ∂f 1 ∂2 f
df ≈
dt + dX + dX 2 . (A.3)
∂t ∂X 2 ∂ X2
Connecting it with Eq. A.1 we get:

∂f ∂f ∂f 1 ∂2 f
df ≈ dt + a(X)dt + b(X)dW + b2 (X) 2 dW 2
∂t ∂X ∂X  2 ∂X
(A.4)
1
≈ f 0 (X)a(X) + f 00 (X)b2 (X) dt + f 0 b(X)dW.
2
Integrating:

Z t  Z t
0 1 00
f (t) ≈ f0 + 2
f (X)a(X) + f (X)b (X) dt + f 0 (X)b(X)dW
0 2 0
Z t Z t Z t (A.5)
1 00
≈ f0 + f 0 (X)a(X)dt + f (X)b2 (X)dt + f 0 (X)b(X)dW
0 0 2 0

Let’s apply this result to the proper functions a(Xs ) e b(Xs ):

a Grigori Noichowitsch Milstein, Russian mathematician.

DOI: 10.1201/9781003127956-A 239


240 Introduction to Econophysics

Z tn+1 
a0 (Xu )a(Xu ) + 1/2a00 (Xu )b2 (Xu ) du+

a(Xtn+1 ) ≈ a(Xtn ) +
tn
Z tn+1 
a0 (Xu )b(Xu ) dWu

+
tn
Z tn+1 
b0 (Xu )a(Xu ) + 1/2b00 (Xu )b2 (Xu ) du+

b(Xtn+1 ) ≈ b(Xtn ) +
tn
Z tn+1 
b0 (Xu )b(Xu ) dWu .

+
tn
(A.6)
Plugging these results back in Eq. A.2 we find:

Z tn+1  Z ts 
a0 (Xu )a(Xu ) + 1/2a00 (Xu )b2 (Xu ) du+

Xtn+1 ≈ Xtn + a(Xtn ) +
tn tn
Z ts 
+ a0 (Xu )b(Xu )dWu ds
tn
Z tn+1  Z ts 
b0 (Xu )a(Xu ) + 1/2b00 (Xu )b2 (Xu ) du+

+ b(Xtn ) +
tn tn
Z ts 
+ b0 (Xu )b(Xu )dWu dWs .
tn
(A.7)
dtdt terms are of order O(dt 2 ) while dtdW terms are of order O(dt 3/2 ). Finally,
dW dW terms are of order O(dt). Neglecting high order terms, we get:

Z tn+1 Z tn+1 Z tn+1 Z ts


Xtn+1 ≈ Xtn + a(Xtn )ds + b(Xtn )dWs + b0 (Xu )b(Xu )dWu dWs
tn tn tn tn
Z tn+1
0
≈ Xtn + a(Xtn )∆t + b(Xtn )∆Wn + b (Xtn )b(Xtn ) Ws dWs ,
tn
(A.8)
where we have used the fact that in a Lévy process W0 = 0.
For the resulting integral, we can write:
Z t Z t
dW
Ws dWs = ds
Ws
0 0ds
(A.9)
1 t d 2
Z
= W ds.
2 0 ds s
Since we got the integral of a derivative, we would like to write the result as 1/2Wt2 .
However, W is a non-differentiable function and this result is incorrect. Alternatively,
we can use a Riemann sum to obtain the right answer. In order to do so, we apply the
following algebraic trick:
 
Wtn = 1/2 Wtn+1 +Wtn − 1/2 Wtn+1 −Wtn . (A.10)
Simulation of Stochastic Processes 241

Applying the Riemann sum, the integral becomes:

Z tn+1 
Ws dWs = ∑ Wtk Wtk+1 −Wtk
tn tk <tn
 
= ∑ 1/2 Wtn+1 +Wtn Wtn+1 −Wtn −
tk <tn
  (A.11)
− ∑ 1/2 Wtn+1 −Wtn Wtn+1 −Wtn
tk <tn
  2
= 1/2 W 2 −W 2 − Wtn+1 −Wtn
∑ tn+1 tn ∑ 1/2 .
tk <tn tk <tn

For the first summation, we have a telescopic sum (W12 −W02 ) + (W22 −W12 ) + . . . +
(Wn2 − Wn−1
2 ) + (W 2 − W 2 ) = W 2 − W 2 = W 2 → W 2 for ∆ → 0. Since this
n+1 n n+1 0 n+1 n t
summation occurs within a subinterval, we get ∆W2 .

An integral of the form:


Z T k−1

0
f (t)dWt = lim ∑ f (ti )(Wi+1 −Wi )
∆t→0 i=0
(A.12)

is known as Ito’s integral. It contrasts with Stratonovich’s integralb given by:


Z T k−1  
1
f (t)dWt = lim ∑f [ti+1 + ti ] (Wi+1 −Wi ). (A.13)
0 ∆t→0 i=0 2
For the second term we have:

1/2
∑ ∆W 2 = 1/2 ∑ δt
tk <tn tk <tn (A.14)
= 1/2 · ∆t .
Note that the summations are within a subinterval, hence ∑ δt = ∆t . The Riemann
sum becomes:
Z tn+1
Ws dWs = 1/2(Wn2 − ∆t ). (A.15)
tn
Finally, we arrive at an expression for Xtn+1 :

Xtn+1 ≈ Xtn + a(Xtn )∆t + b(Xtn )∆Wn + 1/2b0 (Xtn )b(Xtn ) ∆W


2

n
− ∆t (A.16)

Maruyamac extended Euler’s method to approximate stochastic differential equa-


tions numerically [272] as:

b Developed by the Russian physicist Leontévich Stratonovich (1930-1997).


c Gisiro Maruyama (1916-1986) Japanese mathematician.
242 Introduction to Econophysics

Z tn+1
a(Xs , s)ds ≈ a(Xn ,tn )δt
tn
Z tn+1 (A.17)
b(Xs , s)dWs ≈ b(Xn ,tn )∆Wn ,
tn

where ∆Wn = Wtn+1 −Wtn . Hence, we use:

Xn+1 = Xn + a(Xn ,tn )δt + b(Xn ,tn )∆Wn . (A.18)


This can be easily achieved considering that b0 (Xtn ) is zero in Milstein’s approxima-
tion.
B Monte Carlo Simulations
A Metropolis-Hastingsa Markov chain Monte Carlo simulation [273, 274] begins
with the probability of finding the system in a state φ given by the Boltzmann factor:
1 −β H(φ )
p(φ ) =
e , (B.1)
Z
where Z is the partition function, β is the inverse temperature (1/kB T ), and H is the
Hamiltonian of the system. In equilibrium, the system must obey the detailed balance
condition (see Sec. 3.2.2.1):

πi∗ pi j = π ∗j p ji
p ji π∗ e−β H(φi )
= i∗ = −β H(φ )
pi j πj e j
(B.2)
= e−β [H(φi )−H(φ j )]
= e−β ∆ε .
This can be written as:

p ji π∗ g( j → i)A( j → i)
= i∗ = = e−β ∆ε , (B.3)
pi j πj g(i → j)A(i → j)
where g is the probability of selecting a state, and A is the acceptance rate of such
state.
For the Ising model (see Sec. 8.2), this corresponds of randomly picking a site. If
there are N spins in the grid, then g = 1/N, and:

exp{−β (εi − ε j )}, if εi > ε j
A(i → j) = (B.4)
1, otherwise.
Thus, new test states are generated. If a state decreases the energy of the system,
it is accepted. Otherwise, it can still be accepted with probability exp{−β ∆ε}. This
is equivalent of having an acceptance probability p(φ j ) = min (1, exp{−β ∆ε}).
Another possibility for the acceptance rate is the so-called heat bath:

e−β ε j e−β ∆ε
A(i → j) = = . (B.5)
e−β ε j + e−β εi 1 + e−β ∆ε

a Nicholas Constantine Metropolis (1915-1999) Greek physicist, and Wilfred Keith Hastings (1930-

2016) Canadian statistician.

DOI: 10.1201/9781003127956-B 243


C Fokker-Planck Equation
The Fokkera -Planckb equation is a partial differential equation that describes the
evolution of diffusive systems [275, 276].
In order to derive this equation, let’s consider a smooth function h(Y ) with a
compact support and make the following approximation:

 
∂ P(Y,t|X) P(Y,t + ∆|X) − P(Y,t, X)
Z ∞ Z ∞
h(Y ) dY = lim h(Y ) dY
−∞ ∂t ∆→0 −∞ ∆
Z ∞ 
1
Z ∞
= lim h(Y )P(Y,t + ∆|X)dY − h(Y )P(Y,t|X)dY .
∆→0 ∆ −∞ −∞
(C.1)
Let’s now use the Kolmogorov-Chapman equation (Eq. 3.75) in the first integral on
the right hand side of the equation. Let’s also change the name R∞
of the integrating
variable in the second integral from Y to Z and use the identity −∞ P(Y, ∆|Z)dY = 1.
This way, we get:

Z
∂ P(Y,t|X) 1
Z ∞ ∞
h(Y ) dY = lim h(Y )P(Y, ∆|Z)P(Z,t|X)dZdY
−∞ ∂t ∆→0 ∆ −∞
Z ∞ Z ∞ 
− h(Z)P(Z,t, X)dZ P(Y, ∆|Z)dY
−∞ −∞
Z ∞ 
1
Z ∞
= lim P(Z,t|X) P(Y, ∆|Z) (h(Y ) − h(Z)) dY dZ
∆→0 ∆ −∞ −∞
(C.2)
Doing a Taylor expansion for h(Y ) around Z:

h(Y ) = h(Z) + ∑ h(n) (Z)(Y − Z)n /n! (C.3)
n=1

Let’s also create the following variable:


1 1
Z ∞
Q(n) (Z) = lim (Y − Z)n P(Y, ∆|Z)dY. (C.4)
n! ∆→0 ∆ −∞
Therefore:

a Adriaan Daniël Fokker (1887-1972) Dutch physicist, advisee of Hendrik Lorentz.


b Max Karl Ernst Ludwig Planck (1858-1947) German physicist, advisee of Gustav Kirchhoff and Her-

mann von Helmholtz, adviser of Gustav Ludwig Hertz, Max von Laue, Walter Schottky, Moritz Schlick
and Julius Edgar Lilienfeld among others. Planck won the Nobel prize of physics in 1918.

DOI: 10.1201/9781003127956-C 245


246 Introduction to Econophysics


∂ P(Y,t|X)
Z ∞ Z ∞
h(Y ) dY = P(Z,t|X) ∑ Q(n) (Z)h(n) (Z)dZ. (C.5)
−∞ ∂t −∞ n=1

The integration by parts for high order derivatives can be written as:

dnv d d n−1 v
Z ∞ Z ∞  
u n dx = u n−1
dx
−∞ dx −∞ dx dx
∞ (C.6)
d n−1 v
Z ∞  n−1 
d v du
= u n−1 − n−1
dx.
dx −∞ −∞ dx dx
If the function u, though, has a compact support, both the function itself and its
derivatives tend to zero at ±∞. Therefore,

dnv du d n−1 v
Z ∞ Z ∞  
u n dx = − dx. (C.7)
−∞ dx −∞ dx dxn−1
Applying this procedure n times we get:
n
dnv
Z ∞ 
d
Z ∞
u n dx = v − udx. (C.8)
−∞ dx −∞ dx

Consequently, we get:
∞ 
∂ n h (n)

∂ P(Y,t|X)
Z ∞ Z ∞ i
h(Y ) dY = h(Z) ∑ − Q (Z)P(Z,t|X) dZ. (C.9)
−∞ ∂t −∞ n=1 ∂Z

Changing the name of the integrating variable on the left hand side of the equation
to Z:

!
∞ 
∂ n h (n)

∂ P(Z,t, X)
Z ∞ i
h(Z) −∑ − Q (Z)P(Z, y|X) ]dZ = 0. (C.10)
−∞ ∂t n=1 ∂Z

Since h(Z) is a generic function, it follows that:


∞ 
∂ n h (n)

∂ P(Z,t, X) i
=∑ − Q (Z)P(Z, y|X) . (C.11)
∂t n=1 ∂Z
We can consider p(X,t) as the PDF of X(t). Therefore, p(X,t) can be chosen as
the solution for the last equation for a unitary excitation at t = 0, X = X0 :
∞ 
∂ n h (n)

∂ p(x,t) i
=∑ − Q (x)p(x,t) . (C.12)
∂t n=1 ∂x
Fokker-Planck Equation 247

This procedure that transforms the integro-differential equation in a differential equa-


tion through an expansion is known as the Kramersc -Moyald expansion [277, 278].
Considering only terms up to the second order:

∂ 2 ∂ 2 Q(x)
   
∂ p(x,t) ∂ ∂ Q(x)
=− p(x,t) + 2 p(x,t)
∂t ∂x ∂x ∂x ∂ x2
(C.13)
∂ p(x,t) ∂ ∂2
= − [µ(x,t)p(x,t)] + 2 [D(x,t)p(x,t)] ,
∂t ∂x ∂x
which is the Fokker-Plank equation and:

∂ Q(x)
µ(x,t) = . (C.14)
∂x
is known as the drift coefficient, and:

∂ 2 Q(x) 1 2
D(x,t) = = σ (X,t). (C.15)
∂ x2 2
is known as diffusion coefficient.
Given a stochastic differential equation (SDE):

dx = f (x,t)dt + g(x,t)dW, (C.16)

it is possible to find the corresponding Fokker-Planck equation.


In order to obtain this representation we assume a function ϕ = δ (x − X). Let’s
Taylor expand it:

∂ϕ ∂ϕ 1 ∂ 2ϕ 2
dϕ = dt + ds + ds + . . . (C.17)
∂t ∂s 2 ∂ s2
and substitute it back in the SDE:

∂ϕ ∂ϕ 1 ∂ 2ϕ
dϕ = dt + ( f (x,t)dt + g(x,t)dW ) + ( f (x,t)dt + g(x,t)dW )2 + . . .
∂t ∂s 2 ∂ s2
∂ϕ ∂ϕ ∂ϕ 1 ∂ 2ϕ
≈ dt + f (x,t) dt + g(x,t) dW + g2 (x,t) 2 dt
∂t ∂s ∂s 2 ∂s
∂ 2ϕ
 
∂ϕ ∂ϕ 1 2 ∂ϕ
≈ + f (x,t) + g (x,t) 2 dt + g(x,t) dW,
∂t ∂s 2 ∂s ∂s
(C.18)
where we kept only low order terms and used the variance of a Wiener process
dW 2 → dt.
Only f and g are time dependent. Therefore:

c Hans Anthony Kramers (1894-1952) Dutch physicist, advisee of Niels Bohr and Paul Ehrenfest.
d José Enrique Moyal (1910-1998) Australian mathematician.
248 Introduction to Econophysics

∂ 2ϕ
 
dϕ ∂ϕ 1 2 ∂ϕ
≈ f (x,t) + g (x,t) 2 + g(x,t) η
dt ∂s 2 ∂s ∂s
∂ 2ϕ
   
dϕ ∂ϕ 1 2
≈ f (x,t) + g (x,t) 2
dt ∂s 2 ∂s
∂ 2ϕ
   
∂ϕ 1 2 (C.19)
≈ f (x,t) + g (x,t) 2 .
∂s 2 ∂s
 
dϕ d d
Z
= hϕi = P(z,t)δ (z − X)dz
dt dt dt

= P(X,t),
∂t
where the Leibniz rulee was used
For the first expected value on the right hand side of the equation:
  Z
∂ϕ ∂ δ (z − X)
f (x,t) = P(z,t) f (z,t) dz. (C.20)
∂z ∂z
Integrating by parts:
Z

= P(z,t) f (z,t)δ (z − X)|∞
−∞ − δ (z − X) (P(z,t) f (z,t)) dz
∂z
(C.21)

=− (P(X,t) f (x,t)) .
∂X
For the remaining expected value, we get:

∂ 2ϕ ∂ 2 δ (z − X)
 
1 2 1
Z
g (x,t) 2 = P(z,t)g(z,t) dz
2 ∂s 2 ∂ z2
1
Z  ∂ ∂ δ (z − X)
= P(z,t)g2 (z,t) dz
2 ∂z ∂z
1 ∂ δ (z − X) ∂ P(z,t)g2 (z,t)
Z 
=− dz (C.22)
2 ∂z ∂z
1 ∂ 2 P(z,t)g2 (z,t)
Z
= δ (z − X) dz
2 ∂ z2
1 ∂ 2 P(X,t)g2 (X,t)
= .
2 ∂ X2
Combining Eqs. C.19, C.21 and C.22:

∂ ∂ 1 ∂2
P(X,t)g2 (X,t) .

P(X,t) = − (P(X,t) f (x,t)) + (C.23)
∂t ∂X 2 ∂ X2

R 
e d b Rb
dx a f (x,t)dt = f (x, b) db da
dx − f (x, a) dx + a

∂x f (x,t)dt.
D Girsanov Theorem
Let Wt be a Brownian motion on a probability space (Ω, Σ, P) and θ (t), 0 ≤ t ≤ T
be an adapted process to a corresponding filtration F . Now, for an Ito process:

dW̃t = θt dt + dWt , W̃0 = 0, (D.1)


is there a measure Q equivalenta
to P where W̃t is a Brownian motion under Q?
For a random variable X on (Ω, F ), its expectation under Q is given by:
 
dQ
hXiQ = X , (D.2)
dP P
where dQ/dP is the Radon-Nikodym derivative (see Sec. 2.2.4). This last equation
can be rewritten using the densities of a process under these measures. Let’s take, for
instance, WT :
Z ∞
hWT iQ = w fQ (w)dw
−∞
fQ (w)
Z ∞
= w fP (w)dw (D.3)
−∞ fP (w)
 
fQ (WT )
= WT .
fP (WT ) P
Therefore,

dQ fQ (WT )
= . (D.4)
dP fP (WT )
WT is normally N (0, T ) distributed under P, whereas, according to Eq. D.1,
it is N (−θ T, T ) distributed under Q if we assume θt being constant over time.
Therefore, we can write:
2
n o
√ 1 exp − (WT +θ T )
dQ 2πT 2T
=
WT2
n o
dP √ 1
exp −
2πT 2T
(D.5)
 
1 2
= exp −θWT − θ T
2
 ZT
1 T 2
Z 
= exp − θ dWt − θ dt .
0 2 0

a Two measures are equivalent if P(A) = 0 ⇐⇒ Q(A) = 0 ∀A ∈ Ft .

DOI: 10.1201/9781003127956-D 249


250 Introduction to Econophysics

This is known as the Doléans-Dade exponentialb which also appears as the solution
of the martingale:

dZt = −Zt θ dWt , Z0 = 1. (D.6)


Applying Ito’s lemma to ln(Z), one gets ∂ f /∂t = 0, ∂ f /∂ Z = 1/Z, and ∂ 2 f /∂ Z 2 =
−1/Z 2 . Thus:
1
d ln(Z) = − θ 2 dt − θ dWt
2
Z t (D.7)
1 t 2
Z 
ln(Z) = exp − θ dWs − θ ds .
0 2 0
The integral inside the exponential is finite if:
  ZT 
1 2
exp |θs | ds < ∞. (D.8)
2 0 P
This is known as the Novikov conditionc [279, 280].
The Cameron-Martin-Girsanovd theorem [281] proves that under these condi-
tions, W̃t is a Brownian motion under the measure Q.
For example, for the Ito process:

dXt = µdt + σ dWt , (D.9)


we can set θ = (µ − ν)/σ . Therefore, according to Eq. D.1:
µ −ν
dW = dW̃ − dt. (D.10)
σ
Eq. D.9 can then be written as:
 
µ −ν
dXt = µdt + σ dW̃ − dt
σ (D.11)
= νdt + σ dW̃ .
Since W̃ is a Brownian motion under the measure Q, X has drift ν and the same
variance σ 2 under this new measure.

b Catherine Doléans-Dade (1942-2004) French mathematician.


c Alexander Novikov, Russian mathematician.
d Robert
Horton Cameron (1908-1989) American mathematician, advisee of Monroe David Donkser
among others; William Ted Martin (1911-2004) American mathematician; Igor Vladimirovich Girsanov
(1934-1967) Russian mathematician.
E Feynman-Kack Formula
Let’s consider a partial differential equation:

∂ u(x,t) ∂ u(x,t) 1 ∂ 2 u(x,t)


+ a(x,t) + b(x,t)2 = ru(x,t) (E.1)
∂t ∂x 2 ∂ x2
defined for x ∈ R and t ∈ [t0 , T ] subject to the boundary condition u(x, T ) = ϕ(x).
Let’s define a stochastic differential equation (SDE) in the interval [t0 , T ] that
represents u(x,t):

dX = a(X,t)dt + b(X,t)dW, (E.2)


such that X(t0 ) = x.
Ito’s lemma applied to this process produces:

∂ 2 u(X,t)
 
∂ u(X,t) ∂ u(X,t) 1
du(X,t) = + a(X,t) + b(X,t) dt+
∂t ∂X 2 ∂ X2
∂ u(X,t) (E.3)
+ b(X,t) dW
∂X
∂ u(X,t)
= ru(X,t)dt + b(X,t) dW.
∂X
In order to solve this equation, we can create an auxiliary variable:

f (X,t) = u(X,t)e−rt
d f (X,t) = e−rt du − ru(X,t)e−rt dt
 
−rt ∂ u(X,t) (E.4)
=e ru(X,t)dt + b(X,t) dW − ru(X,t)e−rt dt
∂X
∂ u(X,t)
= b(X,t)e−rt dW.
∂X
Integrating in its temporal domain:

Z T
∂ u(X, s)
f (X, T ) − f (X,t0 ) = b(X, s)e−rs dWs
t0 ∂X
Z T (E.5)
∂ u(X, s)
u(X,t0 )e−rt0 = u(X, T )e−rT − b(X, s)e−rs dWs .
t0 ∂X
Taking the expectation on both sides of the equation:

u(x,t0 ) = e−r(T −t0 ) hϕ(X)i . (E.6)

DOI: 10.1201/9781003127956-E 251


252 Introduction to Econophysics

This is known as the Feynmana -Kacb formula. Note that the coefficients a(X,t) and
b(X,t) depend only on the current value of X(t) and therefore describe a Markovian
process. Therefore, the Feynman-Kac formula does not hold if these coefficients
depend on the history of the process.

a Richard Phillips Feynman (1918-1988) American physicist, advisee of John Archibald Wheeler, ad-

viser of James Maxwell Bardeen (son of John Bardeen) among others. Feynman was awarded the Nobel
prize in physics in 1965.
b Mark Kac (1914-1984) Polish mathematician.
F Boltzmann Equation
Let’s consider a non-negative function f : R3 × R3 × R+ → R∗+ representing the
density of particles in a gas. After some short interval ∆, the position and momentum
of every particle evolve according to the semiclassical equations of motion:

r(t) = r(t − ∆) − v(t − ∆)∆


(F.1)
p(t) = p(t − ∆) − F(t − ∆)∆,
where F is an external force. Therefore, in the absence of collisions, the distribution
at position r, momentum p, and instant t is given by:

f (r(t), p(t),t) = f (r(t − ∆) − v(t − ∆)∆, p(t − ∆) − F(t − ∆)∆,t − ∆). (F.2)

Some particles, though, are deflected due to collisions, and some particles that
have arrived at r, p,t may also have moved because of past collisions. Therefore, we
must correct the previous expression as:

f (r(t), p(t),t) = f (r(t − ∆) − v(t − ∆)∆, p(t − ∆) − F(t − ∆)∆,t − ∆)


(F.3)
   
∂ f (r, p,t) ∂ f (r, p,t)
+ ∆+ ∆.
∂t out ∂t in

After some little algebra and taking the limit ∆ → 0:

 
∂ f (r, p,t) ∂ f (r, p,t)
+ v · ∇r f (r, p,t) + F · ∇ p f (r, p,t) = . (F.4)
∂t ∂t collision

This is known as the Boltzmann transport equation. The second and third terms
on the left hand side of the equation are known as the diffusion and drift terms,
respectively.
Given a scattering probability Wp,p0 , the collision term, on the right hand side of
the equation, is given by:

 
∂ f (r, p,t)
Z
dp03 Wp,p0 f (p) 1 − f (p0 ) −Wp0 ,p f (p0 ) [1 − f (p)] ,
  
=−
∂t collision
(F.5)
where the first product term in the integrand indicates the probability of a particle
changing its momentum p to p0 , for example.
The Boltzmann equation is often simplified using a relaxation-time approxima-
tion:

DOI: 10.1201/9781003127956-F 253


254 Introduction to Econophysics

f (p) − f 0 (p)
 
∂ f (r, p,t)
=− , (F.6)
∂t collision τ(p)
where dt/τ is the probability that a particles suffers a collision in an interval dt and
f 0 is an equilibrium distribution.
Typically for rare gases, we are interested in the spatially uniform distribution and
we use a simplified version of Boltzmann equation:

∂ f (p,t)
= I f (p,t), (F.7)
∂t
where I f (p,t) is a collision operator that describes the binary interactions among par-
ticles. This operator must be positivity preservinga , and since the number of agents
is normally kept the same in a simulation, it has to obey:

∂ f (p,t) 3
Z Z Z

f (p,t)d 3 p = d p = I f (p,t)d 3 p = 0. (F.8)
∂t ∂t
We can use Eq. F.7 to find the collision operator by making:
Z Z

f (p,t)ϕ(p)dp = I f (p,t)ϕ(p)dp, (F.9)
∂t
where ϕ(p) is some observable.

a Maps a non-negative density to a non-negative future density.


G Liouville-BBGKY
G.1 LIOUVILLE THEOREM
Consider the phase space volume dΩ = ∏Ni=1 d 3 ri d 3 pi centered around (r, p) and
occupied by dN pure states. After an interval ∆, these states move to another volume
dΩ0 ∏Ni=1 d 3 r0i d 3 p0i centered around:

∂ ri
r0i = ri + ∆
∂t (G.1)
∂ pi
p0i = pi + ∆.
∂t
The respective differential elements are given by:

∂ ṙi
dr0i = dri + dri ∆
∂ ri
(G.2)
∂ ṗi
dp0i = dpi + dpi ∆.
∂ pi
For each differential element pair we get:
   
0 0 ∂ ṙi ∂ ṗi 2
dri dpi = dri dpi 1 + + ∆ + O(∆ ) . (G.3)
∂ ri ∂ pi
The N particles obey Hamilton’s equations, hence:

∂H
ṗi = −
∂ ri
(G.4)
∂H
ṙi = ,
∂ pi
where H is the Hamiltonian of the system, which typically takes the form:

1 N p2i N
H = ∑ + ∑ V (ri ) + ∑ U(ri − r j ), (G.5)
2 i=1 mi i=1 {i, j}

where U is a two-body interaction potential and V is a general potential.


Thus, using the results from Eq. G.4 in G.3 we get:

∂ H ∂ 2H
  2  
0 0
dri dpi = dri dpi 1 + − ∆ = dri dpi . (G.6)
∂ ri ∂ pi ∂ pi ∂ ri

DOI: 10.1201/9781003127956-G 255


256 Introduction to Econophysics

Therefore, although the particles move to another location, they occupy the same vol-
ume and the phase space density behaves as an incompressible fluid. This is known
as Liouvillea theorem.
The incompressibility condition for the phase space density can be written as:

f (r0 , p0 ,t + ∆) = f (r + ṙ∆, q + q̇∆,t + ∆) = f (r, p,t). (G.7)


After some algebra:
N N
∂f ∂ f dri ∂ f dqi
+∑ · +∑ · =0
∂t i=1 ∂ r dt i=1 ∂ qi dt
(G.8)
N 
∂ f ∂H ∂ f ∂H

∂f
=−∑ · − · = { f , H }.
∂t i=1 ∂ ri ∂ pi ∂ qi ∂ ri

G.2 BBGKY HIERARCHY


The total number of particles lying at some location (r, p), the one-particle distribu-
tion function, can be found discarding one particle since they are all identical:

Z N Z
f1 (r, p,t) = ∏ d 3 ri d 3 pi f (R, P) = f dR(1) dP(1) , (G.9)
(Rd ×Rd )N−1 i=2 (Rd ×Rd )N−1

where we adopted a simplified notation with R = (r1 , . . . , rN ), and the subscript “(1)”
indicates that the first item is absent.
The evolution of the one-particle distribution function can be found by integrating
the Liouville equation (G.8). The first element in the equation gives:

∂f ∂ f1
Z Z

dR(1) dP(1) = f dR(1) dP(1) = . (G.10)
(Rd ×Rd )N−1 ∂t ∂t (Rd ×Rd )N−1 ∂t

The first element inside the parenthesis gives:

∂ f ∂H ∂ f pi
Z Z
· dR(1) dP(1) = · dR(1) dP(1) =
d
(R ×R ) d N−1 ∂ ri ∂ pi d d
(R ×R ) N−1 ∂ ri mi
Z  (
pi ∂ f 1 (G.11)
pi ∂f if i = 1
Z
(1) (1)
= · dR dP = mi ∂ r1
(Rd )N−1 mi (Rd )N−1 ∂ ri 0 otherwise.

The remaining element gives:

a Joseph Liouville (1809-1882) French mathematician advisee of Siméon Poisson and adviser of Eu-

géne Charles Catalan, among others.


Liouville-BBGKY 257

∂ f ∂H
Z
· dR(1) dP(1) =
(Rd ×Rd )N−1 ∂ qi ∂ ri
N
! (G.12)
∂f ∂V (r j ) ∂U(rk − r j )
Z
= · ∑ ∂ ri + ∑ dR(1) dP(1)
(Rd ×Rd )N−1 ∂ qi j=1 {k, j}
∂ ri

Let’s split the right hand side of the equation into two integrals I1 and I2 . For the first,
we get:

(
∂ f1
∂ f ∂V · ∂∂Vr if i = 1
Z
I1 = · dR(1) dP(1) = ∂ q1 1 (G.13)
(Rd ×Rd )N−1 ∂ qi ∂ ri 0 otherwise.

For the second integral, when i = 1, we get:


N
∂ f ∂U(r1 − r j ) (1) (1)
Z
I2 = ∑ · dR dP . (G.14)
j=2 (Rd ×Rd )N−1 ∂ q1 ∂ r1
Since we are dealing with a binary interaction, we may write:

∂ f ∂U(r1 − r j ) (2) (2)


Z
I2 = (N − 1) · dR dP , (G.15)
(Rd ×Rd )N−1 ∂ q1 ∂ r1

where the second marginal can be identified. Also, when i > 1, I2 = 0 as in the
previous cases. Hence, putting it all together we end up with:

∂ f1 pi ∂ f1 ∂ f1 ∂V ∂ f2 ∂U(r1 − r j ) (2) (2)


Z
+ − · − (N − 1) · dR dP = 0.
∂t mi ∂ r1 ∂ q1 ∂ r1 ∂ q1 ∂ r1
(Rd ×Rd )N−1
(G.16)
This is known as the BBKGYb hierarchy for the first two marginals. The first
marginal depends on the second and it is possible to show that the second depends
on the third and so on.

b Nikolay Bogolyubov (1909-1992) Russian physicist, winner of many awards including the Dirac

Prize in 1992; Max Born (1882-1970) German physicist, advisee of Joseph John Thomson and adviser of
Victor Weisskopf, Enrico Fermi, and Robert Oppenheimer, among others. Born was awarded the Nobel
Prize in Physics in 1954; Herbert Sydney Green (1920-1999) English physicist, advisee of Max Born;
John Gamble Kirkwood (1907-1959) American physicist and chemist; Jacques Yvon (1903-1979) French
physicist.
References
1. R. Inklaar, H. de Jong, J. Bolt, and J. van Zanden. Rebasing ‘maddison’: new income
comparisons and the shape of long-run economic development. GGDC Research Mem-
orandum GD-174, Groningen Growth and Development Centre, University of Gronin-
gen, 2018.
2. P. Duhem. The aim and structure of physical theory. Princeton University Press,
Princeton, NJ, 1991.
3. R. N. Mantegna and H. E. Stanley. Introduction to Econophysics: Correlations and
Complexity in Finance. Cambridge University Press, Cambridge, UK, 2007.
4. K. C. Dash. The story of econophysics. Cambridge Scholars Publishing, Newcastle,
UK, 1st edition, 2019.
5. F. A. von Hayek. The use of knowledge in society. Am. Econ. Rev., 35(4):519–530,
1945.
6. F. A. von Hayek. Scientism and the study of society i. Economica, 9:267–291, 1942.
7. F. A. von Hayek. Law, Legislation, and Liberty, volume 2, pages 267–290. Routlege
Classics, Abingdon, UK, 2013.
8. John Locke. Some considerations on the consequences of the lowering of interest and
the raising of the value of money. McMaster University Archive for the History of
Economic Thought, London, UK, 1691.
9. Adam Smith. An inquiry into the nature and causes of the wealth of nations. W. Strahan
and T. Cadell, London, UK, 1776.
10. A. Cournot. Researches into the Mathematical Principles of the Theory of Wealth. The
Macmillan Company, London, UK, 1838.
11. A. Marshall. Principles of economics. 1890.
12. S. H. Strogatz. Dynamics and chaos: with applications to physics, biology, chemistry,
and engineering. CRC Press, Reading, MA, 1994.
13. N. Kaldor. A classificatory note on the determinateness of equilibrium. Economic
Studies, 1(2):122–136, 1934.
14. Irving Fisher. Stabilizing the dollar. The Macmillan Company, New York, NY, 1920.
15. J. F. Muth. Rational expectations and the theory of price movements. Econometrica,
29(3):315–335, 1961.
16. H. A. Simon. A behavioral model of rational choice. Q. J. Econ, 69(1):99–118, 1955.
17. A. Tversky and D. Kahneman. Judgment under uncertainty: heuristics and biases.
Science, 185:1124–1131, 1974.
18. R. H. Thaler and C. R. Sunstein. Nudge: Improving decisions about health, wealth,
and happiness. Yale University Press, New Haven & London, 1st edition, 2008.
19. R. M. Raafat, N. Chater, and C. Frith. Herding in humans. Trends Cogn. Sci.,
13(10):420–428, 2009.
20. J. Regnault. Calcul des chances et philosophie de la bourse. Mallet-Bachelier and
Castel, Paris, France, 1863.
21. L. J.-B. A. Bachelier. Théorie de la spéculation. Ann. Sci. Éc. Norm. Supér., 3(17):21–
86, 1900.
22. B. Mandelbrot. The variation of certain speculative prices. J. Business, 36:394–419,
1963.

259
260 References

23. E. Fama. The behaviour of stock market prices. Journal of Business, 38:34–105, 1965.
24. P. Samuelson. Proof that properly anticipated prices fluctuate randomly. Industrial
Management Review, 6:41–59, 1965.
25. S. J. Grossman and J. E. Stiglitz. On the impossibility of informationally efficient
markets. Am. Econ. Rev., 70(3):393–408, 1980.
26. M. Musiela and M. Rutkowski. Martingale methods in financial modelling. Stochastic
modelling and applied probability. Springer-Verlag, Berlin, Heidelberg, 2nd edition,
2005.
27. A. N. Kolmogorov. Foundations of the theory of probability. Dover Publications, Inc.,
Mineloa, NY, 2nd edition, 2018.
28. D. S. Lemons. An introduction to stochastic processes in physics. The Johns Hopkins
University Press, Blatimore, MD, 2002.
29. P. Devolder, J. Janssen, and R. Manca. Basic stochastic processes. Mathematics and
Statistics Series. John Wiley & Sons, Inc., Hoboken, NJ, 2015.
30. H. M. Taylor and S. Karlin. An introduction to stochastic modeling. Academic Press,
Inc., London, UK, 3rd edition, 1998.
31. J. Medhi. Stochastic processes. New Academic Science Limited, Kent, UK, 3rd edition,
2012.
32. N. G. van Kampen. Stochastic processes in physics and chemistry. North-Holland,
Amsterdam, Netherlands, 3rd edition, 1992.
33. P. Lévy. L’addition des variables aléatoires définies sur une circonférence. Bull. Soc.
Math. Fr., 67:1–41, 1939.
34. P. Lévy. Processus Stochastiques et Mouvement Brownien. Monographies des Proba-
bilities. Gauthier-Villars, Paris, France, 2nd edition, 1965.
35. K. I. Sato. Lévy processes and infinitely divisible distributions. Cambdrige studies in
advanced mathematics. Cambridge University Press, Cambridge, UK, 1999.
36. M. Capiński, E. Kopp, and J. Traple. Stohastic calculus for finance. Cambridge Uni-
versity Press, Cambridge, UK, 2012.
37. B. de Finetti. Sulla funzione a incremento aleatorio. Atti. Accad. NAz. Lincei Sez.,
1(6):163–168, 1929.
38. K. I. Sato. Lévy processes and infinitely divisible distributions. Cambridge University
Press, Cambridge, UK, 1999.
39. P. Lévy. Calcul des Probabilites. Gauthier-Villars et Cie, Paris, France, 1925.
40. A. Ya. Khinchin and P. Lévy. Sur les loi stables. C. R. Acad. Sci. Paris, 202:374–376,
1936.
41. Jayakrishnan Nair, Adam Wierman, and Bert Zwart. The fundamentals of heavy-tails:
Propertis, emergence, and identification. In Mor Harchol-Balter, John R. Douceur, and
Jun Xu, editors, International Conference on Measurement and Modeling of Computer
Systems (SIGMETRICS), pages 387–388, Pittsburgh, PA, 2013. ACM.
42. B. B. Mandelbrot. Fractals and scaling in finance. Dicontinuity, concentration, risk.
Selecta Volume E. Springer-Verlag, New York, NY, 1997.
43. B. M. Hill. A simple general approach to inference about the tail of a distribution. Ann.
Stat., 3(5):1163–1174, 1975.
44. M. O. Lorenz. Methods of measuring the concentration of wealth. Am. Stat. Assoc.,
9(70):209–219, 1905.
45. C. Gini. Concentration and dependecy ratios. Riv. Pol. Econ., 87:769–789, 1997.
46. H. O. Wold. A Study in the Analysis of Stationary Time Series. Almqvist & Wiksell,
Stockholm, Sweden, 2nd edition, 1938.
References 261

47. George Box, Gwilym Jenkins, and G. C. Reinsel. Time Series Analysis: Forecasting
and Control. Wiley, Hoboken, NJ, 4th edition, 2008.
48. G. E. P. Box and D. A. Pierce. Distribution of residual autocorrelations in
autoregressive-integrated moving average time series models. Journal of the Ameri-
can Statistical Association, 65:1509–1526, 1970.
49. G. Ljung and G. Box. On a measure of lack of fit in time series models. Biometrika,
65:297–303, 1978.
50. J. Durbin. The fitting of time series models. Rev. Inst. Int. Stat., 28:233–243, 1960.
51. N. Levinson. The wiener rms error criterion in filter design and prediction. J. Math.
Phys., 25:261–278, 1947.
52. G. U. Yule. On a method of investigating periodicities in disturbed series, with special
reference to wolfer’s sunspot numbers. Philosophical Transactions of the Royal Society
of London, Ser. A, 226:267–298, 1927.
53. G. Walker. On periodicity in series of related terms. Proceedings of the Royol Society
of London, Ser. A, 131:518–532, 1931.
54. R. F. Engle. Autoregressive conditional heteroscedasticity with estimates of the vari-
ance of united kingdom inflation. Econometrica, 50:987–1007, 1982.
55. J. A. Yan. Introduction to stochastic finance. Springer, Singapore, 2018.
56. T. Bollerslev. Generalized autoregressive conditional heteroskedasticity. J. Economet-
rics, 31:307–327, 1986.
57. S. J. Taylor. Modeling Financial Time Series. World Scientific Publishing Company,
London, UK, 2nd edition, 1986.
58. R. K. Merton. The unanticipated consequences of purposive social action. American
Sociological Review, 1(6):894–904, 1936.
59. N. Kaldor. A model of economic growth. The Economic Journal, 67:591–624, 1957.
60. D. Hischman. Stylized facts in the social sciences. Sociological Science, 3:604–626,
2016.
61. J. Tinbergen. Selected Papers, pages 37–84. North-Holland Publishing Co., Amster-
dam, Holland, 1959.
62. Rama Cont. Empirical properties of asset returns: stylized facts and statistical issues.
Quantitative Finance, 1:223–236, 2001.
63. C. R. da Cunha and R. da Silva. Relevant stylized facts about bitcoin: Fluctuations,
first return probability, and natural phenomena. Physica A, 550:124155, 2020.
64. O. Knill. Probability theory and stochastic processes with applications. Overseas
Press, New Delhi, India, 2009.
65. R. Mansuy. The origins of the word “martingale”. Electron. J. Hist. Prob. Stat., 5(1),
2009.
66. L. Mazliak. How paul lévy saw jean ville and martingales. Electron. J. Hist. Prob.
Stat., 5(1), 2009.
67. Z. F. Huang and S. Solomon. Finite market size as a source of extreme wealth inequal-
ity and market instability. Physica A, 294(3-4):503–513, 2001.
68. R. K. Merton. The matthew effect in science. Science, 159(3810):56–63, 1968.
69. R. Gibrat. Les Inégalités économiques. Applications aux inégalités des richesses, à la
concentration des entreprises, aux populations des villes, aux statistiques des familles,
etc. d’une loi nouvelle. La loi de l’effet proportionnel. Recueil Sirey, Paris, France,
1931.
70. F. Galton and H. W. Watson. On the probability of the extinction of families. J. Royal
Anthrop. Inst., 4:138–144, 1875.
262 References

71. K. Frenken and R. Boschma. A theoretical framework for economic geography: indus-
trial dynamics and urban growth as a branching process. J. Econ. Geogr., 7(5):635–649,
2007.
72. A. A. Markov. Extension of the law of large numbers to dependent quantities (in
russian). Izvestiia Fiz.-Matem. Obsch. Kazan Univ. (2nd Ser.), 15:135–156, 1906.
73. G. A. Pavliotis. Stochastic Processes and Applications: Diffusion Processes, the
Fokker-Planck and Langevin Equations. Texts in Applied Mathematics. Springer, New
York, NY, 2014.
74. K. Zhu, K. L. Kraemer, V. Gurbaxani, and S. X. Xu. Migration to open-standard
interorganizational systems: Network effects, switching costs, and path dependency.
MIS Q., 30:515–539, 2006.
75. M. Stack and M. Gartland. Path creation, path dependency, and alternative theories of
the firm. J. Econ. Issues, 37(2):487, 2003.
76. P. A. David. Clio and the economics of qwerty. Am. Econ. Rev., 75:332–337, 1985.
77. M. Tabor. Chaos and integrability in nonlinear dynamic system: An introduction. John
Wiley & Sons, Inc., New York, NY, 1989.
78. J. L. McCauley. Integrability and attractors. Chaos Solitons Fractals, 4(11):1969–
1984, 1994.
79. L. Lam, editor. Introduction to nonlinear physics. Springer-Verlag, New York, NY,
2003.
80. A. Kolmogorov. über die analytischen methoden in der wahrscheinlichkeitsrechnung.
Math. Ann., 104:415–458, 1931.
81. S. Chapma. On the brownian displacements and thermal diffusion of grains suspended
in a non-uniform fluid. Proc. Roy. Soc. Lond. A, 119:34–54, 1928.
82. W. H. Furry. On fluctuation phenomena in the passage of high energy electrons through
lead. Phys. Rev., 52:569, 1937.
83. G. E. Uhlenbeck and L. S. Ornstein. On the theory of brownian motion. Phys. Rev.,
36:823, 1930.
84. A. Einstein. über die von der molekularkinetischen theorie der wärme geforderte be-
wegung von in ruhenden flüssigkeiten suspendierten teilchen. Annalen der Physik,
322(8):549–560, 1905.
85. D. Sondermann. Introduction to stochastic calculus for finance. Lecture notes in eco-
nomics and mathematical systems. Springer-Verlag, Berlin, Heidelberg, 2006.
86. S. M. Iacus. Simulation and inference for stochastic differential equations with R ex-
amples. Springer series in statistics. Springer, New York, NY, 2008.
87. O. Vasicek. An equilibrium characterization of the term structure. Journal of Financial
Economics, 5(2):177–188, 1977.
88. L. D. Landau and E. M. Lifshitz. Statistical physics, volume 5. Butterworth-
Heinemann, Oxford, UK, 3rd edition, 1980.
89. W. Feller. Two singular diffusion problems. Ann. Math., 54(1):173–182, 1951.
90. J. C. Cox, J. E. Ingersoll, and S. A. Ross. A theory of the term structure of interest
rates. Econometrica, 53:385–407, 1985.
91. D. L. Snyder. Random point processes. John Wiley & Sons, Inc., Hoboken, NJ, 1975.
92. A. G. Hawkes. Spectra of some self-exciting and mutually exciting point processes.
Biometrika, 58:83–90, 1971.
93. T. W. Epps. Comovements in stock prices in the very short run. Journal of the American
Statistical Association, 74:291–298, 1979.
References 263

94. E. Bacry, S. Delattre, M. Hoffmann, and J. F. Muzy. Modelling microstructure noise


with mutually exciting point processes. Quantitative Finance, 13(1):65–77, 2013.
95. M. D. Donsker. An invariance principle for certain probability limit theorems. Mem.
Am. Math. Soc., 6:1–10, 1951.
96. A. Etheridge. A course in financial calculus. Cambridge University Press, Cambridge,
UK, 2002.
97. J. C. Hull. Fundamentals of futures and options markets. Pearson Education Limited,
Essex, England, 2017.
98. J. C. Cox, S. A. Ross, and M. Rubinstein. Option pricing: a simplified approach. J.
Financ. Econ., 7:229–263, 1979.
99. F. Black and M. Scholes. The pricing of options and corporate liabilities. J. Pol. Econ.,
81:673–654, 1973.
100. W. F. Sharpe. Mutual fund performance. Journal of Business, 39:119–138, 1966.
101. Moawia Alghalith. Pricing the american options using the black-scholes pricing for-
mula. Physica A, 507:443–445, 2018.
102. M. Musiela and M. Rutkowski. Modifications of the black-scholes model. In Mar-
tingale Methods in Financial Modeling, volume 36 of Applications of Mathematics
(Stochastic Modelling and Applied Probability). Springer, Springer, Berlin, Heidel-
berg, 1997.
103. Svetlana I Boyarchenko and Sergei Z Levendorskii. Non-Gaussian Merton-Black-
Scholes Theory, volume 9 of Advanced Series on Statistical Science & Applied Proba-
bility. World Scientific Publishing Co., Singapore, 2002.
104. Ian Steward. In pursuit of the unknown: 17 Equations that changed the world. Basic
Books, New York, NY, illustrated edition, 2012.
105. C. S. Wehn, C. Hoppe, and G. N. Gregoriou. Rethinking valuation and pricing models.
Lessons learned from the crisis and future challenges. Academic Press, Inc., Oxford,
UK, 1st edition, 2013.
106. G. Galles. Pathways to policy failure. American Institute for Economic Research,
Great Barrington, MA, 2020.
107. G. Reisman. The government against the economy. TJS Books, Laguna Hills, CA,
2012.
108. H. Markovitz. Portfolio selection. The Journal of Finance, 7:77–91, 1952.
109. M. W. Brandt, P. Santa-Clara, and R. Valkonov. Parametric portfolio policies: Exploit-
ing characteristics in the cross-section of equity returns. Review of Financial Studies,
22:3411–3447, 2009.
110. W. F. Sharpe. Capital asset prices: A theory of market equilibrium under conditions of
risk. Journal of Finance, 19:425–442, 1964.
111. W. F. Sharpe. The sharpe ratio. The Journal of Portfolio Management, 21:49–58, 1994.
112. J. Tobin. Liquidity preference as behavior towards risk. Review of Economic Studies,
25:65–86, 1958.
113. F. H. Knight. Risk, Uncertainty, and Profit. Cosimo Classics, New York, NY, 2006.
114. J. L. Treynor. Market Value, Time, and Risk (1961) - Toward a Theory of Market Value
of Risky Assets (1962), pages 15–22. Risk Books, 1999.
115. J. Litner. The valuation of risk assets and the selection of risky investments in stock
portfolios and capital budgets. Review of Economics and Statistics, 47:13–37, 1965.
116. J. Mossin. Equilibrium in a capital asset market. Econometrica, 34:768–783, 1966.
117. A. Edelman and N. R. Rao. Random matrix theory. Acta Num., 14:1–65, 2005.
264 References

118. M. L. Mehta. Random matrices. Pure and applied mathematics series. Elsevier Aca-
demic Press, San Diego, CA, 3rd edition, 2004.
119. G. W. Anderson, A. Guionnet, and O. Zeitouni. An introduction to random matrices.
Cambdrige studies in advanced mathematics. Cambridge University Press, Cambridge,
UK, 2010.
120. E. J. Heller and S. Tomsovic. Postmodern quantum mechanics. Phys. Today, 46:38–46,
2008.
121. V. A. Marčenko and L. A. Pastur. The distribution of eigenvalues in certain sets of
random matrices. Mat. Sb., (72):507–536, 1967.
122. E. P. Wigner. Results and theory of resonance absorption. Technical Report ORNL-
2309, Oak Ridge National Laboratory, 1957.
123. Y. Choueifaty and Y. Coignard. Toward maximum diversification. J. Portf. Manag.,
35(1):40–51, 2008.
124. S. Maillard, T. Roncalli, and J. Teïletche. The properties of equally weighted risk
contribution portfolios. J. Portf. Manag., 36(4):60–70, 2010.
125. L.D. Kudryavtsev. Homogeneous function. Springer-Verlag, Switzerland, 2011.
126. Florin Spinu. An algorithm for computing risk parity weights. SSRN, page 2297383,
2013.
127. M. Kelbert, I. Stuhl, and Y. Suhov. Weighted entropy: basic inequalities. Mod. Stoch.:
Theory Appl., 4(3):233–252, 2017.
128. J. R. Wu, W. Y. Lee, and W. J. P. Chiou. Diversified portfolios with different entropy
measures. Appl. Math. Comput., 241:47–63, 2014.
129. M. J. Naylor, L. C. Rose, and B. J. Moyle. Topology of foreigh exchange markets using
hierarchical structure methods. Physica A, 389:199–208, 2007.
130. R. Rammal, G. Toulouse, and M. A. Virasoro. Ultrametricity for physicists. Rev.
Modern. Phys., 58:765–788, 1986.
131. M. Mezard, G. Parisi, and M. A. Virasoro. Spin glass theory and beyond. An introduc-
tion to the replica method and its applications, volume 9 of World Scientific Lecture
Notes in Physics. World Scientific Publishing, Singapore, 2004.
132. A. Z. Górski, S. Drożdż, and J. Kwapień. Scale free effects in world currency exchange
network. Eur. Phys. J. B, 66:91–96, 2008.
133. R. N. Mantegna. Hierarchical structure in financial markets. Eur. Phys. J. B, 11:193–
196, 1999.
134. M. Schulz. Statistical physics and economics: Concept, tools, and applications. 2003.
135. R. C. Prim. Shortest connection networks and some generalizations. Bell System Techn.
J., 36:1389–1401, 1957.
136. R. Sibson. Slink: An optimally efficient algorithm for the single-link cluster. Comp. J.,
16(1):30–34, 1973.
137. C. Mackay. Extraordinary Popular Delusions, the Money Mania: The Mississippi
Scheme, the South-Sea Bubble, & the Tulipomania. Cosimo Classics, New York, NY,
abridged edition, 2008.
138. F. A. von Hayek. Hayek’s triangles: two essays on the business cycle. Laissez Faire
Books, Maltimore, MD, 2014.
139. R. W. Garrison. Time and Money, The macroeconomics of capital structure. Routledge,
New York, NY, 1st edition, 2000.
140. L. von Mises. The Theory of Money and Credit. Skyhorse, New York, NY, 1st edition,
2013.
References 265

141. J. P. Keeler. Empirical evidence on the austrian business cycle theory. Rev. Austrian
Econ., 14(4):331–351, 2001.
142. G. Kim and H. M. Markowitz. Investment rules, margin and market volatility. J. Portf.
Manag., 16:45–52, 1989.
143. I. Stewart. Bifurcation theory. Math. Chronicle, 5:140–165, 1977.
144. R. Thom. Structural Stability and Morphogenesis. CRC Press, Boca Raton, FL, 2018.
145. I. Katerelos and N. Varotsis. A cusp catastrophe model of tax behavior. Nonlinear
Dynamics Psychol. Life Sci., 21(1):89–112, 2017.
146. C. Diks and J. Wang. Can a stochastic cusp catastrophe model explain housing market
crashes? J. Econ. Dyn. Cont., 69:68–88, 2016.
147. J. Barunik and M. Vosvrda. Can a stochastic cusp catastrophe model explain stock
market crashes? J. Econ. Dyn. Cont., 33:1824–1836, 2009.
148. I. Cobb. Parameter estimation for the cusp catastrophe model. Behav. Sci., 26(1):75–
78, 1981.
149. M. Gardner. Mathematical games - the fantastic combinations of john conway’s new
solitaier game “life”. Scientific American, 223:120–123, 1970.
150. R. D. Beer. Autopoiesis and cognition in the game of life. Artificial Life, 10:309–326,
2004.
151. N. M. Gotts. Ramifying feedback networks, cross-scale interactions, and emergent
quasi-individuals in conway’s game of life. Artificial Life, 15:351–375, 2009.
152. W. H. Zureck, editor. Complexity, entropy and the physics of information, volume VIII
of A proceedings volume in the Santa Fe Institute studies in the sciences of complexity.
CRC Press, Boca Raton, FL, 1990.
153. P. Bak, C. Tang, and K. Wiesenfeld. Self-organized criticality: an explanation of 1/f
noise. Physical Review Letters, 59(4):381–384, 1987.
154. F. Omori. On the aftershocks of earthquakes. Journal of the College of Science, Impe-
rial University of Tokyo, 7:111–200, 1894.
155. T. Utsu. A statistical study of the occurrence of aftershocks. Geophysical Magazine,
30:521–605, 1961.
156. B. Gutenberg and C. F. Richter. Magnitude and energy of earthquakes. Annali di
Geofisica, 9:1–15, 1965.
157. Bogdan Negrea. A statistical measure of financial crises magnitude. Physica A: Statis-
tical Mechanics and its Applications, 397:54–75, 03 2014.
158. S. M. Potirakis, P. I. Zitis, and K. Eftaxias. Dynamical analogy between economical
crisis and earthquake dynamics within the nonextensive statistical mechanics frame-
work. Physica A, 392(13):2940–2954, 2013.
159. J. von Neumann. Zur theorie der gesellschaftsspiele. Mathematische Annalen,
100(1):295–320, 1928.
160. J. von Neumann and O. Morgenstern. Theory of Games and Economic Behavior.
Princeton University Press, Princeton, NJ, 1953.
161. A. W. Brian. Inductive reasoning and bounded rationality. Am. Econ. Rev., 84:406–411,
1994.
162. R. Stalnaker. The problem of logical omniscience, i. Synthese, 89(3):425–440.
163. M. Friedman. The methodology of positive economics. University of Chicago Press,
Chicago, IL, 1953.
164. J. S. Mill. On the definition of political economy; and on the method of investigation
proper to it. In Essays on Some Unsettled Questions of Political Economy. John W.
Parker, West Strand, London, UK, 1844.
266 References

165. W. S. Jevons. The theory of political economy. Palgrave Classics in Economics. Pal-
grave Macmillan, London, UK, 2013.
166. D. Kahneman and A. Tversky. Prospect theory: an analysis of decision under risk.
Econometrica, 47(2):263–291, 1979.
167. D. Challet and Y. C. Zhang. Emergence of cooperation and organization in an evolu-
tionary game. Physica A, 246:407–418, 1997.
168. D. Challet, M. Marsili, and Y. C. Zhang. Modeling market mechanism with minority
game. Physica A, 276:284–315, 2000.
169. M. Levy, H. Levy, and S. Solomon. A microscopy model of the stock market: Cycles,
booms and crashes. Economics Letters, 45:103–111, 1994.
170. D. Challet and M. Marsili. Phase transition and symmetry breaking in the minority
game. Phys. Rev. E, 60(6):R6271–R6274, 1999.
171. L. S. Shapley. Notes on the n-person game ii: the value of an n-person game. Technical
Report RAND RM670, August 1951.
172. W. Güth, R. Schmittberger, and B. Schwarze. An experimental analysis of ultimatum
bargaining. J. Econ. Behav. Org., 3:367–388, 1982.
173. M. Marsili and Y. C. Zhang. Fluctuations around nash equilibria. Physica A, 245(1-
2):181–188, 1997.
174. M. M. Pillutla and J. K. Murnighan. Unfairness, anger and spite: Emotional rejections
of iltimatum offers. Organ. Behav. Hum. Decis. Process., 68(3):208–224, 1996.
175. E. Hoffman, K. A. McCabe, and V. L. Smith. On expectations and the monetary stakes
in ultimatum games. Int. J. Game Theory, 25:289–301, 1996.
176. A. Gunnthorsdottir, D. Houser, and K. McCabe. Disposition, history and contributions
in public goods experiments. J. Econ. Behav. Org., 62(2):304–315, 2007.
177. F. Guala and L. Mittone. Paradigmatic experiments: The dictator game. J. Socio-Econ.,
39(5):578–584, 2010.
178. M. M. Flood. Some experimental games. Technical report, June 1952.
179. A. W. Tucker. On jargon: The prisoner’s dilemma. UMAP Journal, 1:101, 1980.
Originalmente: “A Two-Person Dilemma” (1950) mimeo, Stanford University.
180. E. Fehr and J.-R. Tyran. Money illusion and coordination failure. Games Econ Behav,
58(2):246–268, 2007.
181. G. Stigler. The theory of economic regulation. Bell Journal of Economics and Man-
agement Science, 2(1):3–21, 1971.
182. R. H. Coase. The federal communications commision. J. Law Econ., 2:1–40, 1959.
183. I. M. Kirzner. The meaning of market process: essays in the development of modern
Austrian economics. Routledge, New York, NY, 1st edition, 2002.
184. R. H. Coase. The nature of the firm. Economica, 4(16):386–405, 1937.
185. W. B. Arthur. Competing technologies, increasing returns, and lock-in by historical
events. Econ. J., 97:642–665, 1989.
186. G. Saint-Paul, D. Ticchi, and A. Vindigni. A theory of political entrenchment. Econ.
J., 126(593):1238–1263, 2016.
187. L. Walras. Elements of theoretical economics, or the theory of social wealth. 2014.
188. A. M. Colell, M. D. Whinston, and J. R. Green. Microeconomic Theory. Oxford
University Press, Oxford, England, 1st edition, 2012.
189. I. Goldstein and A. Pauzner. Demand-deposit contract and the probability of bank runs.
J. Finance, 60:1293–1327, 2005.
190. S. Morris and H. S. Shin. Unique equilibrium in a model of self-fulfilling currency
attacks. Am. Econ. Rev., 88(3):587–597, 1998.
References 267

191. S. Morris and H. S. Shin. Coordination risk and the price of debt. Eur. Econ. Rev.,
48(1):133–153, 2004.
192. L. E. J. Brouwer. über abbildungen von mannigfaltigkeiten. Math. Ann., 71:97–115,
1911.
193. J. Nash. Equilibrium points in n-person games. Proceedings of the National Academy
of Sciences, 36(1):48–49, 1950.
194. W. F. Lloyd. Two lectures on the checks to population. Oxford University Press,
Oxford, UK, 1833.
195. G. Hardin. The tragedy of the commons. Science, 162:1243–1248, 1968.
196. E. Ostrom, J. Burger, C. B. Field, R. B. Norgaard, and D. Policansky. Revisiting the
commons: Local lessos, global challenges. Science, 284(5412):278–282, 1999.
197. R. Axelrod. The evolution of cooperation. Basic Books, New York, NY, revised edition,
2006.
198. T. C. Schelling. The strategy of conflict. Harvard University Press, Cambridge, MA,
1981.
199. R. Higgs and A. A. Rkirch, Jr. Crisis and Leviathan. Critical episodes in the growth of
American government. The Independent Institute, Oakland, CA, 2012.
200. G. P. Harmer and D. Abbott. Losing strategies can win by parrondo’s paradox. nature,
402:864, 1999.
201. G. P. Harmer, D. Abbott, and P. G. Taylor. The paradox of parrondo’s games. Proc.
Roy. Soc. Lond. A, 456:247–259, 2000.
202. B. Cornell and R. Roll. Strategies for pairwise competitions in markets and organiza-
tions. Bell J. Econ., 12(1):201–213, 1981.
203. M. Kandori. Evolutionary game theory in economics. Cambridge University Press,
Cambridge, 1997.
204. D. Friedman. Evolutionary games in economics. Econometrica, 59(3):637–666, 1991.
205. D. Friedman and K. C. Fung. International trade and the internal organization of firms:
An evolutionary approach. J. Int. Econ., 41:113–137, 1996.
206. D. Friedman. On economic applications of evolutionary game theory. J. Evol. Econ.,
8:15–43, 1998.
207. J. Maynard Smith and G. R. Price. The logic of animal conflict. Nature, 246:15–18,
1973.
208. A. J. Lotka. Contribution to the theory of periodic reaction. J. Phys. Chem., 14(3):271–
274, 1910.
209. A. J. Lotka. Analytical note on certain rhytmic relations in organic systems. Proc.
Natl. Acad. Sci. USA, 6:410–415, 1920.
210. A. J. Lotka. Elements of Physical Biology. Williams & Wilkins, Baltimore, MD, 1925.
211. R. Syms and L. Solymar. A dynamic competition model of regime change. J. Oper.
Res. Soc., 66:1939–1947, 2015.
212. R. M. Goodwin. A Growth Cycle. Socialism, Capitalism and Economic Growth, pages
165–170. Palgrave Macmillan, London, UK, 1982.
213. B. Powell. Some implications of capital heterogeneity, chapter 9. Edward Elgas Pub-
lishing Limited, Cheltenham, UK, 2012.
214. A. W. Phillips. The relationship between unemployment and the rate of change of
money wages in the united kingdom 1861-1957. Economica, 25(100):283–299, 1958.
215. M. Friedman. The role of monetary policy. Am. Econ. Rev., 58(1):1–17, 1968.
216. E. S. Phelps. Money-wage dynamics and labor market equilibrium. J. Pol. Econ.,
76(S4):678–711, 1968.
268 References

217. E. S. Phelps. Philips curves, expectations of inflation and optimal unemployment over
time. Economica, 34(135):254–281, 1967.
218. F. A. von Hayek. Full employment, planning and inflation. Inst. Pub. Affair Rev.,
4(6):174–184, 1950.
219. P. Hartman. A lemma in the theory of structural stability of differential equations. Proc.
A.M.S., 11(4):610–620, 1960.
220. D. M. Grobman. Homeomorphism of systems of differential equations. Doklady Akad.
Nauk SSSR, 128:880881, 1959.
221. David R. Howell and Arne L. Kalleberg. Declining job quality in the united states:
Explanations and evidence. RSF: The Russell Sage Foundation Journal of the Social
Sciences, 5(4):1–53, 2019.
222. G. Reisman. Capitalism: A treatise on economics. TJS Books, Laguna Hills, CA,
2012.
223. W. Weaver. Science and complexity. Am. Sci., 36(4):536–544, 1948.
224. Y. Holovatch, R. Kenna, and S. Thurner. Complex systems: physics beyond physics.
Eur. J. Phys., 38-2:023002, 2017.
225. S. Wolfram. A new kind of science. Wolfram media, Champaign, IL, 1st edition, 2002.
226. E. W. Dijkstra. A note on two problems in connexion with graphs. Numer. Math.,
1:269–271, 1959.
227. R. Bellman. On a routing problem. Q. Appl. Math., 16:87–90, 1958.
228. R. W. Floyd. Algorithm 97: Shortest path. Commun. ACM, 5(6):345, 1962.
229. S. Warshall. A theorem on boolean matrices. J. ACM, 9(1):11–12, 1959.
230. R. Cont and J. P. Bouchaud. Herd behavior and aggregate fluctuations in financial
markets. Marcoecon. Dyn., 4:170–196, 2000.
231. L. C. Freeman. Centrality in social networks conceptual clarification. Social Networks,
1:215–239, 1978.
232. A. Bavelas. Communication patterns in task-oriented groups. J. Acoust. Soc. Am.,
22(6):725–730, 1950.
233. L. Freeman. A set of measures of centrality based upon betweeness. Sociometry,
40(1):35–41, 1977.
234. P. Bonacich. Power and centrality: A family of measures. Am. J. Sociol., 92(5):1170–
1182, 1986.
235. P. Erdös and A. Renyi. On random graphs. Publicationes Mathematicae, 6:290–297,
1959.
236. M. Kochen, editor. The small world. Ablex Publishing Co., Norwood, NJ, 1989.
237. S. Milgram. The small world problem. Psychology Today, 2:60–67, 1967.
238. J. Travers and S. Milgram. An experimental study of the small world problem. So-
ciometry, 32:425–443, 1969.
239. G. U. Yule. A mathematical theory of evolution based on the conclusions of dr. j.
c. willis, f.r.s. Philosophical Transactions of the Royal Society, 213(402-410):8560–
8566, 1925.
240. H. A. Simon. On a class of skew distribution functions. Biometrika, 42(3-4):425–440,
1955.
241. A. Réka and A. L. Barabási. Statistical mechanics of complex networks. Rev. Mod.
Phys., 74(1):47–97, 2002.
242. A.-L. Barabási and R. Albert. Emergence of scaling in random networks. Science,
286(5439):509–512, 1999.
243. A. L. Barabási. Network science. Cambridge University Press, Cambridge, UK, 2016.
References 269

244. Watts D. J and S. H. Strogatz. Collective dynamics of ‘small-world’ networks. Nature,


393(6684):440–442, 1998.
245. W. Lenz. Beiträge zum verständnis der magnetischen eigenschaften in festen körpern.
Physikalische Zeitschrift, 21:613–615, 1920.
246. E. Ising. Beitrag zur theorie des ferromagnetismus. Z. Phys., 31:253–258, 1925.
247. R. H. Swendsen and J. S. Wang. Nonuniversal critical dynamics in monte carlo simu-
lations. Phys. Rev. Lett., 58(2):86–88, 1987.
248. U. Wolff. Collective monte carlo updating for spin systems. Phys. rev. Lett., 62:361,
1989.
249. T. C. Schelling. Dynamic models of segregation. J. Math. Sociol., 1(2):143–186, 1971.
250. D. Stauffer and S. Solomon. Ising, schelling and self-organising segregation. Eur.
Phys. J. B, 57:473–479, 2007.
251. C J. Mod. Phys. Self-organazing, two-temperature ising model describing human seg-
regation. Int. J. Mod. Phys. C, 19(3):393–398, 2008.
252. A. V. Mantzaris, J. A. Marich, and T. W. Halfman. Examining the schelling model
simulation through an estimation of its entropy. Entropy, 20(9):623, 2018.
253. L. Gauvin, J. Vannimenus, and J. P. Nadal. Phase diagram of a schelling segregation
model. Eur. Phys. J. B, 70:293–304, 2009.
254. I. Benenson, E. Hatna, and E. Or. From schelling to spatially explicit modeling of urban
ethnic and economic residential dynamics. Sociol. Methods Res., 37(4):463, 2009.
255. R. McCrea. Explaining sociospatial patterns in south east queensland, australia. Am.
Sociol. Rev., 41(9):2201–2214, 2009.
256. S. E. Asch. Effects of group pressure upon the modification and distortion of judgment.
Carnegie Press, Pittsburgh, PA, 1951.
257. A. V. Banerjee. A simple model of herd behavior. Q. J. Econ, 107(3):797–817, 1992.
258. R. Hegselmann and U. Krause. Opinion dynamics and bounded confidence models,
analysis, and simulation. JASSS, 5(3):1–33, 2002.
259. G. Deffuant, D. Neau, F. Amblard, and G. Weisbuch. Mixing beliefs among interacting
agents. Adv. Complex Syst., 03(01n04):87–98, 2000.
260. A. Kirman. Ants, rationality, and recruitment. Q. J. Econ, 108(1):137–156, 1993.
261. S. Bornholdt. Expectation bubbles in a spin model of markets: Intermittency from
frustration across scales. Int. J. Mod. Phys. C, 12(5):667–674, 2001.
262. T. Lux. The socio-economic dynamics of speculative markets: interacting agents,
chaos, and the fat tails of return distributions. J. Econ. Behav. Organ., 33:143–165,
1998.
263. T. Lux and M. Marchesi. Scaling and criticality in a stochastic multi-agent model of a
financial market. Nature, 397:398–500, 1999.
264. L. Pareschi and G. Toscani. Interacting Multiagent Systems: Kinetic equations &
Monte Carlo methods. Oxford University Press, Oxford, England, 2014.
265. A. Chakraborti and B. K. Chakrabarti. Statistical mechanics of money: How saving
propensity affects its distributions. Eur. Phys. J. B, 17:167–170, 2000.
266. S. Ispolatov, P. L. Krapivsky, and S. Redner. Wealth distributions in asset exchange
models. Eur. Phys. J. B, 2:267–276, 1998.
267. M. Gallegati, S. Keen, T. Lux, and P. Ormerod. Worrying trends in econophysics.
Physica A, 370(1):1–6, 2006.
268. J. H. McCulloch. The austrian theory of the marginal use and of orginal marginal
utility. J. Econ, 37(3-4):249–280, 1977.
270 References

269. F. Slanina. Inelastically scattering particles and welath distribution in an open econ-
omy. Phys. Rev. E, 69:046102, 2004.
270. L. Pareschi and G. Toscani. Self-similarity and power-like tails in non-conservative
kinetic models. J. Stat. Phys., 124:747–779, 2006.
271. A. Drǎgulescu and V. M. Yakovenko. Exponential and power-law probability distri-
butions of wealth and income in the united kingdom and the united states. Physica A,
299:213–221, 2001.
272. H. Tanaka. Professor gisiro maruyama, in memoriam. Probability Theory and Mathe-
matical Statistics, 1299:1–6, 1988.
273. N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller. Equa-
tions of state calculations by fast computing machines. Journal of Chemical Physics,
21(6):1087–1092, 1953.
274. W. K. Hasting. Monte carlo sampling methods using markov chains and their applica-
tions. Biometrika, 57(1):97–109, 1970.
275. A. D. Fokker. Die mittlere energie rotierender elektrischer dipole im strahlungsfeld.
Ann. Phys., 348:810–820, 1914.
276. M. Planck. über einen satz der statistischen dynamik und seine erweiterung in der quan-
tentheori. Sitzungsberichte der Preussischen Akademie der Wissenschaften zu Berlin,
24:324–341, 1917.
277. H. A. Kramers. Brownian motion in a field of force and the diffusion model of chemical
reactions. Physica, 7:284–304, 1940.
278. J. E. Moyal. Stochastic processes and statistical physics. Journal of the Royal Statisti-
cal Society - B, 11(2):150–210, 1949.
279. A. Novikov. On an identity for stochastic integrals. Theory Probab. its Appl.,
17(4):717–720, 1972.
280. A. Novikov. On conditions for uniform integrability of continuous non-negative mar-
tingales. Theory Probab. its Appl., 24(4):820–824, 1979.
281. I. V. Girsanov. On transforming a certain class of stochastic processes by absolutely
continuous substitution of measures. Theory Probab. its Appl., 5(3):285–301, 1960.
Index
Abelian group, 162 beta distribution, 67
Abelian sandpile model, 162 Bethe lattice, 207
abnormal return, 127 bifurcation, 152, 153
Adam Smith, 235 binary bets, 77
adaptive expectations, 5 binomial approximation, 28
additive process, 24 binomial distribution, 89, 165, 213
additive random walk, 105 binomial tree, 101, 103, 105, 106
adjacency matrix, 206, 208 birth-and-death process, 85, 89
advection, 111 Bitcoin, 57
advection-diffusion, 110 Black-Scholes, 101, 109–111, 114
aggregate output, 197 Boltzmann equation, 205, 233, 253
aggregational Gaussianity, 58 Boolean domain, 205
anti-coordination game, 186 Boolean matrix, 206
AR(0) process, 37 boom and bust, 150
AR(1) process, 38, 54 Borel set, 21
arbitrage, 62, 103, 105 Borel space, 19
ARCH(1) model, 50 Borel, Félix Édouard Justin Émile, 17
Arthur, William, 170 Bornholdt model, 229
Asch, Solomon E., 224 bounded confidence, 225
assortativity, 211 bounded rationality, 5, 170
at the money, 8 Box-Jenkins approach, 44
Austrian business cycle theory, 150 Box-Ljung test, 45
autocorrelation, 38, 42, 54–56 Box-Pierce test, 45
autocovariance, 38, 42, 53, 56 branching process, 71
automaton, 160, 220, 229 break even point, 9
autoregressive conditional heteroskedas- Brentano, Franz, 53
ticity (ARCH), 49 Bretton Woods, 57
autoregressive model (AR), 37 Breusch-Pagan test, 49
autoregressive moving average (ARMA), Brownian filtration, 112
37 Brownian motion, 103, 111, 249
avalanche, 161, 165 BTW model, 161
Azuma-Hoeffding inequality, 74 budget equation, 118
bull market, 13, 78, 82
Bachelier, Louis J. -B. A., 6, 64
bank run, 185 call option, 8, 77, 109, 112
Barabasi-Albert network, 216, 219 candlestick, 13
battle of sexes, 185 capital asset pricing model (CAPM), 127
BBKGY hierarchy, 257 capital market line (CML), 125
bear market, 13, 78, 82 Cardano’s discriminant, 153
behavioral economics, 5 catallaxy, 2
behavioral game theory, 179 catastrophe manifold, 152
Bernoulli process, 65, 105, 169, 233 catastrophe theory, 151

271
272 INDEX

Cauchy-Lorentz distribution, 26 contract curve, 184


Cauchy-Schwarz inequality, 211 control space, 152
Cayley tree, 206 convex function, 74
cellular automata, 160 Conway’s game of life, 161
central moment, 23 Cooley-Tuckey algorithm, 55
centrality, 209 cooperative game, 176
certificate of deposit, 123 coordination failure, 182
Chakraborti-Chakrabarti, 234 coordination games, 185
chaos, 78 coordination number, 161, 206
Chapman-Kolmogorov equation, 79, 80, core of a game, 178
245 correlation function (ACF), 45
characteristic function, 25 correlation length, 163
Chernoff bound, 28–30, 75 correlation matrix, 135
chi-square distribution, 45 correlation time, 39
CIR model, 90 correlogram, 47
circuit, 206 counting process, 96
circular ensemble, 128 Cournot, Antoine, 2, 169
class size paradox, 211 covariance matrix, 117
clique, 208 crab market, 13, 78, 82
closeness centrality, 209 crisis of 2008, 101
club goods, 184 criticality, 163
clustering, 143 cumulative distribution function (CDF),
clustering coefficient, 208, 215, 219 21, 113
coalitional game, 176 cumulative prospect theory, 170
Coase theorem, 182 currency, 57
cobweb diagram, 3 cusp catastrophe, 152
collective behavior, 224 cycle, 206
collision operator, 234, 254
comformity, 224 dÁlembert’s martingale, 61
community matrix, 199 Dóleans-Dade exponential, 250
complementary cumulative distribution data collapse, 163, 175
function (CCDF), 32 debenture, 7
complete information game, 180 Deffuant model, 226
completness relation, 130 degree matrix, 206
complex network, 207 degree sum formula, 216
complex systems, 205 delta hedging, 103, 109
compound interest rate, 15, 109 dendrogram, 143
conditional expectation, 20 depressed cubic function, 153
conditional expected value, 64 derivatives, 7
conditional probability, 17 detailed balance, 80–83, 243
conditional variance, 50 Dickey-Fuller test, 55
confidence level, 225 dictator game, 181
conservative market model, 234 diffeomorphism, 199
conspiracy principle, 27 diffusion, 111
diffusion coefficient, 102, 247
INDEX 273

diffusion equation, 102 evolutionary stable states, 195


diffusion term, 253 evolutionary stable strategy, 191
digital goods, 57, 144 evolutive economy, 183
diminishing marginal utility, 169 exchange lens, 183
discoordination game, 187 excludability, 184
discrete Fourier transform (DFT), 55 exercise price, 8
dispersed knowledge, 1, 183 exponential distribution, 33
dispersion matrix, 49 exponential random walk, 64
dividends, 7 extensive form, 179
dominant strategy, 180 externalities, 185
Donsker’s theorem, 103 extrinsic value, 8
Doob martingale, 63, 77
drift coefficient, 247, 253 fair game, 61, 62
duopolies, 169 Fama, Eugene, 6, 62
duration process, 96 farness, 209
Durbin-Levinson recursive method, 47 fast Fourier transform (FFT), 55
dynamical reserve, 55 fat tail, 28, 31, 58
Dyson’s equation, 130 Feynman-Kac formula, 112, 252
fiat money, 57
earthquakes, 166 Fick’s law, 110
eccentricity, 207 filtration, 63, 75, 93, 96
Edgeworth box, 183 financial instrument, 7
efficient frontier, 118, 120 finite size scaling, 163
efficient market, 6, 50, 62, 64, 108, 127, first passage time, 83
176, 189 Fisher, Irving, 5
Ehrenfest urn process, 228 fitness function, 190
eigenvalue spacings, 138 fixed points, 199
eigenvalues, 131, 134, 135 fixed return options, 77
Einstein’s propagator, 91 flood fill algorithm, 222
El Farol Bar problem, 170 fluctuation scaling, 59
elasticity, 3 Fokker-Planck equation, 103, 154, 155,
elementary process, 93 245
emergence, 161 fold catastrophe, 151
energy equipartition theorem, 94 fold curve, 153
Epps effect, 99 forward contract, 7
equilibrium point, 2 Fourier transform, 102
Erdös-Rényi network, 213 fractal geometry, 163
ergodic Markov chain, 85 free market, 181
ergodicity, 53 frictionless market, 108
Euler diagram, 18 Friedman’s ‘as if’ methodology, 170
Euler method, 200, 241 friendship paradox, 209
Euler’s homogeneous functions theorem, Fubini’s theorem, 93, 156
141 future contract, 7
European option, 108
evolutionary game theory, 189, 195 Galton Watson process, 71
274 INDEX

Gambler’s ruin, 69 Hill estimator, 34


game of chicken, 186 homo economicus, 170
game theory, 169 homophily, 211
GARCH, 50, 59 homoscedasticity, 49
Gaussian distribution, 22, 26, 29, 58, 103 housing bubble, 101
Gaussian ensemble, 128, 131, 133 Hurst coefficient, 27
Gaussian sympletic ensemble (GSE), hyperbolic fixed point, 199
128, 140 hypergeometric process, 65
Gaussian unitary ensemble (GUE), 128,
140 idiosyncratic risk, 127
GDP, 236 imperfect information game, 180
general equilibrium theory, 183 imputation, 178
geodesic, 207 in the money, 8
geometric Brownian motion, 108, 111, incompressible fluid, 256
112, 154, 193 independent events, 17
geometric distribution, 88 indicator function, 21
geometric random walk, 64, 106, 107 indifference curve, 183
Gibbs distribution, 156 inductive reasoning, 170
Gibbs, Josiah Willard, 5 infimum, 17
Gilbrat’s law, 67 infinite impulse filter (IIR), 37
Gini index, 35 infinitely divisible processes, 25
Girsanov theorem, 111, 250 infinitesimal generator, 107
gold, 57, 101, 147 inflation, 5
Goodwin model, 197 information cascade, 224
graphs, 205 information set, 180
Greeks, 110 initial public offering, 8
Green’s function, 102, 128, 129 innovations, 37
gross investment, 148 intensity jump process, 96
Grossman-Stiglitz paradox, 6 interaction kernel, 233
group, 162 interest rates, 94
Gutenberg-Richter law, 167 intrinsic value, 8
irrational exuberance, 225
handshaking lemma, 216 irreducible Markov chain, 85
Hann window, 55 Ising model, 219, 243
Hartman-Grobman theorem, 199 Ito isometry, 92
Hawk-dove game, 190 Ito process, 249, 250
Hawkes process, 97 Ito’s integral, 241
Hayek’s triangles, 149 Ito’s isometry, 93, 95
Hayek, Friedrich, 1, 170 Ito’s lemma, 106–108, 112, 194, 239,
heat bath, 243 250, 251
heavy tails, 27, 52, 57, 67 Ito’s lemma, multidimensional, 194
hedge, 7
Hegselmann-Krause model, 225 Jacobian matrix, 139
herd behavior, 224 John Law, 167
heteroscedasticity, 49
INDEX 275

Kahneman, Daniel, 5 MA(0) process, 41


Kaldor, Nicholas, 3 MA(1) process, 40
kernel, 102 Mandelbrot, Benoit B., 6
Keynesian economics, 197 manifold, 151
Kirman model, 227 Marcenko-Pastur theorem, 133, 136
Knightian uncertainty, 126 marginal rate of substitution, 183
Kolmogorov, Andrey, 16 marginal rate of transformation, 147
Kramers-Moyal expansion, 247 market portfolio, 124
kurtosis, 24, 51, 58 Markov chain, 77, 78, 81, 85, 86, 227,
243, 252
Lévy process, 24, 240 Markov chain Monte Carlo, 83
Lachmann, Ludwig, 183 Markov inequality, 28
Lagrange multipliers, 118, 123 Markov propagator, 91, 193
Landau, Lev, 151 Markov property, 77, 81, 91
Laplace distribution, 29 Markowitz, 118, 119
Laplace transform, 23, 237 Markowitz bullet, 120
Laplacian matrix, 206 Marshall, Alfred, 2
law of proportionate effect, 67 martingale, 61, 65, 67, 69, 72, 76, 101,
law of total expectation, 21, 50, 75 112, 228, 250
Lebesge, Henri Léon, 17 martingale bet, 62
Lebesgue measure, 21 martingale measure, 111
Lebesgue’s dominated convergence the- martingale property, 62
orem, 68 Maruyama method, 241
leptokurtic, 24, 28 matching pennies game, 187
light tail, 27 Matthew effect, 67
Lindy effect, 33 maximum likelihood estimation, 34
linear payoff scheme, 172 measure, 17
linear return, 13 Merton, Robert, 67
Liouville equation, 256 mesokurtic, 24
Liouville theorem, 256 methodological individualism, 1
Lipschitz condition, 74 metric space, 207
liquid market, 108, 189 Metropolis-Hastings, 243
loanable funds model, 148 Milgram, Stanley, 215
lock-in phenomenon, 183 Milstein’s method, 239
log-return, 14, 15 minimuml spanning tree, 143
long buying, 8 minor matrix, 131
long call, 9 minority game, 170, 171
long put, 9 minority group, 229
long straddle, 9 Mississippi bubble, 147
long tail, 28, 30 mixed Nash equilibria, 185
Lorenz curve, 34, 35 modern portfolio theory, 117, 126
Lotka-Volterra equations, 196, 198 moment generating function, 23, 29
Lucas, Robert Emerson, 5 monetary illusion, 5
Lyapunov function, 152 monetary stimulus, 150
276 INDEX

money, 57 Parrondo paradox, 188


monopsony,oligopsony, 203 partial autocorrelation function (PACF),
monotone game, 177 45
Monte Carlo, 243 partial volatility, 142
Morgenstern, 169 path, 206
moving average (MA), 37, 40 path dependence, 78
multigraph, 206 payoff diagram, 10
multiplicative processes, 65 per analogiam, 1
multiplicative random walk, 105 perfect information game, 180
Muth, John Fraser, 5 perfect rationality, 170
periodic Markov chain, 85
NAIRU, 197 permutable sequence, 66
Nash equilibrium, 180, 191 phase transition, 151, 176
natural rate of unemployment, 197 Phillips curve, 5, 197
negative binomial distribution, 88 platykurtic, 24
neglected firm effect, 6 Plemelj-Sokhotski formula, 130
neighborhood, 160, 206, 208, 220 point processes, 95
non-conservative market model, 235 Poisson distribution, 87
non-homogeneous Poisson process, 97 Poisson process, 96
non-quantifiable risk, 126 political entrenchment, 183
nonholonomy, 78 portfolio, 103, 109, 117, 123, 124, 142
nonintegrable systems, 78 positive recurrent Markov chain, 85
normal distribution, 113 power law, 59, 166, 215
normal form, 181 power set, 19
normalized return, 15 power spectral density (PSD), 56
Novikov condition, 250 precision matrix, 118
nudge effect, 5 preferential attachment, 216, 218
null recurrent Markov chain, 85 prey-predator model, 170
price discovery process, 2
Omori’s law, 166 Prim’s algorithm, 143
on the money, 8 Prisoner’s dilemma, 181
opportunity cost, 147 private goods, 184
optimal portfolio, 124 probability density function (PDF), 22,
optional stopping theorem, 68 103, 113
options, 101, 106 probability distribution, 21
Ornstein-Uhlenbeck process, 90, 94, 98 probability generating function, 73
orthogonal Gaussian ensemble (GOE), probability mass function, 22
128, 140 probability measure, 17, 78, 105, 111
probability of extinction, 89
Pólya’s process, 65, 67, 228
probability space, 16
Pareto distribution, 31, 34
probability transition function, 78
Pareto improvement, 184
production-possibility frontier, 147
Pareto optimum, 182, 183
pseudograph, 206
Pareto principle, 35
public goods game, 181
Pareto, Wilfried Fritz, 31
INDEX 277

pure Nash equilibria, 180 securitization, 101


put option, 8 security, 7
security characteristic line (SCL), 127
quantum chaos, 128 security market line (SML), 127
Quetelet, Lambert, 1 segregation coefficient, 222
seismology, 167
radius of a graph, 207 self-energy, 131
Radon-Nikodym derivative, 22, 249 self-enforcing contract, 180
random matrix, 128 self-excited process, 97
random network, 219 self-financing portfolio, 109
random variable, 19, 83 self-organization, 161, 163
random walk, 64, 101 self-organized criticality, 160
ratchet effect, 188 self-similarity, 27, 236
recession, 150 semi-circle law, 131
Regnault, Jules A. F., 6 Shapley value, 178
regulatory capture, 182, 183 shareholder, 7
reinforced learning, 172 shares, 6
relaxation-time approximation, 253 Sharpe ratio, 111, 125
reliability function, 33 Shiller, Robert James, 5
replicator dynamics, 195 shocks, 37
resolvent, 129 short selling, 8
reward equation, 118 short squeeze, 11
Riemann sum, 240 shortest path, 207
Riemann zeta function, 216 sigma-algebra, 17, 18, 105
risk, 7, 28, 123 Simon, Herbert Alexander, 5
risk budget, 142 six degrees, 215
risk budget equation, 142 Slalina model, 235
risk measure, 110 small world network, 219
risk parity portfolio, 141 small world phenomenon, 215
risk-free asset, 123 Smith, Adam, 1, 2
risk-free investment, 103, 108, 109 Smoluchowski limit, 94
risk-free rate, 111 social segregation, 220
risk-neutral, 110 spanning tree, 207
rivalry, 184 spectral density, 39
Runge-Kutta, 195 spectral leakage, 55
spontaneous symmetry breaking, 153
S&P500, 153
stable distribution, 25
Saint Petersburg paradox, 169
stable manifold, 199
sample space, 16, 105
stagflation, 197
Samuelson, Paul, 6
standardized moment, 24, 33
savings bonds, 123
state space, 105
Says’s law, 149
stationarity, 53
scale-free networks, 215
stationary distribution, 80, 85
Schelling model, 220
stationary process, 53
Schumpter, Joseph Alois, 1
278 INDEX

stationary state, 83 transaction costs, 182


Stieltjes transformation, 133 transient state, 85
Stirling’s approximation, 67 transition costs, 108
stochastic process, 53, 67, 71, 72, 96 transition function, 160
stocks, 6 transition matrix, 82, 85
stopping time, 72 Treynor index, 127
Stosszahlansatz, 234 triplets, 208
Stratonovich’s integral, 241 Tversky, Amos Nathan, 5
strike, 8
structured-investment vehicles, 101 ultrametric ordering, 143
stylized facts, 52, 58, 231 unfolding, 151, 152
sub-Gaussian distribution, 29 unintented consequences of the human
subcritical process, 74 action, 52
subexponential distribution, 28 unit root, 54
subjective value, 235 utility function, 169, 180
submartingale, 63, 72 Utsu’s law, 166
sum of independent random variables, 23
superadditive game, 177 Vašíček model, 90, 94, 95
supercritical process, 74 value, 5
supermartingale, 63 Venn diagram, 26
Supply and demand, 2 Verhulst, Pierre François, 3
supremum, 17 volatility, 59
survival function, 33 volatility clustering, 59, 231
survival probability, 89 von Neumann, 169
swap, 7
Wald’s equation, 69, 72
t-student distribution, 57 walk, 206
tâtonment, 183 Walras’s law, 183
tail index, 34 Walrasian equilibrium, 184
tail preservation criterium, 28 Watts-Strogatz model, 219
tangent portfolio, 125 wealth distribution, 65
Taylor expansion, 107, 108, 194, 245, welfare eonomics, 184
247 wide-sense stationarity, 38, 42, 53
Taylor’s law, 59 Wiener process, 24, 90, 93, 94, 101, 112,
temporal preference, 149 167, 193, 239, 247
Thaler, Richard H., 5 Wiener-Khinchin theorem, 39, 42, 56,
three-state market, 82 163
ticker, 13 Wigner matrix, 132, 133
tight market, 197 Wigner’s semi-circle law, 131
time series, 37 Wigner, Eugene Paul, 138
Tobin’s separation theorem, 125 Wishart ensemble, 128, 133
tolerance level, 224 Wold’s decomposition, 43
toppling, 161 Wolfram, Stephen, 205
tragedy of the commons, 186, 188
Yule process, 88
trail, 206
INDEX 279

Yule-Furry process, 87
Yule-Simon’s urn process, 216
Yule-Walker equations, 48

zero-sum game, 182

You might also like