You are on page 1of 20

1

Extended essay

How the price changes on the stock chart can be analyzed over
different time periods using fractal economics?

IB #: kgk852
2

Introduction

1.1 Abstract

In my EE I am going to study fractals and their construction, sets and functions that

analytically describe the structure of fractals, graphs and properties of these functions,

which are continuous but are not differentiable anywhere, with market chart of Bitcoin as an

instance for them.

1.2 Personal engagement

Two weeks ago, when I was walking in the park, I accidentally paid attention to the tree,

since it is autumn, I could see a lot of branches and could notice a very interesting tendency

which could not be explained with the concept I knew before.

Picture 1: zoom of the trees

The closer I got to the trees the more branches I saw, and they seem endless but at one

point I realized that even if I come closed, I will not be able to see any new branches.

After this situation some questions occurred: how it happens that u can observe more and

more looking at a tree which theoretically has only one established form? How can the point

where I cannot multiply anymore be found?

After quick research in internet, I found one more interesting phenomenon which might be

even harder for understanding.


3

Picture 2: fractal properties of coastline

The length of coastline depends on the way you measure it, because segments which can be

used differ from a lot of kilometers till a few centimeters or even millimeters. Obviously, the

shortest possible segment cannot be chosen. At one point a conclusion can be made that

that Sweden’s coastline is infinite, but then even more question without answers arise. Such

as how did scientist measure the length of coastlines? And if a person starts walking on the

one side, will they be able to come another one?

That is why I tried to take a simpler example to find out whether they can actually be infinite

or not.

1.3 Prove that fractals are finite

Firstly, we will build a square with the length of side a.


a 4

a 1
4
3
6
5
7 98

Picture 3: prove that fractals are finite

If we divide the square in two parts and then the resulting rectangular in two parts, then

resulting square in two parts again etc. we will get a repeated piece which can repeat much

more times than on the picture.

If we count area of this square with formula for the full square it will be a 2, but if we count it

as a sum of the smaller squares the formula for area will be:

a a a a a a a a a a a
a× + × + × + × + × + × +…=
2 2 2 2 4 4 4 4 8 8 8
1 1 1 1 1 1
= a2 ( × 2 × 3 × 4 × 5 × 6 + … )
2 2 2 2 2 2
1 1
Considering this equation as a geometric progression we have u1 = , q = and now the
2 2

sum of progression can be expressed as:

1
u1 2
S = a 2( )= a 2 ( )= a 2 × 1 = a 2
1−q 1
1−
2

When we got a particular result, we can make a conclusion that area of this square cannot

be infinite and therefore the trees and the length of the coast are also finite.
5

All these examples are called fractals. Fractal is a set (can be a set of numbers or geometric

shapes) which has a property of self-similarity, in other words an object that fully or partly

match with its parts.

Fractals are used in completely different areas of expertise: examples of them are medicine,

art, engineering, economics etc. This fact makes them fascinating and useful even though

they can be considered a hard for understanding concept.

1.4 History of fractals

History of fractals began in 17th century when a mathematician and philosopher Gottfried

Leibniz noticed a tendency of a straight line for recursive self-similarity. A lot of

mathematicians tried to figure out the principle of work of these mathematical “monsters”

but only in two centuries a few researchers managed to reach some progress; a function

that nowadays will be considered fractal was built and presented to the world. (fractal,

2023)

The first real life application of fractals was introduced by Benoit Mandelbrot in early 1960s

and comprise of the New York cotton market analysis; he found that the price fluctuations

show similar properties on the different time scale. (Benoit Mandelbrot, 2023)

Since the dependence of price and time is a function, the discovery of Mandelbrot can be

considered as just an example of the fractal-function discovered by other scientists. That is

why, starting with exploration of fractal-function I want to analyze the example of price

fluctuations on the market over different time period using the Mandelbrot theory.

Non-differentiable functions as fractals

2.1 History of non-differentiable functions


6

For a long time after discovery of differential calculus all scientists thought that it is

impossible to get a function that does not have a differential in all its point. Eventually

sometime before 1831 Bernard Bolzano constructed the first example of the function that

cannot be differentiated in any points, but his finding was published only in 1930 so Karl

Weierstrass who discovered one in 1860 but was published in 1872 obtained a much higher

level of popularity and his option of the function became more common among

mathematicians and in general people talking about non-differentiable functions. (Non-

differentiable function, 2020)

2.2 Exploration of non-differentiable functions

The function is differentiable if derivative exists at each point in its domain. On the graph this

property can be recognized by tangent line: a differentiable function has a non-vertical

tangent line whereas the tangent line of non-differentiable function is vertical. In other

words, the first on is smooth and the second one has breaks, angles, or cusps.

(Mathematics: analysis and approaches, 2019)

a a

Picture 4: function where point a is differentiable Picture 5: function where point a is non-differentiable

So that on the graph on picture 4 it is possible to take derivative in the point a whereas

graph on picture 5 has a turning point which is non-differentiable. It being due to it having a

“sharp” angle.

2.3 The Weierstrass function


7

The Weierstrass function is an example of a real-valued function which is continuous

everywhere but differentiable nowhere. It is presented in the form of sum of other

functions. This function is shown on the picture 6. (Weierstrass function, 2023)

Picture 6: graph of Weierstrass function

2.4 The Takagi–van der Waerden function

Some time later van der Waerden, a mathematician from Amsterdam introduced a function

which had the same properties as Weierstrass function but at the same time was much

easier for understanding. It was proved by Takagi and van der Waerden in 1903

independently of each other. The function can be expressed as following equation: (Allaart,

2014)

A method of construction and prove of this function was detaily described in “Algebra:

Volume 1” (Waerden, 1977) written by van der Waerden but from that time a lot of other

mathematicians found their own way to demonstrate non-differentiable features of the

continuous function.

2.5 Takagi-van der Waerden function’s construction


8

Since the described way of construction and prove of the non-differentiability of Takagi-van

der Waerden function requires complex knowledge, which is not included in IB mathematics

course, I will construct and prove it by myself with my current knowledge as a step on the

way to analyze market chart.

To begin with, the function f0 should be constructed, its graph is shown on the picture 7 in

the red color.

f0
1
f1 2
−3 1 −1 1 1 1 3 2

2 2 2 2
Picture 7: graphs of function f0 and f1

1
It can be described as the two functions, in the first case it will be y=x for x є [0; ], in the
2

1
second it will be y=-x for x є [ ; 1¿ . Function f0 is continuous in all points and has a period of
2

k
one. In points , where k є Z it is non-differentiable.
2

1
Function f1 which equals a half of function f0 (f1(x) = f0(2x)) is shown on the graph 1 in
2

k
blue. This function cannot be differentiated in points , where k є Z.
4

1 2 k
Function f2 = 2 f0(2 x) and it cannot be differentiated in points , where k є Z.
2 8

If all functions fn were added together, the received sum would be continuous in all points

k
and non-differentiable in point , where k є Z, n є Z, but it is unknown what is the sum of an
2n

infinite number of terms.


9

1
That is why it is reasonable to create a sequence of functions. For this let: fn(x) = f0(2nx);
2n

1 1
from this we can get Fn(x) = f0(x) + f1(x) + … + fn(x) or in terms of f0: f0(x) + f0(2x) + 2 f0(
2 2

2
1
2 x) + … + f0(2nx); then on the base of created sequence it will be proved that for each x
2n

the nlim
→∞
Fn( x) exists.

To prove this, I will use the Weierstrass’ theorem which states that a monotonic bounded

1 1 1 1
sequence has a limit. Since Fn(x) = f0(x) + f1(x) + … + fn(x) ≤ + + … + n+1 = 1 - n+1 < 1,
2 4 2 2

the sequence has boundaries. Therefore, nlim


→∞
Fn(x) exists. If this limit is designed as F (x), a

function F will be determined along the entire axis. It is periodic, with period of one, 0 ≤ F(x)

k
≤ 1 for all x є R. The graph of this function is symmetrical to every line x є , where k є Z.
2

It is impossible to build a graph of this function but on the pictures 8 and 9 it is shown how

the point where it has angles accumulate.

F1
F2
f0 F1

f1 F2
1
1 8 1

Picture 8: sum of functions f0 and f1 Picture 9: sum of functions f0, f1 and f2

2.6 Prove of non-differentiability of Takagi-van der Waerden function

To prove non-differentiability of the function proof by contradiction method will be used,

that is why we can assume that F '(x0) exists.


10

First, I will look at a random point that is located in between of two sharp angles, in which

derivative blatantly does not exist, so that it separates created segment in two halves:

sk s k +1
k+1
< x0<
z 2k +1

sk
The first point k+1 will be called α k and the second one will be called β k , therefore we can say
z

that: α k < x 0< β k . From this it can be stated that:

lim α k =lim β k = x
k→∞ k →∞ 0

β k −x 0
Since β k - x 0 < β k - α k , if we try to fine the result of the equation: will be in the terms
β k −α k

of 0 and 1, therefore we get a new expression:

β k −x 0
0¿ <1
β k −α k

With the same way another expression can be get as well:

x 0−α k
0¿ <1
β k – αk

After I will construct and solve an equation which will help to prove non-differentiability of

the function later:

F ( β k )−F (α k )
- F ' (x 0 )
βk – α k

At the end of calculations (Appendix 1) the result will look like this:

lim F ( β k )−F (α k )
k →∞ - F ' (x 0 ) = 0
βk – α k

And therefore:
11

lim F ( β k )−F (α k )
k →∞ = F '( x0 )
βk – α k

If the left side of this equation is interpreted as a sum of terms it will look like this:

f 0 ( 2 β k ) −f 0 ( 2 α k )
i i
F ( β k )−F (α k ) n
=∑ , where i∈ Z ; k ∈ Z
βk – α k i=0
i
2 (β k −α k )

For i>k : 2i−k−1 ∈ Z , that is why it is possible to count:

f 0 ( 2 α k ) =f 0 2
i
( ) i

2
Sk
k+1
=f 0 ( 2
i−k−1
× S k ) =0

f 0 ( 2 β k ) =f 0 2
i
( i S k +1
2
k+1 )=f 0 ( 2
i−k−1
× S k+1 ) =0

So that when n → ∞ we get that:

F ( β k )−F (α k ) k 1 f 0 ( 2i β k ) −f 0 ( 2i α k )
=∑ i ×
βk – α k i=0 2 (β k −α k )

For i≤ k :

f 0 ( 2 β k )−f 0 ( 2 α k )
i i

=
f0
( ) ( )
2
S k+ 1
k +1−i
−f
0 2
S k
k+1−i

i
2 (β k −α k ) 1
k+1−i
2

From this it can be concluded that: x ∈ ¿]

The relation -
f0 ( ) ( )
2
Sk +1
k +1−i
−f
0 2
k S
k+1−i
– is an equation of tangent line of the 45 ° line and with
1
2k+1−i

the help of pictures 7 and 8 it is possible to see that it equals 1 or -1.

That is why we can get:

F ( β k )−F (α k )
= p ×1+ q ×(−1), where p+q=k + 1
βk – α k
12

Now there are two possible options of the sign of the of k:

F ( β k )−F ( α k )
If k −even → is alsoan even number
βk – α k

F ( β k )−F ( α k )
If k −odd → is also an odd number
β k – αk

F ( β k )−F ( α k )
Since there is now one precise sign for , it can be concluded that
β k – αk

lim F ( β k )−F (α k )
k →∞ does not exist and there the Takagi-van der Waerden function is a non-
βk – α k

differentiable function.

Analysis of market chart using fractal economics

3.1 Fractal market hypothesis

Since after the first economical example of fractal, researchers did not have any other

appropriate data, available for scientific analysis, no new intensive studies were done until

1990.

In 1991 Edgar Peters formalized fractal market hypothesis (FMH) within the framework

of chaos theory to explain the heterogeneity of investors with respect to their investment

horizons. (Blackledge, 2012)

The FMH proposes that:

 The market is stable when it consists of investors covering the large number of

investment horizons (investment horizon is the term used to describe the total

length of time that an investor expects to hold a security or a portfolio.) which

ensures that there is ample liquidity for traders


13

 Information is more related to market sentiment and technical factors in the short

term than in the long term – as investment horizons increase and longer-term

fundamental information dominates

 If an event occurs that puts the validity of fundamental information in question, long-

term investors either withdraw completely on invest on shorter terms.

 Prices reflect a combination of short-term technical and long-term fundamental

valuation and thus, short-term price movements are likely to be more behavior

 If a security has no tie to the economic cycle, then there will be no long-term trend

and short-term technical information will dominate.

In other words, there is a pattern of fluctuations of the price on the free market, but it can

occur only till a particular time period. It means that on the short-term period market chart

shows the properties of fractal but on the long-term does not.

3.2 Finding a patter on the market chart graphs in different periods of time

To analyze how FMH works I will take a look at the example of market chart of one of the

most well-known cryptocurrencies – Bitcoin. (Bitcoin USD (BTC-USD), 2023)

Picture 10: market chart of Bitcoin over time period of 2018 - 2022
The picture 10 shows price fluctuations of Bitcoin over time period of five years (2018-2022).

At some points it is already possible to notice patterns which occur in 2019, 2020, 2021 and
14

2022, they are highlighted with red squares on the picture. Even though they can be

“stretched” for different time periods, in all these situations price goes twice up, then down,

up, and down again.

After this when the data is zoomed in to 1 year it will reveal a lot of additional information

and it is possible to see much more precise price fluctuations.

Picture 11: market chart of Bitcoin over time period of March 2022 – January 2023
Picture represents price fluctuation over the year of 2022. At the place where the found

patter occurred on the previous picture, now we can see it being a few times.

Picture 12: market chart of Bitcoin over time period of the 3 rd of January 2023
Now the price is zoomed in till one day and we can see how it was changing from 7:00 till

11:30 on the 2nd of January 2023. Moreover, the pattern of two upper, one down, one upper,

and them one down fractal still exists on this very short time period scale. This is evidence of
15

how the market chart has a tendency for self-similar recreation during the process of

zooming it in. This is one of the properties inherent in fractals.

Another vital characteristic of fractal functions in non- differentiability. The non-

differentiability of market chart can be shown with the help of Takagi–van der Waerden

function.

Picture 12: comparison of market chart of Bitcoin and Takagi-van der Waerden function

From the first view, the can seem different but looking more precisely it is possible to notice

that they both have a tendency for self-similarity at the point where function reaches its

peak values. Even though the market chart function does not fully repeat the first one we

can still see their similar structure of them: significant growth, small falls, small growth and

at the end significant fall. In other words, them having two “heels”.

But the most vital feature they both possess is that they are jump functions. As it was

previously examined and proved Takagi–van der Waerden function is constituent only from

angles and therefore it cannot be differentiated at any point. But also, since the price

changes happen over every time period, and it never goes smooth it can be stated that both

functions are non-differentiable.

Moreover, neither the Takagi-van der Waeden not the market chart functions have a limit in

zooming in; so, they can be infinitely zoomed in but still have the “sharp” changes in their

values.
16

3.3 Candlesticks on the market charts

Candlesticks are a way of representing market chart. They help to show emotions of treaders

by visually representing the size of price moves with different colours. Candlesticks are

useful because they show four price points: open, close, high, and low. A candlestick has a

vide which is called “real body”. It represents the difference between the open and close

price of the trading period. If a candlestick is filed or red, it means that the close price was

lower than the open price; if it is empty or green, it means than the close price was higher

than the open price.

There is a very similar concept to candlesticks in mathematics, what is one more evidence of

the tight connection of economics and mathematics. This concept is Box-and-Whisker plot.

High price High price Lower quartile Upper quartile


Median
Open price Close price
Min Max

Whisker Whisker

Close price Open price Box

Low price Low price The range

Picture 13: structure of candlestiks Piture 14: structure of box-and-whisker plot

On the pictures 13 and 14 it is possible to see that both, candesticks and box-and-whisker plot have

the maximum value, minimum value and the box which represents the range.

3.4 Fractals in economics

When candlesticks are connected together, they construct fractals. Fractals refer to the

concept of a recurring pattern that occurs amid larger more chaotic price movements.


17

Fractals are composed of five or more bars or sticks. There are two types of fractals repeat

themselves:

 A bearish fractal: turning point occurs when there is a pattern with the highest high

in the middle and two lower highs on either side.

 A bullish fractal: turning point occurs when there is a pattern with the lowest low in

the middle and two higher lows on each side.

Fractals can consist out of different numbers of candlesticks; while those can have different

range and minimum, maximum values. The ones represented on picture 15 are perfect

version of fractals.

Picture 15: bearish and bullish fractals

Each market chart graph can be easily turned into an accumulation of these fractals. One the

examples is shown on the picture 16.

Picture 16: market chart of Bitcoin using candlesticks


As it is possible to notice the price fluctuation that were used to find pattens correspond

with the fractals formed by candlesticks. It is easier and more effective to use the
18

candlesticks fractal picture because with their help we can precisely see how price changes

now and prognose the future how the patterns will repeat themselves in future.

Conclusion

The investigation lead on this paper is aiming to show that with the help of fractal economics

it is possible to analyze price changes of any good or service. During the research I carried

out I successfully managed to show that thought use of fractals we can find patterns on the

market chart and prognose at which points they can occur.

I started the essay with mathematics part where I investigated non-differentiable function,

their construction, and proofs. It also helped me to understand the market fractal theory I

used after. The next and the most important part of the essay was economical analysis. It

appeared to be more difficult than mathematics because it is not obvious how to apply the

obtained knowledge in order to achieve goal of the essay.

The limitedness of my knowledge in mathematics and economics could cause some

uncertainties in my research. Another problem could be the insufficient amount of data I had

to make the research. One more limitation of the investigation is that only one example was

used to proof my theory. Therefore, if looking at other goods’ price changes the fractal

patters could not occur.

The results of my investigation clearly demonstrate that there is a connection between non-

differentiable functions and fractals. Moreover, with their help it is possible to find patters in

economic charts. Even though it is very difficult to prognose the future price changes we can

see that the found patters will repeat themselves on every time scale. It can be aid

economists to understand the falls and rises of the price in the future.
19

Appendix 1

F ( β k )−F ( α k )
β k – αk (
β −x F ( β k ) −F ( x 0 )
−F' ( x 0 )= k 0
βk – α k β k −x0 )
−F' ( x 0 ) + 0 k
βk – α k(
x −α F ( x 0 ) −F ( α k )
x0 −α k )
−F ' ( x 0 ) =
F ( β k )−F ( x 0 ) β k −
βk – α k

βk –

References
Allaart, P. C. (2014). On the level sets of the Takagi–van der Waerden functions. Journal of
Mathematical Analysis and Applications, 1168-1180.

Benoit Mandelbrot. (2023, 02 03). Retrieved from Wikipedia:


https://en.wikipedia.org/wiki/Benoit_Mandelbrot

Bitcoin USD (BTC-USD). (2023). Retrieved from Yahoo Finance: https://finance.yahoo.com/chart/BTC-


USD?
showOptin=1#eyJpbnRlcnZhbCI6IndlZWsiLCJwZXJpb2RpY2l0eSI6MSwidGltZVVuaXQiOm51bG
wsImNhbmRsZVdpZHRoIjoyLjE0MTYxMjIwMDQzNTcyOTYsImZsaXBwZWQiOmZhbHNlLCJ2b2
x1bWVVbmRlcmxheSI6dHJ1ZSwiYWRqIjp0cnVlLCJjcm9zc2hhaXIiOnRydWUsImN

Blackledge, J. (2012). The fractal market hypothesis: applications to financial forecasting.


https://www.academia.edu/59699980/The_fractal_market_hypothesis_applications_to_fina
ncial_forecasting.

fractal. (2023, 01 12). Retrieved from wikipedia: https://en.wikipedia.org/wiki/Fractal

Mathematics: analysis and approaches. (2019). Oxford: Oxford university press.


20

Non-differentiable function. (2020, 05 22). Retrieved from Encyclopedia of mathematics:


https://encyclopediaofmath.org/wiki/Main_Page

Waerden, B. L. (1977). Algebra: Volume .


https://archive.org/details/algebra01waer/page/n17/mode/2up: Frederik Ungar publishing
co.

Weierstrass function. (2023, 01 14). Retrieved from Wikipedia:


https://en.wikipedia.org/wiki/Weierstrass_function

You might also like