Introduction to Econophysics - Carlo Requião Da Cunha
Introduction to Econophysics - Carlo Requião Da Cunha
Econophysics
Introduction to
Econophysics
Contemporary Approaches with
Python Simulations
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.
DOI: 10.1201/9781003127956
http://www.filosofisica.com/books/econophysics.html
Dedication
Preface.......................................................................................................................xi
vii
viii Contents
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
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.
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.
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
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)
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
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:
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.
loss/profit
break
strike even
$40 $42
Trading
price
−$2
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
loss/profit
strike
$38 $40
break Trading
even price
−$2
loss/profit
strike
$38 $40 $42
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,
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-
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
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.
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
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
def nret(series):
m = np.average(series)
s = np.std(series)
1. µ(E) ≥ 0, ∀E ∈ Σ, non-negativity
/S = 0, null empty set, and
2. µ(0)
3. µ ( ∞ ∞
k=1 Ek ) = ∑k=1 µ(Ek ), ∀Ek ∈ Σ countable additivity.
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.
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.
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
Given the Euler diagram shown in Fig. 2.3 we can obtain the following prob-
abilities:
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.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)
Ω Ω'
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
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:
hhX|Y ii = ∑ xP(X = x|Y )
x
=∑ ∑ xP(X = x|Y = y) P(Y = y)
y x
= ∑ xP(X = x) = hXi.
x
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.
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.
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
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
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)
−∞
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
Furthermore, the three first central moments are additive for independent random
variables:
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.
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
The Fourier transform of the distribution of the stochastic variables is called char-
acteristic function and can simply be written as:
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
Processes whose variables have the same distribution of the sum ∑nk=1 Xk , ∀n ∈
N+ are called infinitely divisible.
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.
( )
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
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.
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
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:
λ2
1 a
g t= = 2
−
λ 2λ λ (2.62)
a
≤− .
2λ
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.
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.
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
∞ 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
∂ log L N
= + N log(x0 ) − ∑ log(xn )
∂α α n
N xn
0 = + ∑ log (2.78)
α n x0
N
α̂ = ,
x
∑n log x̂n0
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
(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)
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
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
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:
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:
Therefore:
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
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
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:
σ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(ω) .
ε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
µ
hyt i = µ + φ hyt−1 i → hyt i = . (2.115)
1−φ
The variance can be found by first computing yt yt and yt yt−1 :
γ0 = φ γ1 + σe2 + θ σe2 (φ + θ )
(2.119)
γ1 = φ γ0 + θ σe2 .
Therefore,
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.
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:
In order to compute this conditional correlation, let’s write the elements of the
time series as a linear combination of lagged elements:
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
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
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)
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
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
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.
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.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:
−T T
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
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.
xn Xk 1/T
+f 2π/N −f
π,−π 0,2π
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∗ (ω)} .
2π
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
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])
Money
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
9.6
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
7 Pierre-Simon, marquis de Laplace (1749–1827) French polymath. Advisee of Jean d’Alembert and
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,
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-
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:
* +
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:
then this is known as a submartingale. On the other hand, if it is a limiter for the
upper bound:
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:
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].
Finally, let’s also compare those with the probability of obtaining a green ball fol-
lowed by a red and another green balls:
B ac + k, bc + N − k
=
B ac , bc
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
Γ(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 .
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:
√
a Γ(x + 1) ≈ 2πe−x x1/2+x .
68 Introduction to Econophysics
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:
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
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
hZT i = hZ0 i = 0
* +
T
∑ Xj − hT ihXi = 0
j=1 (3.34)
* +
T
∑ Xj = hT ihXi.
j=1
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
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.
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
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.
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
Z2=3
Zn = X1 + X2 + . . . + XZn−1 . (3.42)
Thus, it is possible to use Wald’s equation for the stopping time Zn−1 :
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
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:
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
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
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.
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].
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:
x2 = x1 P
= x0 PP (3.79)
0 2
=x P .
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
π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)
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∗ pi j = ∑ π ∗j p ji = π ∗j ∑ p ji = π ∗j (3.92)
i i i
∴ π ∗j =∑ πi∗ pi j , ∀ j.
i
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:
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:
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).
!
[
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:
= 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
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.
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 .
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
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:
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):
(λ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.
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
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 = µ:
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)
Figure 3.5: Probability Xn of finding the system in state n for a Yule-Furry process
with λ = 0.08, m = 2
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
∞
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,
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:
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
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:
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
β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.
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:
β
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 .
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
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 .
τ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 − 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
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
Z t
λ (t|Ft ) = λ0 (t) + α e−β (t−u) dNu
0
(3.170)
= λ0 (t) + α ∑ e−β (t−tu ) .
tu <t
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:
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
λ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
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;
Finnish statistician.
12 Rudolf Lipschitz (1832–1903) German mathematician, advisee of Gustav Dirichlet and Martin Ohm
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
t x−2Δx x x+2Δx
t+2Δt x
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:
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
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.
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
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.
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.
= (u − d)2 p(1 − p)
108 Introduction to Econophysics
ert − d u − ert
σ 2 ∆t = (u − d)2 . (4.22)
u−d u−d
Let’s assume that u = 1/d = ex . Therefore:
Doing a Taylor expansion up to second order and keeping only terms up to o(t):
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:
∂ 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:
∂ 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
∂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
= 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
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:
Option price
Figure 4.4: Call option payoff as a function of the price of the underlying asset for
different expiry times
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
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
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.
a See [106] and [107] for some ways a central authority may afflict the economy.
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
∂Λ
= 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 .
IBM
AMD
INTEL
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
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]
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))
# Get Returns
ribm = ret(pibm)
ramd = ret(pamd)
ritl = ret(pitl)
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)
# M Matrix
e = np.array([[1.0] for i in range(3)])
eT = np.transpose(e)
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)
pl.plot(s_space,a_space)
Portfolio Theory 123
α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:
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:
b This class of asset is usually protected by insurance corporations such as the Federal Deposit Insur-
λ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
(α − 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 )
λ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
L IBM
CM AMD
INTEL
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)
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.
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):
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:
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
1 N
ρ(λ ) = ∑ δ (λ − λα ).
N α=1
(5.43)
h11 τ †1
H= . (5.46)
τ 2 H0
Dyson’s Equation
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
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
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:
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:
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
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.
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η:
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.
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
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)
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
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 φ
where
φ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
8π
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,
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
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 :
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:
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
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,
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
mathematician.
10 Freeman John Dyson (1923–2020) British mathematical physicist, advisee of Hans Bethe. Dyson was
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
a The total potential benefit of all alternatives that are discarded when one chooses some option.
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
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
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
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.
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
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
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
σ 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
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 ϕ(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)
Z Z
y j ∂ fY |X (y|x) = − j y j−1 fY |X (y|x)dy, (6.21)
= − 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
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]
i = [0,0,1,1,0]
j = [0,1,0,1,2]
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:
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
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:
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
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
Commutativity: ∀a, b ∈ A → a b = b a,
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
# 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
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))
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)
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
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:
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 .
a The bar chosen by Arthur was the El Farol located in Santa Fe, NM. Hence, this problem was popu-
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
Table 7.1
A Possible Strategy Book for an Agent with Two Strategies
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)
# Winning Group
W = -np.sign(A)
bits = push(bits,W)
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
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
def push(v,x):
for i in range(len(v)-2,-1,-1):
v[i+1]=v[i]
v[0] = x
return v
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)
Table 7.2
A Cooperative Game Where Agents Want to Buy the Biggest Field in
the Market, but They Have a Fixed Money Supply
Table 7.3
Possible Permutations for the Cooperative Game of Table 7.2
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
∆π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].
f air un f air
R R
5, 5 0, 0 8, 2 0, 0
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.
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]).
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.
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.
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].
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
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
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.
e The original idea, called “How to cheat a bad mathematician” was not published, but an early refer-
2 0 1
Figure 7.6: Illustration of the Parrondo paradox
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
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)
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
∂ 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
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
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
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
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
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
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:
u̇
= ρv − η − λ . (7.55)
u
Equations 7.53 and 7.55 are exactly the Lotka-Volterra equations:
v̇ 1
= (1 − u) − λ − θ
v σ (7.56)
u̇
= ρ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.
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
α −β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
sigma = 0.5
lbd = 0.8
theta = 0.3
rho = 0.5
eta = 0.6
p = [alpha,beta,delta,gamma]
xi,yi = 0.25,0.37
x,y = LV(xi,yi,p)
pl.plot(x,y)
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
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
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
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.
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
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.
Figure 8.2: Graphs with the same number of nodes but with different regularities
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:
∑ 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
(closed).
Agent-Based Simulations 209
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
∑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
f (x) = ∑(ai x − bi )2
i
! ! (8.11)
= ∑ a2i 2
x −2 ∑ ai bi x + ∑ b2i .
i i i
∑ a2i ∑ b2i ≥ ∑ ai bi .
i i i
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 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)
# Number of nodes
N = np.shape(A)[0]
p = np.sum(np.dot(e,e))
num = np.trace(e)-p
den = 1-p
return(r)
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].
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.
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
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:
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.
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:
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
Randomness (β)
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.
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))
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)
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)
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 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
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
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 ρ
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:
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
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:
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 .
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:
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 δ .
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:
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
r = []
M=1
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))
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
CCDF
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
∂
hϕ (X(t)) + ϕ (Y (t))i = µ ϕ X 0 (t) + ϕ Y 0 (t)
∂t (8.61)
− hϕ (X(t))i − hϕ (Y (t))i] .
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 Ω×Ω
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 .
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.
k Consider this famous paradox attributed to Adam Smith: What would the values of water and diamond
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
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
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
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
Here we will see how to numerically solve stochastic differential equations of the
type:
∂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
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
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 .
0
f (t)dWt = lim ∑ f (ti )(Wi+1 −Wi )
∆t→0 i=0
(A.12)
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 :
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
π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-
∂ 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
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.
∞
∂ 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
∂ 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):
∂ϕ ∂ϕ 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:
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
This is known as the Doléans-Dade exponentialb which also appears as the solution
of the martingale:
∂ 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:
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:
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, 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:
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.
∂ 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}
∂ H ∂ 2H
2
0 0
dri dpi = dri dpi 1 + − ∆ = dri dpi . (G.6)
∂ ri ∂ pi ∂ pi ∂ ri
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:
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
∂ 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.
a Joseph Liouville (1809-1882) French mathematician advisee of Siméon Poisson and adviser of Eu-
∂ 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.
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:
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
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
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
Yule-Furry process, 87
Yule-Simon’s urn process, 216
Yule-Walker equations, 48