Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch...

1
100 Burtt Road, Suite 227, Andover, MA 01810 (617) 433-9221 [email protected] www.northbaysolutions.com Database Freedom DISCOVER the list of possible ML/AI use cases from which value can be derived ASSESS the business drivers and possible strategies for each of the use cases listed EDUCATE key personnel on the AWS suite of ML/AI offerings and their applicability DETERMINE the most viable use cases and dive deep into possible strategies for implementation FORMULATE a high level roadmap to commence exploration of the high value use cases identied NorthBay’s ML & AI Workshop provides an opportunity to bring together your technical and business constituents and discuss possible applicable use cases. NorthBay’s Machine Learning & AI Practice Leaders will provide you with an overview of AWS and the related services. We will also work with you to dive deep into your specific candidate use cases, discuss the most appropriate technical approaches as well as the most applicable AWS services. Lastly, we will seek to identify several high value outcomes and projects that would be worth pursuing. Use Case Summary Data Source Inventory High-Level Technical Design Next Step Action Plan Machine Learning & Artifical Intelligence 1/2 dAY Workshop Considering using AWS Machine Learning or AI to help Drive Insights, Improve Operational Efficiency or Improve Financial Performance? Workshop Outputs Workshop Objectives AMAZON SAGEMAKER AMAZON TRANSCRIBE AMAZON TRANSLATE AMAZON LEX AMAZON COMPREHEND AMAZON REKOGITION EXPLORER SERIES

Transcript of Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch...

Page 1: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Multifractal Processes and Their Applications

Jan Korbel

7. 12. 2012

Jan Korbel Multifractal Processes and Their Applications

Page 2: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Outline

History & MotivationBrownian motionBeyond classical diffusion: memory and scalingFractal geometryMultifractal processes

Jan Korbel Multifractal Processes and Their Applications

Page 3: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Brief history overview

Diffusion is a transport phenomenon that has been studiedsince 18th century1827 - discovered Brownian motion on a pollen grain in thewater1900 - Louis Bachelier: Théorie de la spéculation - Firstapplication of Brownian motion in financial markets60’s - Benoit Mandelbrot: Fractals and self-similarity -description of irregular objects90’s - econophysics - application of physical models intofinancial markets

Jan Korbel Multifractal Processes and Their Applications

Page 4: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Econophysics

Why econophysics? - necessity of modeling and analyzingcomplex processes as financial time seriesPresence of various phenomena - memory, crash,economic cycles, financial crisis...Aim: generalization of models based on random walk(discrete version of Brownian motion)Multiscaling: general phenomenon that enables to modelmany different processes

Jan Korbel Multifractal Processes and Their Applications

Page 5: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Brownian motion: different approaches

Brownian motion is a well known transport phenomenonthat has many applications in different fieldsIt can be described with many formalisms such as Randomwalk, Langevin equation, theory of stochastic processes,etc.It is advantageous to introduce a few of possible definitionsand show the relations between themFirst diffusion description - Adolf Fick

Fick’s law

∂φ

∂t= D

∂2φ

∂x2

Solution: φ(x , t) = 1√2Dt

exp[− (x−x0)

2

2Dt

]Jan Korbel Multifractal Processes and Their Applications

Page 6: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Basic approach: Random walk

We begin with a walker that can do a step to the right withprobability p and to the left with probability 1− pAfter n steps we get a binomial distribution

p(m, n) =n!( n+m

2

)!( n−m

2

)!p

n+m2 (1− p)

n−m2

For long times n→∞ around the expectation valueE(m) = n(2p − 1) we get that

p(m, n) ≈ 1√2πnp(1− p)

exp[− (m − E(m))2

8npq

]For long times in the center part of the distribution we get agaussian distribution, which describes classical diffusion

Jan Korbel Multifractal Processes and Their Applications

Page 7: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Central part of distribution of random walkfor n = 1000, p = 1

2

Jan Korbel Multifractal Processes and Their Applications

Page 8: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Physical approach: Langevin equation

We generalize a classical Newton’s law for systems in thecontact with heat bath (presence of random fluctuations)Newton equation

mx(t)− F = 0 (1)

We add a random force and because of conservation ofphysical laws we have to add a friction forces too

Langevin equation

mx(t)+∂U∂x

+γx(t) = η(t) (2)

−∂U∂x - external forces−γx(t) - friction forcesη(t) - fluctuation forces with 〈η(t)〉 = 0,〈η(t)η(t ′)〉 = 2Dδ(t − t ′)Jan Korbel Multifractal Processes and Their Applications

Page 9: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Diffusion equation

Alternative representation od Langevin equation is throughprobability distribution of the system p(x , t)

Diffusion equation for free particle

∂p(x , t)∂t

=Dγ2∂2p(x , t)∂x2 (3)

The equation is formally the same as Fick’s equation forconcentrationFor one localized particle at time 0 we get a Gaussianfunction

p(x , t) =1√

4πDtexp

(−(x − x0)2

4Dt

)(4)

Jan Korbel Multifractal Processes and Their Applications

Page 10: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Diffusion in 2D

-400 -300 -200 -100 100

-400

-300

-200

-100

Jan Korbel Multifractal Processes and Their Applications

Page 11: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Mathematical approach: Wiener process

Another possibility is to use a formalism of stochasticprocessesA stochastic process W (t) (for t ∈ [0,∞]) is called Wienerprocess, if

W (0)a.s.= 0

For every t , s are increments W (t)−W (s) dependent onlyon |t-s| with distribution: W (t)−W (s) ∼ N (0, |t − s|).for different values are increments not correlated.

The Wiener process also obeys diffusion equationAll formalisms lead to the main property of diffusion:|∆W (t)| = t

12

Jan Korbel Multifractal Processes and Their Applications

Page 12: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Sample paths of Wiener process in 1D

200 400 600 800 1000

-20

20

40

Jan Korbel Multifractal Processes and Their Applications

Page 13: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Remark: Diffusion on financial markets

On financial markets is observed a modified version ofdiffusionWe demand that price S(t) is always positiveFrom empirical observationsr(t) = log(S(t))− log(S(t − 1)) has a normal distribution -increment of Wiener processthe price is then defined as

Geometric Brownian motion

S(t) = S0 exp

(∑t

r(t)

)

Jan Korbel Multifractal Processes and Their Applications

Page 14: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Sample path of geometric Brownian motion

200 400 600 800 1000

1.5

2.0

2.5

3.0

3.5

Jan Korbel Multifractal Processes and Their Applications

Page 15: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Beyond classical diffusion

The theory of Brownian motion is an elegant simple theory,but cannot describe systems with more complex behaviorGeneralizations of Brownian motion: introduction ofmemory and large fluctuationTypical scales for Brownian motion: for space - variance,for time - correlationBoth have their typical values (scales) - in generalizationsthese typical scales vanish

Jan Korbel Multifractal Processes and Their Applications

Page 16: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Fractional Brownian Motion

We generalize Brownian motion by introduction ofnon-trivial correlationsFor Brownian motion is the covariance element

E[W (t)W (s)] = min{s, t} =12

(s + t − |s − t |) (5)

We introduce a generalization WH(t) with the sameproperties, but covariance

E [WH(t)WH(s)] =12

(s2H + t2H − |s − t |2H) (6)

Standard deviation scales as |∆WH(t)| ∝ tH

For H = 12 we have Brownian motion, for H < 1

2sub-diffusion, for H > 1

2 super-diffusion

Jan Korbel Multifractal Processes and Their Applications

Page 17: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Sample functions of fBM for H=0.3, 0.5, 0.6, 0.7.

500 1000 1500 2000

-10

10

20

30

40

50

60

500 1000 1500 2000

-10

10

20

30

40

50

60

500 1000 1500 2000

-10

10

20

30

40

50

60

500 1000 1500 2000

-10

10

20

30

40

50

60

Jan Korbel Multifractal Processes and Their Applications

Page 18: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Lévy distributions

Gaussian distribution has special property - it is a stabledistributionSuch distributions are limits in long time for stochasticprocesses driven by independent increments with givendistributionLévy distributions - class of stable distributions withpolynomial decay

Lα(x) ' lα|x |1+α

for |x | → ∞ (7)

for α ∈ (0,2)The variance for these distributions is infiniteThe distribution has sharper peak and fatter tails (= heavytails)

Jan Korbel Multifractal Processes and Their Applications

Page 19: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Difference between Gaussian distributionand Cauchy distribution (α = 1)

-4 -2 0 2 4

0.1

0.2

0.3

0.4

Σ = 1

Γ = 1.2

Γ = 0.8

Γ = 1

5 10 15 20 25 30 35 400.000

0.002

0.004

0.006

0.008

0.010

0.012

0.014

Σ =10

Σ = 1

Γ = 1.2

Γ = 0.8

Γ = 1

Jan Korbel Multifractal Processes and Their Applications

Page 20: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Lévy flights

Lévy flight Lα(t) is a stochastic process that the sameproperties as Brownian motion, but its increments haveLévy distributionBecause of infiniteness of variance, scaling properties areexpressed via sum of random variables

For Brownian motion: a1/2W (t) + b1/2W (t) d= (a + b)1/2W (t)

For Lévy flight: a1/αLα(t) + b1/αLα(t)d= (a + b)1/αLα(t)

α-th fractional moment E(|X |α) =∫

xαp(x)dx of increment isequal to

E(|Lα(t1)− Lα(t2)|α) ∼ |t1 − t2|. (8)

Jan Korbel Multifractal Processes and Their Applications

Page 21: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Lévy flight in 2D

-100 100 200 300

-300

-200

-100

100

200

300

Jan Korbel Multifractal Processes and Their Applications

Page 22: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Fractal dimension

Many objects in nature exhibit inner structure that is present at anyscaleThese object fill the space more than regular curves, surfaces, etc -fractalsThe robustness of fractals is measured by a generalization of thedimension

we measure by how many squares with side l can be the objectcovereda curve is covered by N(l) = Al−1 squaresa surface is covered by N(l) = Bl−2 squares etc.for a dimension we have −D ln l = ln N(l)− ln B

Fractal dimension

dim F = − liml→0

ln N(l)ln l

Jan Korbel Multifractal Processes and Their Applications

Page 23: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Example: Koch curve

The Koch curve is generated iterativelyWe begin with a line, we remove a middle part of the lineand replace it by two lines with the angle of 60◦

We repeat it to infinityFractal dimension: we cover the object by squares oflength l = 3−k , the number of squares is N(l) = 4k

dim F = − limk→∞

ln 4k

ln 3−k = − limk→∞

k ln 4−k ln 3

=ln 4ln 3

> 1

Jan Korbel Multifractal Processes and Their Applications

Page 24: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Fractal dimension of random fractals

We can calculate the dimension of random objects from its statisticalproperties (random Koch curve has the same dimension as Koch curve)Fractal dimension of stochastic processes:

Random processes in 2D: dimension of Wiener process - 2,dimension of Lévy process - max{1, α}Random functions t 7→ X (t): Wiener function - 3

2 , Lévy function -max{1, 2− 1

α}, fBM - 2− H

Hurst exponent - gives scaling between space and time increments|∆x | ∝ ∆tH , relation to fractal dimension

Jan Korbel Multifractal Processes and Their Applications

Page 25: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Multifractal spectrum

Assumption of one scaling index (even in a statisticalmeaning) seems to be quite restrictive for many processesoccurring in natureWe relax the condition of one scaling exponent, processescan have scaling exponents locally different (|∆x | ∝ ∆tH(t))We would like to capture relative strengths of fractaldimensions, we divide the fractal into subsets Fα that scalewith an exponent α

Multifractal spectrum

f (α) = − limδ→0

ln N[Fα](δ)

ln δ

Jan Korbel Multifractal Processes and Their Applications

Page 26: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Multifractal deformations

The basic model of price evolution is based on geometric Brownianmotion

ln S(t) = µt + σW (t)

We generalize this model by introduction of time deformation, where weconsider an existence of two times: trading time on the market and realphysical clock time. The transformation between them is given by a timedeformation θ(t), so

ln S(t) = µt + σW [θ(t)]

The time deformation is constructed as a multifractal process, whichenables us to estimate the multifractal spectrum and from it scalingproperties of the process

Jan Korbel Multifractal Processes and Their Applications

Page 27: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Generation of a multifractal patterns

0.2 0.4 0.6 0.8 1.0

0.2

0.4

0.6

0.8

1.0

0.2 0.4 0.6 0.8 1.0

0.2

0.4

0.6

0.8

1.0

0.2 0.4 0.6 0.8 1.0

0.2

0.4

0.6

0.8

1.0

0.2 0.4 0.6 0.8 1.0

0.2

0.4

0.6

0.8

1.0

0.2 0.4 0.6 0.8 1.0

0.2

0.4

0.6

0.8

1.0

0.2 0.4 0.6 0.8 1.0

0.2

0.4

0.6

0.8

1.0

Jan Korbel Multifractal Processes and Their Applications

Page 28: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Multifractal deformation and its spectrum

0.2 0.4 0.6 0.8 1.0

0.2

0.4

0.6

0.8

1.0

0.2 0.4 0.6 0.8 1.0

0.02

0.04

0.06

0.08

0.2 0.4 0.6 0.8 1.0

0.5

0.6

0.7

1.30 1.35 1.40 1.45 1.50 1.55 1.60 1.65 1.700.0

0.2

0.4

0.6

0.8

1.0

Jan Korbel Multifractal Processes and Their Applications

Page 29: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Applications to financial markets

MMAR - Multifractal model of asset returns: ln S(t) = σW [θ(t)]

MSM - Markov switching multifractal: ln S(t) = W (t , σ(t))

σ2(t) = σ2(∏k

j=1 Mk (t))

Mk (t) - state variables driven by a Markov process, they determinethe final volatilityspecial choice of the process: For every time tn the variable Mk (tn)is either updated from given distribution M with intensity γk orremains the same value as in tn−1

γk is chosen approximately geometrically, M is binomial, Mk -representation of economic cycles, the process depends on 4variablesin limit of continuous time and countably many state variables webecome a time deformation

Jan Korbel Multifractal Processes and Their Applications

Page 30: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Benefits of MSM

With a few parameters, we can analyze and predictcomplex time series on financial marketsCompared to other models commonly used on financialmarkets (ARMA, GARCH,...) has MSM better resultsState variables have nice interpretationMSM is related to multifractal deformations andmultiscaling processes

Jan Korbel Multifractal Processes and Their Applications

Page 31: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Conclusions

Brownian motion is a phenomenon that has manyapplicationsIt provides an elegant description of various systemsIn case of complex processes, with memory or largefluctuations, the description failsMore appropriate models: fBM, Lévy flightMultifractal processes: good description of real models onfinancial markets

Jan Korbel Multifractal Processes and Their Applications

Page 32: Multifractal Processes and Their Applicationskmlinux.fjfi.cvut.cz/.../multifractal_processes.pdfSuch distributions are limits in long time for stochastic processes driven by independent

IntroductionBrownian motion

Memory and ScalingFractal geometry

Multifractal processesSummary

Thank you for attention.

Jan Korbel Multifractal Processes and Their Applications