Random Fractal Signals

Random Fractal Signals

Chapter 17 Random Fractal Signals Many signals observed in nature are random fractals. Random fractals are signals that exhibit the same statistics a...

9MB Sizes 4 Downloads 200 Views

Chapter 17

Random Fractal Signals Many signals observed in nature are random fractals. Random fractals are signals that exhibit the same statistics at different scales. In other words, they are signals whose frequency distribution (Probability Distribution Function or PDF) has the same 'shape' irrespective of the scale over which they are observed. Thus, random fractal signals are (statistically) self-similar; they 'look the same' (in a stochastic sense) at different scales. We can define this property as follows: Suppose that s(t) is a statistically selfsimilar stochastic field with a PDF denoted by Pr[s(t)], then, if A is a scaling parameter,

APr[s(t)]

=

Pr[s(At)].

Here, the PDF of the signal S(At) observed over a scale of A is a scaled down version of the PDF of s(t) (i.e. the PDF of s(t) is multiplied by A). More generally, random fractal signals are statistically self-affine, conforming to the property

AqPr[s(t)]

=

Pr[s(At)], q > O.

Such signals are characterized by power spectra whose frequency distribution is proportional to l/w q where w is the (angular) frequency and q > 0 is the 'Fourier Dimension' (a value that is simply related to the 'Fractal Dimension' and is discussed later on in this chapter). In cases where the signal is governed by a stationary process, the value of q is constant. However, when the process is non-stationary and (random) fractal, the value of q may change. Such signals are common; they are examples of multi-fractal behaviour and finding a theoretical basis for modelling and interpreting such signals is important in many areas of science and engineering. In addition to the random fractal geometry of signals, there are a number of natural signals that can be considered to be the result of a chaotic process (time invariant or otherwise). Such systems can often be modelled in terms of deterministic chaos which is itself based on a variety of (typically iterative) models obtained from some nonlinear equation or system of equations. An important aspect of chaotic signals is that when the data as analysed in an appropriate way (in an appropriate phase space or using a so called Feigenbaum diagram - see Chapter 14), self-affine structures are observed. In this sense, there is a close connection between nonlinear (chaotic) systems 1 and 1 Not

all nonlinear systems exhibit chaos.

541

CHAPTER 17. RANDOM FRACTAL SIGNALS

542

fractal geometry; the geometric interpretation and characteristics of chaotic signals is typically undertaken in terms of their fractal geometry in an analogous approach to the way in which the interpretation and characteristics of linear signals is undertaken in terms of Euclidean geometry (e.g. plotting a graph!). In this chapter, the principles of fractal geometry are applied to fractal signal synthesis and analysis using an approach in which fractional calculus plays a central role. In particular, a non-stationary approach to simulating fractal signals is developed. Two case studies are provided which discuss the application of this approach to covert communications and financial time series analysis.

17.1

Introduction

Developing mathematical models to simulate and analyse noise has an important role in digital signal processing. Computer generated noise is routinely used to test the robustness of different types of algorithms (e.g. algorithms whose principal goal is to extract information from noise). Further, noise generators are used for data encryption and to enhance or amplify signals through the process of 'stochastic resonance', e.g. the correlation of noise with noise for information extraction Accurate statistical models for noise (e.g. the PDF or the Characteristic Function, i.e, the Fourier transform of the PDF) are particularly important in signal restoration using Bayesian estimation (see Chapter 15), for signal reconstruction and in the segmentation of coherent images in which 'speckle' (arguably a special type of noise, i.e. coherent Gaussian noise, which, to a first approximation, is Gamma distributed) is a prominent feature. The noise characteristics of a given system often dictate the type of filters that are used to process and analyse the data. Noise simulation is also important in the synthesis of signals and images used in computer graphics and computer animation systems in which fractal noise has a special place. The application of fractal geometry for modelling naturally occurring signals is well known. This is due to the fact that the 'statistics' and spectral characteristics of Random Scaling Fractals (RSFs) are consistent with many objects found in nature, a characteristic that is compounded in the term 'statistical self-affinity'. This term refers to random processes whose statistics are scale invariant. A RSF signal is one whose PDF remains the same irrespective of the scale over which the signal is sampled. Thus, as we zoom into a RSF signal, although the time signature changes, the PDF of the signal remains the same (a scaled down version of the 'original') and a concept that is aptly compounded in the Chinese proverb: 'In every way one can see the shape of the sea '. There is another presumably Chinese proverb concerning this theme that aptly describes human beings that exhibit self-affine personalities, namely, 'He who goes to work with hole in pocket, feel cocky all day'. Many signals found in nature are statistically self-affine. For example, speech signals tend to exhibit the characteristics of RSFs as do other signals such as financial time series, seismic signals and music (irrespective of the culture from which it has been derived). The incredible range of vastly different systems which exhibit random fractal behaviour is leading the scientific community to consider statistical self-affinity to be a universal law, a law that is particularly evident in systems which are undergoing a phase transition.

17.1. INTRODUCTION

543

In a stable state, the behaviour of the elements from which a system is composed depends primarily on their local neighbours and the statistics of the system is not self-affine. In a critical state, the elements become connected, propagating 'order' throughout the system in the sense that the statistical characteristics of the system are self-affine with 'system wide' correlations. This is more to do with the connectivity of the elements than the elements themselves. (Critical states can of course be stable in the dynamical sense.) Moreover, critical states appear to be governed by the power law System(size) ex

1 -'-q

SIze

where q > 0 is a non-integer. Here, the term 'System' is a generic term representative of some definable parameter that can be measured experimentally over different scales of a certain 'size'. This power law is the principal 'signature' that the system is behaving in a statistically self-affine way. There are a wide variety of examples which demonstrate this power law. For example, the growth rate of companies tends to diminishes with size, irrespective of the type of business being conducted; typical US companies are characterized by q E [0.7,0.9]. This also applies to the death rate of companies, i.e. those that are forced into liquidation. The frequency of the creation and extinction of species (as revealed through a growing number of fossil records) is starting to indicate that the pattern of fitness for survival is statistically self-affine. The distribution of base pairs in DNA is statistically self-affine, i.e. the frequency of occurrence of Adenine-Thymine and Cytosine-Guanine in a DNA molecule is the same at different scales. DNA is in effect, a self-affine bit stream. The power law given above which governs so many of natures signals and systems is a universal law. However, to date, there is no general mechanism or deeper understanding through which this law can be derived. It is like Newton's universal law of gravitation in which two bodies exert a force upon each other which is inversely proportional to the square of the distance between them and, like Newton's law (and other universal physical laws), although complex in its action, it is beautifully simple in its pattern. Thus, in introducing this power law, it is worth reflecting on Newton's response to criticism over his theory of gravitation: ' ... I have told you how it works, not why'. Conventional RSF models are based on stationary processes in which the 'statistics' of the signal are invariant of time. However, many signals exhibit non-stationary behaviour. In addition, many signals exhibit episodes which are rare but extreme (sudden changes in amplitude and/or frequency), events which are statistically inconsistent with the 'normal' behaviour of the signal. These episodes include so-called Levy flights in cases when the statistics of a signal conform to that of a Levy distribution; a power-law distribution of the type l/x H q , 0 < q < 2 that is used to investigate the 'strange kinetics' of systems undergoing phase transitions including hot plasmas, super-fluids, super-conducting materials and economic systems. In this chapter, a model is developed which attempts to unify these features of stochasticism using a phenomenological approach. The model is based on a modification to the stochastic diffusion equation in which a fractional temporal derivative to an order q(t) is introduced. By considering a model for the PDF of q(t), a solution is derived which allows a stochastic field to be computed that is fractal, non-stationary and where the likelihood of events called 'Brownian flights' (effects which are analo-

544

CHAPTER 17. RANDOM FRACTAL SIGNALS

gous to Levy-type flights) can be altered via the PDF. The following section gives a brief overview of the different aspects of stochasticism which form the background to the postulation and analysis of this model.

17.2

Stochastic Modelling Revisited

There are two principal criteria used to define the characteristics of a stochastic field: (i) The PDF or the Characteristic Function (i.e. the Fourier transform of the PDF).

(ii) The Power Spectral Density Function (PSDF). The PSDF is the function that describes the envelope or shape of the power spectrum of the field and is related to the autocorrelation function of a signal through the autocorrelation theorem. In this sense, the PSDF is a measure of the time correlations of a signal. For example, zero-mean white Gaussian noise is a stochastic field characterized by a PSDF that is effectively constant over all frequencies and has a PDF with a Gaussian profile whose mean is zero. Stochastic fields can of course be characterized using transforms other than the Fourier transform (from which the PSDF is obtained). However, the conventional PDF-PSDF approach serves many purposes in stochastic signals theory. There are two conventional approaches to simulating a stochastic field. The first of these is based on predicting the PDF (or the Characteristic Function) theoretically (if possible). A pseudo random number generator is then designed whose output provides a discrete stochastic field that is characteristic of the predicted PDF. For example, a Gaussian pseudo random number generator can be designed using the Box-Muller transformation operating on uniform deviates (see Chapter 14). The second approach is based on considering the PSDF of a signal which, like the PDF, is ideally derived theoretically. The stochastic field is then typically simulated by filtering white noise. Many stochastic fields observed in nature have two fundamental properties: (i) the PSDF is determined by irrational power laws, i.e. 1/ the (angular) frequency and q > 0;

I w Iq

noise where w is

(ii) the field is statistical self-affine. (iii) the PDF is Levy-type distributed.

What is a good stochastic model? A 'good' stochastic model is one that accurately predicts both the PDF and the PSDF of the data. It should take into account the fact that in general, stochastic processes are non-stationary. In addition, it should, if appropriate, include behaviour that is characteristic of fractal walks and be able to produce rare but extreme events in which large deviations from the norm occur - effects that might be considered analogous to, but not necessarily formally related to Levy flights. Note that although we refer to Levy flights and/or distributions, such references should be taken to be qualitative in nature and are being used only in terms of introducing an analogy to a strictly well

17.2. STOCHASTIC MODELLING REVISITED

545

defined process or term (i.e. Levy flight or Levy distribution respectively) which can yield analogous or similar effects. Note there is no connection between the theoretical prediction and/or the experimental determination of the PDF and the PSDF, i.e. there is no direct relationship between the characteristics of the Fourier transform of a stochastic field and the Fourier transform of the PDF of the same field - one cannot compute directly the PDF of a stochastic field from its PSDF or the PSDF from its PDF. Levy Flights and Distributions Named after the French mathematician Paul Levy (1886-1971), Levy flights are random walks whose distribution has infinite moments. The statistics of (conventional) physical systems are usually concerned with stochastic fields that have PDFs where (at least) the first two moments (the mean and variance) are well defined and finite. Levy statistics is concerned with statistical systems where all the moments (starting with the mean) are infinite. Many distributions exist where the mean and variance are finite but are not representative of the process, e.g. the tail of the distribution is significant, where rare but extreme events occur. These distributions include Levy distributions. Levy's original approach/ (which was developed in the late 1930s) to deriving such distributions is based on the following question: Under what circumstances does the distribution associated with a random walk of a few steps look the same as the distribution after many steps (except for scaling)? This question is effectively the same as asking under what circumstances do we obtain a random walk that is statistically self-affine. For a 1D random walk, the characteristic function P(k) of such a distribution p(x) was first shown by Levy to be given by (for symmetric distributions only)

P(k) = exp( -a I k

Iq),

0
where a is a (positive) constant. If q = 0,

p(x)

~ 27f

=

CXJ

J

exp( -a) exp(ikx)dk = exp( -a)5(x)

-CXJ

and the distribution is concentrated solely at the origin as described by the delta function 5(x). When q = 1, the Cauchy distribution

p(x) =

2~

CXJ

J

exp( ~a 1k I) exp(ikx)dk =

~ a2: x 2

-CXJ

is obtained and when q = 2, p(x) is characterized by the Gaussian distribution

p(x) = -1JCXJ exp( -ak 2) exp(ikx)dk = ~

-CXJ

1~- exp[-x 2/(4a)],

~

a

2p Levy was the research supervisor of B Mandelbrot, the 'inventor' of 'fractal geometry'

CHAPTER 17. RANDOM FRACTAL SIGNALS

546

whose first and second moments are finite. The Cauchy distribution has a relatively long tail compared with the Gaussian distribution and a stochastic field described by a Cauchy distribution is likely to have more extreme variations when compared to a Gaussian distributed field. For values of q between 0 and 2, Levy's characteristic function corresponds to a PDF of the form

p(x)

1

~x 1+ q

for I x I>> 1. For q ?: 2, the second moment of this distribution exists and the sums of large numbers of independent trials are Gaussian. For example, if the result were a random walk with a step length distribution governed by this PDF, then the result would be normal (Gaussian) diffusion, or Brownian motion. For q < 2 the second moment of this PDF (the mean square), diverges and the characteristic scale of the walk is lost. This type of random walk is called a fractal walk, or a Levy flight. Figure 17.1 shows 10,000 steps for such a walk with q = 1.5. The statistics of the walk conform to a Levy distribution rather than a Gaussian. In this way, Levy distributions are a generalization of Gaussian distributions that include infinite variance and therefore fractal scaling behaviour. Levy distributions offer a better description of random fields with long PDF tails although infinite variance is not always observed (or the variance is very slow to converge).

200

/

-4001

~.~ ~yt.;,

-600!

-800

-1000 -200

t/

0

200

400

600

Figure 17.1: A Levy flight with p(x) ex x-1.5

800

1000

17.3. FRACTIONAL CALCULUS

17.3

547

Fractional Calculus

In a famous letter from l'Hospital to Leibnitz written in 1695, l'Hospital asked the following question: 'Given that d n f / di" exists for all integer n, what if n be ~'. The reply from Leibnitz was all the more interesting: 'It will lead to a paradox ... From this paradox, one day useful consequences will be drawn'. Fractional calculus has been studied for many years by some of the great names of mathematics since the development of (integer) calculus in the late seventeenth century. Relatively few papers and books exist on such a naturally important subject. However, a study of the works in this area of mathematics clearly show that the ideas used to define a fractional differential and a fractional integral are based on definitions which are in effect, little more than generalizations of results obtained using integer calculus. The classical fractional integral operators are the Riemann-Liouville transform

J t

,

1

I'' f(t) = r(q)

f(T) - dr, q > 0 (t - T )1 q

-00

and the Weyl transform

J 00

i« 1 I f(t) - r(q)

f(T) (t _ T)l_qdT,

q>O

t

where

J 00

r(q)

=

t

q- 1

exp( -t)dt.

o For integer values of q (i.e. when q = n where n is a non-negative integer), the Riemann-Liouville transform reduces to the standard Riemann integral. This transform is just a (causal) convolution of the function f(t) with t q- 1/r(q). For fractional differentiation, we can perform a fractional integration of appropriate order and then differentiate to an appropriate integer order. The reason for this is that direct fractional differentiation can lead to divergent integrals. Thus, the fractional differential operator t» for q > 0 is given by

Another (conventional) approach to defining a fractional differential operator is based on using the formula for nth order differentiation (obtained by considering the definitions for the first, second, third etc. differentials using backward differencing) and then generalising the formula by replacing n with q. This approach provides us with the result

CHAPTER 17. RANDOM FRACTAL SIGNALS

548

A review of this result shows that for q = 1, this is a point process but for other values it is not, i.e, the evaluation of a fractional differential operator depends on the history of the function in question. Thus, unlike an integer differential operator, a fractional differential operator has 'memory'. Although the memory of this process fades, it does not do so quickly enough to allow truncation of the series in order to retain acceptable accuracy. The concept of memory association can also be seen from the result

where

J t

jq-n f(t)

= __1----,r(n - q)

f(T)

(t -

n- q>0

dr

T)1+q-n

'

-00

in which the value of [a-» f(t) at a point t depends on the behaviour of f(t) from q -00 to t via a convolution with the kernel t n - /f(q). The convolution process is of course dependent on the history of the function f(t) for a given kernel and thus, in this context, we can consider a fractional derivative defined via the result above to have memory.

17.3.1

The Laplace Transform and the Half Integrator

It informative at this point to consider the application of the Laplace transform to identify an ideal integrator and then a half integrator. The Laplace transform is given by (see Chapter 5)

J 00

L[f(t)] '= F(p)

f(t) exp( -pt)dt

=

a and from this result we can derive the transform of a derivative given by

L[f'(t)]

=

pF(p) - f(O)

and the transform of an integral given by

L

[!

1

f(T)dT] = p-F(p).

Now, suppose we have a standard time invariant linear system whose input is f(t) and whose output is given by

s(t)

f(t) 0 g(t)

=

where the convolution is causal, i.e. t

s(t)

=

J

f(T)g(t - T)dT.

a

17.3. FRACTIONAL CALCULUS

549

Suppose we let

g(t)

=

H(t)

{I,

=

0;

t> t < O.

0,

Then, G(p) = l/p and the system becomes an ideal integrator: t

s(t) = f(t) ® H(t) =

t

J

J

o

0

f(t - T)dT =

f(T)dT.

Now, consider the case when we have a time invariant linear system with an impulse response function by given by

{I0,t 1-

t _ H(t) _ g( ) - Vi The output of this system is is f ® 9 ® g. Now

f

J o

t > 0; t < O.

® 9 and the output of such a system with input

J Vi

t

g(t) ® g(t) =

1 2 / ,

dr Vi/f=T =

[1 (

2xdx = 2 sin~ T t - TXt - x2

f

®9

Vi X

ri

Vt

)]

0

=

tt .

0

Hence,

H(t) ® H(t)

Vri

H(t)

=

Vri

and the system defined by the impulse response function H (t) / Vri represents a 'halfintegrator' with a Laplace transform given by

L [H(t)] Vri

=

~.

vP

This result provides an approach to working with fractional integrators and/or differentiators using the Laplace transform. Fractional differential and integral operators can be defined and used in a similar manner to those associated with conventional or integer order calculus and we now provide an overview of such operators.

17.3.2

Operators of Integer Order

The following operators are all well-defined, at least with respect to all test functions u(t) say which are (i) infinitely differentiable and (ii) of compact support (i.e. vanish outside some finite interval). Integral Operator: t

iu(t) == flu(t) =

J

u(T)dT.

-00

Differential Operator:

Du(t) ==

b 1 u(t ) = u'(t).

CHAPTER 17. RANDOM FRACTAL SIGNALS

550 Identify Operator:

jOu(t) = u(t) = fJOu(t). Now, t

j[fJu](t)

=

J

u'(T)dT

U(t)

=

-00

and

J t

D[Iu](t) = A

A

d dt

U(T)dT = u(t)

-00

so that For n (integer) order: t

J

jnu(t) =

Tl

J J T2

dTn-l ...

-00

dTl

u(T)dT,

-00-00

and

17.3.3

Convolution Representation

Consider the function t~-l(t)

=1 t

Iq-l H(t) =

1q- 1 '

t

{l0,

t>O', t < O.

which, for any q > 0 defines a function that is locally integrable. We can then define an integral of order n in terms of a convolution as

jnu(t)

=

(u ® (n

~ I)! t~-l) (t) =

(n

~ I)!

t

J

(t - T)n-lu(T)dT

-00

J t

1 (n - I)!

Tn-1U(t - T)dT

-00

In particular,

J t

j1u(t) = (u ® H)(t) =

u(T)dT.

-00

17.3. FRACTIONAL CALCULUS

551

These are classical (absolutely convergent) integrals and the identity operator admits a formal convolution representation, using the delta function, i.e.

J 00

jOu(t)

8(T)U(t - T)dT

=

-00

where

8(t) = fJH(t). Similarly,

J 00

fJnu(t) == j-nu(t) =

<5 Cn ) (T)U(t -

T)dT = uCn)(t).

-00

On the basis of the material discussed above, we can now formally extend the integral operator to fractional order and consider the operator t

00

jqu(t)

=

r(q)

J

U(T)tr1(t - T)dT =

r(q)

-00

JU(T)t~~l(t

- T)dT

-00

where

J 00

r(q) =

t

q- 1

exp( -t)dt, q > 0

°

with the fundamental property that

r(q + 1) = qr(q). Here, Iq is an operator representing a time invariant linear system with impulse response function 1 (t) and transfer function 1/ pq. For the cascade connection of jql and jq2 we have

tr

jql[jq2U(t)]

=

jql+q2 U(t).

This classical convolution integral representation holds for all real q > 0 (and formally for q = 0, with the delta function playing the role of an impulse function and with a transfer function equal to the constant 1).

17.3.4

Fractional Differentiation

For 0 < q < 1, if we define the (Riemann-Liouville ) derivative of order q as

then,

fJqu(t) = r(1

1_

t

q)

J

(t - T)-qU'(T)dT == jl-qu'(t).

-00

CHAPTER 17. RANDOM FRACTAL SIGNALS

552 Hence,

jq[bqu] = jq[fl-qu'] = flu' = u and

i» is the formal inverse of the operator t«.

Given any q > 0, we can always write

A = n - 1 + q and then define

D" is an operator representing a time invariant linear system consisting of a cascade combination of an ideal differentiator and a fractional integrator of order 1 - q. For D)., we replace the single ideal differentiator by n such that t

bOu(t) =

J

rt1) :t

00

u(T)dT = u(t) ==

-00

and n

bnu(t) =

J -00

J

J

t

1

1d + -

00

U(T)<5 Cnl(t - T)dT.

u(T)dT = uCnl(t) ==

r(1) dt n + 1

U(T)<5(t - T)dT

-00

-00

In addition to the conventional and classical definitions of fractional derivatives and integrals, more general definitions have recently been developed including the Erdelyi-Kober operators, hypergeometric operators and operators involving other special functions such as the Maijer G-function and the Fox H-function. Moreover, all such operators leading to a fractional integral of the Riemann-Liouville type and the Weyl type would appear (through induction) to have the general forms

J t

jqf(t)

=

t q- 1

<[>

(~) T-qf(T)dT

-00

and

J 00

jq f(t) =



<[>

(~) Tq- 1 f(T)dT

t

respectively, where the kernel <[> is an arbitrary continuous function so that the integrals above make sense in sufficiently large functional spaces. Although there are a number of approaches that can be used to define a fractional differential/integral, there is one particular definition, which in terms of its 'ease of use' and wide ranging applications, is of significant value and is based on the Fourier transform, i.e. d f(t) -d tq

J 00

q

= -1

21f

(iw)qF(w)exp(iwt)dw,

-00


00

-00

where F(w) is the Fourier transform of f(t). When q = 1,2,3... , this definition reduces to a well known result that is trivial to derive in which for example, the 'filter' iw

17.3. FRACTIONAL CALCULUS

553

(for the case when q = 1) is referred to as a 'differentiator'. When q < 0, we have a definition for the fractional integral where, in the case of q = -1 for example, the filter (iw)-l is an 'integrator'. When q = we just have f(t) expressed in terms of its Fourier transform F(w). This Fourier based definition of a fractional derivative can be extended further to include a definition for a 'fractional Laplacean' \7q where for n dimensions q \7q == - (2~)n dnkk exp(ik· r), k =1 k I

°

J

are r is an n-dimensional vector. This is the fractional Riesz operator. It is designed to provide a result that is compatible with the case of q = 2 for n > 1, i.e. \72 <¢==? _k 2 (which is the reason for introducing the negative sign). Another equally valid generalization is \;7Q

==

(2~)n

J

dnk(ik)q exp(ik· r),

k

=1 k I

which introduces a q dependent phase factor of Jrq/2 into the operator. In general terms, although it is possible to compute fractional integral and differential operators using the results discussed above, neither a fractional differential (or a fractional integral) operator appear to have a geometric and/or physical interpretation unlike an integer differential, which can be considered to be a map of the gradient of a piecewise continuous function (for which a picture can be drawn at any point by zooming into the function and arguing that over a small enough portion of the function, a straight line can be considered which has a definable gradient). However, when generalized functions are introduced, the concept of definable gradients requires attention and generalized functions such as the delta function b(t) are only defined properly in terms of the role they play in certain transforms, e.g. the sampling property of the delta function. There have been some attempts to develop a geometric interpretation of a fractional differential and/or integral operator. In the few published works that consider this problem, relationships have been explored between fractional calculus and fractal geometry using a few specific examples and in some cases, it has been concluded that no direct relationship between fractional calculus and fractal geometry has yet been established. Thus, the establishment of a proper geometrical interpretation of a fractional derivative is still 'up for grabs' and we arrive at a rather fundamental and open question: Is there a geometrical representation of a fractional derivative? If not, can one prove that a graphical representation of a fractional derivative does not exist? The general consensus of opinion is that there is no simple geometrical interpretation of a derivative of fractional order and that if there is, then as Virginia Kiryakova concludes in her book on 'Generalized Fractional Calculus and Applications', '... it is likely to be found in our fractal world'. An approach to quantifying the relationship between a fractal object and fractional calculus is through a parametric approach. Consider a fractal object with a well defined Fourier dimension which is composed of an infinite set of points in the plane defined by the coordinates functions [x(t), y(t)] where t E [0,1]. This parametric representation of the fractal consists of the independent signals x(t) and y(t). If the spectra of x(t) and y(t) are characterized by a PSDF of the type (iw)-q then, by inference, they are signals that can be represented in terms of the Riemann-Liouville or fractional integral transform. Thus, through the geometrical parametrization of deterministic

CHAPTER 17. RANDOM FRACTAL SIGNALS

554

fractal objects we can represent such objects in terms of a signal or set of signals which have self-affine properties that can be expressed via a fractional integral. In principle, the signal obtained should have a Fourier dimension that is independent of the parametrization that is applied (uniform, chord length, arc length etc.).

17.3.5

Fractional Dynamics

Mathematical modelling using (time dependent) fractional Partial Differential Equations (PDEs) is generally known as fractional dynamics. A number of works have shown a close relationship between fractional diffusion equations of the type (where p is the space-time dependent PDF and T is the generalized diffusivity)

and f)

,;1Qp -

T

mP = 0,

0 < q ::::: 2

and continuous time random walks with either temporal or spatial scale invariance (fractal walks). Fractional diffusion equations of this type have been shown to produce a framework for the description of anomalous diffusion phenomena and Levy-type behaviour. In addition, certain classes of fractional differential equations are known to yield Levy-type distributions. For example, the normalized one-sided Levy-type PDF

_

~ exp(-alx)

P (x ) - f(q)

xl+ q

,a> 0, x> 0

is a solution of the fractional integral equation

where

J X

A_

I

q

_

1

p(x) - r(q)

p(y) (x _ y)l_qdY,

q

> o.

o Another example involves the solution to the anomalous diffusion equation

Fourier transforming this equation and using the fractional Riesz operator defined previously, we have f)

mP(k,t)

=

1 --:;.kqp(k,t)

which has the general solution P(k, t)

= exp( -t I k Iq IT), t > O.

17.3. FRACTIONAL CALCULUS

555

Comparing this result with

P(k) = exp( -a I k

q I

),

0
<2

we recognise the characteristic function of a Levy distribution with a = t.]«, This analysis can be extended further by considering a fractal based generalization of the Fokker-Planck-Kolmogorov (FPK) equation

aq

af3

atqP(x, t) = ax f3 [s(x)p(x, t)] where s is an arbitrary function and 0 < q :::; 1, 0 < (3 :::; 2. This equation is referred to as the fractal FPK equation; the standard FPK equation is of course recovered for q = 1 and (3 = 2. The characteristic function associated with p(x, t) is given by

where a is a constant which again, defines a Levy distribution. Finally, d-dimensional fractional master equations of the type (for example)

aq

atqP(r, t)

=

L w(r ~ s)p(s, t),

0 < q :::; 1

s

can be used to model non-equilibrium phase transitions where p denotes the probability of finding the diffusing entity at a position r E R d at time t (assuming that it was at the origin r = 0 at time t = 0) and ware the fractional transition rates which measure the propensity for a displacement r in units of 1I (time)". These equations conform to the general theory of continuous time random walks and provide models for random walks of fractal time. A study of the work on fractional dynamics reveals that the fractional PDEs proposed are being solved through application of the Fourier based definition of a fractional differential operator. One could therefore argue that such equations are being 'invented' to yield a desired result in Fourier space (e.g. the characteristic function for a Levy distribution). Moreover, definitions of fractional derivatives are being considered in such a way that they lead to self-consistent results for the integer case (e.g. the Riesz definition of a fractional Laplacean). In this sense, taking well known PDEs and 'fractionalising' them in such a way that a Fourier transform yields the desired result might justifiably be considered as an example of phenomenology at its worst. It is clearly more desirable to derive a PDE from basic principles (based on the known physical laws) and then solve the equation using appropriate solution methods (some of which are based on certain integral transforms including the Fourier transform). On the other hand, there are a number of important PDEs whose form is based on postulation alone and cannot be derived or proved but nevertheless yield remarkably accurate models for the behaviour of a physical system informed by experiment, e.g. the Schrodinger equation and the Dirac field equations. However, the measurable quantity is not always that for which a solution can be derived. Referring to the following table,

CHAPTER 17. RANDOM FRACTAL SIGNALS

556 Name

Basic operator

Solution variable

Diffusion equation Schrodinger equation Wave equation

\72 _ JL \72 + f~ at \72 - &2 a2

u(r, t) u(r, t) u(r, t)

Experimental measurable u(r, t) 2 1 u(r, t) 1 u(r, t) or I u(r, t) 12

we note that the diffusion and wave equations can be derived rigorously from a range of fundamental physical laws (Fourier's law of thermal conduction, conservation of mass, conservation of momentum, the continuity equation, Newton's laws of motion, Maxwell's equations and so on) but that Schrodinger's equation is phenomenological. Further, although we can solve Schrodinger's equation for the field variable, the probability wave u, we can only ever measure u 2 (the probability of the occur r and time t). This feature is analogous to the approach that follows, where the phenomenological operator'' 1

2

1

8 q (t )

\7 - - atq(t)

is introduced and solved for the non-stationary variable u(r, t) where only Pr[u(r, t)] can be measured experimentally (Pr[u(r, t)] denotes the space-time PDF of u).

17.4

Non-stationary Fractional Dynamic Model

A common theme associated with the fractional dynamic models discussed in the previous section is that they describe stationary random processes in terms of solutions to a PDE. Here, we postulate a PDE whose characteristics incorporate behaviour that describes non-stationary fractal walks and Levy-type flights in terms of a solution to the stochastic field itself rather than its PDF. Also, as will be discussed later, within the context of the solution proposed, these so called Levy-type flights are actually the result of randomly introducing Brownian noise over a short period of time into an otherwise non-stationary fractal signal. In this sense, they have nothing to do with Levy flights as such, but produce results that may be considered to be analogous to them. We call these effects 'Brownian transients' which have longer time correlations than fractal noise. Suppose we consider an inhomogeneous fractal diffusion equation of the form

8

2

[

8x 2

-

T

8q]

8t q u(x, t) = F(x, t), 0 < q :::: 1

where T is a constant, F is a stochastic source term with some PDF and u is the stochastic field whose solution we require. When q = 1 we obtain the diffusion equation but in general, a solution to this equation will provide stationary temporal fractal walks - random walks of fractal time. One way of introducing a (first order) non-stationary process is to consider a source term of the form F[x, t, a(x), p(t)] where a and p are arbitrary functions. For example, suppose that we write F in separable form F(x, t) = f(x)n(t) and that n(t) is a random variable of time with a normal or 3First postulated by Dr S Mikhailov, a former research student of the author

17.4. NON-STATIONARY FRACTIONAL DYNAMIC MODEL

557

Gaussian PDF given by

where f1 and a are the mean and standard deviation respectively. By letting f1 and/or a be functions of t, we can introduce time variations in the mean and/or standard deviation respectively. In this case, varying the mean will cause the range of n(t) to change with time and varying the standard deviation will change the variance of n(t) with time. Note that in this case, the form of the distribution of the field remains the same, it is a time varying Gaussian field. A more general statement of a non-stationary stochastic process is one in which the distribution itself changes with time. Another way of introducing non-stationarity is through q by letting it become a function of time t. Suppose that in addition to this, we extend the range of q to include the values 0 and 2 so that 0 :.:: q :.:: 2. This idea immediately leads us to an interesting consequence because with q in this range, we can choose q = 1 to yield the (stochastic) diffusion equation but also choose q = 2 to obtain an entirely different equation, namely, the (stochastic) wave equation. Choosing (quite arbitrarily) q to be in this range, leads to control over the basic physical characteristics of the equation so that we can define a static mode when q = 0, a diffusive mode when q = 1 and a propagative mode when q = 2. In this case, non-stationarity is introduced through the use of a time varying fractional derivative whose values modify the physical 'essence' of the equation. Since the range of q has been chosen arbitrarily, we generalize further and consider the equation a2

[

ax 2

aq(t) ] - Tq(t) atq(t)

u(x, t)

=

F(x, t),

-00

< q(t) <

00,

'Vt.

Now, when q = 0 'Vt, the time dependent behaviour is determined by the source function alone; when q = 1 'Vt, u describes a diffusive process where T is the 'diffusivity' (the inverse of the coefficient of diffusion); when q = 2 we have a propagative process where T is the 'slowness' (the inverse of the wave speed). The latter process should be expected to 'propagate information' more rapidly than a diffusive process leading to transients or 'flights' of some type. We refer to q as the Fourier dimension which, for a fractal signal, is related to the conventional definition of the fractal (i.e. the 'Similarity', 'Minkowksi' or 'Box Counting') dimension D by q

=

5-2D 2

1

< D < 2.

How Should we Choose q(t)?

Since q(t) 'drives' the non-stationary behaviour of u, the way in which we model q(t) is crucial. It is arguable that the changes in the statistical characteristics of u which lead to its non-stationary behaviour should in themselves be random. Thus, suppose that we let the Fourier dimension at a time t be chosen randomly, a randomness that is determined by some PDF. In this case, the non-stationary characteristics of u will be determined by the PDF (and associated parameters) alone. Also, since q is

CHAPTER 17. RANDOM FRACTAL SIGNALS

558

a dimension, we can consider our model to be based on the 'statistics of dimension'. There are a variety of PDFs that can be applied which will in turn effect the range of q. By varying the exact nature of the distribution considered, we can 'drive' the non-stationary behaviour of u in different ways. For example, suppose we consider a system which is assumed to be primarily diffusive; then a 'normal' PDF of the type Pr[q(t)]

=

1

r.>= uy27f

exp[-(q - 1)2/2u 2],

-00


00

will ensure that u is entirely diffusive when o ----+ O. However, as a is increased in value, the likelihood of q = 2 (and q = 0) becomes larger. In other words, the standard deviation provides control over the likelihood of the process becoming propagative. If for example, we consider a Gamma distribution given by Pr[q(t)]

1

1

= (3c< f(a)qc<-l ex p(_q/(3), q 2" 0

where a > 0 and (3 > 0, then q lies in the positive half space alone with mean and variance given by J-l = a(3 and u 2 = a(32

respectively. PDFs could also be considered which are of compact support such as the Beta distribution given by P [ (t)] = f(a + (3) c<-1(1_ ){3-1 0 < q < 1 r q f(a)f((3) q q, where a and (3 are positive constants. Here, the mean and variance are a

J-l = a

a(3

2

+ (3

and a = (a

+ (3)2(a + (3 + 1)

respectively and for a > 1 and (3 > 1 there is a unique mode given by mode

=Pr[q(t)]max =

a-I

(3

a+ +2

Irrespective of the type of distribution that is considered, the equation (j2 aq(t) ] [ ax 2 - yq(t) atq(t) u(x, t) = F(x, t),

-00

< q(t) <

00,

'Vt

poses a fundamental problem which is how to define and work with the term

aq(t) atq(t) u(x, t). Given the result (for constant q) q

a 1 ",u(x,t) = -27f utq

f

00

-00

(iw)qU(x,w)exp(iwt)dw,

-00


00

17.5. GREEN'S FUNCTION SOLUTION

559

we might generalize as follows:

J. 00

aq(t) _ 1 atq(t)u(x,t) - 2n

q(t) . (zw) U(x,w)exp(zwt)dw.

-00

However, if we consider the case where the Fourier dimension is a relatively slowly varying function of t, then we can legitimately consider q(t) to be composed of a sequence of different states qi = q(ti)' This approach allows us to develop a stationary solution for a fixed q over a fixed period of time. Non-stationary behaviour can then be introduced by using the same solution for different values or 'quanta' qi over fixed (or varying) periods of time and concatenating the solutions for all qi'

17.5

Green's Function Solution

We consider a Green's function solution to the equation

a2 aq(t) ] [ ax 2 - Tq(t) atq(t) u(x, t)

=

F(x, t),

-00

< q(t) < 00, Vt

for constant q when F(x, t) = f(x)n(t) where f(x) and n(t) are both stochastic functions. Applying a separation of variables here is not strictly necessary. However, it yields a solution in which the terms affecting the temporal behaviour of u(x, t) are clearly identifiable. Thus, we require a general solution to the equation

q) qa a2 T at ax q u(x, t) 2 (

=

f(x)n(t).

Let

J

J

00

u(x,t) =

~ 2n

00

U(x,w)exp(iwt)dw, and n(t) =

-00

~ 2n

N(w)exp(iwt)dw.

-00

Then, using the result

J 00

q

aq u(x,t) = -1 -a t 2n

U(x,w)(iw)qexp(iwt)dw

-00

this fractional PDE transforms to

a2 ) ( ax 2 + Sl; U(x,w)

=

f(x)N(w)

where we shall take

Slq = i(iwT)~ and ignore the case for Slq = -i(iwT)~. Defining the Green's function g to be the solution of

CHAPTER 17. RANDOM FRACTAL SIGNALS

560

(::2 + f2~)

g(X I XO,W)

=

6(x - xo)

where 6 is the delta function, we obtain the following solution:

J 00

U(xo,w) = N(w)

g(x I xo,k)f(x)dx

-00

where

J 00

g(X,w)

1

= ~21f

exp(iuX) (u+f2

q)(u_f2q)du,

X

=1 x-xo I·

-00

The contour integral

J

exp(izX)

+ f2 q )(z -

fe (z

d

f2 q ) z

has complex poles at z = ±f2q which are q dependent (varying from ±i when q = 0, through to ±i(iwT)1/2 when q = 1 and on to =fWT when q = 2 for example). For any value of q, we can compute this contour integral using the residue theorem. By choosing the z plane for -00 < x < 00 and iO ::; iy < ioo where z = x + iy we obtain (through application of a semi-circular contour C and Cauchy's residue theorem)

g(x I xo,k)

~

=

2Hq

exp(m q I x-xo

I)

f2

under the assumption that q is finite. This result reduces to conventional solutions for cases when q = 1 (diffusion equation) and q = 2 (wave equation) as shall now be shown. Wave Equation Solution

When q = 2, the Green's function defined above provides a solution for the outgoing Green's function. Thus, with 2 = -WT, we have

f2

J . 00

N(w) U(xo,w) = .2ZWT

exp( -ZWT I x - Xo I)f(x)dx

-00

and Fourier inverting we get

u(xo, t)

1

2T

Joo dxf(x)1 Joo 21f

-00

J

dxf(x)

-00

ZW

-00

00

2~

N(w). - .- exp( -ZWT I x - Xo

t

J

n(t - T I x - Xo I)dt

-00

. I) exp(zwt)dw

17.5. GREEN'S FUNCTION SOLUTION

561

which describes the propagation of a wave travelling at velocity 1jT subject to variations in space and time as defined by f(x) and n(t) respectively. For example, when f and n are both delta functions,

u(xo,t)

1

-H(t-T 1x-xo I) 2T

=

where H is the Heaviside step function defined by

H(y)

{1,

> 0; 0, y < o.

=

y

This is a d'Alembertian type solution to the wave equation where the wavefront occurs at t = T I x - Xo I in the causal case.

Diffusion Equation Solution When q = 1 and [21 = iViwT,

J

J

00

u(xo, t)

1

00

1

dxf(x)-

= 2

exp( -ViWT I x - Xo I)

v'iWT ZWT

27l'

N(w) exp(iwt)dw.

-00

-(Xl

For p = iw, we can write this result in terms of a Bromwich integral (i.e. an inverse Laplace transform) and using the convolution theorem for Laplace transforms with the result c-l-zoo

J

exp( -ayP)

yP

c-iCXJ

exp(pt)dp

=

1 Ci

Y7l't

exp[-a 2j(4t)],

we obtain

J

1r,:;

2 yT

J t

00

u ( xo, t ) --

dx f('x )

exp[-T(Xorzi: - X)2 j( 4to)] n (t - to )dto. y7l'to

0

-00

Now, if for example, we consider the case when n is a delta function, the result reduces to

J 00

u(xo, t) =

~

2Y7l'Tt

f(x)H(t) exp[-T(XO - x)2 j(4t)]dx, t

----+ 00

-00

which describes classical diffusion in terms of the convolution of an initial source f(x) (introduced at time t = 0) with a Gaussian function.

General Series Solution The evaluation of u(xo, t) via direct Fourier inversion for arbitrary values of q is not possible due to the irrational nature of the exponential function exp(i[2q I x - Xo [) with respect to w. To obtain a general solution, we use the series representation of the exponential function and write

CHAPTER 17. RANDOM FRACTAL SIGNALS

562

U( Xo,W )

~ s:

iMoN(w) [ D 1+

=

2

(iOq)m Mm(X O) ] , M

°

m.

m=l

q

where

J 00

f(x) I x - Xo

Mm(xo) =

l" dx.

-00

We can now Fourier invert term by term to develop a series solution. This requires us to consider three distinct cases.

Case 1: q

=

0

Evaluation of u(xo, t) in this case is trivial since

M(xo) M(xo) U(xo,w) = -2-N(w) or u(xo, t) = -2-n(t) where

J 00

M(xo) =

exp( -

Ix -

Xo I)f(x)dx.

-00

Case 2: q > 0 Fourier inverting, the first term in this series becomes

J 00

1 27f

iN(w)Mo D exp(iwt)dw 2

q

J 00

u;

1 -'I 272 27f

N(w) exp(zwt)dw . (ZW)2

-.--'1

-00

-00

J t

Mo

1

2T~ r(q/2)

n(~)

(t _ ~)l-(q/2) d~, Re[q] > O.

o The second term is

J

.

00

1 -M-1 2 27f

Ml N(w) exp(zwt)dw = --n(t). 2

-00

The third term is •

--I -

J 00

zM2 1 2.2. 27f

q

'I

N(w)i(iwT) 2 exp(iwt)dw

-00

and the fourth and fifth terms become

=

(1

M2T2 d2 -22' ----;rn(t) . . dt 2

563

17.5. GREEN'S FUNCTION SOLUTION

J 00

3 1 M, 2.3. 27f

q

q

N(w)i 2(iwT)q exp(iwt)dw

M 3T d 2.3. t

= - - - I -d n(t) q

-00

and

J

3q

00

M4 1 i-,2.4. 27f

3:3'L

N(w)i (iWT)

2

3fJ

M 4T 2 d2 exp(iwt)dw = --,---eqn(t) 2.4.

dt2

-00

respectively with similar results for all other terms. Thus, through induction, we can write u(xo, t) as a series of the form

u(xo, t)

Observe that the first term involves a fractional integral, the second term is composed of the source function n(t) alone (apart from scaling) and the third term is an infinite series composed of fractional differentials of increasing order kq/2. Also note that the first term is scaled by a factor involving T- q / 2 whereas the third term is scaled by a factor that includes Tkq/2.

Case 3: q

<0

In this case, the first term becomes

J

J

00

1 27f

-

00

iN(w)Mo 2

nq

exp(iwt)dw

J1vl0 'I - 1 -T2 2

27f

N(w)(iw)'I'I exp(iwt)dw

-00

-00

M o 'I d~ -T2-n(t). 2

dt~

The second term is the same is in the previous case (for q > 0) and the third term is

J

J t

00

iM2 1 - 2.21 27f

N(w)i. M2 1 1 (iWT)~ exp(zwt)dw = 2.21 Tq/2 f(q/2)

n(~) (t _ ~)l-(q/2) d~.

0

-00

Evaluating the other terms, by induction we obtain

u(xo, t)

M O(XO)T q/2 dq/2 M 1(xo) 2 dtq/2 n(t) 2 n(t) 00

1~(-1)k+1Mk+l(XO) 1 '2 L (k + I)! Tkq/2 f(kq/2)

k=l

+

J t

0

n(~)

(t _ ~)l-(kq/2) d~

CHAPTER 17. RANDOM FRACTAL SIGNALS

564

where q == I q I, q < O. Here, the solution is composed of three terms: a fractional differential, the source term and an infinite series of fractional integrals of order kq/2. Thus, the roles of fractional differentiation and fractional integration are reversed as q changes from being greater than to less than zero. N.B. all fractional differential operators associated with the equations above and hence forth should be considered in terms of the definition for a fractional differential given by fJq f(t)

= ~: [i n - q f(t)], n -

q

> O.

Asymptotic Forms for f(x) = o(x)

We consider a special case in which the source function f(x) is an impulse so that

J 00

Mm(xo)

=

o(x) I x - Xo

l'" dx =1

Xo

l'" .

-00

This result immediately suggests a study of the asymptotic solution 1

1

2T'J!2 rcqj2)

u(t) = lim u(xo, t) =!':..ill xo--+o

{

2

Tq/2

'

t

n(~)

J (t-~)'

°

(,,/2) d~,

q

.

> 0,

- O',

q-

dq / 2

-2-dt'j/2n(t),

q
The solution for the time variations of the stochastic field u for q > 0 are then given by a fractional integral alone and for q < 0 by a fractional differential alone. In particular, for q > 0, we see that the solution is based on a causal convolution. Thus in t-space 1

u(t)

1

= 2T qj 2f(q/2) t 1- qj 2 ®

n(t),

q> 0

where ® denotes (causal) convolution and in w-space

U(w) =

N(w)

2Tqj2 (iw )qj2'

This result is the conventional fractal noise model. The table below quantifies the results for different values of q with conventional name associations. Note that u has the following fundamental property (for q > 0): ,\,qj 2 Pr[u(t )] =

Pr[u('\'t)].

This property describes the statistical self-affinity of u. Thus, the asymptotic solution considered here, yields a result that describes a RSF signal characterized by a PSDF of the form 1/ I w lq which is a measure of the time correlations in the signal.

17.6. DIGITAL ALGORITHMS q-value

q=O q=1

565

t-space

w-space (PSDF)

Name

!n(t)

I

White noise

4"

2 fti(1/2)

~ ® n(t)

t

q=2

2T~(1) J n(t)dt

q>2

2T
1

°

1

Pink noise

4T 2W 2

1

Brown noise

1

Black noise

4Tlwl

t(q/2)-1 ® (t) n

4T'llwl<1

Table 17.1: Noise characteristics for different values of q. (Note that f(1/2) and I'(I ) = 1.)

= y1r

Other Asymptotic Forms Another interesting asymptotic form is

Here, the solution is the sum of fractal noise and white noise. By relaxing the condition T -+ we can consider the approximation

°

J t

U(xo, t)

Mo(xo) 1 2Tq/2 f( q/2) M1(xo) () 2 n t

n(~) de (t - ~)l-(q/2) <,-

°

+

q/ 2 M 2(xo) q/2 d () 2.2! T dt q/ 2 nt, T

<< 1

in which the solution is expressed in terms of the sum of fractal noise, white noise and the fractional differentiation of white noise.

17.6

Digital Algorithms

There are two principal algorithms that are required to investigate the results given in the previous section using a digital computer. The first of these concerns the computation of discrete fractal noise Uj given q which is as follows: (i) Compute a pseudo random zero mean (Gaussian) distributed array nj,

j =

0,1, ... ,N - 1. (ii) Compute the Discrete Fourier Transform (DFT) of nj giving N j using a Fast Fourier Transform (FFT). (iii) Filter N, with 1/(iwj)q/2. (iv) Inverse DFT the result using a FFT to give Uj (real part).

CHAPTER 17. RANDOM FRACTAL SIGNALS

566

The second algorithm is an inversion algorithm. Given the digital algorithm described above, the inverse problem can be defined as given Uj compute q. A suitable approach to solving this problem, which is consistent with the algorithm given above is to estimate q from the power spectrum of Uj whose expected form (considering the positive half space only and excluding the DC component which is singular) is

A

A

Pj=q;

wj

j=1,2, ...,(N/2)-1

where A is a constant. Here, we assume that the FFT provides data in 'standard form' and that the DC or zero frequency component occurs at j = O. If we now consider the error function

e(A,q) =

IllnPj

A

2

-lnPj l12

where Pj is the power spectrum of Uj, then the solution of the equations (least squares method)

ae

aq = 0;

ae

aA = 0

gives

q=

and

A =exp

(

N~l- l ln pj + q (N;~l-llnWj) N

"2 -1

.

The algorithm required to implement this inverse solution is as follows: (i) Compute the power spectrum Pj of the fractal noise Uj using an FFT. (ii) Extract the positive half space data (excluding the DC term). (iii) Compute q This algorithm (which is commonly known as the Power Spectrum Method) provides a reconstruction for q which is (on average) accurate to 2 decimal places for N ~ 64.

17.7

Non-stationary Algorithm

The results considered so far have been based on the assumption that the Fourier dimension is constant. We have considered the case of q(t) having discrete states

17.7. NON-STATIONARY ALGORITHM

567

qi

= q(ti) assuming that q(t) is a slowly varying function. In this case, the solutions and algorithms discussed so far are valid for any qi, i = 0,1,2, ... , M - 1 over a window of time l:i.ti say, which is taken to be composed of N - 1 elements. A nonstationary signal can therefore be generated by computing M - 1 signals each of size N - 1 and concatenating the results to form a contiguous stream of data of size (M - 1) x (N - 1) to give Uj' A further generalization can be made by choosing l:i.ti randomly. An interesting approach to this is based on letting l:i.ti be a fractal signal so that the stochastic behaviour of Uj is governed by fractal time. Following the ideas discussed in the section on 'how should we choose q(t)?', qi can be taken to be a discrete random variable which is chosen to conform to a discrete PDF or histogram. For example, we can consider the 'normal' distribution given by

Pr[q(t)] =

1

rn= exp[-(q - 1)2/20.2],

ay27T

-00


00

'V t.

Here, the distribution is symmetric about q = 1; pink noise characterising a diffusive process.

Continuity Condition The short time integration of white noise that occurs when q = 2 can lead to a significant change in the range of values of Uj' This type of behaviour is called a Brownian transient. A time series generated for different values of q may be composed of Brownian transients that 'look like' spikes. These spikes may be of arbitrary polarity given that n(t) is zero-mean white Gaussian noise. An example of this is given in Figure 17.2 where a fractal signal has been simulated using two values of q, namely, 1 (for points 1 to 500 and 516 to 1000) and 2 (for points 501 to 515). The complex plane map obtained through application of the Hilbert transform is also given for comparison illustrating the concentration of the stochastic field over one center of this plane. Suppose we wish to simulate a non-stationary signal whose mean value changes from time to time. One way of doing this is to let the mean value vary according to the amplitude obtained at the end of a transient (where q changes from one value to the next). This provides continuity in the mean value from one transient to another. An example of this is given in Figure 17.3 for the same stochastic field illustrated in Figure 17.2. The effect of the continuity condition is to simulate a multi-fractal signal with a much broader distribution where Brownian transients in particular, change the mean value over a short period of time. This is compounded in the complex plane representation of the signal which now shows two centers of activity with a transitory path (Brownian transient) between them. The effect of introducing this is further illustrated in Figures 17.4 to 17.8. Here q is chosen from a Gaussian distribution with a mean of 1 and the standard deviation increased from 0 to 4 in steps of 1 providing multi-random-fractal non-stationary signals with increasingly transient behaviour and consequently, broader distributions. The positions at which these transients occur together with their directions and amplitudes are entirely arbitrary and 'driven' by the Gaussian pseudo random number generators used to compute nj and qi which in turn depends on the seeds used to initiate these generators. Moreover, the likelihood of generating a Brownian transient is determined by the standard deviation of qi alone. This provides a method of

CHAPTER 17. RANDOM FRACTAL SIGNALS

568

modelling non-stationary fractal signals as found in a wide variety of areas such as in economic time series, biomedical signal analysis etc.

0.8

r-----,.----,--------,---,------.-----r---r-----,--------,-------,

0.6

0.8,-------,-----,.~============='======;_1

0.6

0.4 0.2

o -0.2 -0.4

0.8

-0.:-~'c:.6-----=:"-:------::-'~-----:':------=:"::------::-'...,-----.:-':=--------='

o

-0.2

-0.4

0.2

0.4

0.6

Figure 17.2: Non-stationary fractal signal (top) and complex plane map (bottom) for q = 1 and q = 2.

1.5

r-----,--------,---~---.-----.-----,------,,----,-----,-----,

1.5,---.----===:::=:;;;;;;:::'----.---:i-===--..-----,.----.--1 0.5

o -0.5 -1

-1.5 '-__-'---__-'--__--' -0.6

-0.4

-0.2

o

0.8

. L -_ _- - ' -_ _- , - L_ _- - - , J ~_ _. L . __ _~_ _- - l

0.2

0.4

0.6

1.2

1.4

Figure 17.3: Non-stationary fractal signal (top) and complex plane map (bottom) for q = 1 and q = 2 with application of the continuity condition.

569

17.7. NON-STATIONARY ALGORITHM 0.4 l),2

a -0.2 -0.4 0

1000

3000

2000

5000

4000

6000

7000

150

lUO

50

0 -U,4

-l),3

o

-U,1

-0.2

Figure 17.4: Mono-fractal signal (top) for and histogram (bottom).

(J

0.2

l),1

D,;;

= 0 (entirely diffusive with qi = 1,

0.4

'Vi)

0.5

0

-0.5

0

1000

2000

3000

4000

5000

6000

-02

a

0.2

04

0.6

O_B

150 100 50 0 -0.4

Figure 17.5: Multi-fractal signal (top) for

(J

= 1 and histogram (bottom).

7000

CHAPTER 17. RANDOM FRACTAL SIGNALS

570

0,5

o -0,5

1000

2000

3000

-0.4

·02

4000

5000

6000

7000

o

02

04

0.6

150

100

50

o L-_ _--'"__..._ -0.8

·0.0

Figure 17.6: Multi-fractal signal (top) for

(J

= 2 and histogram (bottom).

05

a -0.5

-1 .......- - -.......- - -........- - -........- - -.........- - - - - - ' - - - - - - - ' - - - - - - ' 1000 :<1000 3000 4000 5000 6000 7000 o 150

100

50

o l..-_ _--'-o.s

-0,6

_

·0,4

-0,2

Figure 17.7: Multi-fractal signal (top) for

o

(J

0.2

0,4

= 3 and histogram (bottom).

0.6

17.7. NON-STATIONARY ALGORITHM

571

0.5 0 -0.5

-,

1000

0

2000

3000

4000

5000

6000

7000

150

100

50

0 -0.8

-0.6

-0.4

-0.2

0

Figure 17.8: Multi-fractal signal (top) for

0.2

(J

0.4

0.6

0.8

= 4 and histogram (bottom).

Inverse Solution

The inverse solution is based on computing the variable Fourier dimension and then an appropriate time variant (or otherwise) statistic from it. For example, in the case of a time variant Gaussian distributed Fourier dimension, we compute the standard deviation using a moving window. In this case, for a given input signal Si say, the Fourier dimension function qi is computed using a moving window in which the power spectrum method is applied to the windowed data to produce a single value of the Fourier dimension for the window at position i. Having computed qi, the moving window principle is again invoked in which the windowed data is used to compute the standard deviation of the Fourier dimension under the assumption that the distribution of these values is Gaussian. In each case, the data are used to construct a histogram of qi and a least squares fit to a Gaussian function obtained from which the standard deviation is then computed. This produces the variable standard deviation function o; which provides a measure of the non-stationary nature of the original signal in terms of its propensity for propagative behaviour (i.e. Brownian transients). Applications

There are a wide variety of applications. For example, in medicine, there are a number of biomedical signals that can and should be analysed using multi-Fourier dimensional

572

CHAPTER 17. RANDOM FRACTAL SIGNALS

analysis. An interesting example concerns the behaviour of the heart rate prior to the on set of a heart attack. It is well known that the heart rate (measured in terms of the number of beats per minute Ii where i counts the minutes) is not constant but varies from one minute to the next. In other words, the heart rate signal Ii does not have a constant amplitude and if it is generated over a long enough period of time, starts to exhibit multi-fractal characteristics." For a healthy condition, the computation of qi from Ii yields a signal with a narrow (Gaussian) distribution and a well defined mean value and variance (of the type given in Figure 17.4). However, the behaviour of qi becomes significantly more erratic (leading to a broadening of a typically nonGaussian distribution similar to the type given in Figure 17.8 for example) prior to the onset of a heart attack. More importantly, this characteristic is observable up to 24 hours before the heart attack starts! Another example includes the use of multi-fractal statistics for developing a financial volatility index. It tuns out, that although the distribution of financial time series are not Gaussian, the Fourier dimensions of such time series are Gaussian distributed. Moreover, these Gaussian statistics are not time invariant, i.e. the standard deviation is a variable. Now, if the standard deviation increases then, based on the model considered here, there is an increased likelihood for either propagative behaviour (Brownian transients when q = 2) or white noise behaviour (when q = 0) indicative of the possibility of greater volatility of the time series. Thus, by monitoring the standard deviation of the Gaussian distributed Fourier dimension associated with a macro-economic time series, a measure can be introduced that attempts to predict market volatility. Finally, a method of covert communications can be consider based on the application of a process called fractal modulation which is discussed in further detail in the following case study.

17.8

General Stochastic Model

For a time invariant linear system, the power law I w I-q is consistent with statistically self-affine noise which is the basic model used so far. Many signals do have a high frequency decay for which the fractal model is appropriate but the overall spectrum may have characteristics for which a I w I-q power law is not appropriate. In such cases, it is often possible to apply a spectral partitioning algorithm which attempts to extract the most appropriate part of the spectrum for which this power law applies. There are of course a range of PSDF models that can be considered. One process of interest is the Bermann process where

A I W 2g (2 2) 1

P(w)

=

wo +w

which is a generalization of the Ornstein-Uhlenbeck process where

Aw

P(w) = (2 2) wo +w and stems from an attempt to overcome the difficulties of the non-differentiability associated with a Wiener process. Here, A is a constant, g > 0 and Wo is a constant 4Principal source: American Journal of Cardiology, from 1999 onwards.

17.9. CASE STUDY: FRACTAL MODULATION

573

frequency. Clearly, we can consider a further generalization and consider the PSDF

A I W 12g P(w) = (2 wo +w 2)' q This PSDF represents a more general fractal-type process and is less restrictive particularly with regard to the low frequency characteristics.

17.9

Case Study: Fractal Modulation

Embedding information in data whose properties and characteristics resemble those of the background noise of a transmission system is of particular interest in covert digital communications. In this case study", we explore a method of coding bit streams by modulating the fractal dimension of a fractal noise generator. Techniques for reconstructing the bit streams (i.e. solving the inverse problem) in the presence of additive noise (assumed to be introduced during the transmission phase) are then considered. This form of 'embedding information in noise' is of value in the transmission of information in situations when a communications link requires an extra level of security or when an increase in communications traffic needs to be hidden in a covert sense by coupling an increase in the background noise of a given area with appropriate disinformation (e.g. increased sun spot activity). Alternatively, the method can be considered to be just another layer of covert technology used for military communications in general. In principle, the method we develop here can be applied to any communications system and in the following section, a brief overview of existing techniques is discussed.

17.9.1

Secure Digital Communications

A digital communications systems is one that is based on transmitting and receiving bit streams. The basic processes involved are as follows: (i) a digital signal is obtained from sampling an analogue signal derived from some speech and/or video system; (ii) this signal (floating point stream) is converted into a binary signal consisting of Os and Is (bit stream); (iii) the bit stream is then modulated and transmitted; (iv) at reception, the transmitted signal is demodulated to recover the transmitted bit stream; (v) the (floating point) digital signal is reconstructed. Digital to analogue conversion may then be required depending on the type of technology being used. In the case of sensitive information, an additional step is required between stages (ii) and (iii) above where the bit stream is coded according to some classified algorithm. Appropriate decoding is then introduced between stages (iv) and (v) with suitable pre-processing to reduce the effects of transmission noise for example which introduces bit errors. The bit stream coding algorithm is typically based on a pseudo random number generator or nonlinear maps in chaotic regions of their phase spaces (chaotic number generation). The modulation technique is typically either Frequency Modulation or Phase Modulation. Frequency modulation involves assigning a specific frequency to each 0 in the bit stream and another higher (or lower) frequency to each 1 in the stream. The difference between the two frequencies is minimized to provide 5Based on the research of Dr S Mikhailov, a former research student of the author

574

CHAPTER 17. RANDOM FRACTAL SIGNALS

space for other channels within the available bandwidth. Phase modulation involves assigning a phase value (0, 7f/2, tt ; 37f/2) to one of four possible combinations that occur in a bit stream (i.e. 00, 11, 01 or 10). Scrambling methods can be introduced before binarization. A conventional approach to this is to distort the digital signal by adding random numbers to the outof-band components of its spectrum. The original signal is then recovered by lowpass filtering. This approach requires an enhanced bandwidth but is effective in the sense that the signal can be recovered from data with a relatively low signal-to-noise ratio. 'Spread spectrum' or 'frequency hopping' is used to spread the transmitted (e.g. frequency modulated) information over many different frequencies. Although spread spectrum communications use more bandwidth than necessary, by doing so, each communications system avoids interference with another because the transmissions are at such minimal power, with only spurts of data at anyone frequency. The emitted signals are so weak that they are almost imperceptible above background noise. This feature results in an added benefit of spread spectrum which is that eaves-dropping on a transmission is very difficult and in general, only the intended receiver may ever known that a transmission is taking place, the frequency hopping sequence being known only to the intended party. Direct sequencing, in which the transmitted information is mixed with a coded signal, is based on transmitting each bit of data at several different frequencies simultaneously, with both the transmitter and receiver synchronized to the same coded sequence. More sophisticated spread spectrum techniques include hybrid ones that leverage the best features of frequency hopping and direct sequencing as well as other ways to code data. These methods are particularly resistant to jamming, noise and multipath anomalies, a frequency dependent effect in which the signal is reflected from objects in urban and/or rural environments and from different atmospheric layers, introducing delays in the transmission that can confuse any unauthorized reception of the transmission. The purpose of Fractal Modulation is to try and make a bit stream 'look like' transmission noise (assumed to be fractal). The technique considered here focuses on the design of algorithms which encode a bit stream in terms of two fractal dimensions that can be combined to produce a fractal signal characteristic of transmission noise. Ultimately, fractal modulation can be considered to be an alternative to frequency modulation although requiring a significantly greater bandwidth for its operation. However, fractal modulation could relatively easily be used as an additional preprocessing security measure before transmission. The fractal modulated signal would then be binarized and the new bit stream fed into a conventional frequency modulated digital communications system albeit with a considerably reduced information throughput for a given bit rate. The problem is as follows: given an arbitrary binary code, convert it into a non-stationary fractal signal by modulating the fractal dimension in such a way that the original binary code can be recovered in the presence of additive noise with minimal bit errors. In terms of the theory discussed earlier, we consider a model of the type a2 aq(t) ] [ ax 2 - Tq(t) atq(t) u(x, t) = -<5(x)n(t),

q

> 0,

x -+ 0

where q(t) is assigned two states, namely ql and qz (which correspond to 0 and 1 in a bit stream respectively) for a fixed period of time. The forward problem (fractal

17.9. CASE STUDY: FRACTAL MODULATION

575

modulation) is then defined as: given q(t) compute u(t) == u(O, t). The inverse problem (fractal demodulation) is defined as: given u(t) compute q(t).

17.9.2

Fractal Modulation and Demodulation

Instead of working in terms of the Fourier dimension q, we shall consider the fractal dimension given by D = 5 - 2q 2 where D E (1,2). The technique is outlined below: (i) For a given bit stream, allocate

Dmin

to bit=O and

D m ax

to bit=1.

(ii) Compute a fractal signal of length N for each bit in the stream. (iii) Concatenate the results to produce a contiguous stream of fractal noise. The total number of samples can be increased through N (the number of samples per fractal) and/or increasing the number of fractals per bit. This results in improved estimates of the fractal dimensions leading to a more accurate reconstruction. Fractal demodulation is achieved by computing the fractal dimensions via the power spectrum method using a conventional moving window to provide the fractal dimension signature D i , i = 0,1,2,.... The bit stream is then obtained from the following algorithm: If o,

::; ~

then bit =0;

If o,

>

then bit =1;

~

where ~

=

1

D m in

+ 2(D m ax

-

D m in).

The principal criteria for the optimization of this modulation/demodulation technique is to minimize (D m ax - D m in) subject to accurate reconstructions for D; in the presence of (real) transmission noise with options on: (i) fractal size - the number of samples used to compute a fractal signal; (ii) fractals per bit - the number of fractal signals used to represent one bit; (iii) D m in (the fractal dimension for bit=O) and bit=l);

D m ax

(the fractal dimension for

(iv) addition of Gaussian noise before reconstruction for a given SNR. Option (iv) is based on the result compounded in the signal is taken to be the sum of fractal noise and white An example of a fractal modulated signal is given binary code 0.... 1.. .. 0.... has been considered in order to

asymptotic model where the Gaussian noise. in Figure 17.9 in which the illustrate the basic principle.

CHAPTER 17. RANDOM FRACTAL SIGNALS

576

1

,

.. 0 0

0.60 0.40 0.2:0

CODE

" "" ,"" ,

0.80

20

,'II

PAAAHETERS

I

,, ,,,

Fract:,a 1 :s i z e : 64 est: 64

"

"""

," , 10

,, ,,

I

30

40

50

6\'>

-------1- - - -

F ..-ac::t:als ...... Sit:: : ~st:

.1.

o

.:L

90

80

SIGNAL Hi d i .... e n s i o...... : 1.'90 es.t:: ..1-.90

.50

ClOde:

00000000000000 00000000000000

o

OO~~..I.~1.11111.1..J.. .1.1:J..111.1.1J...1~.1..1.1

1.1.11.1..1.1.1.1..1..1.1.1..1 00000000000000

00000000000000 00

Est:i.l"toate:

FRACTAL

00000000000000 000000000000.1.0 00.1.1..1..1..1..1..1..1..1.J...1..1.1..1..1...1..1...1...1.1..1..1..1...1..1..1. .1..I..1.1.J...1.0.1..1..1..1.1.1.1 00000000000000 00000000000000 00

DIMENSIONS

.•..

\

-

v

,

80

P.-eS5

Ent:er-

Figure 17.9: Fractal modulation of the code 0... 1...0 ... for one fractal per bit.

.1..00

PARAMETERS

0.80

F r a c t a l siZE!: 64 est: 6 4

0.60 0.40

F.-actal.s/Oit:: : 3 est: 3

20

30

40

50

60

o

80

90

SIGNAL 1-1 i

d i_ens ie..,: est: .1..90

.1. .. 9 0

Code: 00000000000000 00000000000000 00.1..1..1..1..1...1..1..1.1.1.1..1.

.1.J....1.1..1..1..1..1..1..1..1..1..1..1.1..I..J...1..1..1..J..1.J...1..1.~.1.J..

00000000000000 00000000000000

00 Est:i.Ma'te: 00000000000000 00000000000000 001~.1.1..1...l..lJ...l.1.1.1

.1.1.1.1.1.11.1.1.11.1.11 1.11..1.1.1111.1..1.1.1..1. 00000000000000 00000000000000 00

p

~

nt:

Figure 17.10: Fractal modulation of the code 0... 1...0 ... for three fractals per bit.

17.9. CASE STUDY: FRACTAL MODULATION

577

PARAMETERS

I

Fract:al 64

size:

e,s't:

64

I

d

o to~;;::~:;;::=:±======:!::===:::=:.::!=::::====::±.:::::====:'.:t:::::::====±::::=1LO""" .1.60 j Hens est: i 1 .n 6: 0

Hi

d i .....e nsior1l:

.1..90

est:

1.90

Code: 001.1.. O.J. 00.1..1 0.1.10 .11.1..1..111.1.01.1.00.1-

00.100.1.1.0011.1..1.1 0000.1000.1.1.0000 OJ. 0.1.000.1.

Est: i _ a t e : 00.1.10.1001.10.1.1.0 .1..1..1..1..1..1..1..100.1.00.100.1001.1.00.1.1..1.1..10000.1.000.1..1.0000 0.1.0.1.000.1.

200

100

"0

300

2"0

Figure 17.11: Fractal modulation of a random bit stream without additive noise.

PARAHETERS Fre:.ct:al size.: 64 est: 64

Hi. d i ...... n s i o n : .1..90 est: .1..90

Ccu:le: 00.1..1.0.100.1..1.0.1..1.0 .1.11.1..1.1..1..1.0.1100.1.

00.100.1.1.00.1..1..1..1..10000.1..000.1.1.0000 0.1.0.1.000.1.

Est:i_at:e: 00.110.1.00.1.1.0.1..1.0 J..1..1..1..1..1..1..1.0.1..1.00.1. 00.1...1.0.1..1.0011.1..1..1. 0000.1000.1..10000 OJ.. 0.1 0001

2:25

'

l

'.1.5~

.1.25 .1.00 0.75

' :"l t"

, '

'J.,

t

"0

\"

i i '. -

I

II ...L I '

,FRACTAL

fo ,

DI~~IHSl?~S

,. ~' ~ :,' , .~~wr~'l-:(t\.~~~ ,'1, I:

'('.II,,~'''I',.,_, n

9)1

100

I"f

~

,"''0

.'

I'

~"\(' ltr~

.'ft'!"

:11~Y.~·t,../~'·:I"J

.

",.

)1-

"•.•

U'(l ,.. ,~I ~. ~

r

~50

Figure 17.12: Fractal modulation of a random bit stream with 10% additive noise.

578

CHAPTER 17. RANDOM FRACTAL SIGNALS

This figure shows the original binary code (top window) the (clipped) fractal signal (middle window) and the fractal dimension signature D, (lower window - dotted line) using 1 fractal per bit, 64 samples per fractal for a 'Low dimension' (D m in ) and a 'Hi dimension' (D m ax ) of 1.1 and 1.9 respectively. The reconstructed code is superimposed on the original code (top window - dotted line) and the original and estimated codes are displayed on the right hand side. In this example, there is a 2% bit error. By increasing the number of fractals per bit so that the bit stream is represented by an increased number of samples, greater accuracy can be achieved. This is shown in Figure 17.10 where for 3 fractals/bit there are no bit errors. In this example, each bit is represented by concatenating 3 fractal signals each with 64 samples. The reconstruction is based on a moving window of size 64. In Figures 17.9 and 17.10, the change in signal texture from 0 to 1 and from 1 to 0 is relatively clear because (D m in , D m ax ) = (1.1,1.9). By reducing the difference in fractal dimension, the textural changes across the signal can be reduced. This is shown in Figure 17.11 for (D m in , D m ax ) = (1.6,1.9) and a random 64 bit pattern where there is 1 bit in error. Figure 17.12 shows the same result but with 10% white Gaussian noise added to the fractal modulated signal before demodulation. Note that the bit errors have not been increased as a result of adding 10% noise. Discussion

Fractal modulation is a technique which attempts to embed a bit stream in fractal noise by modulating the fractal dimension. The errors associated with recovering a bit stream are critically dependent on the SNR. The reconstruction algorithm provides relatively low bit error rates with a relatively high level of noise, provided the difference in fractal dimension is not too small and that many fractals per bit are used. In any application, the parameter settings would have to optimized with respect to a given transmission environment.

17.10

Case Study: Financial Signal Processing

In addition to the use of digital signal processing for a wide variety of applications ranging from medicine to mobile communications, DSP has started to play an increasing role in Computer Aided Financial Engineering". In this extended final case study, we explore the background to financial signal processing. By discussing many of the conventional approaches to market analysis and the reasoning behind these approaches, we develop a Multi-fractal Market Hypothesis based on the application of the non-stationary fractional dynamical model discussed earlier in this chapter. After a short introduction, we investigate market analysis based on the 'Efficient Market Hypothesis' leading to Black-Scholes analysis. The 'Fractal Market Hypothesis' is then considered using a form of data analysis based on the work of Hurst. Finally, a multi-fractal market hypothesis' is introduced together with some example results. 6Grateful acknowledgement is due to Dr M London, a former research student of the author and whose research forms the basis for this case study.

17.11.

17.11

INTRODUCTION

579

Introd uction

The application of statistical techniques for analysing time series and the financial markets in general is a well established practice. These practices include time series analysis and prediction using a wide range of stochastic modelling methods and the use of certain partial differential equations for describing financial systems (e.g. the Black-Scholes equation for financial derivatives). A seemingly inexhaustible range of statistical parameters are being developed to provide an increasingly complex portfolio of financial measures. The financial markets are a rich source of complex data. Changing every second or less, their behaviour is difficult to predict often leaving economists and politicians alike, baffled at events such as the crash of 15th October 1987 which lead to the recession of the late 1980s and early 1990s. This event is shown in Figure 17.13 which is the time series for the New York Average from 1980 to 1989.

200

150

100

500

1000

1500

2000

2500

3000

Figure 17.13: The New York Average or NYA from 1980-89, showing the crash of late 1987, the NYA being given as a function of the number of days with the crash occurring around the 2000 mark.

Attempts to develop stochastic models for financial time series (which are just digital signals or 'tick data') can be traced back to the late eighteenth century when Louis Bachelier, who studies under Henri Poincare (one of the first mathematicians to discuss the principles of chaotic dynamics) in Paris, proposed that fluctuations in the prices of stocks and shares could be viewed in terms of random walks. Bachelier's model (like many of those that have been developed since) failed to predict extreme behaviour in financial signals because of its assumption that such signals conform to Gaussian processes. A good stochastic financial model should ideally consider all the observable behaviour of the financial system it is attempting to model. It should therefore be able to provide some predictions on the immediate future behaviour of the system within an appropriate confidence level. Predicting the markets has become (for obvious reasons) one of the most important problems in financial engineering. Although

580

CHAPTER 17. RANDOM FRACTAL SIGNALS

in principle, it might be possible to model the behaviour of each individual agent operating in a financial market, the uncertainty principle should always be respected in that one can never be sure of obtaining all the necessary information required on the agents themselves and their modus operandi. This principle plays an increasingly important role as the scale of the financial system for which a model is required increases. Thus, while quasi-deterministic models can be of value in the understanding of micro-economic systems (with fixed or fuzzy 'operational conditions' for example), in an ever increasing global economy (in which the operational conditions associated with the fiscal policies of a given nation state are increasingly open), we can take advantage of the scale of the system to describe its behaviour in terms of functions of random variables. However, many economists, who like to believe that agents are rational and try to optimize their utility function (essentially, a trade off between profit and risk), are reluctant to accept a stochastic approach to modelling the markets claiming that it is 'an insult to the intelligence of the market(s)'. In trying to develop a stochastic financial model based on a macro-economy, it is still important to respect the fact that the so called global economy is actually currently controlled by three major trading centres (i.e. Tokyo, London and New York, the largest of which, in terms of the full complement of financial services offered is London). Politicians are also generally reluctant to accept a stochastic approach to financial modelling and forecasting. The idea that statistical self-affinity may by a universal law , and that the evolution of an economy and society in general could be the result of one enormous and continuing phase transition does little to add confidence to the worth and 'power spectrum' of politics (until politics itself is considered in the same light!). Nevertheless, since the early 1990s, fractal market analysis has been developed and used to study a wide range of financial time series. This includes different fractal measures such as the Hurst dimension, the Lyapunov exponent, the correlation dimension and multi-fractals. Ultimately, an economy depends on the confidence of those from which it is composed and although governments (and/or central or federal banks) have a variety of control parameters (interest rates being amongst the most important) with which to adjust the pace of economic growth or otherwise, there is no consensus on how to control and accurately define the term confidence.

17.12

The Efficient Market Hypothesis

The unpredictable (stochastic) nature of financial time series or signals is well known and the values of the major indices such as the FTSE (Financial Times Stock Exchange) in the UK, the Dow Jones in the US and the Nikkei Dow in Japan are frequently quoted. The most interesting and important aspects which can affect the global economy in a dramatic and short term way are apparently unpredictable and sudden markets crashes such as the one that took place on the 15th October 1987. In this section, we provide an extensive case study which builds up to the application of the fractional dynamic model discussed earlier in this chapter for multi-fractal financial analysis. A principal aim of investors is to attempt to obtain information that can provide some confidence in the immediate future of the stock markets based on patterns of the past. One of the principle components of this aim is based on the observation that there are 'waves within waves' and events with events that appear to permeate

17.12.

THE EFFICIENT MARKET HYPOTHESIS

581

financial signals when studied with sufficient detail and imagination. It is these repeating patterns that occupy both the financial investor and the systems modeller alike and it is clear that although economies have undergone many changes in the last one hundred years, the dynamics of market data have not changed considerably. For example, Figure 17.14 shows the build up to two different crashes, the one of 1987 given previously and that of 1997. The similarity in behaviour of these two signals is remarkable and is indicative of the quest to understand economic signals in terms of some universal phenomenon from which appropriate (macro) economic models can be generated.

1987 vs 1997

2.35

+-------------------------

----.,--

_

Data normalized to percent return

1.75

'87 data begins 12/84 +-------------------------,--.fI-'ViIII"!------t-I--'97 data begins 12/94 +------------------------."'-iIt------"If------l-:---

1.55

t-------------:;~a#i~'i4I~~L..L----------fJ--V-

1.95

1.35 + - - - - - - - - - - - F - ; ~ T - - - - - - - - - - - - - - - - - - - - -

1.15

+-----=-F-""=_""'=.....F L - - - - - - - - - - - - - - - - - - - - - - - -

Figure 17.14: The build up to the financial crashes of 1987 and 1997.

Random walk or Martingale models, which embody the notions of the so called Efficient Market Hypothesis (EMH) and successful arbitraging, have been the most popular models of financial time series since the work of Bachelier in 1900. The BlackScholes model (for which Scholes won a Nobel prize in economics) for valuing options is based on this approach and although Black-Scholes analysis is deterministic (one of the first approaches to achieve a determinism result), it is still based on the EMH. However, it has long been known that financial time series do not follow random walks. The shortcomings of the EMH model include: failure of the independence and Gaussian distribution of increments assumption, clustering, apparent non-stationarity and failure to explain momentous financial events such as crashes. These limitations have prompted a new class of methods for investigating time series obtained from a range of disciplines. For example, Re-scaled Range Analysis (RSRA), originally inspired by the work of Hurst on the Nile river discharges has turned out to be a powerful tool for revealing some well disguised properties of stochastic time series such as persistence, characterized by non-periodic cycles. Non-periodic cycles correspond to trends that persist for irregular periods but with some statistical regularity often caused by non-linear dynamical systems and chaos. RSRA is particularly valuable

582

CHAPTER 17. RANDOM FRACTAL SIGNALS

because of its robustness in the presence of noise. Ralph Elliott first reported the fractal properties of financial data in 1938. Elliott was the first to observed that segments of financial time series data of different sizes could be scaled in such a way, that they were statistically the same producing so called Elliot waves. Many different random fractal type models for price variation have been developed over the past decade based on iterated function/dynamic systems. These models capture many properties of the time series but are not based on any underlying causal theory. In economies, the distribution of stock returns and anomalies like market crashes emerge as a result of considerable complex interaction. In the analysis of financial time series, it is inevitable that assumptions need to be made to make the derivation of a model possible. This is the most vulnerable stage of the process. Over simplifying assumptions lead to unrealistic models. There are two main approaches to financial modelling: The first approach is to look at the statistics of market data and to derive a model based on an educated guess of the mechanics of market dynamics. The model can then be tested using real data. The idea is that this process of trial and error helps to develop the right theory of market dynamics. The alternative is to 'reduce' the problem and try to formulate a microscopic model such that the desired behaviour 'emerges', again, by guessing agents' strategic rules. This offers a natural framework for interpretation; the problem is that this knowledge may not help to make statements about the future unless some methods for describing the behaviour can be derived from it. Although individual elements of a system cannot be modelled with any certainty, global behaviour can sometimes be modelled in a statistical sense provided the system is complex enough in terms of its network of interconnection and interacting components. In complex systems, the elements adapt to the world -the aggregate pattern- they co-create. As the components react, the aggregate changes, as the aggregate changes the components react anew. Barring the reaching of some asymptotic state or equilibrium, complex systems keep evolving, producing seemingly stochastic or chaotic behaviour. Such systems arise naturally in the economy. Economic agents, be they banks, firms, or investors, continually adjust their market strategies to the macroscopic economy which their collective market strategies create. It is important to appreciate at this point, that there is an added layer of complexity within the economic community: Unlike many physical systems, economic elements (human agents) react with strategy and foresight (some of the time) by considering the implications of their actions although it is not certain whether this fact changes the resulting behaviour. What do complex systems have to do with fractals? The property of feedback is the very essence of both economic/complex systems and chaotic dynamical systems that produce fractal structures. The link between dynamical systems, chaos and the economy is an important one because it is dynamical systems that illustrate that local randomness and global determinism can co-exist. Complex systems can be split into two categories: equilibrium and non-equilibrium. Equilibrium complex systems, undergoing a phase transition, can lead to 'critical states' that often exhibit fractal structures. A simple example is the heating of ferromagnets, As the temperature rises, the atomic spins in the magnetic field gain energy and begin to change in direction. When the temperature reaches some critical value, the spins form a random vector field with mean zero and a phase transition occurs in which the magnetic field averages to zero. The statistics of this random field are scale invariant or fractal. Non-

17.13.

MARKET ANALYSIS

583

equilibrium complex systems or 'driven' systems give rise to 'self organised critical states', an example is the growing of sand piles. If sand is continuously supplied from above, the sand starts to pile up. Eventually, little avalanches will occur as the sand pile inevitably spreads outwards under the force of gravity. The temporal and spatial statistics of these avalanches are scale invariant. Financial markets can be considered to be non-equilibrium systems because they are constantly driven by transactions that occur as the result of new fundamental information about firms and businesses. They are complex systems because the market also responds to itself in a highly non-linear fashion, and would carryon doing so (at least for some time) in the absence of new information. This is where confusion commonly arises. The 'price change field' is highly non-linear and very sensitive to exogenous shocks and it is highly probable that all shocks have a long term affect. Market transactions generally occur globally at the rate of hundreds of thousands per second. It is the frequency and nature of these transactions that dictate stock market indices, just as it is the frequency and nature of the sand particles that dictates the statistics of the avalanches in a sand pile. These are all examples of random scaling fractals. Further, they are example of systems that often conform to Levy distributions discussed earlier in this chapter.

17.13

Market Analysis

In 1900, Louis Bachelier concluded that the price of a commodity today is the best estimate of its price in the future. The random behaviour of commodity prices was again noted by Working in 1934 in an analysis of time series data. Kendall (1953) attempted to find periodic cycles in indices of security and commodity prices but did not find any. Prices appeared to be yesterday's price plus some random change and he suggested that price changes were independent and that prices apparently followed random walks. The majority of financial research seemed to agree; asset price changes are random and independent, so prices follow random walks. Thus, the first model of price variation was just the sum of independent random numbers often referred to as Brownian motion (BM) after Robert Brown (1828) who studied the erratic movement of a small particle suspended in a fluid. Some time later, it was noticed that the size of price movements depends on the size of the price itself. The model was revised to include this proportionality effect, and so a new model was developed that stated that the log price changes should be Gaussian distributed. This behaviour can be described mathematically by a model of the form dS

S = adX + J-ldt where S is the price at time t, J-l is a drift term which reflects the average rate of growth of the asset, a is the volatility and dX is a sample from a normal distribution. In other words, the relative price change of an asset is equal to some random element plus some underlying trend component. More precisely, this model is a lognormal random walk. The Brownian motion model has the following important properties: 1. Statistical stationarity of price increments. Samples of Brownian motion taken

CHAPTER 17. RANDOM FRACTAL SIGNALS

584

over equal time increments can be superimposed onto each other in a statistical sense. 2. Scaling of price. Samples of Brownian motion corresponding to different time increments can be suitably re-scaled such that they too, can be superimposed onto each other in a statistical sense. 3. Independence of price changes. Why should prices follow Gaussian random walks? It is often stated that asset prices should follow random walks because of the Efficient Market Hypothesis (EMH). The EMH states that the current price of an asset fully reflects all available information relevant to it and that new information is immediately incorporated into the price. Thus, in an efficient market, the modelling of asset prices is really about modelling the arrival of new information. New information must be independent and random, otherwise it would been anticipated and would not be new. The EMH implies independent price increments but why should they be Gaussian distributed? The Gaussian PDF is chosen because most price movements are presumed to be an aggregation of smaller ones, and sums of independent random contributions have a Gaussian PDF. The arrival of new information actually sends 'shocks' through the market as people react to it and then to each other's reactions. The EMH assumes that there is a rational (sensible) and unique way to use the available information and that all agents possess this knowledge. Moreover, the EMH assumes that this chain reaction happens instantaneously. In an efficient market, only the revelation of some dramatic information can cause a crash, yet post-mortem analysis of crashes typically fail to (convincingly) tell us what this information must have been. In order to understand the nature of an economy, as with any other signal, one needs to be clear about what assumptions are being made in order to develop suitable models and have some way to test them. We need to consider what is happening at the microscopic level as well as the macroscopic level on which we observe financial time series, which are often averages of composites of many fundamental economic variables. It is therefore necessary to introduce some of the approaches and issues associated with financial engineering which is given in the following sections.

17.13.1

Risk .v. Return: Arbitrage

For many years, investment advisers focused on returns with the occasional caveat 'subject to risk'. Modern Portfolio Theory (MPT) teaches that there is a trade off between risk and return. Nearly all finance theory assumes the existence of risk-free investment, e.g. the return from depositing money in a sound financial institute or investing in equities. In order to gain more profit, the investor must accept greater risk. Why should this be so? Suppose the opportunity exists to make a guaranteed return greater than that from a conventional bank deposit say; then, no (rational) investor would invest any money with the bank. Furthermore, if he/she could also borrow money at less than the return on the alternative investment, then the investor would borrow as much money as possible to invest in the higher yielding opportunity. In response to the pressure of supply and demand, the banks would raise their interest rates. This would attract money for investment with the bank and reduce the profit

17.13.

MARKET ANALYSIS

585

made by investors who have money borrowed from the bank. (Of course, if such opportunities did arise, the banks would probably be the first to invest our savings in them.) There is elasticity in the argument because of various friction factors such as transaction costs, differences in borrowing and lending rates, liquidity laws etc., but on the whole, the principle is sound because the market is saturated with arbitrageurs whose purpose is to seek out and exploit irregularities or miss-pricing. The concept of successful arbitraging is of great importance in finance. Often loosely stated as, 'there's no such thing as a free lunch', it means that, in practice, one cannot ever make an instantaneously risk-free profit. More precisely, such opportunities cannot exist for a significant length of time before prices move to eliminate them.

17.13.2

Financial Derivatives

As markets have grown and evolved, new trading contracts have emerged which use various tricks to manipulate risk. Derivatives are deals, the value of which is derived from (although not the same as) some underlying asset or interest rate. There are many kinds of derivatives traded on the markets today. These special deals really just increase the number of moves that players of the economy have available to ensure that the better players have more chance of winning. For example, anyone who has played naughts and crosses a few times will know that once a certain level has been reached every game should be a draw. Chess, on the other hand, is a different matter. To illustrate some of the implications of the introduction of derivatives to the financial markets we consider the most simple and common derivative, namely, the option. Options

An option is the right (but not the obligation) to buy (call) or sell (put) a financial instrument (such as a stock or currency, known as the 'underlying') at an agreed date in the future and at an agreed price, called the strike price. For example, consider an investor who 'speculates' that the value of a stock, XYZ, will rise. The investor could buy shares in XYZ, and if appropriate, sell them later at a higher price to make money. Alternatively, the investor might buy a call option, the right to buy an XYZ share at a later date. If the asset is worth more than the strike price on expiry, the holder will be content to exercise the option, immediately sell the stock at the higher price and generate an automatic profit from the difference. The catch is, that if the price is less, the holder must accept the loss of the premium paid for the option (which must be paid for at the opening of the contract). Denoting C to be the value of a call option, 8 the asset price and E to be the strike price, the option is worth C(8, t) = max(8 - E, 0).

Conversely, suppose the investor speculates that XYZ shares are going to fall, then the investor can sell shares or buy puts. If the investor speculates by selling shares that he/she does not own (which in certain circumstances is perfectly legal in many markets), then he/she is selling 'short' and will profit from a fall in XYZ shares. (The opposite of a short position is a 'long' position.) The principal question is then, how much should one pay for an option? Clearly, if the value of the asset

586

CHAPTER 17. RANDOM FRACTAL SIGNALS

rises so does the value of a call option and vice versa for put options. But how do we quantify exactly how much this gamble is worth? In previous times (prior to the Black-Scholes model which is discussed later) options were bought and sold for the value that individual traders thought they ought to have. The strike prices of these options were usually the 'forward price', which is just the current price adjusted for interest-rate effects. The value of options rises in active or volatile markets because options are more likely to payout large amounts of money when they expire if market moves have been large. That is, potential gains are higher, but loss is always limited to the cost of the premium. This gain through successful 'speculation' is not the only role options play. Hedging

Suppose an investor already owns XYZ shares as a long-term investment, then he/she may wish to insure against a temporary fall in the share price by buying puts as well. Clearly, the investor would not want to liquidate the XYZ holdings only to buy them back again later, possibly at a higher price if the estimate of the share price is wrong, and certainly having incurred some transaction costs on the two deals. If a temporary fall occurs, the investor has the right to sell his/her holdings for a higher than market price. The investor can then immediately buy them back for less, in this way generating a profit and long-term investment then resumes. If the investor is wrong and a temporary fall does not occur, then the premium is lost for the option but at least the stock is retained, which has continued to rise in value. Furthermore, since the value of a put option rises when the underlying asset value falls, what happens to a portfolio containing both assets and puts? The answer depends on the ratio. There must exist a ratio at which a small unpredictable movement in the asset does not result in any unpredictable movement in the portfolio. This ratio is instantaneously risk free. The reduction of risk by taking advantage of correlations between the option price and the underlying price is called 'hedging'. If a market maker can sell an option and hedge away all the risk for the rest of the options life, then a risk free profit is guaranteed. Why write options? Options are usually sold by banks to companies to protect themselves against adverse movements in the underlying price, in the same way as holders do. In fact, writers of options are no different to holders, they expect to make a profit by taking a view of the market. The writers of calls are effectively taking a short position in the underlying behaviour of the markets. Known as 'bears', these agents believe the price will fall and are therefore also potential customers for puts. The agents taking the opposite view are called 'bulls'. There is a near balance of bears and bulls because if everyone expected the value of a particular asset to do the same thing, then its market price would stabilise (if a reasonable price were agreed on) or diverge (if everyone thought it would rise). Clearly, the psychology and dynamics (which must go hand in hand) of the bear/bull cycle play an important role in financial analysis. The risk associated with individual securities can be hedged through diversification and/or various other ways of taking advantage of correlations between different derivatives of the same underlying asset. However, not all risk can be removed by diversification. To some extent, the fortunes of all companies move with the economy.

17.13.

MARKET ANALYSIS

587

Changes in the money supply, interest rates, exchange rates, taxation, the prices of commodities, government spending and overseas economies tend to affect all companies in one way or another. This remaining risk is generally referred to as market risk.

17.13.3

Black-Scholes Analysis

The value of an option can be thought of as a function of the underlying asset price S (a random variable) and time t denoted by V(S, t). Here, V can denote a call or a put; indeed, V can be the value of a whole portfolio or different options although for simplicity we can think of it as a simple call or put. Any derivative security whose value depends only on the current value S at time t and which is paid for up front, satisfies the Black-Sholes equation given by

8V

1

7!it + "2 a

2

282V S 8S 2

8V

+ rS 8S

- rV = 0

where a is the volatility and r is the risk. As with other partial differential equations, an equation of this form may have many solutions. The value of an option should be unique; otherwise, again, arbitrage possibilities would arise. Therefore, to identify the appropriate solution, appropriate initial, final and boundary conditions need to be imposed. Take for example, a call; here the final condition comes from the arbitrage argument. At t = T O(S, t) = max(S - E, 0). The spatial or asset-price boundary conditions, applied at S = 0 and S --+ 00 come from the following reasoning: If S is ever zero then dS is zero and will therefore never change. Thus, we have 0(0, t) = O. As the asset price increases it becomes more and more likely that the option will be exercised, thus we have S --+ 00. O(S, t) ex: S, Observe, that the Black-Sholes equation has a similarity to the diffusion equation but with extra terms. An appropriate way to solve this equation is to transform it into the diffusion equation for which the solution is well known and with appropriate transformations gives the Black-Scholes formula

O(S, t) = SN(dI) where

d1

log(Sj E)

EeT(T-t) N(d 2)

+ (r + ~a2)(T -

t)

= ------'---'--'-----'----'-====---'----'------'--

avT - t

log(Sj E) + (r - ~a2)(T - t) d 2 = -----'---'-======--'----

avT-t

and N is the cumulative normal distribution defined by

'

CHAPTER 17. RANDOM FRACTAL SIGNALS

588

The conceptual leap of the Black-Scholes model is to say that traders are not estimating the future price, but are guessing about how volatile the market may be in the future. The volatility is mathematically defined and it is assumed that the distribution of these moves is lognormal. The model therefore allows banks to define a fair value of an option, because it assumes that the forward price is the mean of the distribution of future market prices and that the volatility is known. Figure 17.15 illustrates an example of the Black-Sholes analysis of the price of a call option as a function of S, at 4 time intervals approaching expiry.

6,.---,--,------,----,------,----,---,---,-----,-----,

5

4

2

3

4

5

6

7

8

9

10

S

Figure 17.15: The Black-Scholes value of a call option as a function of Sat 4 successive time intervals T - t approaching expiry E = 5.

The simple and robust way of valuing options using Black-Scholes analysis has rapidly gained in popularity and has universal applications. The Black-Scholes volatility and the price of an option are now so closely linked into the markets that the price of an option is usually quoted in option volatilities or 'vols', which are displayed on traders' screens across the world. Nevertheless, the majority of methods (particularly Black-Scholes analysis) used by economic agents are based on random walk models that assume independent and Gaussian distributed price changes. A theory of modern portfolio management, like any theory, is only valuable if we can be sure that it truly reflects reality for which tests are required. The following section investigates empirically the properties of real financial data as observed macroscopically in the form of financial time indices.

17.13.

MARKET ANALYSIS

589

Macro-Economic Models

17.13.4

The modern portfolio rationalization of the random walk hypothesis introduced in the previous section is ultimately based on the EMH. Figure 17.16 shows the de-trended log price increments'! of the New York Average (NYA) from 1960-89 (top) and the EMH's proposed random walk Gaussian increments (below). Both sets have been normalized and the EMH signal plotted using an offset of -5 for comparison. It is clear, that there is a significant difference between the two stochastic signals. This simple comparison indicates a failure of the statistical independence assumption using for the EMH.

2 Reality

-2

-3

-4

EMH

9000

Figure 17.16: Real data (top) versus the random walk hypothesis (bottom) with mean displaced to -5 for comparative display purposes. In general, when faced with a multidimensional process of unknown origin, it is usual to select an independent process such as Brownian motion as a working hypothesis. If analysis shows that a prediction is difficult, the hypothesis is accepted. Brownian motion is elegant because statistics and probabilities can be estimated with great accuracy. However, using traditional statistics to model the markets assumes that they are games of chance. For this reason, investment in securities is often equated with gambling. In most games of chance, many degrees of freedom are employed to ensure that outcomes are random. Take a simple dice, a coin, a roulette wheel etc. No matter how hard you may try, it is physically impossible to master your roll or throw such that you can control outcomes. There are too many non-repeatable elements (speeds, angles and so on) and non-linearly compounding errors involved. 6Removal of the long term exponential growth trend by taking the logarithm and then differentiating the data (using finite differencing).

CHAPTER 17. RANDOM FRACTAL SIGNALS

590

Although these systems have a limited number of degrees of freedom, each outcome is independent of the previous one. However, there are some games of chance that involve memory. Take Blackjack for example, also known as '21'. Two cards are dealt to each player and the object is to get as close as possible to 21 by twisting (taking another card) or sticking. If you go 'bust' (over 21) you lose; the winner is the player that sticks closest to 21. Here, memory is introduced because the cards are not replaced once they are taken. By keeping track of the cards used, one can assess the shifting probabilities as play progresses. This game illustrates that not all gambling is governed by Gaussian statistics. There are processes that have long-term memory, even though they are probabilistic in the short term. This leads directly to the question, does the economy have memory? A system has memory if what happens today will affect what happens in the future. We can test for memory effects by testing for correlations in the data. If the system today has no affect on the system at any future time, then the data produced by the system will be independently distributed and there will be no correlations. Now, the Auto-Correlation Function (ACF), which describes the expected correlations between time periods t apart, is defined by (see Chapter 4)

A(t)

=

(X(T)X(T - t)) ==

i:

X(T)X(T - t)dT.

Since prices themselves, like Brownian motion, are a non-stationary process, there is no ACF as such. However, if we calculate the ACF of the price increments, which are Gaussian by null hypothesis, then we can observe how much of what happens today is correlated with what happens in the future. This can be undertaken using the Power Spectral Density Function (PSDF), the Fourier transform of the autocorrelation function, i.e.

P(w) =

FI (X(T)X(T - t)) ==

i:

(X(T)X(T

~ t)) exp( -iwt)dt

where FI denotes the Fourier Transform operator. The PSDF tells us the amplitude distribution of the correlation function from which we can estimate the time span of the memory effects. This also offers a convenient way to calculate the correlation function (by taking the inverse Fourier transform of the PSDF). If the PSDF has more power at low frequencies, then there are long time correlations and therefore long-term memory effects. Inversely, if there is greater power at the high frequency end of the spectrum, then there are short-term time correlations and evidence of short-term memory. According to traditional theory, the economy has no memory and there will therefore be no correlations, except for today with itself. We should therefore expect a PSDF that is effectively constant as would result from a delta function autocorrelation function i.e, if

(X(T)X(T - t)) then

P(w) =

i:

=

J(t)

J(t) exp( ~iwt)dt = 1.

The PSDFs and ACFs of log price changes and the absolute log price changes of the NYA are shown in Figure 17.17.

17.13.

MARKET ANALYSIS

591

2

2.5

-2

-3 1000

X

2000

3000

o

4000

1000

2000

3000

4000

1000

2000

3000

4000

10-3

2.5"---~----~--"---'

2

1.5

1.1

Figure 17.17: PSDF (left) and ACF (right) of log price movements (top) and absolute log price movements (bottom) as a function of days. The PSDF of the data is not constant; there is evidence of a power law at the low frequency end and rogue spikes (or groups of spikes) at the higher frequency end of the spectrum. This power law is even more pronounced in the PSDF of the absolute log price increments, indicating that there is additional correlation in the signs of the data. If we denote q to be the parameter of this power law then we can consider a simple power law of the form P(w) ex l/w Q to describe the power law feature which is the principal signature for a random fractal signal. The ACF of the Log Price Increments (LPI) appears featureless, indicating that the excess of low frequency power within the signal (as described by PSDF) has a fairly subtle affect on the correlation function. The ACF of the absolute LPI, however, contains some interesting features. It shows that there are high short range correlations followed by a rapid decline up to approximately 100 days, followed by a steadier decline up to about 600 days when the correlations start to develop again, peaking at about 2225 days. The system governing the magnitudes of the log price movements seems to have a better long-term memory than it should. The data used in this analysis contains 8337 price movements. Thus, a spike in the PSDF at frequency w is based on the values of 8337/w data points, and since most of this power is at the low frequency end (more points), it is improbable that these results have occurred by coincidence. To investigate short-term correlations we can carry out a simple experiment that involves evaluating the average length of a run of either larger than or smaller than average price increments. The question we are asking is: are below average (negative)

CHAPTER 17. RANDOM FRACTAL SIGNALS

592

and above average (positive) log price changes distributed randomly or do they come in 'bursts'. Given that there is a fixed probability of continuing a run of either above or below average increments, the probability of a run of length r of successive occurrences of pis, Pr(r) = pT(1 ~ p) and the expected run length is E(r) = pj(1 - p). If the data were independently distributed then we expect p = 0.5 and E(r) = 1. If the data were negatively correlated, E(r) < 1 and if the data were positively correlated E(r) > 1. In the data set for NYA if = 1.2695 for LPI and if = 1.3027 for the absolute LPI, where if denotes the average run length. Assuming that the bias for large and small movements is the same, this makes the probability of a run continuing equal to p = 0.565 and p = 0.5657 respectively. This can be tested for significance under the independence null hypothesis and the assumption of Gaussian error in measuring the means. The probability of observing if = 1.3 is p < 1 X 10- 16 . Therefore it is highly improbable that this data originates from an independent distribution and we can conclude that the correlations are significant. Modelling 'trends' in this way assumes that the PDF for trend 'innings' in the real data follows the same distribution as Pr(r), as it does.

0.45 0.4

\

0.35 0.3 0.25 0.2 0.15 0.1 0.05

-------

0 0

5

10

15

Figure 17.18: Distribution of trend innings of the NYA compared with Pr(r) p) (smooth line) for p = 0.565.

= pT(1-

Figure 17.18 shows the distribution of 'runs' for the NYA along with the theoretical distribution, characterized by if = 1.3. Correlations in (log) price changes invalidates the independence assumption of the EMH. It does not necessarily invalidate the Gaussian distribution of price changes. Figure 17.19 shows the frequency distribution of daily and 5-daily New York Average (NYA) returns from 1960 to 1999. The two return distributions are virtually the same, implying self-affine behaviour. They are also uni-modal. There are two main features in which the distribution of returns differs from the Gaussian: A high peak at the mean and longer tails. Ninety

17.13.

MARKET ANALYSIS

593

nine percent of a normal distribution is contained within the main six standard deviations. The distribution of returns takes a lot longer to converge to zero. Even at four standard deviations from the mean, there are as many observations as there are at two.

1800

350

1600 300 1400 250 1200 200

1000

800

150

600 100 400 50 200 0

0 -5

o

-2

5 x 10-'

-1

0 X

2 10- 3

Figure 17.19: PDF of daily (left) and 5-daily (right) returns of the NYA stock market index along with the Gaussian distribution (dashed-line) for comparison. The long tails are an important feature of this distribution. It is from the distribution of returns that we measure risk. Risk is often referred to as the, 'one in six' rule which refers to the Gaussian property that approximately 4/6 of all outcomes lie within one standard deviation of the expected outcome and there is therefore a one in six chance of a very good (upside potential) or very bad (downside risk) outcome. In reality, the risk of large events occurring is much higher than the normal distribution implies. As we measure still larger events, the gap between theory and reality becomes even more pronounced. This risk is virtually identical in all the investment horizons investigated. We can quantify the tails deviation from a normal distribution using kurtosis - long tails being referred to as excess kurtosis (see Chapter 16) since the kurtosis is zero for the normal distribution and typically between 2 and 50 for daily returns and even higher for intraday data. A number of statistical models have been suggested to account for excess kurtosis including Mandelbrot's Stable Paretian hypothesis, the mixture of distributions hypothesis and models based on conditional heteroskedasticity which refers to the condition where residual variance is non-constant. In general, market data exhibits generalized autoregressive heteroskedasticity which means that there are periods of persistent high volatility followed randomly by periods of persistent low volatility. Another basic assumption that comes with the normal distribution involves the

CHAPTER 17. RANDOM FRACTAL SIGNALS

594

scaling of volatility known as the term structure of volatility. Typically, we use the standard deviation of returns to measure volatility. For independent or 'white noise' processes, standard deviations scale according to the square root of time. For example, we can 'annualize' the standard deviation of monthly returns by multiplying it by the square root of 12. Figure 17.20 shows the NYA volatility term structure (1989-1990) along with the theoretical scaling line. Volatility grows linearly at a faster rate than the square root of time up until about 1000 days or 4 years, it then slows down dramatically. If we use volatility as a measure of risk, investors incur more risk than is implied by the normal distribution for investment horizons of less than 4 years. However, investors incur increasingly less risk for investment horizons of greater than 4 years. This verifies what is known intuitively, namely, that long-term investors incur less risk than short-term investors. Term structure of Volatility, NYA daily return

2,-----,------,--------.--------,----,---------,

1.5

0.5L------'----...L-------'--------'-------L--_--' 1 1.5 2.5 2 3 3.5 4 log10(1)

Figure 17.20: Term structure of volatility of the NYA, along with theoretical scaling line (dashed line). If a financial walk (in the random walk sense) scales according to the power law,

\

~ logu(t) )

ex t

H

where u(t) denotes price movements for time t, then the walk is self-affine because the distribution of steps must look the same at different scales. For a non-constant PSDF, this shows that the phases of the different frequency components that make up the PSDF are randomized. The fact that data scales with a consistent power law up to 1000 days reveals that there is self-affinity in market return data, but only over a certain range.

17.13.

MARKET ANALYSIS

17.13.5

595

Fractal Time Series and Rescaled Range Analysis

A time series is fractal if the data exhibits statistical self-affinity and has no characteristic scale and the results of the previous section have verified that there is self-affinity in market data. The data has no characteristic scale if it has a PDF with an infinite second moment. The data may have an infinite first moment as well; in this case, the data would have no stable mean either. One way to test the financial data for the existence of these moments is to plot them sequentially over increasing time periods to see if they converge. Figure 17.21 shows that the first moment, the mean, is stable, but that the second moment, the mean square, is not settled. It converges and then suddenly jumps, as a Levy flight with an infinite mean square would do. It is interesting to observe that although the variance is not stable, the jumps occur with some statistical regularity. X

10- 3

6

4

2

0

-2

~"

0

X

1000

2000

3000

4000

5000

6000

7000

8000

9000

1000

2000

3000

4000

5000

6000

7000

8000

9000

10- 5

8

6

4

2

0

0

Figure 17.21: The first and second moments (top and bottom) of the NYA plotted sequentially.

Rescaled Range Analysis: Measuring Memory HE Hurst (1900-1978) was an English civil engineer who built dams and worked on the Nile river dam project. He studied the Nile so extensively that some Egyptians reportedly nicknamed him 'the father of the Nile.' The Nile river posed an interesting problem for Hurst as a hydrologist. When designing a dam, hydrologists need to estimate the necessary storage capacity of the resulting reservoir. An influx of water occurs through various natural sources (rainfall, river overflows etc.) and a regulated amount needed to be released for primarily agricultural purposes. The storage capacity of a reservoir is based on the net water flow. Hydrologists usually begin by

596

CHAPTER 17. RANDOM FRACTAL SIGNALS

assuming that the water influx is random, a perfectly reasonable assumption when dealing with a complex ecosystem. Hurst, however, had studied the 847-year record that the Egyptians had kept of the Nile river overflows, from 622 to 1469. Hurst noticed that large overflows tended to be followed by large overflows until abruptly, the system would then change to low overflows, which also tended to be followed by low overflows. There seemed to be cycles, but with no predictable period. Standard statistical analysis revealed no significant correlations between observations, so Hurst developed his own methodology. Hurst was aware of Einstein's (1905) work on Brownian motion (the erratic path followed by a particle suspended in a fluid) who observed that the distance the particle covers increased with the square root of time, i.e.

R=Vt where R is the range covered, and t is time. This is the same scaling property as discussed earlier in the context of volatility. It results, again, from the fact that increments are identically and independently distributed random variables. Hurst's idea was to use this property to test the Nile River's overflows for randomness. In short, his method was as follows: Begin with a time series Xi (with i = 1,2, ... , n) which in Hurst's case was annual discharges of the Nile River. (For markets it might be the daily changes in the price of a stock index.) Next, create the adjusted series, Yi = Xi - X (where x is the mean of x;). Cumulate this time series to give

such that the start and end of the series are both zero and there is some curve in between. (The final value, Y n has to be zero because the mean is zero.) Then, define the range to be the maximum minus the minimum value of this time series, R n = max(Y) - min(Y).

This adjusted range, R n is the distance the systems travels for the time index n, i.e. the distance covered by a random walker if the data set Yi were the set of steps. If we set n = t we can apply Einstein's equation provided that the time series Xi is independent for increasing values of n. However, Einstein's equation only applies to series that are in Brownian motion. Hurst's contribution was to generalize this equation to where S is the standard deviation for the same n observations and c is a constant. We define a Hurst process to be a process with a (fairly) constant H value and the R/S is referred to as the 'rescaled range' because it has zero mean and is expressed in terms of local standard deviations. In general, the R/ S value increases according to a power law value equal to H known as the Hurst exponent. This scaling law behaviour is the first connection between Hurst processes and fractal geometry. Rescaling the adjusted range was a major innovation. Hurst originally performed this operation to enable him to compare diverse phenomenon. Rescaling, fortunately, also allows us to compare time periods many years apart in financial time series. As discussed previously, it is the relative price change and not the change itself that is

17.13.

MARKET ANALYSIS

597

of interest. Due to inflationary growth, prices themselves are a significantly higher today than in the past, and although relative price changes may be similar, actual price changes and therefore volatility (standard deviation of returns) are significantly higher. Measuring in standard deviations (units of volatility) allows us to minimize this problem. Rescaled range analysis can also describe time series that have no characteristic scale, another characteristic of fractals. By considering the logarithmic version of Hurst's equation, i.e. 10g(R/S)n

= log (c) + Hlog(n)

it is clear that the Hurst exponent can be estimated by plotting 10g(R/S) against the log( n) and solving for the gradient with a least squares fit. If the system were independently distributed, then H = 0.5. Hurst found that the exponent for the Nile River was H = 0.91, i.e. the rescaled range increases at a faster rate than the square root of time. This meant that the system was covering more distance than a random process would, and therefore the annual discharges of the Nile had to be correlated. It is important to appreciate that this method makes no prior assumptions about any underlying distributions, it simply tells us how the system is scaling with respect to time. So how do we interpret the Hurst exponent? We know that H = 0.5 is consistent with an independently distributed system. The range 0.5 < H ::::; 1, implies a persistent time series, and a persistent time series is characterized by positive correlations. Theoretically, what happens today will ultimately have a lasting effect on the future. The range 0 < H ::::; 0.5 indicates anti-persistence which means that the time series covers less ground than a random process. In other words, there are negative correlations. For a system to cover less distance, it must reverse itself more often than a random process.

The Joker Effect After this discovery, Hurst analysed all the data he could including rainfall, sunspots, mud sediments, tree rings and others. In all cases, Hurst found H to be greater than 0.5. He was intrigued that H often took a value of about 0.7 and Hurst suspected that some universal phenomenon was taking place. He carried out some experiments using numbered cards. The values of the cards were chosen to simulate a PDF with finite moments, i.e. 0, ±1, ±3, ±5, ±7and ± 9. He first verified that the time series generated by summing the shuffled cards gave H = 0.5. To simulate a bias random walk, he carried out the following steps. 1. Shuffle the deck and cut it once, noting the number, say n.

2. Replace the card and re-shuffle the deck. 3. Deal out 2 hands of 26 cards, A and B. 4. Replace the lowest ti cards of deck B with the highest n cards of deck A, thus biasing deck B to the level n, 5. Place a joker in deck B and shuffle. 6. Use deck B as a time series generator until the joker is cut, then create a new biased hand.

CHAPTER 17. RANDOM FRACTAL SIGNALS

598

Hurst did 1000 trials of 100 hands and calculated H = 0.72. We can think of the process as follows: we first bias each hand, which is determined by a random cut of the pack; then, we generate the time series itself, which is another series of random cuts; then, the joker appears, which again occurs at random. Despite all of these random events H = 0.72 would always appear. This is called the 'joker effect'. The joker effect, as illustrated above, describes a tendency for data of a certain magnitude to be followed by more data of approximately the same magnitude, but only for a fixed and random length of time. A natural example of this phenomenon is in weather systems. Good weather and bad weather tend to come in waves or cycles (as in a heat wave for example). This does not mean that weather is periodic, which it is clearly not. We use the term 'non-periodic cycle' to describe cycles of this kind (with no fixed period). Thus, if markets are Hurst processes, they exhibit trends that persist until the economic equivalent of the joker comes along to change that bias in magnitude and/or direction. In other words rescaled range analysis can, along with the PDF and PSDF, help to describe a stochastic time series that contains within it, many different short-lived trends or biases (both in size and direction). The process continues in this way giving a constant Hurst exponent, sometimes with flat episodes that correspond to the average periods of the non-periodic cycles, depending on the distribution of actual periods. Figure 17.22 shows RSRA performed on a synthetic data set characterized by an expected length of a trend of 100 days, or P(Xi > i: I Xi-l > x) = 100/101 = 0.9901. In this case, the RSRA results give no visual indication of what the average run length is. The Hurst exponent, however is a direct representation of the amount of persistence in the data, which is related to P and E(r).

RIS Analysis 3.5,----,------.------,-------.----,--------,

3

2.5

~

2

6

C, !2 1.5

0.5

O'-1

-'---1.5

--L.-

2

---L-

2.5 109 10(1)

-L

3

---'--

---..J

3.5

Figure 17.22: Rescaled range analysis on synthesized data with E(r)

4

=

100

17.13.

MARKET ANALYSIS

599

The following is a step by step methodology for applying R/ S analysis to stock market data. Note that the AR(l) notation used below stands for auto regressive process with single daily linear dependence. Thus, taking AR(l) residuals of a signal is equivalent to plotting the signals one day out of phase and taking the day to day linear dependence out of the data. 1. Prepare the data Pt. Take AR(l) residuals of log ratios. The log ratios account for the fact that price changes are relative, i.e. depend on price. The AR(l) residuals remove any linear dependence, serial correlation, or short-term memory which can bias the analysis.

lit Xt

=

=

10g(PtiPt-d

lit - (c+mllt-d

The AR( 1) residuals are taken to eliminate any linear dependency. 2. Divide this time series (of length N) up into A sub-periods, such that the first and last value of time series are included i.e, A x n = N. Label each subperiod fa with a = 1,2,3, ... , A. Label each element in fa with Xk,a where k = 1,2,3, ..., n. For each I of length n, calculate the mean k

ea = (l/n)

L

Nk,a

i=1

3. Calculate the time series of accumulated departures from the mean for each sub interval. k

Yk,a

=

L

(Ni,a -

ea )

i=1

4. Define the range as where 1 .::; k .::; n. 5. Define the sample standard deviation for each sub-period as

SI" =

6. Each range, RIa is now normalized by dividing by its corresponding SI". Therefore the re-scaled range for each fa is equal to R I" / SI". From step 2 above, we have A contiguous sub-periods of length n. Therefore the average R/ S value for each length n is defined as 1 A

(R/S)n =

AL a=1

(RI,,/SI,,)

CHAPTER 17. RANDOM FRACTAL SIGNALS

600

5-daily return

RSRA for daily return 2 1.5 _ 1.5

(j)

~

04

it

H=0.544818

0

0

0,

0,

.Q

.Q

~

0.5 0.5

1

4

3

2

1.5

1O-daily return

2.5

2 log10(t)

log10(t)

3

20-daily return

1.5

1.4 1.2

~

[if

0

0

0,

~0.8

a:

.Q

1

0.6 0.5

1

1.5

2 log10(t)

2.5

3

0.4

y

~0.589652

'" 1

1.5

2

2.5

log10(t)

Figure 17.23: Rescaled Range Analysis results for the NYA 1960-89. 7. The length n is then increased until there are only two sub-periods, i.e. n = N/2. We then perform a least squares regression on log(n) as the independent variable and log(R/ S) as the dependent variable. The slope of the equation is the estimate of the Hurst exponent, H. The R/S analysis results for the NYA (1960-1998) for daily, 5-daily, lO-dailyand 20-daily returns are shown in Figure 17.23. The Hurst exponent is 0.54 ::::: H ::::: 0.59, from daily to 20-daily returns indicating that the data set is persistent, at least up to 1000 trading days. At this point the scaling behaviour appears to slow down. The (R/ S)n values show a systematic deviation from the line of best fit which is plotted in the Figures. From the daily return results this appears to be at about 1000 days. The 5-daily, 10-day and 20-day return results appear to agree a value of about 630 days. This is also where the correlation function starts to increase. This deviation is more pronounced the lower the frequency with which the data is sampled. The results show that there are certain non-periodic cycles that persist for up to 1000 days which contribute to the persistence in the data, and after these are used up, the data (the walker) slows down. These observations can be summarized as follows: The market reacts to information, and the way it reacts is not very different from the way it reacts previously, even though the information is different. Therefore the underlying dynamics and the statistics of the market have not changed. This is especially true of fractal statistics. (The 'fractal statistics' referred to are the fractal dimension and the Hurst exponent.) The results clearly imply that there is an inconsistency between the

17.14.

MODELLING FINANCIAL DATA

601

behaviour of real financial data and the EMH lognormal random walk model which is compounded in the following points: 1. The PSDF of log price changes is not constant. Therefore price changes are not independent. 2. The PDF of log price changes are not Gaussian, they have a sharper peak at the mean and longer tails. In addition, the following properties are evident: 1. Asset price movements are self-affine, at least up to 1000 days. 2. The first moment of the PDF is finite but the second moment is infinite (or at least very slow to converge). 3. If stock market data is viewed as a random walk then the walk scales faster than the square root of the time up until approximately 1000 days and then slows down. 4. Large price movements tend to be followed by large movements and vice versa, although signs of increments are uncorrelated. Thus volatility comes in bursts. These cycles are referred to as non-periodic as they have randomly distributed periods. Hurst devised a method for analysing data which does not require a Gaussian assumption about the underlying distribution and in particular, does not require the distribution to have finite moments. This method can reveal subtle scaling properties including non-periodic cycles in the data that spectral analysis alone cannot find.

17.14

Modelling Financial Data

In general, the unveiling of a new phenomenon either results from a strong theoretical reasoning or from compelling experimental evidence. In econometrics, the process that creates our time series has many component parts, or degrees of freedom, and the interaction of those components is so complex that a deterministic description is simply not possible. As in all complex systems theory, we restrict ourselves to modelling the statistics of data rather than the data itself. This means that we model the data with stochastic models. When creating models of complex systems there is a trade off between simplifying and deriving the statistics we want to compare with reality, and simulating the behaviour and letting the statistics emerge, as they do in real life. It may be hard to learn from the latter approach (i.e. creating an artificial market) for the same reasons that it is hard to learn by looking at real markets. On the other hand, there is a danger of making incorrect assumptions and thus failing to capture certain emergent traits when adopting the former method. We need both approaches; at least for the time being. We need the simulation approach to investigate the affect of various traders' behavioural rules on the global statistics of the market; this approach has

602

CHAPTER 17. RANDOM FRACTAL SIGNALS

the added benefit of a natural interpretation. We also need the derivation approach to understand exactly how the amalgamation of certain rules leads to these statistics. So what makes a good stochastic model? A good stochastic model is one that accurately predicts the statistics we observe in reality, and one that is based upon some sensible rationale. Thus, the model should not only describe the data, but also help us to explain and understand the system. It can still, however, be advantageous to have an accurate and/or predictive model without understanding it's origins, i.e. a phenomenological model. Economists often feel insulted by a stochastic approach to financial modelling; they believe all of their decisions are rational and well founded. However, the Black-Scholes model, which has to date played such an important role (because it has no random variable), assumes a stochastic model of financial time series anyway, namely, the lognormal random walk. One cause of correlations in market price changes (and volatility) is mimetic behaviour, known as herding. In general, market crashes happen when large numbers of agents place sell orders simultaneously creating an imbalance to the extent that market makers are unable to absorb the other side without lowering prices substantially. What is interesting is that most of these agents do not communicate with each other, nor do they take orders from a leader. In fact, most of the time they are in disagreement, and submit roughly the same amount of buy and sell orders. This is a healthy non-crash situation; it is a diffusive process. The key question is thus: by what mechanism do they suddenly manage to organise a coordinated sell-off? When constructing a comprehensive model of financial time series we need to make the following distinction regarding the nature of a crash: 1. Are crashes exceptions to the model? Do we need one model to describe stable behaviour and another for when the things become unstable? In which case, when should we switch? There should be some critical point; indeed, we would not be able to distinguish a crash from a negative price increment if there were not.

2. Can crashes be represented by a model with a (one) price increment PDF with an infinite second moment? This Levy style method allows seemingly disproportionate large price movements to occur with (statistically) controllable frequency. 3. Are they critical points analogous to phase transitions in nature? If so, are there any warning signs prior to a crash? 4. Are they model-able at all? That is, do crashes occur because of unforeseeable circumstances like political news and news related to actual firms and businesses? One explanation for crashes involves a replacement for the efficient market hypothesis, by the Fractal Market Hypothesis (FMH). The FMH proposes the following: 1. The market is stable when it consists of investors covering a large number of investment horizons. This ensures that there is ample liquidity for traders.

2. Information is more related to market sentiment and technical factors in the short term than in the long term. As investment horizons increase, longer term fundamental information dominates.

17.14.

MODELLING FINANCIAL DATA

603

3. If an event occurs that puts the validity of fundamental information in question, long-term investors either withdraw completely or invest on shorter terms. When the overall investment horizon of the market shrinks to a uniform level, the market becomes unstable.

4. Prices reflect a combination of short-term technical and long-term fundamental valuation. Thus, short-term price movements are likely to be more volatile than long-term trades. Short-term trends are more likely to be the result of crowd behaviour. 5. 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. Unlike the EMH, the FMH says that information is valued according to the investment horizon of the investor. Because the different investment horizons value information differently, the diffusion of information will also be uneven. Unlike most complex physical systems, the agents of the economy, and perhaps to some extent the economy itself, have an extra ingredient, an extra degree of complexity. This ingredient is consciousness.

17.14.1

Psychology and the Bear/Bull Cycle

An economy is ultimately driven by people (economic agents) and the principal component of this drive, is their expectation of others. When economic agent's expectations induce actions that aggregatively create a world that validates them as predictions, they are in equilibrium, and are called 'rational expectations'. Rational expectations are useful in demonstrating logical equilibrium outcomes and analysing their consequences. In the real world, however, they break down very easily. If some agents lack the resources to arrive at a posited outcome or if they logically arrive at different conclusions (as they might in a pattern recognition problem) or if there is more than one rational expectations equilibrium with no means to decide on which is preferable, then some agents may deviate in their expectations. Moreover, if some deviate, the world that is created may change so that others should logically predict something different and deviate too. There have been various games made up to illustrate this problem. A well known example is the 'EI Farol bar' problem: One hundred people must decide independently whether to show up at a particular bar. If a person expects that more than say 60 will attend, then they will stay at home to avoid the crowd; otherwise that person will attend. If all believe that few will go, then all will go; if all believe many will go, then no one will go. By simulating this game allowing agents access to historical data and by giving them a simple genetic algorithm to decide how to use this data, one can illustrate how stochastic/chaotic time series can emerge. Trading crowds are made up of bulls and bears. A bullish crowd is one that will try to force prices up and a bearish crowd is one that will try to push prices down. The size of each crowd must remain roughly the same, but the members are continually swapping. When the price is going up, the bullish crowd are dominating and when the price is going down, the bearish crowd are dominating. Within a full cycle, the

CHAPTER 17. RANDOM FRACTAL SIGNALS

604

bullish crowd will dominate, then there will be a period of co-existence, and finally the bearish crowd will dominate. This means that between any two given points in time there will be a successful crowd and an unsuccessful one. Members of the successful crowd will be motivated by greed and will feel pleasure from their success; they will feel integrated with like-minded investors. On the other hand, members of the unsuccessful crowd will feel fear and displeasure, and feel divorced from the other members of the same crowd. Eventually, the members of the unsuccessful crowd desert to the successful crowd and thus the cycle continues.

17.14.2

The Multi-Fractal Market Hypothesis

Crashes are the result of price corrections due to trend chasing strategies and/or external news. Markets are efficient but the EMH fails, mostly due to the break down of rational expectations and although psychology undoubtedly plays a role in market analysis, its extent is undetermined. The multi-fractal model is based on the fact that econometric data has fractal properties and is concerned with the variable diffusion of information. This is related to the fractional dynamic equation introduced earlier in this chapter, i.e. (j2 ( ax 2

-

aq(t) ) ,q(t) Otq(t)

u(x, t) = F(x, t)

and its asymptotic solution u(O, t) which is compounded in the following points: 1. The PDF of log market movements has an infinite or very slow-to-converge second moment.

2. The economy can be thought of as a non-equilibrium self-organised system that is normally and healthily in a critical state, and that crashes occur when somehow this criticality is temporarily disturbed. 3. Prices oscillate around fundamentals (due to the bear/bull cycle) which are themselves dictated by people's speculation on what they should be. 4. These oscillations propagate through supply/information chains. 5. The level of diffusion/propagation through the information chain varies with time. Point (5) is the fundamental basis for the model above. By introducing a Fourier dimension that is a function of time q(t) which is itself taken to be a stochastic function, we are able to model multi-fractal signals (signals with variations in q) in terms of both a quasi-diffusive and quasi-propagative behaviour.

17.14.

MODELLING FINANCIAL DATA

605

2.5

-1

-2

o

---

--------_._--_.j._-------~

100

___

--------_'--.-

200

400

300

Figure 17.24: A realisation of

Ui,

_

L._ .....

500

._L._.

600

_

_ __ .L

.

700

.

~

_.l

~

800

.. _

~

__.1

gOO

.•......- .1

1000

with 10 different q values (indicated by +) in

qi E (0,2) and reconstruction of q; using the power spectrum method (darker line).

350

300

250

200

150

100

50

0 -1.5

-1

0.5

1.5

Figure 17.25: A Gaussian distribution (least squares) fit to the histogram of q values of the NYA. Figure 17.24 shows how the value of q affects the characteristics of the signal. The signal is a concatenation of 10 smaller signals, each of 100 elements and a unique Fourier dimension, qi E (0,2). Each slice of the signal is scaled by dividing through by the sample variance of the signal. Without this scaling, signals with a high q value would have significantly less magnitude. The rationale here is that signals with the same Black-Scholes volatility can behave very differently - the sums of squares can

CHAPTER 17. RANDOM FRACTAL SIGNALS

606

2

-2

-8

_10L---...~---'-~~--'-~~-"-~~'--~---'-~~---'---~~-"-~~'--~----.J

o

1000

2000

3000

4000

5000

6000

7000

8000

9000

Figure 17.26: Synthetic stock market price moves (top) .v. the NYA (bottom) real data with mean displaced to -5 for comparative display purposes.

add up in many different ways. The idea is that the model will capture this different kind of volatility. The inversion algorithm (based on the power spectrum method discussed earlier in this chapter) estimates the q-values relatively accurately. Given this model together with the simulation presented, the principal question is how does q(t) behave for real data? There are two ways to approach this: (i) compute the Fourier dimension from the data Ui directly; (ii) compute the dimension from the de-trended log price increments, i.e. In( Ui+dUi)' Taking the latter case, qi values have been evaluated over a sample of real data (NYA) using a window of size 30 and revealing the Fourier dimensions to be normally distributed with IL = 0.35 and (J" = 0.4, as shown in Figure 17.25. This is an interesting result; it shows that the deviations from the random walk model, as measured by the Fourier dimension, are governed by a Gaussian PDF. It also shows that on average there is much less high frequency content in the log price movements than the random walk model. It is opportune at this point to employ the 'joker effect' discussed earlier. Suppose we define trends with particular values of q. A problem here is that due to the necessity of a moving window method for computing qi, we obtain a very smeared picture of how q is behaving on a day to day basis - we cannot measure run lengths of q values. Thus, we ideally need higher frequency data to successfully calculate the day-to-day behaviour of q. We do know, however, that there exists some probability, P(Xi > x I Xi-l > x) > 0.5 that accounts for the persistence in the data. Since q controls these correlations we can postulate a distribution for the length of stay for a particular value of q based on Pr(r) = p T (l - p) as described earlier.

17.14.

MODELLING FINANCIAL DATA

607

Figure 17.26 shows synthesized stock market price movements with normally distributed Fourier dimensions that persist for random periods defined by the aforementioned binomial style distribution with R = 1.3 and p = 0.565. The market movements of the NYA are shown for comparison. The average run length of the synthetic signal is approximately the same as the NYA daily returns, as is the Hurst exponent and the distribution of Fourier dimensions. The PDF and the power law property of the PSDF as shown in Figure 17.27. Comparing these results with Figure 17.17, the PSDF and ACF are similar, although the ACF of the synthesized data does not capture the increase in correlations observed in the real absolute log price movements. Clearly, compared with the EMH, these results - based on a Multi-fractal Market Hypothesis - are encouraging and lead naturally to consider the non-stationary behaviour of the Fourier dimension for a financial index and a possible association of a particular range of qi with the behaviour of the index. Figure 17.28 shows the behaviour of the Fourier dimension (the q-signature) for the NYA at the time of the crash of October 1987. Here, the q-signature has been superimposed on the log price increments or price moves. Observe, that q is almost zero over the period of the crash with relative small deviations, indicating that during periods of exceptionally high volatility the price moves behave more like white noise than when the volatility is low; the value of qi is below the mean. Also, the variation of the q-signature is minimal over this period. Most important of all, is that it has a downward trend prior to the event. Discussion

The material discussed has been based on the asymptotic solution to the fractional dynamic model proposed for price variation. In accordance with the definitions of the model, this is equivalent to observing market price movements very close (in terms of connectivity) to the source of information affecting them. The general solution suggests that prices further 'down the line' are of the same form but with additional amounts of higher frequency noise. Thus, although the economy is totally connected (to maintain consistency), noise can induce price movements that are far apart in a chain that is virtually unconnected. The proposed model for price variation accurately mimics the PDF, the power law property of the PSDF, the Hurst exponent and the 'runs' statistic observed in real financial markets. A new market measure, q-signature, describing the 'diffusivity' of new information is the core of the model. Crashes happen when price increments become uncorrelated. The parameter q-signature can be estimated from market data with a 'least squares fit' thus providing a new risk analysis tool. There are some properties ofthe financial time series, however, that the model does not capture. The first over-sight of the model is the long-range time correlations that occur over approximately 1000 days, or 4 years. As Figure 17.27 illustrates, the model gets the right power law for the PSDF, but does not capture the strange increase in the correlation function at about 600 days in the real data as shown in Figure 17.17. Further, the model does not capture the fact that market price movements only scale persistently up to 1000 days, the synthetic data scales persistently indefinitely. An interesting extension of the model would be to apply spatial reflecting bounds to the

CHAPTER 17. RANDOM FRACTAL SIGNALS

608

field u(x, t) and numerically evaluate the solution to the model. In this way we would not need to drive the field with noise at each time interval, the movements would continue indefinitely. However, the model does provide clarity with regard to the following important points: 1. Market data is not normally distributed but its q-signature or variable Fourier dimension is.

2. By filtering the Fourier spectrum of white noise (as described) over finite intervals (thus causing trends) and allowing them to persist for random periods of time (joker effect), one can create a synthesized financial time series possessing many of the right statistics. 3. Price movements are better described by the conventional (Gaussian) random walk models when the volatility is very high. x 10-' 3.5,----:-------------, 3

3

2

2.5 2

0 -1 -2 1000

2000

3000

4000

5000

-1000

X

0

1000

2000

0

1000

2000

3000

4000

10- 4

1.35 2

1.3

1.5

1.25 1.2 1.15

0.5

1000

2000

3000

4000

5000

1.1 -1000

3000

4000

Figure 17.27: PSDF (left) and ACF (right) of synthetic price increments (top) and absolute price increments (bottom).

17.15.

SUMMARY OF IMPORTANT RESULTS

609

L5

-1.5

L ...

1600

1500

1700

1900

1800

2000

2100

Figure 17.28: q-signature (darker line) of NYA price movements (lighter line) around the time of the 1987 crash.

17.15

Summary of Important Results

Universal Power Law Systern(size) ex

1 -'-q'

SIze

q

>0

Random Fractal Signal Model

/00 1 J n(T) -00 N(w). (iw)q exp(7wt)dw = f(q) (t _ Tp_ qd7, q > 0 t

f(t) =

1 27T

o where n(t) is white noise whose Fourier transform is N(w).

Power Spectrum of a Random Fractal

P(w) =

A I

W

12q

where A is a constant.

Fractal Dimension D of a Random Fractal Signal D = 5 - 2q

2

'

1
CHAPTER 17. RANDOM FRACTAL SIGNALS

610 Levy Distributions

Distributions with a characteristic function given by (symmetric case)

P(k)

exp( -a k

=

1

q I

0

),


and a PDF given by

p(x)

1

rv

xl+ q'

1x I»

1

Non-stationary Fractal Model

[p ( ax 2

-

aq(t) ) Tq(t) atq(t) u(x, t)

where F(x, t) is a stochastic source function and the Fourier dimension.

-00

=

F(x, t)

< q(t) <

00

is a random variable,

General Solution For F(x, t) = f(x)n(t),

u(xo, t)

=

M~xo) n(t),

q = 0;

u(xo, t) ,q < 0; where

Asymptotic Solution For f(x) = o(x), 1 1 t 2rq/2 r(q/2)

n(i;)

J (t~i;)'

u(t) = lim u(xo, t) = xo--+o

n(t)

-2-' { rq/2 d'J/2 -2-dtQI2

0

n (t ),

('1/2)

d~, q > 0; q q

= 0; < O.

17.16.

17.16

FURTHER READING

611

Further Reading

• Oldham K B and Spanier J, The Fractional Calculus, Academic Press, 1974. • Mandelbrot B B, The Fractal Geometry of Nature, Freeman, 1983. • Barnsley M F and Demko S G (Eds.), Chaotic Dynamics and Fractals, Academic Press, 1986. • E R Pike and L A Lugiato (Eds.), Chaos, Noise and Fractals, loP Publishing (Malvern Physics Series), 1987. • Peitgen H 0, Jurgens Hand Saupe D, Chaos and Fractals: New Frontiers of Science, Springer, 1992. • Miller K S and Ross B, An Introduction to the Fractional Calculus and Fractional Differential Equations, Wiley, 1993. • Kiryakova V, Generalized Fractional Calculus and Applications, Longman, 1994. • Peters E E, Fractal Market Analysis, Wiley, 1994. • Turner M J, Blackledge J M and Andrews P A, Fractals Geometry in Digital Imaging, Academic Press, 1998. • Blackledge J M, Evans A K and Turner M J (Eds.), Fractal Geometry: Mathematical Methods, Algorithms and Applications, Horwood Publishing Series in Mathematics and Applications, 2002. • Barnsley M F, Saupe D and Vrscay E R, Fractals in Multimedia, Springer (The IMA Volumes in Mathematics and its Applications), 2002.

17.17

Problems

17.1 Design a void function in ANSI C to synthesize a random fractal signal s with an array size of n and fractal dimension 1 < D < 2: void RFS(float s [ ], int n, float D)

CHAPTER 17. RANDOM FRACTAL SIGNALS

612

Use uniform random deviates to compute the Fourier phase and Gaussian random deviate to compute the Fourier amplitude of the fractal using the functions discussed in Chapter 14.

17.2 Design a function using ANSI C that returns the fractal dimension of a signal s of size n under the assumption that the signal is a time invariant random fractal using the power spectrum method: function FD(float s[ ], int n)

17.3 Using the result that

J f3

exp(ikx)(x - a)'-l¢(x)dx

=

-AN(k)

a

where ¢ is N times differentiable and

show that

J

oo

-00

Ik

exp(ikx) exp( -

1

Iq)dk '" xI+q

for I x I>> 1 by taking the case when 0 < q < 1 and 1 < q < 2 and using integration by parts. 17.4 Show that the maximum value of the PSDF given by

is _

Pm ax = P(w m ax )

_

-

2(g-q) gg

Wo

-(q - g) qq

q_g

.

Derive an expression for the output signal s(t) obtained when the input is white noise when a system whose PSDF is given by the above is linear and time invariant. What is the scaling relationship for this case?