Вы находитесь на странице: 1из 61

Charles University in Prague

Faculty of Social Sciences


Institute of Economic Studies

BACHELOR THESIS

A Fractal View of Coffee Prices

Author: Johana Vaškovicová


Supervisor: PhDr. Petr Teplý, Ph.D.
Academic Year: 2012/2013
Declaration of Authorship
The author hereby declares that she compiled this thesis independently, using
only the listed resources and literature. The author also declares that she has
not used this thesis to acquire another academic degree.

The author grants to Charles University permission to reproduce and to dis-


tribute copies of this thesis document in whole or in part.

Prague, July 31, 2013


Signature
Acknowledgments
I would like to express sincere appreciation to my supervisor, PhDr. Petr Teplý,
Ph.D., for his guidance and advice. I would also like to express my upmost
gratitude to PhDr. Ladislav Krištoufek for his priceless suggestions and to Jan
Kovalovský for help and provision of the data.
Bibliographic entry
VAŠKOVICOVÁ, Johana (2013): ”A Fractal View of Coffee Prices.” (Bachelor
thesis). Charles University in Prague, Faculty of Social Sciences, Institute of
Economic Studies.

Abstract
This thesis analyses the coffee time series from the viewpoint of Fractal Mar-
ket Hypothesis. It presents a brief history of coffee, one of the most traded
commodities, followed by the characterization of coffee markets. The thesis is
motivated by the fractal geometry developed by B.B. Mandelbrot and presents
an overview of the very complex field of fractals, discussing their main proper-
ties. Further on, we deal with the assumptions of the two alternative theories of
the financial markets - the Efficient Market Hypothesis and the Fractal Market
Hypothesis. The main goal of the thesis is to estimate the Hurst exponent,
which provides a measure of self-similarity and distinguishes between random,
persistent and anti-persistent series. Three different estimation methods are
described in detail and applied to arabica and robusta time series of returns
and volatility - the rescaled range analysis, the modified rescaled range analysis
and the detrended fluctuation analysis.

Keywords coffee prices, fractals, Hurst exponent, R/S anal-


ysis, modified R/S analysis, detrended fluctua-
tion analysis

Author’s e-mail johana.vaskovicova@gmail.com


Supervisor’s e-mail teply@fsv.cuni.cz
Abstrakt
Tato práce analyzuje časovou řadu cen kávy z pohledu hypotézy fraktálnı́ch
trhů. Představuje stručnou historii kávy, jedné z nejobchodovanějšı́ch komodit,
po které následuje charakteristika trhu s kávou. Práce vycházı́ z fraktálnı́ ge-
ometrie B.B.Mandelbrota. Nabı́zı́ ucelený přehled tohoto velmi komplexnı́ho
oboru a popisuje hlavnı́ vlastnosti fraktálů. Následně se práce zabývá předpoklady
dvou alternativnı́ch teoriı́ finančnı́ch trhů - hypotézy efektivnı́ch trhů a hy-
potézy fraktálnı́ch trhů. Jako hlavnı́ cı́l si tato práce stanovuje odhad Hurstova
exponentu, který poskytuje mı́ru soběpodobnosti a dokáže rozlišit mezi náhodnou,
perzistentnı́ a antiperzistentnı́ časovou řadou. Pro odhad exponentu jsou de-
tailně popsány a aplikovány 3 metody, a to - R/S analýza (rescaled range analy-
sis), modifikovaná R/S analýza (modified rescaled range analysis) a DF analýza
(detrended fluctuation analysis). Tyto metody jsou aplikovány na časové řady
výnosů a volatility arabiky a robusty.

Klı́čová slova ceny kávy, Hurstův exponent, R/S analýza,


modifikovaná R/S analýza, DF analýza

E-mail autora johana.vaskovicova@gmail.com


E-mail vedoucı́ho práce teply@fsv.cuni.cz
Contents

List of Tables viii

List of Figures ix

Acronyms x

Thesis Proposal xi

1 Introduction 1

2 Coffee and markets 3


2.1 Botanical aspects of coffee . . . . . . . . . . . . . . . . . . . . . 3
2.2 Brief history of coffee . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.1 Coffee origins . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.2 Coffee in the Arab world . . . . . . . . . . . . . . . . . . 5
2.2.3 Coffee culture spreads around the world . . . . . . . . . 5
2.3 World coffee trade . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.1 Production . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.2 Imports and per capita consumption . . . . . . . . . . . 8
2.4 Coffee in the financial markets . . . . . . . . . . . . . . . . . . . 8
2.4.1 Commodity exchanges . . . . . . . . . . . . . . . . . . . 9

3 Fractals 10
3.1 The founding father of fractal geometry . . . . . . . . . . . . . . 10
3.2 Lack of the accurate definition . . . . . . . . . . . . . . . . . . . 12
3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3.1 Brownian motion . . . . . . . . . . . . . . . . . . . . . . 14
3.3.2 Cantor set Cλ . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.3 Sierpinski triangle . . . . . . . . . . . . . . . . . . . . . . 15
3.3.4 Koch curve and snowflake . . . . . . . . . . . . . . . . . 16
Contents vii

3.3.5 Irregularities of the natural world . . . . . . . . . . . . . 18


3.4 Fractal dimension . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4 Fractals in the world of finance 21


4.1 Efficient Market Hypothesis . . . . . . . . . . . . . . . . . . . . 21
4.2 Fractal Market Hypothesis . . . . . . . . . . . . . . . . . . . . . 22
4.2.1 Hurst exponent . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.2 Fractal dimension and Hurst exponent . . . . . . . . . . 25
4.3 Methodology on Hurst exponent estimates . . . . . . . . . . . . 25
4.3.1 Classical rescaled range analysis . . . . . . . . . . . . . . 25
4.3.2 Modified rescaled range analysis . . . . . . . . . . . . . . 27
4.3.3 Detrended fluctuation analysis . . . . . . . . . . . . . . . 27
4.3.4 Comparison of estimation methods . . . . . . . . . . . . 28

5 Empirical results 29
5.1 Data Description . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.1.1 Coffee futures prices of arabica and robusta . . . . . . . 29
5.1.2 Logarithmic returns . . . . . . . . . . . . . . . . . . . . . 30
5.1.3 Volatility . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.2 V -statistic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.2.1 V -statistic for R/S analysis . . . . . . . . . . . . . . . . 31
5.2.2 V -statistic for M-R/S analysis . . . . . . . . . . . . . . . 31
5.3 Hurst exponent . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.3.1 R/S analysis . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.3.2 M-R/S analysis . . . . . . . . . . . . . . . . . . . . . . . 32
5.3.3 DFA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6 Conclusion 35

Bibliography 39

A Tables and figures I

B Content of Enclosed DVD X


List of Tables

5.1 Summary statistics for coffee time series . . . . . . . . . . . . . 31


5.2 V -statistic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.3 Hurst exponent estimates . . . . . . . . . . . . . . . . . . . . . 34

A.1 Major importing countries . . . . . . . . . . . . . . . . . . . . . I


A.2 The major coffee producing countries . . . . . . . . . . . . . . . II
A.3 Per capita consumption of coffee in selected countries . . . . . . III
List of Figures

2.1 Cross-section of a coffee cherry . . . . . . . . . . . . . . . . . . . 4

3.1 Monochromatic image of the Mandelbrot set . . . . . . . . . . . 12


3.2 Brownian motion: the path of a particle suspended in a liquid . 14
3.3 Construction of the Cantor set . . . . . . . . . . . . . . . . . . . 16
3.4 Illustration of the evolution of the Sierpinski triangle . . . . . . 16
3.5 Construction of the Koch curve . . . . . . . . . . . . . . . . . . 17
3.6 Koch snowflake . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

A.1 Total production of coffee . . . . . . . . . . . . . . . . . . . . . III


A.2 Yearly relative changes in coffee production . . . . . . . . . . . . IV
A.3 Arabica coffee futures daily prices 1972-2012 . . . . . . . . . . . V
A.4 Robusta coffee futures daily prices 1991-2009 . . . . . . . . . . . V
A.5 Arabica daily logarithmic returns 1972-2012 . . . . . . . . . . . V
A.6 Robusta daily logarithmic returns 1991-2009 . . . . . . . . . . . VI
A.7 Volatility of arabica prices . . . . . . . . . . . . . . . . . . . . . VI
A.8 Volatility of robusta prices . . . . . . . . . . . . . . . . . . . . . VI
A.9 V-statistic for R/S method . . . . . . . . . . . . . . . . . . . . . VII
A.10 V-statistic for M-R/S method . . . . . . . . . . . . . . . . . . . VII
A.11 Hurst exponent estimation, R/S . . . . . . . . . . . . . . . . . . VIII
A.12 Hurst exponent estimation, M-R/S . . . . . . . . . . . . . . . . VIII
A.13 Hurst exponent estimation, DFA . . . . . . . . . . . . . . . . . IX
Acronyms

BM Brownian motion
CSCE Coffee, Sugar and Cocoa Exchange
DFA Detrended fluctuation analysis
EMH Efficient Market Hypothesis
FMH Fractal Market Hypothesis
ICE Intercontinental Exchange
ICO International Coffee Organization
LIFFE London International Financial Futures and Options Exchange
M-R/S Modified rescaled range analysis
NYBOT New York Board of Trade
NYCE New York Cotton Exchange
R/S Rescaled range analysis
Bachelor Thesis Proposal

Author Johana Vaškovicová


Supervisor PhDr. Petr Teplý, Ph.D.
Proposed topic A Fractal View of Coffee Prices

The aim of this thesis is to analyse the coffee time series from the view-
point of the fractal market hypothesis which is based on the fractal geometry,
originally developed by B.B. Mandelbrot.
In the first part, we will provide a brief history of coffee, which is one of the
most traded commodities. We will distinguish between robusta and arabica and
briefly touch on coffee’s history to show how important it is for human mankind.
Next, we will mention the characteristics of the coffee markets, including the
main production countries and the major commodity exchanges.
In the second part, we will introduce the fractals, the complex objects with
very specific properties like self-similarity or non-integer dimension that can be
found not only in the nature but also in the world of finance. Afterwards, we
will deal with the fractal market hypothesis and contrast it with the bedrock
of today‘s financial theory, the efficient market hypothesis.
Moreover, we will bring up and use different methods for the estimation
of the self-similar parameter, the Hurst exponent, which can provide a notion
whether the coffee time series are independent, persistent or anti-persistent.
For the estimation, the classical rescaled range analysis, the modified rescaled
analysis and the detrended fluctuation analysis will be applied. Further on, the
advantages and disadvantages of these methods used for analysing the scaling
properties will be pointed out.
And finally, based on the previous results, the persistent behavior of coffee
series and possible degree of predictability will be discussed.
Bachelor Thesis Proposal xii

Outline

I. Introduction

II. Theoretical background

• Characteristics of coffee markets


• Fractal geometry & Properties of fractals
• Efficient and fractal market hypotheses

III. Methodology for estimation of the Hurst exponent

• Classical R/S analysis


• Modified R/S analysis
• Detrended fluctuation analysis

IV. Empirical Analysis & discussion of results

V. Conclusion

Core bibliography
[1] FALCONER, K. (2003): Fractal Geometry: Mathematical Foundations and Applica-
tions. New York: Wiley

[2] FLAKE, Gary W. (1998): Computational Beauty of Nature: Computer Explorations of


Fractals, Chaos and Complex Systems, and Adaptation. Cambridge: The MIT Press.

[3] MANDELBROT, B.B. (1997): Fractal and scaling in finance: discontinuity, concentra-
tion, risk. New York: Springer.

[4] MANDELBROT, B.B. and HUDSON, R.L. (2004): The (mis)Behaviour of Markets: A
Fractal View of Financial Turbulence. New York: Basic Books.

[5] PEITGEN, Heinz-Otto and JÜRGENS, Hartmut and SAUPE, Dietmar (1992): Chaos
and Fractals: New Frontiers of Science. New York: Springer-Verlag New York, Inc.

[6] PETERS, E.E. (1996): Chaos and Order in the Capital Markets: A New View of Cycles,
Prices, and Market Volatility. New York: Wiley.

[7] PETERS, E.E. (1994): Fractal Market Analysis: Applying Chaos Theory To Investment
And Economics. New York: Wiley.
Chapter 1

Introduction

Since its introduction in 1960s, the Efficient Market Hypothesis (EMH) has been a dominant
theory in the field of financial markets, and even nowadays, it is accepted as a bedrock of
the financial theory. Its assumptions of independent and normally distributed price move-
ments justify the use of standard statistical testing methods. Nevertheless, there are various
studies, which contradict these assumptions. Most of the studies of Benoı̂t B. Mandelbrot,
originating in 1960s and 1970s, assert that the distribution of price movements exhibits high
peaks and kurtosis. Mandelbrot suggests that the random walk model of the EMH can result
in misleading outcomes (Mandelbrot 1963) and the more complex models are needed. His
work was not appreciated and became respectable only in 1990s, when Peters (1994) intro-
duced the Fractal Market Hypothesis (FMH). The FMH is based on the properties of fractals
and deals with the self-similar structure of markets. It does not state any requirements for
the underlying process, but emphasizes the different investment horizons of the investors to
be crucial for the stability of the market. The Hurst exponent is used as measure of self-
similarity, which can reveal the evidence of persistent behavior of the price movements. Its
value, ranging from 0 to 1, indicates if a time series is random, perstistent or anti-persistent.

The main goal of this thesis is to analyse whether the robusta and arabica series of re-
turns and volatility exhibit persistent behavior, based on the estimation of the self-similarity
parameter called Hurst exponent. For the purposes of our study, we use three different meth-
ods. At first, we apply the rescaled range analysis, originally introduced by Hurst (1951),
while he was designing an ideal form of a dam on the river Nile. The second method is the
modified rescaled range analysis proposed by Lo (1991). Both methods are very similar, the
only difference is that the former method incorporates the auto-covariances. And lastly, we
perform the test with the use of the detrended fluctuation analysis of Peng (1994). Our data
set consists of the time series of daily closing prices of arabica and robusta futures gathered
for the periods 1972-2013 and 1991-2009, respectively. The enclosed DVD contains the source
codes of the estimation methods from Wolfram Mathematica.

The thesis is structured as follows. In the Chapter 2, the botanical aspects and the
concise history of coffee, as one of the most traded commodities is provided. It is followed
by the description of world coffee trade, the characteristics of coffee futures and the main
1. Introduction 2

commodity exchanges. Chapter 3 introduces into the complex field of Fractal geometry
that was formalized by Benoı̂t B. Mandelbrot in the 1960s. The attention is devoted to
important properties of fractal objects like self-similarity, high irregularity and the concept
of fractal dimension. A few examples of the simplest fractals are shown as well. Further on,
the Chapter 4 discusses the different viewpoints of two alternative theories - the Efficient
Market Hypothesis and, subsequently, the Fractal Market Hypothesis. It includes a detailed
description of the estimation methods of the Hurst exponent and compares them. Moreover,
Chapter 5 provides a description of the data and presents the empirical results within all of
the three methods and Chapter 6 concludes.
Chapter 2

Coffee and markets


”Kingdoms may rise and kingdoms may fall, but mankind’s need
for [. . . ] coffee shows no sign of weakening.”

- The ECONOMIST,
Nov 14th, 2012

Coffee brings attention, preciseness, creativity and inspiration. It is the world’s most
popular drink and, as stated by Pendergrast (2010), the world’s most widely taken psychoac-
tive drug with a unique history. It transformed the world in various ways and meaningfully
influenced the economical, political and social structure of many countries.

2.1 Botanical aspects of coffee


Coffee belongs to the botanical family Rubiaceae, genus Coffea, which counts more than 25
species. All of them are woody, ranging from the small shrubs to the tall trees with yellowish,
dark green, bronze or tinged with purple leaves . Coffee cherries (illustrated in the Figure 2.1)
usually contain double-sided seeds which are surrounded by mildly sweet pulp and protected
by a thick, tasty mucilage, that is, by tough-skinned parchment and diaphanous silver skin.

There are 3 species grown commercially:

l Arabica coffee (Coffea arabica): The species which is of the best quality and eco-
nomically the most significant. The optimal altitude for its cultivation is 1000-2000m
with the rain fall 1500-2000mm and yearly average temperature 15-24◦ C. It yields
1500-3000 kg/ha of flat beans containing 0,8 - 1,4% of caffeine. The plant is a large
bush with dark-green oval leaves, mostly grown in Latin America, Central and East
Africa, India and to some extent in Indonesia. Unfortunately it is very susceptible to
be attacked by pests and diseases.

l Robusta coffee (Coffea canephora): In comparison to arabica coffee, robusta coffee


can be grown in lower altitudes (0-700m) with higher yearly average temperatures (24-
30◦ C) and higher optimal rainfall (2000-3000mm). It is more prolific, since it yields
2. Coffee and markets 4

2300-4000 kg/ha of oval beans containing twice the amount of caffeine of arabica beans
(1,7-4,0 %). The robusta plant is a robust shrub or small tree (up to 10m) growing
prevalently in West and Central Africa, South-East Asia and to some extent in Brazil.
It turns out to be more resistant than arabica but its taste is harsh.
l Liberica coffee (Coffea liberica): Originally from Liberia, a species that is not of a
big importance, is traded only in few quantities because of its flavour. The plant is
a large and strong tree (up to 18m) that yields big cherries. It is grown in Malaysia
and in West Africa.

Figure 2.1: Cross-section of a coffee cherry

Source: Pendergrast (2010, p.88)

2.2 Brief history of coffee


2.2.1 Coffee origins
Several legends about recognition of the stimulating effects of coffee, prevalently originated
in the Arab world, do exist. Regardless of its veracity, the oldest and the most interesting
of them tells about Kaldi, the Ethiopian goatherd, and his dancing goats.
According to the legend mentioned by Pendergrast (2010), Kaldi used to go with his
herd up the mountainsides every day. Since the job did not require much of his presence, he
could devote his time to the pipe blowing. In the afternoon, when the time to return home
has come, Kaldi played special tones to allure the goats to come back from the forest and
join him on the way back home.
One day, however, it happened that the goats did not appear. He retried to blow more
loudly, but the goats did not come. Worried Kaldi, while listening carefully for bleating,
started to climb up the mountain in order to find them. After a while, he saw them jump-
ing one over another, running around, and bleating excitedly. Initially, they seemed to be
bewitched to him, but then he spotted they were all eating the green oval leaves and the red
cherries from an unknown tree. It took until dark that the goats calmed down and safely
returned with Kaldi back home. The next day everything repeated. This time, Kaldi did not
resist and decided to taste it too. Shortly after, they were dancing and frisking all together.
And so the secret of the coffee beans has been revealed.
Kaldi informed the others about the feelings he experienced after having eaten the red
cherries, the word spread, and the coffee became a part of the Ethiopian culture. At first,
2. Coffee and markets 5

the beans were probably masticated only, then they were brewed together with the green
leaves in the water and served as a weak tea, and afterwards, they were roasted and grinded
in order to prepare the aromatic cup of coffee as we know it nowadays.

2.2.2 Coffee in the Arab world


As the legend mentioned above suggests, the birthplace of coffee is in Ethiopia in the region
named Kaffa. Ethiopia is the only place in the entire world where the coffee trees grow
naturally. The story of coffee started, when somebody, either accidentally or purposely,
threw green coffee beans into a fire, maybe because he liked the aroma, and then people
came up with the idea of roasting, grinding and brewing.
In the 15th century, coffee was transferred from Ethiopia right across the Red Sea to
Yemen. There, it was firstly cultivated on the terrace-like plantations by the early 16th
century and soon spread all over the Arab world. But not in Europe yet. The Arabs were
aware of the true value of the beverage and forcedly tried not to share it with anybody else.
To keep the secret of growing, they would make sure that every coffee bean was parboiled
before it left the country. For many years, Mocha port was the most important marketplace
for this lucrative trade item and the vast majority of it was exported from there.
And so, the Arab culture gave us mathematics, invented the number zero and introduced
the coffee drinking habit as well. From Yemen the coffee also proceeded to Mecca, the Holy
City of Islam, which every Muslim has to visit at least once in his life. The first coffeehouses,
called kaveh kanes, were established and pilgrims from all over the world could taste a cup
of coffee, bringing it to their home countries afterwards.
From the etymological point of view, 4 different sources, from which the name coffee
could derive, are considered (Pendergrast 2010):

1. Arab word qahwa, which means wine or a stupefying beverage

2. the name of the Ethiopian region, Kaffa

3. Arab word quwwa meaning power

4. or kafta, the beverage obtained from khat plant

The would-be stupefying effect, identified to be the same as the effect of wine, served as an
excuse for coffee prohibition introduced by the governor of Mecca in 1511. The coffeehouses
provided a place to sit and drink and let the human intellect run wild. As the real reason
for prohibition and closure of the coffeehouses can be, however, considered the satirical
verses about the governor arising from them. Luckily, not only this one, but also the other
prohibitions introduced later in time during the long-lasting Ottoman period, were inefficient.
All of them were eventually abolished, so that coffee could commence to colonize the rest of
the world as well.

2.2.3 Coffee culture spreads around the world


Despite the fact that the Arabs guarded their secret of coffee growing, at some point during
the 17th century, an Indian pilgrim named Baba Budan took a few seeds, overcame the
controls at the border and successfully started growing coffee trees in India, where they grow
2. Coffee and markets 6

now. The Dutch, a significant maritime country of that time, managed to smuggle a whole
coffee tree and started the cultivation in their colonies in Ceylon in 1658 and, later on, in
1699, in Java, Sumatra, Bali and in other islands of East Indies as well. Thus, it started to
spread elsewhere.
It was not until 1650 that coffee really became popular in Europe. During a very short
period, between 1650 and 1700, coffee took Europe by storm and gained in popularity very
fast. It was truly unbelievable what happened, particularly in England, but in many other
countries too. In 1683, the first coffeehouse opened in Venice and later on, in 1689, in Paris.
Not long after, thanks to the Turkish army, coffee arrived in Vienna as well. In panic,
after being defeated, they left nearby Vienna about 500 bags of green coffee beans. To the
Viennese it seemed strange, and having it mistaken with the unuseful camel fodder, they
started to burn it. Happily, the familiar aroma was recognized by Georg Franz Kolschitzky,
who lived for several years in the Arab countries, and the coffee was saved. His Blue Bottle
belonged among the first coffeehouses opened in Vienna, which started to serve coffee with
milk. Nonetheless, the very first European coffeehouse opened in the city of London in 1650.
In the 17th century, everybody in Great Britain drank alcohol. People started a day
with a beer, took another for a lunch and they continued throughout the day. The advent of
coffee made a substantial difference. The coffeehouses became the centres of sobre intellectual
discussions and some of them were even headquarters of powerful business organizations, such
as Lloyd’s of London. There were different coffeehouses for different social groups and a lot
of music and literature was written there. Coffee inspired Johann Sebastian Bach to write
Coffee Cantata, meanwhile Ludwig van Beethoven was obsessed with the precise number of
sixty beans to make his cup of coffee.
In the beginning of 18th century, a coffee tree was transported by French naval officer,
Gabriel Mathieu de Clieu, to Martinique. In spite of the strong storm, which they passed
through during the journey, de Clieu took good care of the plant and shared with it his, in
that moment, very precious drinkable water. In the same period Dutch introduced coffee to
Surinam, French Guayana and to Brazil, while British brought it to Jamaica. Soon after it
also spread to other countries of South and Central America, such as Mexico, Guatemala, El
Salvador or Colombia, and by 1830’s Brazil produced more than half of the coffee that was
consumed.
Coffee drinking habit became an intrinsic part of the daily life and many preparation
methods were developed in different countries. Mentioning few, we know the Turkish coffee
boiled in specially designed pot called cezve with cardamom or other species added, the
Italian espresso made in the automatic espresso machine with the use of pressure, the coffee
from the French press brewer, the filtered coffee, coffee from the vacuum pot and many others.
Our very brief bean’s history illustrates how coffee and coffeehouses played an important role
in the process of East influence in the Western cultures and how the tiny seed became hugely
influential product worldwide.
2. Coffee and markets 7

2.3 World coffee trade


2.3.1 Production
Nowadays, coffee trees are cultivated in more than 50 countries around the world, mainly
between the Tropics of Cancer and Capricorn. The production of coffee is the source of living
for hundreds millions of people starting with cultivation in the producing country and con-
tinuing through exporting, importing, processing, roasting, trading, retailing and marketing.
According to the International Coffee Organization (ICO) estimates, approximately 60 % of
coffee that we drink is arabica, the rest is robusta.
The quality of coffee is determined by people called cuppers. They are experts, similar
to sommeliers, who spend the whole day by slurping, savoring and spitting coffee. There
are 4 fundamental components on the basis of which the coffee is judged, it is aroma, body,
acidity and flavor. As stated by Pendergrast (2010, xvi), ”The aroma is familiar and obvious
enough - that fragrance that often promises more than the taste delivers. Body refers to the
feel or ”weight” of the coffee in the mouth, how it rolls around the tongue and fills the
throat on the way down. Acidity refers to a sparkle, a brightness, a tang that adds zest to
the cup. Finally, flavor, is the evanescent, subtle taste that explodes in the mouth, then
lingers as a gustatory memory. Coffee experts become downright poetic in describing these
components.” The world’s most expensive coffee comes from Indonesia and is called Kopi
Luwak. It is made from coffee beans digested and excreted by the palm civet and is sold for
a very high price around $ 300 per pound. 1
The major producing countries are listed in the Table A.2. The data are measured in
thousands of 60kg bags, providing the total production in individual crop years over the last
23 years. As we can see, the leading country is Brazil, whose production has an increasing
trend over the whole period, with the actual production counting 50 826 000 of bags. Among
the leading producers also stand Indonesia, Colombia, Ethiopia, and Vietnam that managed
to sharply increase its production in the last years. In comparison to the crop year 1990/91
when Vietnamese production was at the bottom of the list of the selected countries, the
present day production is almost sixteen times higher, ranking in the second place in general
and in the first place of production of robusta coffee.
In the Figure A.1, the bars represent the total production of coffee (including both
robusta and arabica) in the corresponding crop year. As the figure suggests, even if there
were some minor decreases, the total production of coffee has an increasing trend. Over the
last 23 years it rose by 55 %. Each bar is divided in two parts, where the light grey part
shows the share of major producing countries on total production and the black part shows
the share of the rest of producing countries. In the year 1990/91, the crop of major producing
countries was 79 % of the total coffee production, leaving 21 % for the rest of the countries.
However, during the next 23 years, the share of rest of the countries has significantly declined.
Nowadays, the major countries produce 90 % and the rest of the countries only 10 % of the
total coffee production. As visible in the Figure A.1, the production of the minor producing
countries has declined in absolute values as well. In comparison to 19 millions of 60 kg bags
1
1 pound is approximately 0.4536 kg
2. Coffee and markets 8

in 1990/91, today they produce only 15 millions of bags, that is, their production decreased
by 22 %.
Despite the fact that the total production has increased, there are countries, such as
Colombia, Cote d’Ivoire, El Salvador and Guatemala, in which the production over the last
23 years has decreased. The Figure A.2 depicts yearly relative changes in production in all
of the selected countries. As visible, the total amount of coffee beans produced in individual
countries differs from year to year since there are many factors influencing the crop. Firstly,
without doubt, the extreme weather conditions such as frosts and droughts have a great
impact on the crop. For example, the severe droughts, that occured in 1999 in Brazil, lead to
the sharp decrease in coffee production. The ICO estimates that the droughts lead to the loss
of 40 % of production. In the Figure A.2 it is notable that there was a 36 % yearly decrease.
Secondly, the pests like epidemics of leaf rust have devastating effects on production as well.
Currently, in the Cetral America, there is a grave epidemic of coffee leaf rust which caused
that some of the countries had to announce the phytosanitary emergency.

2.3.2 Imports and per capita consumption


The largest importer of coffee is the United States with approximately 26 millions of 60
kg bags in the year 2012. On the second place ranks Germany with 21.8 millions of bags
followed by Italy where the imports counted 8.6 millions of bags. The European Union as
a whole overcomes the United States significantly. Nowadays, the European Union imports
71.9 millions of bags. When compared to the value 45.8 millions in 1990, the imports to the
EU has increased sharply over the last years. It is an increase of 57 %. As notable in the
Table A.1, the increase in imports of the United Stated when compared to the value of 1990
was only 24 %.
Table A.3 shows per capita consumption of coffee in selected countries measured over
calendar year and expressed in kilograms. Surprisingly, according to the ICO data, the largest
consumers of coffee live in Finland. In 2011, an average Finish consumed 12 kg of coffee. It
is apparent from the data that the consumption per capita in Scandinavian countries is very
high.

2.4 Coffee in the financial markets


To clearly understand how coffee is traded, a distinction between two forms of market has
to be made. On the spot market the physical, green coffee of different qualities is traded.
The spot price reflects the actual price for coffee and the delivery is made immediately. On
the other hand, on the futures market, the futures contract price stands for the standardized
quantity and quality of coffee and the transaction is completed at a specified time in the
future. Hence, the futures price is the expected price for coffee in some time in the future.
Most of the traders, however, are not interested in the physical delivery of the commodity
but in the speculation or risk management. The common way of offsetting an open futures
position is to make a reversing transaction, long positions are offset by short ones (by selling
the same contracts for the same delivery month) and vice versa, resulting in no physical
2. Coffee and markets 9

exchange in the end. Since coffee is grown and not mined, it is, together with cocoa, sugar,
cotton, orange juice, lumber and other commodities, considered to be a soft commodity.

2.4.1 Commodity exchanges


New York Today, the most important commodity exchange, where coffee futures are
traded, is the Intercontinental Exchange (ICE) in New York. It has its roots in the Coffee
Exchange that was founded in 1882. Then, in 1914, the sugar was also added and it became
New York Coffee and Sugar Exchange. Later, in 1979, it merged with Cocoa Exchange
and evolved into Coffee, Sugar and Cocoa Exchange (CSCE) which along with the New York
Cotton Exchange (NYCE) became a subsidiary of New York Board of Trade (NYBOT) in 1998.
And finally, in 2007, NYBOT became a full subsidiary of the ICE. In New York, the futures
contract consists of arabica coffee.

London Another present-day important commodity exchange is located in London. On


the London International Financial Futures and Options Exchange (LIFFE), the robusta
futures contracts are traded. The exchange was founded in 1982, in 1992 merged with
London Traded Options Market and subsequently, in 1996, merged with London Commodity
Exchange. Despite the purchase of LIFFE by Euronext in 2001, today, it is still known as
LIFFE.

We should also mention other less important commodity exchanges like the Tokyo Grain
Exchange in Japan and the Bolsa de Mercadorias & Futuros in Sao Paolo, in Brazil where
both arabica and robusta coffee futures are traded and the Singapore Exchange, where only
robusta coffee futures are traded. However, in our analysis, we will focus on prices from ICE
and LIFFE, since these two commodity exchanges are the most meaningful.
Chapter 3

Fractals
”To see a world in a grain of sand,
And a heaven in a wild flower;
Hold infinity in the palm of your hand,
And eternity in an hour.”

- WILLIAM BLAKE,
Auguries of Innocence

3.1 The founding father of fractal geometry


Benoit B. Mandelbrot (1924-2010) is known for his profound understanding of roughness,
irregularities and randomness. The roughness, as he calls it ”the uncontrolled element in
life”, was the main theme of his work.
Mandelbrot was born in Poland. Since his family was Jewish, by reason of ethnic and
political strife, in 1936 they decided to move to France where Mandelbrot’s uncle, a French
mathematician Szolem Mandelbrojt, lead him towards the study of Mathematics. Man-
delbrot studied at one of the top universities in Paris, École Polytechnique, at which he
graduated in 1947, and subsequently continued his studies of aeronautical engineering at
Caltech (the California Institute of Technology). Afterterwards, he came back to France
and focused his PhD research on the information theory, statistical physics, and structure
of the language. Then, during the years 1953-54, being influenced by John von Neumann
and Norbert Wiener, he did his post-doctorate studies at the Institute for Advanced Study
in Princeton (Mandelbrot & Hudson 2008).
Since 1958, he has been working at IBM’s Research Division until his retirement in 1993.
During this period he concentrated on the scale-invariance principles and the most significant
discoveries of his career came up. In the late fifties and early sixties, Mandelbrot was very
active in finance and economics. To mention the most essential work, he put forward the
model of the Lévy Stable Motion based on the price variation of the cotton prices (Mandelbrot
1963), the Fractional Brownian Motion (in 1965) or general approach related to multifractals
(in 1972).
In 1975, he published a book ”Les objets fractals” and introduced the new branch of
3. Fractals 11

Mathematics - the Fractal Geometry. By using the Latin adjective fractus, which means
broken, he coined the word ”fractal”. Roughly speaking, a fractal is a geometrical structure
that can be magnified forever and has the infinite precision. We can still observe new patterns
emerging, regardless how many times we magnify it. This property is called self-similarity.
In other words, the fractals are self-similar over many scales. Mandelbrot himself describes
a fractal as ”...a geometric shape that can be separated into parts such that each part
is reduced-scale version of the whole” (Mandelbrot 2001, p.117). While being a scientific
maverick, he found a hidden order in the seemingly lawless disorder.
Another extraordinary and remarkable discovery was the detection of the Mandelbrot
set . Thanks to Mandelbrot’s uncle Szolem, who pushed Mandelbrot towards the research of
Julia sets, and there is a little doubt that it was thanks to the availability of IBM’s computers
as well, the Mandelbrot set was discovered in 1979 and firstly visualized in 1980. The Figure
3.1 gives its approximate shape. The most important idea of the Mandelbrot set is that from
a very simple formula:

z
z2 + c (3.1)

where z is a complex number (z = a + bi, z ∈ C,a, b ∈ R, i is the imaginary unit) and c is


a constant (c ∈ C), we can get very complicated results. The double arrow symbolizes that
the equation is iterative, which means it works in both directions. In the beginning we start
with number zero and we add c, in the next step, we square it and we add the constant c. In
each of the steps we will do the same, that is, square the result of the previous step and add
the constant. Repeating it over and over again, we get the following sequence of complex
numbers:

2 h 2 i2
0 → c → c + c2 → c + c2 +c→ c + c2 + c + c → ...

The points can be divided into two groups,

1. points which are inside the set, the black ones and

2. points which are outside the set, usually expressed by myriads of colors, in the Figure
3.1 they are all white.

The black points are the points that converge, it means the sequence of points created
by iterative function from the equation 3.1 does not go to infinity (is bounded), while the
white points are diverging (the sequence is not bounded). When the colors are used, to each
velocity is assigned one color, and then the colors indicate how quickly the sequence goes to
infinity. This explains why the fractals are sometimes said to be the colors of infinity.
Since the Mandelbrot set is created from an iterative function system, it is impossible to
capture its shape in any printed image. When printed, it will always only be an approximation
of the profound complexity of the real shape. Neither the most powerfull computer can make
infinitely many iterations and it will always end on the level where one point represents one
pixel.
The emerging theory of roughness was applicable to the wide range of fields such as
biology, physics or finance and it also explained some of the mathematical monsters that
have arisen on the turn of the 19th and 20th century. The fractal geometry changed not only
3. Fractals 12

Figure 3.1: Monochromatic image of the Mandelbrot set

Source: Mandelbrot & Hudson (2008)

the view of nature but also the view of the entire world. Although there are many types of
fractals, few examples of the simplest fractals are given in Section 3.3.

3.2 Lack of the accurate definition


Despite the pursuit of numerous mathematicians to come up with the appropriate definition
of fractals, even nowadays no such definition still exists. Neither Mandelbrot himself, nor
the others were able to find it. All of the proposed definitions were either incomplete, that
is, their characterization did not cover some important fractal structures or they were too
broad and included even the structures which were not fractal. Therefore we have to base
our recognition of fractals on the open and intuitive characterization only. According to
Falconer (2003), we can think about the definition of fractals in the same way as about the
definition of life. And it is needless to say that there is no precise definition of life. Just a
list of characteristic properties, which most of the living things have, can be made. Here is
a list of characteristic properties for a set K, which is considered to be a fractal:

• Self-similarity
First of all, let us introduce some important definitions of concepts relevant to the
self-similarity.

Definition 3.1 (Contraction). Let D be a closed subset of n-dimensional Euclid space,


D ⊂ Rn . A mapping ϕ : D 7→ D is called a contraction on D if there is a number c
3. Fractals 13

with 0 < c < 1 such that ∀x, y ∈ D:

|ϕ(x) − ϕ(y)| ≤ c|x − y|

Definition 3.2 (Contracting similarity). If equality in Definition 3.1 holds, i.e. if |ϕ(x) −
ϕ(y)| = c|x − y|, then ϕ transforms sets into geometrically similar sets, and we call ϕ
a contracting similarity.

Definition 3.3 (Attractor). A finite family of contractions ϕ1 , ..., ϕk , with k ≥ 2, is


called an iterated function system. We call a non-empty compact subset, K, of D,
K ⊂ D, an attractor (or invariant set) for the iterated function system if

k
[
K= ϕi (K)
i=1

An important property of an iterated function system is that it determines a unique


attractor (Falconer 2003).
The contracting similarity can be considered to be a combination of translation, ro-
tation and scaling. The self-similarity is a basic property of fractal sets. A set K
is self-similar if there exist finitely many contracting similarities ϕ1 , ..., ϕk such that
Sk
K = i=1 ϕi (K). The self-similarity property says that there are some repeating pat-
terns and the object which is fractal looks similar on different scales of observation.
This property holds for deterministic fractals. In the case of random fractals that can
be represented for example by a time series, we can notice the statistical self-similarity.
It means that similar statistical properties are observable on different scales, spatial
or temporal. For fractal object, the self-similarity is observed with respect to space,
while for fractal time series we can observe it with respect to time.
Nevertheless, not all the sets, that are self-similar, have to necessarily be characterized
by the fractal structure. To exemplify it, consider the Cantor set with λ = 1/2
mentioned in the Section 3.3.2. This implies that the self-similarity property is not
enough for perfect characterization of the fractal sets. Other properties are needed.

• Fine structure: No loss of complexity with zooming in occurs, that is, even on very
small scales there are still lots of details visible.

• High irregularity: Neither locally nor globally the set K can be described by the
use of traditional geometry, since its irregularity is too high.

• Fractal dimension exceeds the topological one: The terms concerning fractal
dimensions will be elucidated in the Section 3.4. There are several ways how the
fractal dimension can be defined. In the case of the fractal, the fractal dimension is
usually greater than the topological one.

• Recursion: The fractal sets are very frequently defined in a simple way such as the
recursion is.
3. Fractals 14

3.3 Examples
The fractals can be found almost everywhere. In this subsection we will examine several
well-known examples which were introduced few decades before the fractal geometry was
developed by B. B. Mandelbrot in 1960s. We will briefly look on Brownian motion, Cantor
set, Sierpinski triangle, Koch curve and some of the natural fractals.

3.3.1 Brownian motion


The physical phenomena called Brownian motion was originally observed by the English
botanist Robert Brown in 1827, while he was looking through his one-lens microscope and
studying pollen grains suspended in a liquid (Brown 1828). Although, he never knew it was
due to the unequal bombardment of the tiny molecules of the liquid, that the small particles
of pollen grain were moving randomly. The proper mathematical formalization of Brownian
motion came further in time. If we express the movement of the particle graphically, its
trajectory is an example of simple fractal. Each line segment in the left part of Figure 3.2
connects the positions of the particle in two consecutive moments as it can be observed in the
microscope. Assuming we would sample the particle’s position 100 times more frequently,
then the right part of the Figure 3.2 would represent the 10 times magnification of the line
segment between endpoints A and B. The length of the total trajectory would increase since
the line segments do not represent the real path, they just connect the turning points and
therefore approximate.

Figure 3.2: Brownian motion: the path of a particle suspended in a


liquid

Source: Schroeder (1991, p.142).

The name Brownian motion (BM) was also assigned to a mathematical model of the
stock markets. It was firstly introduced by Louis Bachelier in his doctoral dissertation in
Mathematical Sciences, defended at Faculté de Sciences de Paris in 1900 (Bachelier 1900),
then formalized by Norbert Wiener and, what is interesting, 5 years after Bachelier, in 1905,
it was rediscovered and explained in detail by Albert Einstein (Einstein 1905).
3. Fractals 15

3.3.2 Cantor set Cλ


Cantor set was named after the prominent German mathematician Georg Cantor (1845-
1918), who was a century ahead of his time. He tackled one of the most mysterious areas of
mathematics, the theory of infinity. Cantor showed that we can go beyond the division into
finite and infinite, because there is more than one infinity. In fact, there are infinitely many
infinities and it is possible to find infinite sets of different sizes. His ideas were not accepted
by his contemporaries and the Cantor set, which is an illustration of uncountable set with
zero measure (length), was considered a mathematical monster (Schroeder 1991).
To construct the classical Cantor set C1/3 , let us have a segment of unit length, for
example an interval [0, 1] to which we apply the following contracting similarities:

1 1 2
ϕ1 : x 7→ x ϕ2 : x 7→ x+
3 3 3

The first similarity, ϕ1 , decreases the segment to 13 , that is, to the interval [0, 13 ]. The
second similarity, ϕ2 , does the same and moreover shifts it by 23 to the right, it means to the
interval [ 23 , 1].
We will finish the first step of the construction by the union of the two intervals.

C1/3 = ϕ1 ∪ ϕ2

The second step will be almost identical to the first one, the only difference is that we
will apply the similarities on the set resulting from the first step and, afterwards, we will get
the union of the 4 intervals, and so on with the other steps. In the nth step we will get 2n
intervals, each of length 31n , n ∈ N . The final Cantor set will be obtained after infinitely
many steps. What will remain will be uncountably many points merely looking like a sort of
dust on a line with fractal dimension between 0 and 1. Sometimes, Cantor set is also called
Cantor discontinuum. The Figure 3.3 illustrates few steps of its construction. In general,
the Cantor set Cλ is characterized by

ϕ1 : x 7→ λx ϕ2 : x 7→ λx + (1 − λ)

where λ takes on values between zero and one. Note that when λ equals 12 we will obtain the
whole interval [0, 1] after each step. We cannot say it is a fractal, however it is a self-similar
set, which demonstrates that not all of the self-similar sets are the fractals.

3.3.3 Sierpinski triangle


As its name suggests, the Polish mathematician Waclaw Franciszek Sierpiński (1882-1969)
was the first one to describe the triangle in 1915 (Schroeder 1991). We will begin the
construction of Sierpinski triangle with the equilateral triangle with the side length 1 and
continue by either repeatedly removing of the inverted equilateral triangles with the side
length 1/2, as illustrated in the Figure 3.4, or with the following contracting similarities,
assuming that each point of the plane is represented by the vector (x, y):

x y x 1 y x 1 y 3
ϕ1 : (x, y) 7→ ( , ) ϕ2 : (x, y) 7→ ( + , ) ϕ3 : (x, y) 7→ ( + , + )
2 2 2 2 2 2 4 2 4
3. Fractals 16

Figure 3.3: Construction of the Cantor set

Source: Schroeder (1991, p.17)

The Sierpinski triangle, S, is represented by the union

3
[
S= ϕi (S)
i=1

Since there is the same contraction ratio c = 12 at both coordinates, with the first
mapping, ϕ1 , both the width and the height of the triangle shrinks to the half. The second
mapping, ϕ2 , makes the triangle shrink as well and, moreover, shifts it to the right by 21 .
And finally, the third mapping, ϕ3 , makes it shrink and shifts it to the right by 14 and up by
q √
1
2 of the triangle’s height, that is by 1
2 [ 12 − ( 21 )2 ] = 43 .

Figure 3.4: Illustration of the evolution of the Sierpinski triangle

Source: Schroeder (1991, p.17)

An interesting property of Sierpinski triangle is that it is congruent of itself when rotated


around its center by multiples of 120◦ , that is, by angles k120◦ , k ∈ Z.

3.3.4 Koch curve and snowflake


Koch curve was described by Swedish mathematician Helge von Koch (1870-1924) in
1904. The first steps in the construction are illustrated in the Figure 3.5. We begin with the
interval of unit length, after the first iteration we obtain 4 line segments, each of length 13 .
In the second step, we do the same with each of the 4 line segments we got after the first
iteration which makes us to obtain 16 smaller line segments each of length 19 . Generally, after
n iterations we end up with 4n line segments of length 31n . Each step of the construction
increases the curve’s length by the rate 43 . Therefore after n iterations the total length is
( 43 )n . If we run infinitely many iterations, the length of the resulting curve will be infinite
3. Fractals 17

 n
4
lim = +∞
n→∞ 3

and it is also worth mentioning that the distance of any two points lying on the curve will
be infinite.

Figure 3.5: Construction of the Koch curve

Source: Schroeder (1991, p.8)

Let us describe the construction. Generally, a point (x, y), when rotated about origin by
an angle θ, is obtained when the following mapping is applied:

ϕ : (x; y) 7→ (x cos θ − y sin θ; x sin θ + y cos θ)

Therefore for the construction of the Koch curve we will use mappings:

1
ϕ1 :(x; y) 7→ (x; y)
3  
1 π π π π 1
ϕ2 :(x; y) 7→ x cos − y sin ; x sin + y cos + ;0
3 3 3 3 3 3
  r !
1 π π π 1π 1 1
ϕ3 :(x; y) 7→ x cos + y sin ; −x sin + y cos + ;
3 3 3 3 3 2 6
 
1 2
ϕ4 :(x; y) 7→ (x; y) + ;0
3 3

Despite the fact the Koch curve is continuous everywhere, it is not differentiable in
any point. The same property was first observed in the Weierstrass function. Some of the
mathematical monsters of the times, when Koch curve and the Weierstrass function were
introduced, are now called fractals.

Koch snowflake Just one simple step is needed to obtain the Koch snowflake from the
Koch curve, it is enough to construct the curve over each of the three sides of an equilateral
triangle with side length equal to 1, as it is illustrated in the Figure 3.6. The name Koch
3. Fractals 18

island was preferred by Mandelbrot (2003), because he relates its shape to the coastline of
an island. The snowflake exhibits the intriguing properties - its perimeter is infinite and
besides, it surrounds a finite area. Even though the jagged line is too regular to be an island,
Mandelbrot revealed the similar properties in the coastline of Bretagne.

Figure 3.6: Koch snowflake

Source: Schroeder (1991, p.9)

3.3.5 Irregularities of the natural world


The examples mentioned above are created from the mathematical formulas, however, we
can find fractals everywhere around us. The fractal structure and properties are observable
in various natural objects and phenomena. Typical examples are the florets of a Romanesco
broccoli or a cauliflower, branches of a tree, a fern, bifurcation of torrents of water, vascular
system in our body, hierarchical branching of lungs or the edges of clouds, mountains, coast-
lines, distribution of galaxies and much else besides. In each of these objects, there is some
pattern that is repeating on all of the possible scales. For example, all the leaves of a fern
are similar to the whole plant and the small branches on every individual leaf are similar to
the whole fern as well.
The fractals were also applied in the field of computer graphics. Different methods for
creating landscapes were developed. There are algorithms for computer modelling based
on fractals that allows us to describe the objects like mountains, clouds and plants very
precisely. Nevertheless, when magnifying a real object, we can magnify it to the level of
molecules, atoms, neutrons, quarks and then, even the nature has some limits. Therefore,
we could argue that the natural fractals are fractals only to some extent.
3. Fractals 19

3.4 Fractal dimension


In the Euclidean geometry of Ancient Greeks, with which we have become so familiar, the
dimension of objects is represented by a nonnegative integer number. Dimension of a point
is 0, of a straight line 1, of a plane 2 and of a solid 3. Whereas, the fractal structures require
different and more generalized view of dimension than the standard notion provides. If we
take into account the Koch curve, its infinite length does not tell us, how much space it
fills. The categories like length, area and volume turned out to be insufficient to characterize
fractals and had to be extended. Sometimes, B.B.Mandelbrot is called the Euclid of fractal
geometry.
Let us now explain the values of dimension of line, square and cube from a different
point of view than as a number of possible directions to move. If we consider a line segment,
which we divide into n nonoverlapping intervals, then each of the intervals has the length
1
n of the original line segment, that is, the contraction ratio to obtain the smaller interval
from the original one is c = n1 . If we take into account a square and divide it into 4 equal
parts, the side length of each smaller square will be 21 of side length of the original square.
In general, we can divide a square into n2 equal smaller squares and each of them can be
obtained by contracting the original square by the ratio c = n1 . Analogically in the case of
cube, we can divide it into n3 equal smaller cubes, each scaled with c = n1 . The dimension
satisfies the formula n.cD = 1, where n is number of parts, c is a contraction ratio and D
stands for dimension. After adjusting and solving the equation for D, we get a formula for
one of many types of fractal dimension, namely the similarity dimension, as follows

log n
D=
log 1c

For self-similar objects which consist of small copies of itself it is not difficult to obtain the
similarity dimension. It is possible to generalize the formula so that it applies also to the
cases when there is more than one contraction ratio. When applied to our examples of fractal
sets from Section 3.3, we get the following results

log 4
Koch Curve: D= log 3
≈ 1, 26
log 2
Cantor set C1/3 : D= log 3
≈ 0, 63
log 3
Sierpinski triangle: D= log 2
≈ 1, 58

Numerous definitions of fractal dimension were developed. They are distinguished by dif-
ferent properties and can result in different values for the same set, based on which definition
was used, but what they have in common is that, for fractals, they all take on noninteger
values and differ from the topological dimension of euclidean objects. Sometimes, a term
fractional dimension is mistakenly used. The reason is that their value is usually a ratio-
nal number, nevertheless, they can also equal to an irrational number and therefore the
designation fractional is wrong.
The most common noninteger dimension was firstly introduced by a German mathe-
matician Felix Hausdorff in 1919 and afterwards improved by A. S. Besicovitch. However
they looked for its specific application, they would never imagine that their finding, few
3. Fractals 20

decades later, will gain in importance so much in the theory of fractal geometry. The name
Hausdorff-Besicovitch was assigned to the dimension in honor of its authors. Readers inter-
ested in precise definitions, which are in terms of measures, and in more detail, are referred
to the work of Falconer (2003).
In contrast to the more complex definitions of Falconer (2003), in the work of Peters
(1994), the fractal dimension is calculated by the so called box-counting method, which is
defined in a very intuitive way. Interestingly, the similarity dimension takes on the same
values, however, the box-counting method provides the applicability to a wider range of
objects. The rational behind this method is to cover an object with a certain number of
equally sized boxes (squares) and observe how the amount of these boxes changes with a
different box size. The fractal dimension calculated with box-counting method is also called
Minkowski dimension. Mathematically speaking, it can be expressed as

log N (r)
DB = lim
r→0 log 1r
where r stands for the side length of squares and N (r) represents the smallest number
of squares with length size r that we need to cover the whole object.
In finance, the fractal dimension of time series of asset returns can provide a useful
tool to compare the variability or riskiness of the underlying assets. In standard capital
market theories, the riskiness is usually determined by volatility of its price measured by
the standard deviation. Both fractal dimension and standard deviation can be used as a
statistical measure of volatility. The fractal dimension, however, is a better measure for
roughness since it incorporates more information in comparison to the other measures and,
therefore, provides better understanding of the price movements. It results to be more
appropriate tool since it makes a distinction between smooth and rapid changes. When
rapid changes occur, the fractal dimension is higher, and conversely, when the changes are
smooth, that is, the up-down fluctuations are less frequent, the value of fractal dimension is
lower (Hai-Chin & Huang 2003). In other words, it provides the notion of how much space
the line occupies and therefore of how much the line is jagged. Notably, for fractal time series,
the value will always lie between 1 and 2, because the line which is jagged is more then a line
but less than a plane. Such series have self-similar properties, since at different scales there
are notable similar statistical characteristics. We shall investigate the connection between
fractal dimension and an other measure of roughness, which is called the Hurst exponent,
further bellow.
Chapter 4

Fractals in the world of finance

4.1 Efficient Market Hypothesis


The EMH, today’s bedrock of financial theory, was originally formalized by Paul A.Samuelson
(1965) and by Eugene Fama (1970). Their work, however, was mainly based on the findings
of Louis Bachelier from the beginning of the century (Bachelier 1900), who analysed the asset
prices with the use of game theory methods and stated that it is possible to use standard
probability calculus for market modelling. Samuelson and Fama noticed and adopted Bache-
lier’s insights and, independently of each other, developed a new market hypothesis. The
simplicity and the intuitive logical structure caused that the EMH have become a bedrock
of modern financial theory. We will now provide a brief review of how the markets work
according to the EMH and afterwards, in the next section, we will offer an alternative theory,
that is, the FMH.

The EMH is mainly based on the subsequent assumptions:

1. Returns are independent random variables. It means that what happened in


the past does not influence today’s price movements and, similarly, what happens
today does not influence tomorrow’s price movements or the movements further in
future. In other words, past returns are not related to today’s returns and today’s
returns are not related to future returns and they take a random walk. Therefore,
with the independence, there no need to study historical prices. More precisely, Fama
(1965) describes it mathematically as

P (Xt = x|Xt−1 , Xt−2 ) = P (Xt = x)

2. Returns fit the normal distribution. This suggests that most price changes that
we can observe are quite small and only few of them appear to be extremely large.
The returns fit the 3 σ rule, which asserts that the returns whose value is distant from
the mean value by more than 3 standard deviation are practically impossible because
their probability is extremely low. However, this assumption is very often violated
when examined empirically.
4. Fractals in the world of finance 22

3. All available information has already been reflected in the prices. According
to the EMH, only the new and unexpected information can influence the price. The
investors react immediately to the newly released information.

The EMH can be divided into 3 forms based on which information set is assumed to be
available for the formation of current prices Peters (1991).
The weak form assumes that the current prices are formed with the information set of
market information only and it concludes that it is impossible to outperform the market and
profit with the use of the technical analysis.
The semi-strong form extends the set to all publicly available information. It contends
that the prices fully reflect all the market and non-market information that is released and
it concludes that the use of neither technical nor fundamental analysis is effective to achieve
excess returns.
The strong form broadens the set to inside information, which is available to certain
groups of people only. It assumes that the prices reflect all the market, non-market and the
inside information and it concludes that it is impossible to outperform the market and yield
profits in the long term.

Firstly, the above mentioned assumptions imply that according to EMH, the investors are
homogeneous and behave rationally. Investors know whether the information is important or
not and use all available information in the same way. All of them have the same investment
horizon. Secondly, the standard deviation can be used to measure the risk (Krištoufek 2012).
Thirdly, it implies that the future returns are unpredictable and finally that there is a trade-
off between the risk and profit. For every risk level there exists a certain profit and vice
versa, for every profit there is a risk level. If one wants to get more, then it is necessary to
accept more risk (Mandelbrot & Hudson 2008).
The EMH is a hypothesis involving the behavior of asset returns whose primary function
is to justify the use of standard probability methods for market analysis. The independence
of returns suggests that the returns follow a random walk. Numerous statistical tests and
modelling techniques have been developed based on these assumptions. Although the EMH
received a lot of attention since its introduction, there were a lot of controversy as well. Many
researchers were challenging the EMH in their studies pointing to inconsistencies between
the standard theory and the observed behavior of market. It was stated as neccessary to
reevaluate the underlying assumptions because the conditions for efficient market are hardly
fulfilled, very often violated and impossible to test (LeRoy 1976).

4.2 Fractal Market Hypothesis


The FMH is presented as an alternative theory that suggests to look beyond the random
walks and search for models of complexity that would describe the market behavior. Based
on the fractal geometry of B.B.Mandelbrot, it has changed the way we view the markets.
As mentioned before, the fractal structure is defined by a repeating pattern which is related
to the whole. In the case of financial time series, it is not a spatial but a time scale.
B.B. Mandelbrot pointed out that financial markets exhibit fractal structure, when he was
4. Fractals in the world of finance 23

examining the behavior of cotton prices in 1960s, however, to his findings was not devoted
much attention in that time. It was appreciated further in time when Peters (1994) originally
proposed the FMH.
In contrast to the EMH, the FMH proposes the following (Peters 1994):

1. For a stable market it is necessary that there are many participating investors with
different investment horizons. If each of the investors trading on the market
has a different investment horizon, then they are not homogeneous and they react to
information in different ways. The short-term trader’s unusual event is not unusual
within the investment horizon of a long-term trader. Each investment horizon has
another important information set, which provides sufficient liquidity.

2. Current prices may reflect only the important information for a given in-
vestment horizon and not all the available information. From short-term to long-
term, the meaning of technical analysis and market sentiment decreases and the mean-
ing of fundamental information increases.

3. Uniform investment horizon causes the market to be unstable. If, for a


specific event, long-term investors become short-term investors or even stop partic-
ipating, then all the investors have the same investment horizon. Since long-term
investors can stabilize the market, the market looses liquidity and becomes unstable.
The lack of liquidity causes large price changes and heavy tails in the distribution of
returns emerge. When this happens, the fractal structure of the market collapses.

4. The information is not reflected immediately. The investors may react to


information with delay because they are waiting until the trend is clearly established.

5. And moreover, the FMH does not state any requirement for the underlying pro-
cess. It searches to describe the market behavior appropriately by fitting the observed
data.

To sum it up, the FMH accounts for a market that consist of heterogeneous, irrational
investors and considers the liquidity and investment horizons to be of a great impact to the
behavior of the investors. The name Fractal derives from the fact that markets exhibit the
self-similar structure. The events which are rare and unexpected for a short-term-oriented
investors are viewed in a different way by long-term-oriented investors. This implies that,
after adjusting for the scale of the horizon, the investors share the same risk and the returns
have the similar frequency distributions.

4.2.1 Hurst exponent


The Hurst exponent is a self-similarity parameter, a dimensionless ratio, used to characterize
the time series. It can distinguish between random and nonrandom (biased random) process,
which suggests the presence of long-memory in the data. The exponent owes its name to
B.B.Mandelbrot, who decided to gave it the notation H, after he rediscovered the original
method for its estimation, the Rescaled range analysis (R/S). However, it was originally
proposed by E.H.Hurst (1951). Harold Edwin Hurst (1900-1978) was an English hydrologist,
who spent numerous years in Egypt by studying hundreds years of preserved records in order
4. Fractals in the world of finance 24

to design an ideal storage capacity of a water reservoir on the river Nile. One that would
never overflow and never become empty. He did not rely on the standard statistical analysis,
that assumed the discharges of water to be random, and developed his own method to test
for this property. His approach became useful for testing for the presence of dependence in
economic time series and has been used in extensive number of financial markets studies.

The values of H can range from 0 to 1.

• The value H = 0.5 indicates that the time series is random.


For this value of the Hurst exponent, the EMH coincides with the FMH, the price
changes are following either a random walk in the discrete time or a Brownian motion
in a continuos time and the price movements are independent. There is no correlation
between observations. The probability that the subsequent movement will be positive
equals to the probability that it will be negative.

• If 0 ≤ H < 0.5 then the time series exhibits anti-persistent behavior.


It can be as well called short-memory, short-range dependence or black noise. Each
price movement is more likely to be followed by a movement in the reversing direction,
that is, the positive price movements are more likely to be followed by the negative
movements and vice versa, the negative price movements are more likely to be followed
by positive movements. Only few such series have been found. This behavior involves
a narrow furious zigzag pattern (Mandelbrot & Hudson 2008).

• If 0.5 < H ≤ 1 then the time series exhibits persistent behavior.


It can be as well called long-memory, long-range dependence or pink noise. Each
price movement is more likely to be followed by a movement in the same direction,
that is, the positive movements are more likely to be followed by a move the positive
movements and vice versa, the negative movements are more likely to be followed by
negative movements. Numerous financial time series were found to behave in this
way. A series with such values of H is trend-reinforcing and involves a memory effect
(Mandelbrot & Hudson 2008). The trend is measured depending on how far is the
value of H from 0.5.

In the Section 4.3, we describe the commonly used methods for the estimation of the
Hurst exponent’s values. For the purposes of our analysis, we use the classical R/S analysis
and, moreover, other two estimation methods. The second method is a slight modification
of the rescaled range analysis and is called the modified rescaled range analysis. It was in-
troduced by Lo (1991) and incorporates the auto-covariances of the time series. The third
method is called detrended fluctuation analysis and was firstly applied by Peng (1994).

It is important to mention that the length of time series is essential for the analysis. Un-
like in standard statistics, when the observations are assumed to be independent, in this case,
having more data points for a short time period (e.g. high-frequency data) is not necessarily
better than having fewer data points over a longer period. The reason is that for a large
amount of observations for a short period the long-memory effect has virtually no impact.
We would observe just the local randomness with no possibility to reveal the global structure.
4. Fractals in the world of finance 25

4.2.2 Fractal dimension and Hurst exponent


There is a relation between Hurst exponent, H, and fractal dimension, DB , which can be
stated as follows Peters (1994):

DB = 2 − H

Nevertheless, there is a difference between these two terms. The Hurst exponent describes
the global structure, while the fractal dimension is just a local property. For a financial time
series, DB can take on values from 1 to 2.

• H = 0.5 ⇔ DB = 1.5
Fractal dimension of a random time series equals 1.5. It is the case of Brownian motion,
when the trajectory of a particle increases with the square root of measurement time.
For financial data, the movements of particle represent the movements of price.

• 0 ≤ H < 0.5 ⇔ 1.5 < DB ≤ 2


With a very low H, the time series results into an often reversing line, which is jagged
a lot. It fills more space than a random line and, therefore, its fractal dimension, DB ,
is higher than 1.5.

• 0.5 < H ≤ 1 ⇔ 1 ≤ DB < 1.5


With a very high H, the line is relatively smoother and less reversing. It fills less
space than a random line and, therefore, its fractal dimension, DB , is lower than 1.5.

4.3 Methodology on Hurst exponent estimates


Let us now explain the estimation methods applied in this thesis. All methods were pro-
grammed in Wolfram Mathematica and the source codes can be found in the enclosed DVD.

4.3.1 Classical rescaled range analysis


With minor modifications, we use the rescaled range analysis as described in Peters (1994).
We begin our analysis with a time series of length T which we divide into N nonoverlapping
subperiods, each of length υ. We label each subperiod In , n = 1, . . . , N , such that N.υ = T ,
and each element in the corresponding nth subperiod, In , is labeled as Xk,n . Subsequently,
for each subperiod In we apply the following:

1. We calculate mean, µn , for the nth subperiod, In , as


υ
1X
µn = Xk,n , n = 1, . . . , N
υ
k=1

2. We calculate mean adjusted series by substracting the mean µn from each element
of the subperiod In

Yk,n = Xk,n − µn , k = 1, . . . , υ
4. Fractals in the world of finance 26

3. Afterwards, we compute the cumulative deviate series, Zk,n , such that the k th
element of series is the sum of the first k elements of mean adjusted series, Yk,n . Each
subperiod of cumulative deviate series is called a profile.

k
X
Zk,n = Yi,n , k = 1, . . . , υ
i=1

4. Next, we calculate range series, RIn , defined as the difference between the maximum
and minimum value within each subperiod, which means we will obtain series of length
N defined as

RIn = max (Zk,n ) − min (Zk,n ), n = 1, . . . , N


k=1,...,υ k=1,...,υ

5. We calculate standard deviation series, SIn , of the length N as well, defined as


v
u υ
u1 X
SIn =t (Zk,n − Zk,n )2 n = 1, . . . , N
υ
k=1

where Zk,n represents the mean of the cumulative deviate series for each profile.

6. Subsequently, we obtain the rescaled range series, (R/S)In , by dividing the corre-
sponding value of standard deviation and range series of length N :

(R/S)In = RIn /SIn , n = 1, . . . , N

7. And finally, we find an average value of rescaled range series computed for the
subperiod length υ as
N
1 X
(R/S)υ = (R/S)In
N n=1

The whole process is repeated for different values of υ. However, υ is usually not a divider
of the total length of time series, T , and the remaining observations have to be ignored.
Commonly, the powers of 2 are used for the time scales, υ. Neverthelss, this results in a
very few datapoints for the final regression. To avoid this, we use a method similar to the
method mentioned by Onali & Goddard (2009), which consists of running the whole process
two times (once from the beginning and secondly from the end of time series). Readers
interested in more detail are referred to Onali & Goddard (2009). Although, our method
is slightly differing. We put more restriction on the choice of the value of υ to avoid the
possible bias and we use only those υ for which, after dividing T by υ, the remaining number
of observations is less than 10% of the corresponding value of υ. It can be stated as
mod (T /υ) < 0.1υ 1 . Moreover, as proposed by Weron (2002), we use the minimum scale
υmin = 50. Weron (2002) does not mention the maximum scale υmax , therefore, it is chosen
based on Peters (1994) as υmax = T /2.
1
mod (T, υ) stands for modulo function, which gives the integer remainder after dividing
T by υ
4. Fractals in the world of finance 27

The obtained rescaled range series scales according to the power law

(R/S)υ ≈ c.υ H

where c is a finite constant and H is the Hurst exponent. To conclude the estimation of
Hurst exponent, we take the logarithms of both sides of the equation

log(R/S)υ ≈ log c + H log υ

and run the ordinary least squares regression by regressing log(R/S)υ on log υ.

4.3.2 Modified rescaled range analysis


Secondly, this thesis adopts the method suggested by Lo (1991). Lo developed a simple
generalization of the classical R/S analysis, from which the modified R/S analysis differs
only slightly. The calculation is the same as for the classical case with the only difference in
standard deviation series. It is calculated with use of weighted auto-covariance functions
up to the lag ξ as follows:
v
u
u ξ
X
SIMn = tSI2n + 2 γk ωk (ξ), n = 1, . . . , N
k=1

k
where ωk are the weights defined as ωk (ξ) = 1− ξ+1 , ξ < υ and γk are the corresponding

auto-covariance functions defined as γk = i=k+1 (Xi,n − µn )(Xi−k,n − µn ).
The choice of the optimal lag appeared to be very important. There are several methods
generating various results. We use the most common method for the selection of ξ ∗ , which
was provided by Lo (1991):
$ 1/3  2/3 %
∗ 3υ 2ρ(1)
ξ =
2 1 − ρ(1)2

where b c is the operator for the nearest lower integer number and ρ(1) is the estimated
first-order autocorrelation coefficient.

4.3.3 Detrended fluctuation analysis


And thirdly, we use the detrended fluctuation analysis that was originally introduced by Peng
(1994), while he was analyzing long-range dependence in DNA nucleotides. The method uses
squared fluctuations around trend of the signal (Krištoufek 2010b). The following steps have
to be applied for the estimation of the Hurst exponent by DFA:

1. Similarly to R/S analysis, we create the cumulative deviation series, Zk,n .

2. For each subperiod In we estimate the polynomial fit Zn . Commonly, only the
construction of constant, linear and quadratic trend is used. Vandewalle et al. (1997)
found out that trends of higher powers do not provide any additional significant in-
formation. For the purpose of our analysis, we will use the linear fit (Weron 2002).
We fit the least square line Z̃n (x) = an x + bn to {Z1,n . . . , Zυ,n } , n = 1, . . . , N
4. Fractals in the world of finance 28

3. We construct the detrended time series and calculate the mean root square fluctua-
tion (standard deviation) as
v
u υ
u1 X
Fn = t (Zk,n − an k − bn )2 , n = 1, . . . , N
υ
k=1

4. And finally, calculate the average value of Fn of all N subintervals of length υ as

N
1 X
Fυ = Fn
N n=1

The whole process is repeated for υ satisfying 50 < υ < T /4 as suggested by Weron (2002)
and, moreover, restricted by mod (T, υ) < 0.1υ . Then, Fυ follows the power law

Fυ ≈ c.υ H

Finally, we can obtain the estimate of the Hurst exponent by applying the logarithms on
both sides

logFυ ≈ log c + H log υ

and running the ordinary least squares regression of logFυ on log υ.

4.3.4 Comparison of estimation methods


Even though, the R/S analysis was originally developed in 1950s and was numerously tested
in many studies of financial markets, it has its shortcomings. The main one is that is can
be biased by the presence of short-memory. It can detect the long-memory process when
it is, in fact, a short-memory process. This was the reason why Lo decided to develop a
new method, which would account for it (Lo 1991). His modified R/S analysis incorporates
the auto-covariance functions into computation of standard deviation series in order to treat
with the shortcoming of R/S. The M-R/S analysis is therefore robust to the presence of
short-memory.
The choice of the optimal lag in the M-R/S analysis reveals to be crucial, since very
high value of the optimal lag can bias the estimation. The alternative and more simple
way to j sellect the lag is discussed by Chin (2008). He proposes to set the optimal lag as

 k
υ 2/9
ξ = 4 100 . Both methods are also sensitive to the choice of the time scale,υ. The
appropriate selection of υ is discussed e.g. by Peters (1994), Weron (2002) or Onali &
Goddard (2009).
In contrast to the previous two methods, the Detrended fluctuation analysis (DFA) can
be used even for non-stationary time series because it is able to remove short term trends
in the data. The presence of trends can significantly bias both R/S and M-R/S analysis.
Weron (2002) states that the DFA is the winner among these three methods.
Chapter 5

Empirical results

5.1 Data Description


5.1.1 Coffee futures prices of arabica and robusta
Firstly, our analysis uses the time series of daily closing prices of coffee futures contract,
KC, traded at the ICE in New York over the last 41 years (17/08/1972 - 10/06/2013). We
gathered 10072 observations. Coffee futures contracts traded on the ICE are characterized
by five months of delivery - March, May, July, September and December. The size of the
contract is 37 500 pounds and is quoted in cents of US dollars per one pound of arabica coffee
with the minimum movement 5/100 of cent, which is equivalent to $ 18,75 per contract. The
overall development of the daily prices is illustrated in Figure A.3.

Secondly, we use the time series of daily closing prices of robusta coffee for which the
futures contracts, RC, have traded on the LIFFE. We gathered 4366 observations over the
period 02/12/1991 - 30/01/2009. The reason why our observation period ends in January
2009 is the change of the characteristics of robusta futures contract. The main changes made
in the newly introduced revised robusta coffee futures were 1) the increase in the contract
size from five to ten tonnes, 2) broader range of robusta qualities and 3) the delivery from
all origins. Since there has been a period of few months when both contracts were traded
contemporary, we decided to cut the observation period in year 2009. There are six deliv-
ery months of RC contract traded in our observation period - January, March, May, July,
September, and November - coinciding with the delivery months of the current contract. The
former contract size is five tons and the price is quoted in dollars per ton. The minimum
price movement is $ 1, corresponding to $ 5 per contract. Figure A.4 shows the development
of daily prices.

Both arabica and robusta time series provided by Bloomberg have already been contin-
uosly adjusted. The continuous futures contract values are compounded of prices of the two
contracts with the nearest maturity. The approach used says that the closer in time the
contract expires, the lower percentage of price is reflected in the presentday value of futures
5. Empirical results 30

contract. This method results in smooth blend of prices of different futures contracts and
avoids the periodicity. As all agricultural commodity markets, the coffee market tends to be
particularly volatile as well. It is highly vulnerable to weather shocks and different aspects
such as pests or rust epidemies. The summary for robusta and arabica prices can be found
in Table 5.1.

5.1.2 Logarithmic returns


Let us denote Pt the price of coffee contract at the time t. Then we will define the daily
returns, rt , as the change in the logarithm of the price.1

rt = log(Pt ) − log(Pt−1 )

In finance, it is very common to use the logarithmic difference when analyzing returns
(Cont 2001). The use of logarithmic returns is especially meaningful in our analysis because
of the use of R/S analysis, where the cumulative deviations coincide with the cumulative
returns. The logarithmic returns of our data are represented in Figures A.5 and A.6.
Table 5.1 shows the summary statistics of both robusta and arabica returns. As we
can see, arabica returns are very slightly negatively skewed with kurtosis of 12.78. The
skewness of robusta returns is more significant and, moreover, the kurtosis of 52 is very high
in comparison to the kurtosis of normal distribution which is 3. The maximum and minimum
values of both robusta and arabica are from 10 to 20 standard deviations distant from their
mean values. These characteristics do not suggest that returns are normally distributed.

5.1.3 Volatility
For the construction of time series of volatility we use the time series of logarithmic returns
from Subsection 5.1.2. As a measure of volatility we will use the absolute value of returns,
The time series of volatility is defined as follows

vt = |rt |, t = 1, . . . , T

Figures A.7 and A.8 show the calculated volatility of arabica and robusta futures re-
spectively. Table 5.1 shows that both time series of volatility are positively skewed and have
notable kurtosis. Similarly to returns, the maximum value is distant to the mean value in
terms of standard deviation.

5.2 V -statistic
First of all, we perform test for the presence of long-memory in the time series of returns
and volatility of both arabica and robusta. The V -statistic is used to reveal whether long-
memory is present in our data (Teverovsky 1999). To compute the V -statistic, we use the
(R/S) values, whose computation was described in the Section 4.3:
1
Note that log stands for natural logarithm all over this thesis.
5. Empirical results 31

Table 5.1: Summary statistics for coffee time series

Variable Obs. Mean Std.dev. Min Max Skewn. Kurt.


KC 10072 123.79 52.04 41.50 335.63 0.85 3.74
rKC 10071 0.0 0.0237 -0.2442 0.2377 -0.084 12.78
vKC 10071 0.0162 0.0173 0.0 0.2442 3.39 26.18
RC 4366 1374.81 726.14 350.0 4263.0 1.04 4.02
rRC 4365 0.0 0.0238 -0.4738 0.2215 -2.23 52.00
vRC 4365 0.0153 0.0182 0.0 0.4738 6.98 123.81

Source: Author.

(R/S)υ
Vυ = √
υ
The null hypothesis of the test assumes no long-term memory and the value of V -
statistic is compared with the critical values 0.809 and 1.862. These values were pro-
vided by Lo (1991) and represent the 0.025 and 0.975 fractiles of the distribution Fv (x) =
P∞
1 + 2 k=1 (1 − 4k 2 x2 )e−2(kx)2 to which the V -statistic converges for an independent pro-
cess. If the values of V -statistic lie outside the interval (0.809, 1.862), we reject the null
hypothesis on 5% significance level. When displayed in a semi-log plot, where the values of
V -statistic are on the y-axis and the values log υ on the x-axis, the resulting figure is constant
for time series with no dependence, it increases for persistent time series and decreases for
anti-persistent time series (Krištoufek 2010a).

The results of the test for all series are summarized in the Table 5.2 and semi-log plots
are displayed in Figures A.9 and A.10.

5.2.1 V -statistic for R/S analysis


For arabica and robusta returns, rKC and rRC , the values of V -statistic are equal to 1.299 and
1.632, respectively. It implies that we cannot reject the null hypothesis of no long-memory
on 5% significance level. Both Figure A.10(a) and Figure A.10(b) are horizontal, since the
corresponding R/S values are scaling with the square root of time (Peters 1994).

On the other hand, for arabica and robusta volatility, vKC and vRC , we obtain the
values of V -statistic which are equal to 6.565 and 1.987, respectively. We can reject the null
hypothesis and conclude that there is evidence of long-memory. Figures A.10(c) and A.10(d)
are upward sloping lines. The corresponding R/S values are scaling at a higher rate than
the square root of time.

5.2.2 V -statistic for M-R/S analysis


Surprisingly, the test generates very high values for V -statistics based on M-R/S values. For
rKC , rRC , vKC and vRC we obtain the values 52.288 66.277 119.037 and 57.410, respectively.
5. Empirical results 32

For all of the series, the null hypothesis is strictly rejected, concluding that there is evidence
of long-memory. Figure A.10 displays the corresponding semi-log plots. Note that the scale
of Figure A.10 is distinct from the scale of the Figure A.9. However, the behavior of the line
can be considered as inconclusive.

Table 5.2: V -statistic

Classical R/S Modified R/S


V H0 V H0
rKC 1.299 cannot be rejected 52.288 rejected
rRC 1.632 cannot be rejected 66.277 rejected
vKC 6.565 rejected 119.037 rejected
vRC 1.987 rejected 57.410 rejected

Source: Author.

5.3 Hurst exponent


The results of Hurst exponent estimation are summarized in the Table 5.3. The Figures
A.11, A.12 and A.13 depict the corresponding log-log regressions.

5.3.1 R/S analysis


In the regression log(R/S)υ on log υ of classical R/S analysis, 622 data points for arabica
series and 262 data point for robusta series are used.
The values of estimated Hurst exponent of arabica and robusta returns,rKC and rKC ,
are 0.5297 and 0.5742. These values are just slightly differing from the value 0.5 of a random
series. However, considering the fact that the R/S analysis can generate estimates differing
from 0.5 even for a random series, in addition with the previous test and the nature of Figures
A.10(a) and A.10(b), we conclude that the time series of returns are not persistent.
The Hurst exponent of arabica volatility, vKC , equals 0.8229, which provides strong
evidence of persistent time series, meanwhile the estimate of H for robusta volatility, vRC ,
is 0.5316, which is again just slightly differing, but the previous test suggests the presence
of long-memory. Thus, we conclude, that robusta volatility is persistent under R/S analysis.
The regressions are displayed in the Figure A.11.

5.3.2 M-R/S analysis


In the case of modified R/S analysis, the same amount of data points for the regression as
for classical R/S is yielded.
The resulting estimate for arabica returns, rKC , is 0.4873. This suggests that the time
series is anti-persistent but it contradicts the result of the test with V -statistic. Moreover,
the value is close to 0.5 and the behavior of the line in the Figure A.11(a) is quite perplex and
5. Empirical results 33

ranges from 43 to 62. Therefore, there is no conclusive evidence for arabica returns under
M-R/S analysis.
The estimate of H for robusta returns, rRC equals to 0.5503, which is in concordance
with the V -statistic test. However, as the Figure A.11(b) shows, the value of V -statistic is
reverting significantly, which questions the significance of the estimate under M-R/S.
The estimate of H for arabica volatility, vKC , equals 0.5423, which suggests persistent
series. But, again, the value is very close to the random value, 0.5. Nevertheless, the Figure
A.11(c) is upward sloping. We conclude, that arabica volatility series is persistent under
M-R/S.
And finally, the estimate of H for robusta volatility series, vRC is very low, 0.3813 and
far from beeing persistent. This is contradictory with the result of V -statistic test. Based
on the M-R/S, we can not conclude whether vRC is persistent or not.

5.3.3 DFA
The number of datapoints used for estimation of H by the DFA method is 273 for arabica
series and 111 for robusta series.
The estimes of H for arabica and robusta returns, rKC and rRC are 0.5307 and 0.5094.
Both are very close to the random value. We can conclude that robusta returns series is ran-
dom and arabica returns exhibits slight persistence, under the DFA method. On the other
hand, the estimates for arabica and robusta volatility series, vKC and vRC are significantly
far from the 0.5 value. We can conclude, that both vKC and vRC are persistent.

The strong point of the method we have used for the choice of the time scale, υ, is that
it results in a notably higher number of data points then the commonly used method, which
incorporates the powers of 2. In our case, this would result in not more than 10 data points
for the final regression. Our method leads to exceedingly higher number of data points and,
therefore, to the more accurate estimate of H.
5. Empirical results 34

Table 5.3: Hurst exponent estimates

var H s.e. 95% CI obs.


rKC 0.5297 0.00226 (0.5252; 0.5341) 622
rRC 0.5742 0.00323 (0.5679; 0.5806) 262
R/S
vKC 0.8229 0.00260 (0.8178; 0.8280) 622
vRC 0.5316 0.00707 (0.5177; 0.5455) 262
rKC 0.4873 0.00229 (0.4828; 0.4918) 622
r 0.5503 0.00359 (0.5432; 0.5573) 262
M-R/S RC
vKC 0.5423 0.00218 (0.5380; 0.5465) 622
vRC 0.3813 0.00729 (0.3670; 0.3957) 262
rKC 0.5307 0.00329 (0.5242; 0.5372) 273
rRC 0.5094 0.01158 (0.4864; 0.5323) 111
DFA
vKC 0.7846 0.00885 (0.7672; 0.8020) 273
vRC 0.6731 0.01297 (0.6474; 0.6988) 111

Source: Author.
Chapter 6

Conclusion

This thesis provided a characterization of coffee markets. We devoted our attention to the
brief history of coffee to emphasize how influential the coffee product has been for the human
mankind since its appearance in the 15th century. We investigated the world coffee trade and
revealed that the coffee production has an increasing trend. Over the last 23 years it rose
by 55%. Moreover, in comparison to the crop year 1990/91, the share of major producing
countries on the total production is significantly higher nowadays, since it rose from 79% to
90%. Today’s largest importer of coffee is the United States, however, the European Union
altogether overcomes it sharply. We also observed that the Scandinavian countries lead in
the consumption of coffee per capita. Namely, Finland ranked in the first place with 12
kilograms of coffee per capita in 2011.

The main goal of this thesis was to estimate a parameter of self-similarity, the Hurst
exponent. The estimates were provided for arabica and robusta series of daily returns and
volatility with the use of commonly applied methods - classical rescaled range analysis (Hurst
1951), modified rescaled range analysis (Lo 1991) and detrended fluctuation analysis (Peng
1994). The estimates, which provide the notion whether time series random, persistent or
anti-persistent, have shown several interesting results. To the best of our knowledge, such
analysis of coffee markets has not been yet conducted.

Our analysis of coffee time series has detected different results for each of the three
estimation methods.
The R/S analysis yielded the estimates of returns series indicating very slight persistence
with the values close to the Hurst exponent of random series. Since one shortcoming of R/S
analysis is that it can be biased by the presence of short-memory, in conjuction with the
V -statistic test, we concluded that the series of returns are independent under the R/S
analysis. The highest evidence of persistence was revealed by the series of arabica volatility.
The volatility of robusta values of H estimates for volatility, together with the V -statistic
test provided the evidence of persistence.
The M-R/S analysis generated very unclear results. The V -statistic test provided ex-
tremely high values and the estimates of the Hurst exponent were in contradiction with it.
6. Conclusion 36

The reason could be an inappropriate choice of the optimal lag, which is crucial to obtain
the unbiased estimates in this method.
The DFA method provided evidence of randomness of the robusta returns series and
slight persistence of the arabica returns. The estimates for volatility of both robusta and
arabica yielded estimates indicating significant persistence.
As a subject for the further research, we make the following suggestions. First, the
estimation of the Hurst exponent by M-R/S analysis with the use of different approaches to
the choice of the optimal lag, for example the one stated by Chin (2008). And second, the
investigation of the Hurst exponent’s behavior within the individual subperiods of the whole
observation period.
Bibliography

Bachelier, L. (1900): “Théorie de la speculation.” Annales de l’ Ecole Normale Superieure


3-17: pp. 21–86.

Brown, R. (1828): “Xxvii. a brief account of microscopical observations made in the months
of june, july and august 1827, on the particles contained in the pollen of plants; and on
the general existence of active molecules in organic and inorganic bodies.” The Philosoph-
ical Magazine, or Annals of Chemistry, Mathematics, Astronomy, Natural History and
General Science 4(21): pp. 161–173.

Chin, W. (2008): “Spurious long-range dependence: evidence from malaysian equity mar-
kets.” Technical Report 7914, University Library of Munich, Germany.

Cont, R. (2001): “Empirical properties of asset returns: stylized facts and statistical issues.”
Quantitative Finance, Institute of Physics Publishing 1: pp. 223–236.

Einstein, A. (1905): “On the movement of small particles suspended in stationary liquid
demanded by the molecular-kinetic theory of heat.” Annals de Physik 17: pp. 549–560.

Falconer, K. (2003): Fractal Geometry: Mathematical Foundations and Applications. Wi-


ley.

Fama, E. F. (1965): “The behavior of stock-market prices.” The journal of Business 38:
pp. 34–105.

Fama, E. F. (1970): “Efficient capital markets: Review of theory and empirical work.” The
Journal of Finance 25: pp. 383–417.

Hai-Chin, Y. & M.-C. Huang (2003): “Statistical properties of volatility in fractal dimen-
sion and probability distribution among six stock markets - usa, japan, taiwan, south
korea, singapore, and hong kong.” Technical report, EconWPA.

Hurst, H. E. (1951): “Long-term storage capacity of reservoirs.” Transactions of the Amer-


ican Society of Civil Engineers 116: pp. 770–799.

Krištoufek, L. (2010a): “Long-range dependence in returns and volatility of central euro-


pean stock indices.”
Bibliography 38

Krištoufek, L. (2010b): “Rescaled range analysis and detrended fluctuation analysis: fi-
nite sample properties and confidence intervals.” AUCO Czech Economic Review 4: p.
315–329.

Krištoufek, L. (2012): “Fractal markets hypothesis and the global financial crisis: scaling,
investment horizons and liquidity.” Advances in Complex Systems 15.

LeRoy, S. (1976): “Efficient capital markets: Comment.” The journal of finance 31: pp.
139–41.

Lo, A. (1991): “Long-term memory in stock market prices.” Econometrica 59(5): pp.
1279–1313.

Mandelbrot, B. B. (1963): “The variation of certain speculative prices.” The Journal of


Business 36(4): pp. 394–419.

Mandelbrot, B. B. (2001): “Scaling in financial prices: I. tails and dependence.” Quanti-


tative Finance, Institute of Physics Publishing 1: pp. 113–123.

Mandelbrot, B. B. (2003): Fraktály. Mladá Fronta.

Mandelbrot, B. B. & R. L. Hudson (2008): The (mis)Behaviour of Markets - A Fractal


View of Risk, Ruin and Reward. PROFILE BOOKS LTD.

Onali, E. & J. Goddard (2009): “Unifractality and multifractality in the italian stock
market.” International Review of Financial Analysis 18(4): pp. 154–163.

Pendergrast, M. (2010): Uncommon grounds: the history of coffee and how it transformed
our world. Basic Books.

Peng, C., e. a. (1994): “Mosaic organization of dna nucleotides.” Physical Review E 49(2):
p. 1685.

Peters, E. E. (1991): Chaos and order in the capital markets: A new view of cycles, prices,
and market volatility. Wiley.

Peters, E. E. (1994): Fractal Market Analysis: Applying Chaos Theory to Investment and
Economics. Wiley.

Samuelson, P. A. (1965): “Proof that properly anticipated prices fluctuate randomly.”


Indistrial Management Review 6: pp. 41–49.

Schroeder, M. R. (1991): Fractals, Chaos, Power Laws: Minutes from an Infinite Paradise.
Freeman.

Teverovsky, V., e. a. (1999): “A critical look at lo’s modified r/ s statistic.” Journal of


statistical Planning and Inference 80.1: pp. 211–227.

Vandewalle, N., M. Ausloos, & P. Boveroux (1997): “Detrended fluctuation analysis


of the foreign exchange market.” In “Econophysic Workshop, Budapest, Hungary,” .
Bibliography 39

Weron, R. (2002): “Estimating long range dependece: finite sample properties and confi-
dence intervals.” Physica A 312: pp. 285–299.
Appendix A

Tables and figures

Table A.1: Major importing countries, measured in thousands of 60


kg bags over calendar year

United
Country EU USA Germany Italy Japan France Spain Kingdom Poland
1990 45 781 21 007 13 671 5 242 5 330 6 301 3 053 2 898 435
1991 43 950 19 840 13 229 4 630 5 510 6 553 2 970 2 806 250
1992 47 450 22 939 13 789 4 595 5 326 6 612 3 414 3 088 1 787
1993 48 289 19 329 14 107 5 594 5 691 6 334 2 813 3 197 1 670
1994 48 675 16 171 13 583 5 554 6 217 6 369 3 028 3 466 1 843
1995 45 911 17 107 12 852 5 388 5 489 6 214 3 146 2 807 1 771
1996 48 994 19 445 13 507 5 608 5 994 6 660 3 515 2 903 1 924
1997 50 415 20 343 13 905 5 743 5 921 6 704 3 777 2 929 2 253
1998 51 685 21 030 13 740 5 889 6 027 6 576 3 718 3 142 2 293
1999 52 303 22 746 14 320 5 943 6 547 6 676 3 986 2 907 2 404
2000 52 706 23 767 13 895 6 315 6 908 6 520 3 768 3 012 2 576
2001 54 926 21 415 14 753 6 542 6 996 6 753 4 058 3 062 2 719
2002 56 294 21 639 15 516 6 523 7 307 6 925 4 026 2 971 2 643
2003 57 411 22 760 15 727 6 929 6 923 6 652 4 136 3 002 2 664
2004 59 599 23 184 17 356 7 032 7 254 5 940 4 173 3 329 2 687
2005 59 615 23 042 16 716 7 269 7 408 5 714 4 356 3 433 2 792
2006 63 914 23 709 18 543 7 548 7 632 6 191 4 538 4 046 2 654
2007 65 762 24 219 19 564 8 028 7 086 6 420 4 875 3 781 2 264
2008 67 985 24 277 19 876 8 172 7 060 6 252 4 864 3 967 2 460
2009 66 794 23 578 19 416 8 078 7 090 6 670 4 811 4 131 3 162
2010 69 364 24 378 20 603 8 236 7 407 6 717 5 034 4 302 3 279
2011 69 913 26 093 20 926 8 355 7 544 6 992 4 821 4 183 3 404
2012 71 851 26 066 21 816 8 691 7 025 6 840 5 094 4 125 3 539

Source: Author, based on ICO data.


A. Tables and figures
Table A.2: The major coffee producing countries, measured in thou-
sands of 60 kg bags over crop year. A=arabica, R=robusta

Country Brazil Indonesia Peru Colombia Cote d’Ivoire El Salvador Ethiopia Guatemala Honduras India Mexico Uganda Vietnam Total
Type (A/R) (R/A) (A) (A) (R) (A) (A) (A/R) (A) (R/A) (A) (R/A) (R)
1990/91 27 286 7 441 937 14 231 2 940 2 465 2 909 3 271 1 568 2 829 4 674 1 955 1 390 93 253
1991/92 27 293 8 463 1 200 18 222 4 129 2 198 3 061 3 497 2 322 3 000 4 727 2 088 1 308 101 562
1992/93 34 603 5 577 1 762 13 823 2 246 3 001 1 794 4 318 1 918 2 823 3 401 2 185 2 340 97 392
1993/94 28 167 7 301 665 11 320 2 293 2 378 2 865 3 536 1 829 3 533 5 023 3 142 3 020 91 998
1994/95 28 192 6 280 1 179 12 989 3 006 2 293 2 537 3 787 2 181 3 002 4 159 2 393 3 532 93 881
1995/96 18 060 5 180 1 871 12 878 2 532 2 585 2 860 4 002 1 909 3 717 5 300 3 244 3 938 86 979
1996/97 29 197 8 235 1 806 10 876 4 859 2 534 3 270 4 525 2 004 3 417 5 110 3 419 5 705 103 136
1997/98 26 148 7 922 1 930 12 233 4 164 2 175 2 916 4 219 2 564 3 805 4 802 3 440 6 915 99 695
1998/99 36 761 7 385 2 102 11 035 1 992 2 055 2 745 4 893 2 195 4 417 4 801 3 386 6 970 108 143
1999/00 47 578 6 264 2 744 9 393 6 320 2 598 3 505 5 120 2 985 4 867 6 219 2 862 11 631 130 005
2000/01 31 310 6 987 2 676 10 400 4 846 1 704 3 115 4 940 2 667 4 370 4 815 3 401 14 841 112 913
2001/02 31 365 6 833 2 829 11 962 3 595 1 694 4 044 3 669 3 036 4 604 4 438 3 158 13 093 107 703
2002/03 48 480 6 731 3 000 11 735 3 145 1 361 4 094 4 070 2 496 4 776 4 351 2 890 11 574 123 109
2003/04 28 820 6 404 2 686 11 230 2 689 1 380 4 394 3 610 2 968 5 534 4 201 2 599 15 337 106 199
2004/05 39 272 7 536 3 425 11 573 2 268 1 319 5 213 3 703 2 575 4 159 3 867 2 593 14 370 116 153
2005/06 32 944 9 159 2 489 12 564 1 691 1 374 4 779 3 676 3 204 4 090 4 225 2 160 13 842 111 169
2006/07 42 512 7 483 4 319 11 775 2 177 1 235 5 551 3 950 3 461 4 563 4 200 2 859 19 340 128 350
2007/08 36 070 4 474 3 063 12 516 2 317 1 505 5 967 4 100 3 640 4 319 4 150 3 449 16 405 116 614
2008/09 45 992 9 612 3 872 8 664 2 397 1 450 4 949 3 785 3 450 3 950 4 651 3 290 18 438 128 622
2009/10 39 470 11 380 3 286 8 098 1 795 1 075 6 931 3 835 3 603 4 794 4 109 2 845 17 825 122 798
2010/11 48 095 9 129 4 069 8 523 982 1 860 7 500 3 950 4 331 5 033 3 994 3 203 19 467 133 498
2011/12 43 484 8 620 5 581 7 653 1 907 1 175 6 798 3 840 5 903 5 233 4 546 2 817 24 058 135 934
2012/13 50 826 11 250 4 750 8 000 2 000 1 290 8 100 3 100 4 900 5 258 5 160 3 000 22 000 144 646

Source: Author, based on ICO data.

II
A. Tables and figures III

Figure A.1: Total production of coffee

Source: Author.

Table A.3: Per capita consumption of coffee in selected countries,


measured in kg over calendar year

Country 2004 2005 2006 2007 2008 2009 2010 2011


USA 4.20 4.16 4.06 4.09 4.17 4.09 4.11 4.16
Finland 11.87 12.62 11.94 12.01 12.62 11.91 12.12 12.26
Norway 9.25 9.61 9.25 9.81 8.99 8.92 9.21 9.69
Denmark 9.43 8.80 9.09 8.74 7.56 7.44 9.27 8.65
Austria 7.30 5.63 4.44 6.11 6.53 6.36 6.46 7.99
Sweden 8.21 7.74 8.66 8.15 8.29 7.35 7.89 7.27
Germany 7.61 6.31 6.66 6.29 6.95 6.50 6.79 6.92
Slovenia 5.56 5.44 5.24 5.82 5.77 5.89 6.06 6.14
Italy 5.63 5.68 5.69 5.89 5.93 5.82 5.77 5.68
Belgium 8.08 6.67 8.81 6.29 3.68 5.26 4.88 5.24
Netherlands 7.31 7.08 7.79 8.36 4.80 3.25 4.85 3.69

Source: Author, based on ICO data.


A. Tables and figures IV

Figure A.2: Yearly relative changes in coffee production

Source: Author’s computations.


A. Tables and figures V

Figure A.3: Arabica coffee futures daily prices 1972-2012

Source: Author, based on Bloomberg data

Figure A.4: Robusta coffee futures daily prices 1991-2009

Source: Author, based on Bloomberg data

Figure A.5: Arabica daily logarithmic returns 1972-2012

Source: Author, based on Bloomberg data


A. Tables and figures VI

Figure A.6: Robusta daily logarithmic returns 1991-2009

Source: Author, based on Bloomberg data

Figure A.7: Volatility of arabica prices

Source: Author.

Figure A.8: Volatility of robusta prices

Source: Author.
A. Tables and figures VII

Figure A.9: V-statistic for R/S method

(a) Arabica returns (b) Robusta returns

(c) Arabica volatility (d) Robusta volatility


Source: Author.

Figure A.10: V-statistic for M-R/S method

(a) Arabica returns (b) Robusta returns

(c) Arabica volatility (d) Robusta volatility


Source: Author.
A. Tables and figures VIII

Figure A.11: Hurst exponent estimation, R/S

(a) Arabica returns (b) Robusta returns

(c) Arabica volatility (d) Robusta volatility


Source: Author.

Figure A.12: Hurst exponent estimation, M-R/S

(a) Arabica returns (b) Robusta returns

(c) Arabica volatility (d) Robusta volatility


Source: Author.
A. Tables and figures IX

Figure A.13: Hurst exponent estimation, DFA

(a) Arabica returns (b) Robusta returns

(c) Arabica volatility (d) Robusta volatility


Source: Author.
Appendix B

Content of Enclosed DVD

There is a DVD enclosed to this thesis which contains empirical data and Wolfram Mathe-
matica source codes for computation of classical rescaled range analysis, modified rescaled
range analysis and detrended fluctuation analysis.

• Folder 1: Empirical data

– KCret.txt (arabica time series of returns)


– KCvol.txt (robusta time series of returns)
– RCret.txt (arabica time series of volatility)
– RCvol.txt (robusta time series of volatility)

• Folder 2: Source codes

– RS.nb (computation for classical R/S analysis)


– MRS.nb (computation for modified R/S analysis)
– DFA.nb (computation for detrended fluctuation analysis)

Вам также может понравиться