48
FINAL REPORT Application of the Hilbert Huang Transform to the prediction of financial time series Cyrille BEN LEMRID, Hadrien MAUPARD Natixis supervisor : Adil REGHAI Academic supervisor : Erick HERBIN ´ Ecole Centrale Paris March 18, 2012

HHT Report

Embed Size (px)

Citation preview

Page 1: HHT Report

FINAL REPORT

Application of the Hilbert HuangTransform to the prediction of

financial time series

Cyrille BEN LEMRID, Hadrien MAUPARD

Natixis supervisor : Adil REGHAI

Academic supervisor : Erick HERBIN

Ecole Centrale Paris

March 18, 2012

Page 2: HHT Report

Contents

1 Description of the Hilbert Huang Transform, model overview 7

1.1 The Empirical Mode Decomposition . . . . . . . . . . . . . . . . . . . . . . . 7

1.2 Closed form formulas for IMFs . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 State of the Art 12

2.1 Application fields of the EMD . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.2 Existence and uniqueness of the Decomposition . . . . . . . . . . . . . . . . 12

2.2.1 Stoppage criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.2.2 Cubic spline interpolation . . . . . . . . . . . . . . . . . . . . . . . . 13

2.2.3 Additional boundary data points . . . . . . . . . . . . . . . . . . . . 14

3 Application to the prediction of financial time series 16

3.1 The Empirical Mode Decomposition in finance: stylized facts . . . . . . . . . 16

3.1.1 Empirical Modes and Market Structure . . . . . . . . . . . . . . . . . 16

3.1.1.1 Asset price and IMFs . . . . . . . . . . . . . . . . . . . . . 16

3.1.1.2 High frequency modes . . . . . . . . . . . . . . . . . . . . . 17

3.1.1.3 Low frequency modes . . . . . . . . . . . . . . . . . . . . . 20

3.1.2 Back to the Box & Jenkins framework . . . . . . . . . . . . . . . . . 20

3.1.3 Prediction hypotheses . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.1.3.1 Deterministic periodicity of low frequency IMFs . . . . . . . 24

3.1.3.2 Stochastic periodicity of low frequency IMFs . . . . . . . . . 24

3.2 Insights of potential market predictors . . . . . . . . . . . . . . . . . . . . . 25

3.2.1 Deterministic periodicity: Low frequency Mean Reverting Strategy . 25

2

Page 3: HHT Report

3.2.2 Conditional expectation: Low Frequency Multi Asset Shifting PatternRecognition Strategy and Mono Asset IMF Pattern Recognition Strategy 25

3.2.2.1 Low Frequency Multi Asset Shifting Pattern RecognitionStrategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.2.2.2 Low Frequency Mono Asset IMF Pattern Recognition Strategy 26

4 Strategies analysis 28

4.1 Portfolio management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.1.1 Trading strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.1.2 Investment Horizon . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.1.3 Starting time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4.1.4 Trading time span . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4.1.5 Annualizing the PnL and reducing its variance . . . . . . . . . . . . 29

4.2 Underlying and target market . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5 Results 31

5.1 Empirical choices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5.2 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.2.1 Volatility: VIX Index . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.2.2 Volatility: VStoxx Index . . . . . . . . . . . . . . . . . . . . . . . . . 33

5.2.3 Volatility: other indices: aggregate performance . . . . . . . . . . . . 33

5.2.4 French stocks: CAC 40: Aggregate performance . . . . . . . . . . . . 34

5.2.5 Equities Indices and trading pairs: Aggregate performance . . . . . . 34

5.2.6 Commodities: West Texas Intermediate (WTI) . . . . . . . . . . . . 35

A Time series Prerequisites 43

A.1 Stationary and linear processes . . . . . . . . . . . . . . . . . . . . . . . . . 43

A.1.1 Stationarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

A.1.2 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

A.1.3 Wold’s decomposition: . . . . . . . . . . . . . . . . . . . . . . . . . . 44

A.2 The particular case of financial time series: parametric and non parametricextensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

A.2.1 Non-stationary and non linear financial time series . . . . . . . . . . 45

A.2.2 Parametric processes for financial time series . . . . . . . . . . . . . . 45

3

Page 4: HHT Report

A.2.3 Non parametric processes for financial time series . . . . . . . . . . . 46

A.3 General time series: the Box & Jenkins approach for prediction . . . . . . . 46

B Evaluation criteria of backtests 47

4

Page 5: HHT Report

Introduction

This report presents the Hilbert Huang research work of Cyrille Ben Lemrid and HadrienMaupard.

The Hilbert Huang Transform relies on two steps: a first non-parametric Empirical ModeDecomposition which derives the signal into Intrinsic Mode Functions (semi-periodic func-tions) of various frequencies and then a Hilbert Decomposition, projecting the IMFs onto atime-frequency 3 dimensional graph. The details of the algorithm are thoroughly explainedin the first chapter of this report.

Due to the lack of theoretical formulation of the latter, and in order to keep our algorithmflexible and simple, we will only use the Huang Transform, i.e the Empirical ModeDecomposition (EMD).

Once applied to finance, it is well known that usual tools for the prediction of time seriesare power less. Stationary and linear models, such as ARIMA processes, are unable topredict financial time series, which display non stationarity and a long memory. Hence,some extensions exist, parametric or non parametric. The EMD belongs the non parametricpredictors of non linear non stationary time series.

In chapter 2, based on empirical observations, interesting stylized facts are derived: IMFsare uncorrelated to each other. Low frequency IMFs are periodic, and explain most of thevariance of the original time series. With their smooth and regular form, they are still ableto catch most of the information of the time series. High frequency IMFs are closer torandom processes, and have some stationarity. These facts connect the EMD with the Box& Jenkins statistical framework: a time series can be seem as the sum of a semi-periodicor seasonal process (the low frequency IMFs) and a random semi-stationary process (highfrequency IMFs).

In chapter 3, two categories of predictors are introduced, relying on two hypotheses on theseasonal process: either it is deterministic, and can be prolonged, or it remains stochastic,and conditional expectation is the best predictor. The hypothesis of deterministic seasonalprocess gives one strategy: Low Frequency Mean Reverting Strategy. The hypothesis ofstochastic periodicity of the seasonal process gives two strategies: a Low Frequency MultiAsset Shifting Pattern Recognition, and a Low Frequency Mono Asset Shifting PatternRecognition Strategy.

5

Page 6: HHT Report

In chapter 4, the backtest method of the strategies is formulated, and underlyings for thebacktests are chosen: Implied Volatilities, Stocks, Indices and trading pairs, Commodities.

Finally, the results of these backtests are commented.

In the Annex, prerequisites about time series and asset management literature are given.

6

Page 7: HHT Report

Chapter 1Description of the Hilbert Huang Transform,model overview

The Hilbert-Huang transform (HHT) is an empirically based data analysis method, whichis performed in two steps: first some descriptive patterns are extracted by performing anadaptive decomposition called Empirical Mode Decomposition (Huang Transform), and thenwe can capture the local behavior of these patterns by using tools coming from HilbertSpectral Analysis (Hilbert Transform).

1.1 The Empirical Mode Decomposition

The Empirical Mode Decomposition is based on the assumption that any data consists ofdifferent simple intrinsic modes of oscillations. Each of these oscillatory modes is representedby an intrinsic mode function (IMF) which satisfies two conditions:– In the whole data set, the number of zero crossings and the number of extrema must equal

or differ at most by one.– It exists two envelopes one passing through the local maxima and the other by the local

minima such that at any point the mean value of the two envelopes is zero.

Definition 1.1.1 An R-valued process x(t) is called an IMF (Intrinsic Mode Function) ifit is a continuous process, that satisfies the following conditions:

1. The number of extrema and the number zero-crossings must either equal or differ atmost by one : |#Γmax + #Γmin −#Γ0| 6 1.

with Γ0 = {t ∈ I|x(t) = 0}Γmax = {t ∈ I| ∃u > 0, ∀s ∈ ]t− u, t+ u[/{t}, x(t) > x(s)}Γmin = {t ∈ I| ∃u > 0, ∀s ∈ ]t− u, t+ u[/{t}, x(t) < x(s)}

7

Page 8: HHT Report

2. The mean value m(t) = (xsup(t)+xinf(t))/2 of the envelope defined by the local maximaxsup(t) and the envelope defined by the local minima xinf(t) is zero:

∃xsup ∈ Env(Γmax), ∃xinf ∈ Env(Γmin), ∀t ∈ I, m(t) = 0

with Env(Γmax) = {f ∈ C(I) |∀t ∈ Γmax, f(t) = x(t)}Env(Γmin) = {f ∈ C(I) |∀t ∈ Γmin, f(t) = x(t)}

An IMF represents a simple oscillatory mode as a counterpart to the simple harmonicfunction, but it is much more general: instead of constant amplitude and frequency, asin a simple harmonic component, the IMF can have a variable amplitude and frequency asfunctions of time.

The first condition is apparently necessary for oscillation data; the second condition requiresthat upper and lower envelopes of IMF are symmetric with respect to the x-axis.

The idea of the EMD method is to separate the data into a slow varying local mean partand a fast varying symmetric oscillation part, the oscillation part becomes the IMF and thelocal mean the residue, the residue serves as input data again for further decomposition,the process repeats until no more oscillation can be separated from the residue of frequencymode. On each step of the decomposition, since the upper and lower envelope of the IMFare unknown initially, a repetitive sifting process is applied to approximate the envelopeswith cubic spline functions passing through the extrema of the IMF. The data serves as theinitial input for the IMF sifting process, and the refined IMF is the difference between theprevious version and mean of the envelopes, the process repeats until the predefined stopcondition is statisfied. The residue is then the difference between the data and the improvedIMF.

One big advantage of this procedure is that it can deal with data from nonstationary andnonlinear processes. This method is direct, and adaptive, with a posteriori-defined basis,from the decomposition method, based on and derived from the data.

The intrinsic mode components can be decomposed in the following steps :

1. Take an arbitrary input signal x(t) and initialize the residual: r0(t) = x(t), i = 1

2. Extract the ith IMF

3. Initialize the ”proto-Imf” h0 with h0(t) = ri(t), k = 1

4. Extract the local maxima and minima of the ”proto-Imf” hk−1(t)

5. Interpolate the local maxima and the local minima by a cubic spline to form upperand lower envelopes of hk−1(t)

6. Calculate the mean mk−1(t) of the upper and lower envelopes of hk−1(t)

7. Define: hk(t) = hk−1(t)−mk−1(t)

8. If IMF criteria are satisfied, then set IMFi(t) = hk(t) else go to (4) with k = k + 1

9. Define: ri(t) = ri−1(t)− IMFi(t)

10. If ri(t) still has at least two extrema, then go to (2) with i = i+1; else the decompositionis completed and ri(t) is the ”residue” of x(t).

8

Page 9: HHT Report

Figure 1.1: Sifting process of the empirical mode decomposition: (a) an arbitrary input; (b)identified maxima (diamonds) and minima (circles) superimposed on the input; (c) upperenvelope and lower envelope (thin solid lines) and their mean (dashed line); (d) prototypeintrinsic mode function (IMF) (the difference between the bold solid line and the dashed linein Figure 2c) that is to be refined; (e) upper envelope and lower envelope (thin solid lines)and their mean (dashed line) of a refined IMF; and (f) remainder after an IMF is subtractedfrom the input.

Once a signal has been fully decomposed, the signal x(t) can be written as

x(t) =N∑i=1

IMFi(t) + r(t)

1.2 Closed form formulas for IMFs

Rather than a Fourier or wavelet based transform, the Hilbert transform was used, in orderto compute instantaneous frequencies and amplitudes and describe the signal more locally.Equation 3.1 displays the Hilbert transform Yt, which can be written for any function x(t)of Lp class. The PV denotes Cauchy’s principle value integral.

Yt = H [IMFt] =1

πPV

+∞∫−∞

IMFst− s

ds

= limε→0

t−ε∫−∞

IMFst− s

ds+

+∞∫t+ε

IMFst− s

ds

9

Page 10: HHT Report

Algorithm 1 Empirical Mode Decomposition

Require: Signal, threshold ∈ R+;1: curSignal← Signal, i = 1;2: while (numberOfExtrema(curSignal) > 2) do3: curImf ← curSignal4: while (isNotAnImf(curImf , threshold) = true) do5: Γmax ←emdGetMaxs(curImf);6: Γmin ←emdGetMins(curImf);7: Γmax ←emdMaxExtrapolate(curImf , Γmax);8: Γmin ←emdMinExtrapolate(curImf , Γmin);9: xinf ←emdInterpolate(curImf , Γmax);10: xsup ← emdInterpolate(curImf , Γmin);11: bias← (xinf + xinf )/2;12: curImf ← curImf − bias;13: end while14: IMFi ← curImf , i = i+ 1;15: curSignal← curSignal− IMFi;16: end while17: N = i;18: residual← curSignal19: return (IMFi)i=1..N

An analytic function can be formed with the Hilbert transform pair as shown in equation 1.1

Zt = IMFt + iYt = Ateiθt

where At =√IMF 2

t + Y 2t

θt = arctan

(Yt

IMFt

)

At and θt are the instantaneous amplitudes and phase functions, respectively

The instantaneous frequency ft can then be written as the time derivative of the phase, asshown in equation

ft =1

dθtdt

Hence, an IMF can be expressed analytically :

IMFt = At cos

(2π

∫ t

0

fsds+ ψ

)(1.1)

[11] and [14] showed that not all functions give ”good” Hilbert transforms, meaning thosewhich produce physical instantaneous frequencies. The signals which can be analyzed usingthe Hilbert transform must be restricted so that their calculated instantaneous frequencyfunctions have physical meaning.

10

Page 11: HHT Report

Next, the empirical mode decomposition is essentially an algorithm which decomposes nearlyany signal into a finite set of functions which have ”good” Hilbert transforms that producephysically meaningful instantaneous frequencies.

After IMFs have been obtained from the EMD method, one can further calculate instanta-neous phases of IMFs by applying the Hilbert Huang tranform to each IMF component.

11

Page 12: HHT Report

Chapter 2State of the Art

2.1 Application fields of the EMD

The Empirical Mode Decomposition can be a powerful tool to separate non-linear andnon-stationary time series into the trend (residue function) and the oscillation (IMF)on different time scales, it can describe the frequency components locally adaptively fornearly any oscillating signal. This makes the tool extremely versatile. This decompositionfind applications in many fields where traditionally Fourier analysis method or Waveletmethod dominate. For instance, HHT has been used to study a wide variety of dataincluding rainfall, earthquakes, Sunspot number variation, heart-rate variability, financialtime series, and ocean waves to name a few subjects. But there are still some remainingmathematical issues related to this decomposition which have been mostly left untreated:convergence of the method, optimization problems (the best IMF selection and uniquenessof the decomposition), spline problems (best spline functions for the HHT). In the followingchapters, these inexactitudes will be thoroughly developed, and the current potentialsolutions from the literature will be gathered.

2.2 Existence and uniqueness of the Decomposition

The convergence of the proto-IMF (hk)k>0 sequence to an IMF is equivalent to the conver-gence of (mk)k>0 the bias to zero.

mkL2

−−−→k→∞

0

where mk = hk−1(t)− hk(t)

12

Page 13: HHT Report

2.2.1 Stoppage criteria

The inner loop should be ended when the result of the sifting process meets the definitionof an IMF. In practice this condition is too strong so we need to specify a relaxed conditionwhich can be met in a finite number of iterations. The approximate local envelope symmetrycondition in the sifting process is called the stoppage (of sifting) criterion. In the past, severaldifferent types of stoppage criteria were adopted: the most widely used type, which originatedfrom Huang et al. [14], is given by a Cauchy type of convergence test, the normalized SquaredDifference between two successive sifting operations defined as

SDk =

T∑t=0

|hk−1(t)− hk(t)|2

T∑t=0

h2k−1(t)

must be smaller than a predetermined value. This definition is slightly different from theone given by Huang et al. [14] with the summation signs operating for the numerator anddenominator separately in order to prevent the SDk from becoming too dependent on localsmall amplitude values of the sifting time series.

If we assume that the local mean between the upper and lower envelopes converges to zeroin sense of the euclidean norm, we can apply the following Cauchy criterion :

log

(‖mk−1‖2

L2

‖hk−1‖2L2

)6 threshold

In our implementation the threshold has been calibrated to -15.

These Cauchy types of stoppage criteria are seemingly rigorous mathematically. However,it is difficult to implement this criterion for the following reasons: First, how small is smallenough begs an answer. Second, this criterion does not depend on the definition of the IMFsfor the squared difference might be small, but there is no guarantee that the function willhave the same numbers of zero crossings and extrema.

2.2.2 Cubic spline interpolation

Since the EMD is an empirical algorithm and involves a prescribed stoppage criterion tocarry out the sifting moves, we have to know the degree of sensitivity in the decompositionof an input to the sifting process, so the reliability of a particular decomposition can furtherbe determined. Therefore, a confidence limit of the EMD is a desirable quantity. To computethe upper and lower envelopes we use a piecewise-polynomial approximation.

In general, the goal of a spline interpolation is to create a function which achieves the bestpossible approximation to a given data set. For a smooth and efficient approximation, onehas to choose high order polynomials. A popular choice is the piecewise cubic approximationfunction of order three.

13

Page 14: HHT Report

The basic idea behind using a cubic spline is to fit a piecewise function of the form :

S(x) =

S1(x), x ∈ [x1, x2[S2(x), x ∈ [x2, x3[

...Sn−1(x), x ∈ [xn−1, xn[

where Si(x) is a third degree polynomial with coefficients ai, bi, ci and di defined fori = 0, 1, ..., n− 1 by :

Si(x) =(ai + bi(x− xi) + ci(x− xi)2 + di(x− xi)3) 1{x∈[xi,xi+1[}

More formally, given a function f(x) defined on an interval [a, b] and a set of nodesa = x0 < x1 < ... < xn = b, a cubic spline interpolant S(x) for f(x) is a function thatsatisfies the following conditions :

1. S(x) =n−1∑i=0

Si(x)1{x∈[xi,xi+1[} is a cubic polynomial denoted by Si(x), on the subinterval

[xi, xi+1) for each i = 0, 1, ..., n− 1.

2. Si+1 (xi+1) = Si (xi+1) for each i = 0, 1, ..., n− 2.

3. S ′i+1 (xi+1) = S ′i (xi+1) for each i = 0, 1, ..., n− 2.

4. S ′′i+1 (xi+1) = S ′′i (xi+1) for each i = 0, 1, ..., n− 2.

5. and one of the following set of boundary conditions is also satisfied :

S ′′(x0) = S ′′(xn) = 0 (free or natural boundary)

S ′(x0) = f ′(x0) and S ′(xn) = f ′(xn) (clamped boundary).

But there are four problems with this decomposition method :– the spline (cubic) connecting extrema is not the real envelope,– the resulting IMF function does not strictly guarantee the symmetric envelopes,– some unwanted overshoot may be caused by the spline interpolation,– the spline cannot be connected at both ends of the data series.Higher order spline does not in theory resolve these problems.

2.2.3 Additional boundary data points

It has been already illustrated that the cubic spline has somehow to be kept close to thefunction especially near both ends of the data series. Therefore, the creation of additionalboundary data points, which are supposed to be applicable to the current data set, appearsto be the key element in technically improving the EMD. All artificially added boundary datapoints are generated from within the original set of discrete knots to represent a characteristicnatural behaviour. One routine is to add new maxima and minima to the front and rearof the data series. As a basic requirement, these data points are located off the originaltime span the signal was recorded in. Therefore, no information is cancelled out and thenatural data series remains unaffected. However one disadvantage of this method is that weanticipate the future trend of the data.

14

Page 15: HHT Report

Figure 2.1: Additional boundary data points

Figure 2.2: Additional boundary data points

15

Page 16: HHT Report

Chapter 3Application to the prediction of financial timeseries

3.1 The Empirical Mode Decomposition in finance:

stylized facts

In the markets, one can assume that different modes of oscillations in stock prices areprovoked by different kinds of actors. With this approach, the lowest frequency IMFs couldbe considered as a statistical proxy to infer the behavior of big investors (Banks, Insurancecompanies, Hedge Funds, Mutual Funds, Pension Funds..) and predict the evolution of astock in the long run.

3.1.1 Empirical Modes and Market Structure

3.1.1.1 Asset price and IMFs

With the EMD, a time series can be represented as follows:

∃NIMF ∈ N∗|∀t ∈ Z, Xt =

NIMF∑i=1

IMF it + rt

It can be interesting to observe the correlation matrix of the random vectorXt

IMF 1t

...IMFN

t

rt

t∈Z

This matrix can be empirically computed on an example, as shown in Figure 3.1, page 17.

16

Page 17: HHT Report

This correlation matrix shows three stylized facts:

X IMF1 IMF2 IMF3 IMF4 IMF5 IMF6 IMF7 TrendX 1.000 0.038 0.039 0.172 0.184 0.169 0.488 0.795 0.879

IMF1 0.038 1.000 0.034 -0.009 -0.026 0.002 0.022 -0.021 -0.019IMF2 0.039 0.034 1.000 -0.040 -0.005 0.043 -0.015 -0.022 -0.025IMF3 0.172 -0.009 -0.040 1.000 0.109 -0.114 0.102 0.049 0.059IMF4 0.184 -0.026 -0.005 0.109 1.000 -0.035 0.018 0.035 0.040IMF5 0.169 0.002 0.043 -0.114 -0.035 1.000 -0.096 -0.014 -0.038IMF6 0.488 0.022 -0.015 0.102 0.018 -0.096 1.000 -0.043 0.148IMF7 0.795 -0.021 -0.022 0.049 0.035 -0.014 -0.043 1.000 0.977Trend 0.879 -0.019 -0.025 0.059 0.040 -0.038 0.148 0.977 1.000

Figure 3.1: Empirical correlation matrix of AXA share price and its IMFs, from 01/01/2003to 14/11/2011

– The EMD displays some empirical orthogonal features. Hence, the following theoreticalassumption can be made:

∀(i, j) ∈ [[1;NIMF ]]2, i 6= j ⇒ 〈IMFi, IMFj〉 = 0

With the usual following scalar product:

〈〉 : L2(R)× L2(R)→ R

(X, Y ) 7→ Cov(X, Y )

– Low Frequency IMFs display strong correlations to the original price series.– High Frequency IMFs are uncorrelated to the original price series.

3.1.1.2 High frequency modes

Empirical modes have a strong connection to the market structure. On top of beinguncorrelated to the general time series, high frequency IMFs present strong correlation todaily price movements, as shown by the following empirical correlation matrix of daily yieldsto the IMFs processes and the trend process, (see Figure 3.3, page 18).

High frequency IMFs are accurately following daily movements, as shown in 3.4, page 19.

Moreover, there appears to be local jumps in amplitude of the high frequency IMFs whendaily changes are becoming sharper. This comes along local jumps in volatility. Hence, theamplitude of high frequency IMFs is probably positively correlated to the short term implicitvolatility of the At-The-Money options on the stock. As we see on the last graph, amplitudejumps along with volatility, as daily yields exceed 10% (see Figure 3.6 and Figure 3.5).

Finally, despite their significant short term periodicity, they display some signs of stationar-ity, as shown in Figure 3.2, page 18.

17

Page 18: HHT Report

Figure 3.2: Sample Autorrelation Function of the highest frequency IMF

diff(Axa)Axa

IMF1 IMF2 IMF3 IMF4 IMF5 IMF6 IMF7 Trenddiff(Axa)Axa

1.000 0.552 0.087 0.029 0.016 -0.007 -0.008 -0.004 -0.003IMF1 0.552 1.000 0.034 -0.009 -0.026 0.002 0.022 -0.021 -0.019IMF2 0.087 0.034 1.000 -0.040 -0.005 0.043 -0.015 -0.022 -0.025IMF3 0.029 -0.009 -0.040 1.000 0.109 -0.114 0.102 0.049 0.059IMF4 0.016 -0.026 -0.005 0.109 1.000 -0.035 0.018 0.035 0.040IMF5 -0.007 0.002 0.043 -0.114 -0.035 1.000 -0.096 -0.014 -0.038IMF6 -0.008 0.022 -0.015 0.102 0.018 -0.096 1.000 -0.043 0.148IMF7 -0.004 -0.021 -0.022 0.049 0.035 -0.014 -0.043 1.000 0.977Trend -0.003 -0.019 -0.025 0.059 0.040 -0.038 0.148 0.977 1.000

Figure 3.3: Empirical correlation of daily returns of AXA and its IMFs , from 01/01/2003to 14/11/2011

A Ljung Box Test is a more quantitative way to assess stationarity. It tests the hypothesisof being a second order stationary process.

Definition 3.1.1 Let m ∈ N. (H0) : ρ1 = ρ2 = .. = ρm = 0. The Ljung-Box Test statisticis given by:

Q(m) = N(N + 2)m∑h=1

ρ2h

N − h

QH0(m) ∼ χ2m

However, the test rejects the absence of autocorrelations for the highest frequency IMF onour previous example of AXA. Therefore, it suggests that these high frequency modes display

18

Page 19: HHT Report

Figure 3.4: Daily returns of Societe Generale and its highest frequency IMF

Figure 3.5: Daily returns of Societe Generale and its highest frequency IMF during a highvolatility period

19

Page 20: HHT Report

Figure 3.6: Daily returns of Societe Generale and its highest frequency IMF normalized

some stationary properties, but keep a very short periodicity, making these processes noti.i.d.

3.1.1.3 Low frequency modes

Low Frequency modes describe the long term dynamics of the stock. It reflects the positionsof long term actors within the market,(see Figure 3.7, page 21).

It can also be interpreted in terms of economic cycles, if applied to very long time frames,(see Figure 3.8, page 21).

3.1.2 Back to the Box & Jenkins framework

The EMD algorithm derives the following decomposition of a given financial time series:

∃NIMF ∈ N∗|∀t ∈ Z, Xt =

NIMF∑i=1

IMF it + rt

Moreover, low frequency IMFs explain the general evolution of the stock price, and havestrong periodic patterns, whereas high frequency IMFs are linked to the daily movements.Figure 3.9, page 22 shows all the IMFs of an example of financial time series. In red are lowfrequency IMFs, in blue high frequency IMFs, in green the stock price.

20

Page 21: HHT Report

Figure 3.7: Societe Generale stock price and the sum of its 2 lowest frequency IMFs

Figure 3.8: VIX and the sum of its 3 lowest frequency IMFs

Hence, we can separate the previous sum into the two components of the Box & Jenkinsapproach.

21

Page 22: HHT Report

Figure 3.9: Empirical Mode Decomposition of Axa, starting 01/01/2003 until 14/11/2011

∃NIMF ∈ N∗|∀t ∈ Z, Xt =

Nsep∑i=1

IMF it︸ ︷︷ ︸

Random part

+

NIMF∑i=Nsep+1

IMF it︸ ︷︷ ︸

Seasonal part

+ rt︸︷︷︸Trend

In the rest of this report, we will sometimes include the trend process in the seasonal part.In the previous example, the decomposition is the following:

Remark 3.1.2 In the Figure 3.10, page 23 , the correlation between the ”Random Part”and the ”Seasonal Part” is:

Corr(Xrandomt (t), Xseasonal

t (t)) = −0.01

In order to properly differentiate low frequency IMFs and high frequency IMFs, one needs arule. Multiple choices are possible:

– A stationarity criterion for high frequency IMFs: statistical tests, such as Ljung Box Test,Runs Test, KPSS Test..

– A periodicity criterion for low frequency IMFs: low frequency IMFs must display less thanp pseudo periods within the time interval. Beyond that threshold p, they are consideredas moving too quickly, and not carrying information relative to the general evolution ofthe series.

Provided that the goal of this decomposition is to extract a seasonal pattern reflecting thebroad evolution of the stock price, a selection criterion for low frequency IMFs can seemmore appropriate. It is also more intuitive than statistical tests. Therefore, the criterionchosen is the following:

22

Page 23: HHT Report

Figure 3.10: Box& Jenkins Decomposition of Axastock price based on EMD, starting01/01/2003 until 14/11/2011

∀i ∈ [[1;NIMF ]] ,(IMF i

t

)16t6T

∈(Xseasonalt

)16t6T

⇔ #Γ[[1;T ]]0,i 6 3

where

# Γ[[1;T ]]0,i =

{s ∈ [[1;T ]] |IMF i

s = 0}

Therefore, we can now expressly write the Box & Jenkins decomposition based on the EMD:

∃NIMF ∈ N∗|∀t ∈ [[1;T ]] , Xt =

NIMF∑i=1

IMF it .1

{#Γ

[[1;T ]]0,i >3

}︸ ︷︷ ︸

Random part

+

NIMF∑i=1

IMF it .1

{#Γ

[[1;T ]]0,i 63

}︸ ︷︷ ︸

Seasonal part

+ rt︸︷︷︸Trend

Remark 3.1.3 In the Figure 3.10, page 23, the ”Seasonal Part” achieves to explain 91% ofthe variance of the original time series:

R2 :=V ar(Xseasonal

t + rt)

V ar(Xt)= 0.91

3.1.3 Prediction hypotheses

We have now decomposed our signal in two parts: the seasonal component, and the randomhigh frequency component. These two components are moreover uncorrelated, and thevariance of the seasonal process explains most of the variance of the original time series.

23

Page 24: HHT Report

We have the following decomposition:

∀T ∈ N,∃NIMF ∈ N∗|∀t ∈ [[0;T ]] ,

Xt =N∑i=1

IMF it .1

{#Γ

[[1;T ]]0,i >3

}︸ ︷︷ ︸

Random part

+

NIMF∑i=Nsep+1

IMF it .1

{#Γ

[[1;T ]]0,i 63

} + rt︸︷︷︸Trend︸ ︷︷ ︸

Seasonal part

We can now proceed to separate estimations for each process. As we noticed on the earlierexample, the Random Part Process is approximately centered on zero. Therefore, we willmake a simple prediction for this process:

E[(Xrandoms

)T+16s62.T

|(Xrandomt

)16t6T

]= (0)T+16s62.T

We now have to formulate a prediction of the seasonal process. Following the framework ofBox & Jenkins, two hypotheses are possible, in order to formulate predictions.

3.1.3.1 Deterministic periodicity of low frequency IMFs

The first possible assumption is that the seasonal component is deterministic. Hence, weassume that in the future, this periodic component will keep its properties:

– Periodicity: ∀i ∈ [[i0;NIMF ]] ,∀t ∈ Z,Ti∑j=1

IMF it+j = 0, or ∀i ∈ [[i0;NIMF ]] , ∀t ∈

Z, IMF it+Ti

= IMF it

– IMF structure: ∀i ∈ [[i0;NIMF ]] ,∀t ∈ Z,∣∣∣#Γ

[t;t+Ti]max,i + #Γ

[t;t+Ti]min,i −#Γ

[t;t+Ti]0,i

∣∣∣ 6 1

WhereΓ

[t;t+Ti]0,i =

{s ∈ [t; t+ Ti] |IMF i

s = 0}

Γ[t;t+Ti]min,i =

{s ∈ [t; t+ Ti] |∃u > 0, s = arg min

v∈[s−u,s+u]

IMF iv

}

Γ[t;t+Ti]min,i =

{s ∈ [t; t+ Ti] |∃u > 0, s = arg max

v∈[s−u,s+u]

IMF iv

}

Hence, with these properties, each low frequency IMF can be easily prolonged, hence theestimated future seasonal process.

3.1.3.2 Stochastic periodicity of low frequency IMFs

The second possible assumption is less strong that the first one. Instead of assuming thatthe seasonal component is deterministic, it is now assumed that it presents some periodicity,while remaining stochastic.

24

Page 25: HHT Report

E[(Xseasonals + rt

)T+16s62.T

|(Xseasonalt + rt

)16t6T

]= (Xseasonal

s + rt)T+16s62.T

if we assume that future estimations should rely on sequences from the past of the sameduration.

3.2 Insights of potential market predictors

3.2.1 Deterministic periodicity: Low frequency Mean RevertingStrategy

This strategy relies on the hypothesis of deterministic periodicity of the seasonal process.To formulate a prediction at a certain time t, within the horizon T, this strategy relies onthe following algorithm:

∀s ∈ [[t− T ; t]] , Xs = Xrandoms +Xseasonal

s

∀s ∈ [[t− T ; t]] , Xseasonals = log

(Xseasonals

Xseasonal

)where X

seasonal=

1

T + 1

t∑s=t−T

Xseasonals

if{(Xseasonalt − 2Xseasonal

t−1 +Xseasonalt−2

)> threshold

}then

Xseasonalt+T

Xseasonalt

> 1 and αMeanRe vertingStrat(t) = 1

elseif{(Xseasonalt − 2Xseasonal

t−1 +Xseasonalt−2

)< −threshold

},

thenXt+T

Xt

< 1 and αMeanRe vertingStrat(t) = −1

3.2.2 Conditional expectation: Low Frequency Multi Asset Shift-ing Pattern Recognition Strategy and Mono Asset IMF Pat-tern Recognition Strategy

3.2.2.1 Low Frequency Multi Asset Shifting Pattern Recognition Strategy

This strategy relies on the hypothesis of stochastic periodicity of the seasonal process. Itconsiders a pool of N assets, among which is the asset which is to be predicted: i0 .Toformulate a prediction at a certain time t0, within the horizon T, this strategy relies on thefollowing algorithm:

First, each price process is decomposed.

25

Page 26: HHT Report

∀i ∈ [[1;Nassets]] ,∀s ∈ [[0; t0]] , X is = Xrandom,i

s +Xseasonal,is

And the asset of interest too, since it belongs to the pool of assets.

∀s ∈ [[0; t0]] , X i0s = Xrandom,i0

s +Xseasonal,i0s

Then, the three best fitting patterns are chosen:

{(i1, t1) , (i2, t2) , (i3, t3)}

= arg min(i,u)∈[[1;Nassets]]×[[1;t0−T ]]

∥∥∥∥∥∥(

log

(Xseasonal,is

Xseasonal,i

[[u;u+T ]]

))u6s6u+T

(log

(Xseasonal,i0s

Xseasonal,i0[[t0−T ;t0]]

))t0−T6s6t0

∥∥∥∥∥∥2

where Xseasonal,i0[[t0−T ;t0]] =

1

T + 1

t0∑s=t0−T

Xseasonal,i0s ,

and Xseasonal,i

[[u;u+T ]] =1

T + 1

u+T∑s=u

Xseasonal,is

Let Z =1{Xi1

t1+T>X

i1t1} + 1{Xi2

t2+T>X

i2t2} + 1{Xi3

t3+T>X

i3t3}

3

Z is the decision variable. Predictions are made depending on the vote of the three bestfitted scenarios.

if

{Z >

1

2

},then

Xt0+T

Xt0

> 1 and αShiftingPatternStrat(t) = 1

else if

{Z <

1

2

},then

Xt0+T

Xt0

< 1 and αShiftingPatternStrat(t) = −1

3.2.2.2 Low Frequency Mono Asset IMF Pattern Recognition Strategy

This strategy relies on the hypothesis of stochastic periodicity of the seasonal process. It isvery similar to the previous strategy. Differences exist on two essential points:– It does not require any other time series than the historical prices of the asset that is to

be predicted– It is adapted.

26

Page 27: HHT Report

To formulate a prediction at a certain time t0, within the horizon T, this strategy relies onthe following algorithm:

∀s ∈ [[t0 − T ; t0]] , X i0s = Xrandom,i0

s +Xseasonal,i0s

{t1, t2, t3} = arg minu∈[[1;t0−T ]]

∥∥∥∥∥∥(

log

(Xseasonal,i0s

Xseasonal,i0[[u;u+T ]]

))u6s6u+T

(log

(Xseasonal,i0s

Xseasonal,i0[[t0−T ;t0]]

))t0−T6s6t0

∥∥∥∥∥∥2

where Xseasonal,i0[[t0−T ;t0]] =

1

T + 1

t0∑s=t0−T

Xseasonal,i0s ,and X

seasonal,i0[[u;u+T ]] =

1

T + 1

u+T∑s=u

Xseasonal,i0s

Hence, the decision variable is:

Z =1{Xi0

t1+T>X

i0t1} + 1{Xi0

t2+T>X

i0t2} + 1{Xi0

t3+T>X

i0t3}

3

And the predictions computed by the strategy:

if

{Z >

1

2

}, then

Xt0+T

Xt0

> 1 and αAutoPatternStrat(t) = 1

elseif

{Z <

1

2

}, then

Xt0+T

Xt0

< 1 and αAutoPatternStrat(t) = −1

27

Page 28: HHT Report

Chapter 4Strategies analysis

4.1 Portfolio management

Definition 4.1.1 Let Pt, t ∈ [1;T ] denote the stochastic process of the spot price of an asset.

4.1.1 Trading strategy

Definition 4.1.2 A trading strategy is represented as follows. At each time period, itprovides an anticipation of the market: -1 is bearish (i.e the price will decline), +1 is bullish(i.e the price will rise).

α : [0;T ]→ {−1; 1}

4.1.2 Investment Horizon

An investment duration Tinvest, in terms of business days, drives the predictions of a givenstrategy. It can range from 10 to 252 business days (from two weeks until a year). Therefore,portfolio management can be driven by mid term or long term earnings prospects.

Tinvest ∈ [|50; 252|]

These prospects drive the PnL of the strategy, as positions will be covered after Tinvestbusiness days.

Definition 4.1.3

∀α ∈ {−1; 1}[|1;T |],∀t ∈ [1;T ] ,

P&LTinvestα (t) =

(α(i)

(P(i+Tinvest)∧t − Pi)Pi

)16i6t−1

28

Page 29: HHT Report

4.1.3 Starting time

The beginning of the time series is not subject to predictions. It is kept as prerequisiteinformation in order to compute the first predictions. Indeed, concerning the Patterns FittingStrategies, one needs to have a few historical patterns available for fitting. Therefore, thepredictions start at the time:

tstart = 10.Tinvest

Hence, the new PnL vector:

∀α ∈ {−1; 1}[|1;T |],∀t ∈ [tstart;T ] ,

P&LTinvestα (t) =

(α(i)

(P(i+Tinvest)∧t − Pi)Xi

)tstart6i6t−1

4.1.4 Trading time span

A trading time span δt defines the duration between two portfolio rebalances. It is definedin terms of business days. Every δt days, one trade is closed and another position is taken.By default, and assumed in the back tests, it is equal to a fifth of the investment duration.Therefore, for example for Tinvest = 252, there will be 5 rebalances per year, one every 50business days. Hence, in this example, δt = 50.

δt =Tinvest

5

Therefore, the PnL now becomes:

∀α ∈ {−1; 1}[|1;T |],∀t,

P&LTinvest,δtα (t) =

(α(i.δt + tstart)

(P(Tinvest+i.δt+tstart)∧t − Pi.δt+tstart)Xi.δt+tstart

)06i6

⌊(T−tstart)

δt

4.1.5 Annualizing the PnL and reducing its variance

The PnL computed so far still carries a time dependence. It needs to be annualized, withthe following operation:

∀α ∈ {−1; 1}[|1;T |],∀t,

P&LTinvest,δtα (t) =

(α(i.δt + tstart)

(P(Tinvest+i.δt+tstart)∧t − Pi.δt+tstart)Xi.δt+tstart

.

√252

Tinvest

)06i6

⌊(T−tstart)

δt

Moreover, it is valuable to manage reducing the volatility of returns of a given strategy. Ifit is not at the expense of its mean rate of return, it contributes to slightly improving thesharp ratio. Hence, usual stop losses and cash ins are implemented in the back tests.

29

Page 30: HHT Report

From this section, we know have a frame for deriving a PnL vector from a given strategyα ∈ {−1; 1}[|1;T |], and a given a price process Pt, t ∈ [1;T ]. The latter remains now to beevaluated with objective criteria.

4.2 Underlying and target market

Three potential trading strategies were identified. They have been tested on three differenttypes of underlyings, for the following reasons:

- Stocks: CAC40. The goal is to find recurrent seasonality patterns within a single stock,or between different stocks. This seasonality could be caused by important market shifts onthe initiative of big players, such as pension funds, insurance companies, asset managers, orbanks proceeding to portfolio rebalancing.

- Implied Volatilities: VIX Index, VStoxx Index, VCAC, VDAX.. These indices arecomputed by a closed formula relying on implied volatilities of numeral options, hencereflecting the overall structure of the volatility smile.

- Index Pairs: based on the following most liquid worldwide indexes: CAC, DAX, SX5E,SPX, NKY, UKX, IBOV, SMI, HSI. Index pairs provide trajectories which generally followmean reverting processes, and have the advantage of being extremely liquid.

- Commodities: WTI. Commodities are known for displaying seasonality features. Therefore,they may constitute interesting underlyings.

30

Page 31: HHT Report

Chapter 5Results

5.1 Empirical choices

Three strategies have been mentioned in this paper. However, in practical matters, testshave only targeted one strategy, for the following reasons:– The IMF Mean Convexity Reverting Strategy has been tested for a few examples. However,

the calibration of the threshold has proven to be difficult. Even the seasonal processremains somehow unstable, in particular its last values, where the second order derivativeis computed.

∀s ∈ [[t− T ; t]] , Xs = Xrandoms +Xseasonal

s

∀s ∈ [[t− T ; t]] , Xseasonals = log

(Xseasonals

Xseasonal

)where X

seasonal=

1

T + 1

t∑s=t−T

Xseasonals

if{(Xseasonalt − 2Xseasonal

t−1 +Xseasonalt−2

)> threshold

}then

Xseasonalt+T

Xseasonalt

> 1 and αMeanRe vertingStrat(t) = 1

elseif{(Xseasonalt − 2Xseasonal

t−1 +Xseasonalt−2

)< −threshold

},

thenXt+T

Xt

< 1 and αMeanRe vertingStrat(t) = −1

– The IMF Multi Asset Shifting Pattern Recognition Strategy is very similar to the MonoAsset IMF Pattern Recognition Strategy. However, it is harder to implement because itis a Multi Asset Strategy: results will depend on how much data is utilized. Moreover,the multi asset strategy is unadapted, contrary to the mono asset strategy.

– Due to the small computing capacity available during the project, tests have mainly beenfocused on the last strategy hereby developed, i.e the Mono Asset IMF Pattern RecognitionStrategy. Indeed, the idea is to derive reliable results by testing it on a wide range of

31

Page 32: HHT Report

underlyings (which list has been provided earlier). That way, the law of large numberswill help provide reliable results.

5.2 Tables

5.2.1 Volatility: VIX Index

First are shown the most promising results: on the VIX Index. 3 different investmenthorizons have been tested: 50 days, 150 days, and 250 days. The result for 50 days is themost reliable, for it relies on the highest amount of trades. Bullish signals also seem to bemore performing. It is quite expected, considering the general behavior of implied volatility.

As provided in table 5.1, page 32, the last back test, with 35% cash in, gives a 57% hit ratio,and a 0,40 annualized sharp ratio.

Figure 5.1: Back test on the VIX Index, with a 50 days investment horizon and 35% cash in

Moreover, the results are also encouraging for a longer investment horizon: 150 days.However, they rely on less trades, simply due to a longer horizon. Again, bullish signalsare more powerful. As provided in table 5.2, page 33, the last back test, with 100% cash in,gives a 54% hit ratio, and a 0,54 annualized sharp ratio.

32

Page 33: HHT Report

Figure 5.2: Back test on the VIX Index, with a 150 days investment horizon and 100% cashin

Finally, the results are now presented for 250 days. Again, they rely on less trades, simplydue to a longer horizon. Again, bullish signals are more powerful. As provided in table 5.3,page 34, the last back test, with 150% cash in, gives a 66% hit ratio, and a 0,76 annualizedsharp ratio. However, it only relies on 15 trades, from 2005 to 2011, where bullish signalsobviously have proven quite effective. Therefore, more tests with longer data need to bepursued.

5.2.2 Volatility: VStoxx Index

To confirm long term results for the VIX Index, similar tests have been pursued on theVStoxx Index, see table 5.4, page 35. For the 126 days horizon, results are also encouraging.Without any cash ins, and with all signals (bullish and bearish), a 56% hit ratio is achievedon 70 trades, and a 0,20 sharp ratio.

5.2.3 Volatility: other indices: aggregate performance

Here are, table 5.5, page 36, the aggregated results for all the indices tested in the followingpool. The amount of trades represented is around 1000 for the 150 days table, and 100 for

33

Page 34: HHT Report

Figure 5.3: Back test on the VIX Index, with a 250 days investment horizon and 150% cashin

the 250 days table, dating from 2006 to 2011. Therefore, results are very reliable.

It seems that the aggregate prediction power on volatility is uncertain. However, resultsremain encouraging for the VIX, i.e the most liquid index (via futures or ETFs) among thevolatility indexes.

5.2.4 French stocks: CAC 40: Aggregate performance

Aggregated results for the French stocks market are quite disappointing, see table 5.6,page 37.

5.2.5 Equities Indices and trading pairs: Aggregate performance

Tests have also been pursued on the main worldwide equity indices, and their pairs.Aggregated results on approximately 2000 trades and 20 years historical prices show thatthis strategy does not have any prediction power on this asset class, see table 5.7, page 37.

34

Page 35: HHT Report

Figure 5.4: Back test on the VStoxx Index, with a 126 days investment horizon and withoutcash in

5.2.6 Commodities: West Texas Intermediate (WTI)

Results for the West Texas Intermediate (WTI), are shown in table 5.8, page 38.

35

Page 36: HHT Report

Figure 5.5: Back test on a pool of volatity indexes

36

Page 37: HHT Report

Figure 5.6: Back test on French stocks from the CAC 40

Figure 5.7: Back test on a pool of Equities Indexes

37

Page 38: HHT Report

Figure 5.8: Back test on the West Texas Intermediate (WTI) oil price

38

Page 39: HHT Report

Conclusion and outlook

HHT offers a potentially viable method for nonlinear and nonstationary data analysis. Butin all the cases studied, HHT does not give sharper results than most of the traditional timeseries analysis methods. In order to make the method more robust, rigorous, in application,an analytic mathematical foundation is needed.

In our view, the most likely solutions to the problems associated with HHT can only beformulated in terms of optimization: the selection of spline, the extension of the end, etc.This may be the area of future research.

While this study tries to design some theoretical ground for the HHT, further theoreticalwork is greatly needed in this direction.

On the empirical aspect, more research also needs to be pursued. While not particularlyperforming on stock prices, the EMD seems more adapted to curves resembling impliedvolatilities, and more able to derive meaningful dynamics off them. Strong results havebeen reached concerning main volatility indexes, such as VIX or VStoxx. Therefore, furtherempirical tests on this asset class could be rewarding.

Moreover, a great variety of assets has not been tested for prediction: other types ofcommodities (only WTI was tested), precious metals, fixed income assets such as sovereignor corporate bonds..

Finally, significant tests have only been pursued for one strategy among the three that wereformulated. The code provided with this report is able to generate results for the two otherstrategies, and can be the base of wider back tests on industrial scale.

In terms of applications, this study has limited itself to the first part of the HHT algorithm,i.e the Empirical Mode Decomposition. Maybe further work can be done in order to properlyformalize the Hilbert spectrum, make new hypotheses, and derive potential predictors usingthe same methodology as in this study.

Acknowledgements

This study has been pursued in collaboration with the Equity Quantitative Team at Natixis.Since our first arrival in the locals of Natixis, we have been thoroughly assisted. Successful

39

Page 40: HHT Report

professionals were kind enough to answer our questions and to give their opinion on our workduring the entire year. Without their advices, this study would not have achieved its currentfindings. Our project consisted of working at Natixis every Wednesday, from October 011 toMarch 2012. Workdays were a great opportunity to work within the finance environment,and to learn about the role of quantitative associates within the banking industry.

First, we would like to thank our supervisor Mr Adil Reghai, Head of Quantitative Analyticsat Natixis. Adil showed much interest for our project, shared our views, and gave us valuablefeedbacks during the whole year. He helped us design our predictors, and constantly gaveus new ideas for back tests. We would also like to thank Mr Adel Ben Haj Yedder, whogreatly contributed to our project, proofread our reports, and gave us feedbacks. We alsohad the opportunity to discuss with Adel about his daily job, the role of the team, and aboutthe banking industry in general. His views will be valuable in order for us to precise ourprofessional project and goals. We are also thankful to Stephanie Mielnik, Thomas Combarelfor their contributions, and to the team in general.

Moreover, this study was pursued in collaboration with Dr Alex Langnau, Global Headof Quantitative Analytics at Allianz. Alex is a consultant for Natixis and academics atthe University of Munich, and talked Adil about the Hilbert Huang Transform. During ourproject, Alex also gave us valuable feedbacks, in particular about the portfolio management ofour trading strategies. Also, we would like to thank our teachers at Ecole Centrale Paris, fromthe Applied Mathematics Department. Mr Erick Herbin, professor of stochastic processes,supervised our project. He encouraged us to formalize the Hilbert Huang Algorithm. Despitebeing a difficult task, it has revealed to be essential. We are also thankful to Mr GillesFay, professor of statistics and time series, for his lectures, providing important theoreticalgrounds for our study.

Finally, we wish to thank our colleagues from the Applied Mathematics Program whopursued other projects in collaboration with Natixis. We have been working with themsince October, and we enjoyed having breaks with them. To name them: Marguerite deMailard, Lucas Mahieux, Nicolas Pai and Victor Gerard.

40

Page 41: HHT Report

Bibliography

[1] Barnhart, B. L., The Hilbert-Huang Transform: theory, applications, development,dissertation, University of Iowa, (2011)

[2] Brockwell, P.J., and Davis, R.A.,Introduction to Time Series and Forecasting, secondedition , Springer-Verlag, New York. (2002)

[3] Cohen, L., Generalized phase space distribution functions, J. Math. Phys. 7, 781 (1966)

[4] Datig, M., Schlurmann, T., Performance and limitations of the Hilbert-Huang trans-formation (HHT) with an application to irregular water waves, Ocean Engineering, 31,1783-1834, (2004)

[5] De Boor, C., A Practical Guide to Splines, Revised Edition, Springer- Verlag. (2001)

[6] Dos Passos, W.,( Numerical methods, algorithms, and tools in C# ), CRC Press, (2010)

[7] Fay, G., Series Chronologiques, Lecture notes, Ecole Centrale Paris, (2012)

[8] Flandrin, P., Goncalves, P., Rilling, G., EMD Equivalent Filter Banks, from Interpre-tation to Applications, in : Hilbert-Huang Transform and Its Applications (N.E. Huangand S.S.P. Shen, eds.), pp. 57 -74. (2005)

[9] Golitschek, M., On the convergence of interpolating periodic spline functions of highdegree, Numerische Mathematik, 19, 46-154, (1972)

[10] Guhathakurta, K., Mukherjee, I., Chowdhury, A.R., Empirical mode decompositionanalysis of two different financial time series and their comparison, Elsevier, ChaosSolitons and Fractals, 37, 1214-1227, (2008)

[11] Holder, H.E., Bolch, A.M. and Avissar.,R., Using the Empirical Mode Decomposition(EMD) method to process turbulence data collected on board aircraft Submitted to J.Atmos. Ocean. Tech., (2009)

[12] Hong, L., Decomposition and Forecast for Financial Time Series with High-frequencyBased on Empirical Mode Decomposition, Elsevier, Energy Procedia, 5, 1333-1340, (2011)

[13] Huang, N.E., Shen, S.S.P., Hilbert-Huang transform and its applications, Volume 5 ofinterdisciplinary mathematical sciences, (2005)

[14] Huang, N.E., Shen, Z., Long, S., Wu, M., Shih, H., Zheng, Q., Yen, N., Tung, C. andLiu, H. The empirical mode decomposition and the Hilbert spectrum for nonlinear andnon-stationary time series analysis Proc. R. Soc.. 454, 1971, 903. (1998)

41

Page 42: HHT Report

[15] Huang, N. E., Wu, Z., A review on Hilbert-Huang transform: Method and its applicationsto geophysical studies, Rev. Geophys., 46, RG2006, (2008)

[16] Liu, B. , Riemenschneider, S. ,Xu, Y., Gearbox, fault diagnosis using empirical modedecomposition and Hilbert spectrum, Mechanical Systems and Signal Processing, 20, 718-734, (2006)

[17] Pan, H., Intelligent Finance - General Principles, International Workshop on IntelligentFinance, Chengdu, China, (2007)

[18] Reghai, A., Goyon, S., Messaoud, M., Anane, M., Market Predictor : Predictionquantitative des tendances des marches, Etude Strategie Quant Recherche Actions,Natixis Securities, Paris (2010)

[19] Reghai, A., Goyon, S., Combare, T., Ben Haj Yedder, A., Mielnik, S., SharpeSelect : optimisation de l’investissement Cross Asset, Etude Strategie Quant RechercheQuantitative, Natixis Securities, Paris (2011)

42

Page 43: HHT Report

Appendix ATime series Prerequisites

A.1 Stationary and linear processes

A.1.1 Stationarity

Definition A.1.1 A time series is a stochastic process in discrete time, Xt ∈ R, t ∈ Z forexample. Thus, a time series is composed of realizations of a single statistical variable duringa certain time interval (for example a month, a trimester, a year, or a nanosecond ).

We can expect to develop some interesting predictions if the process displays certainstructural properties:– Either some ”rigidity”, allowing to extrapolate some deterministic parts.– Either some form of statistical invariance, called stationnarity, allowing learning the

present and predicting the future, based on the past.

Definition A.1.2 Xt ∈ R, t ∈ Z is said strictly stationary iff its finite dimensionaldistributions are invariant under any time translation, i.e:

∀τ ∈ Z,∀n ∈ N∗,∀(t1, .., tn) ∈ Zn, (Xt1 , .., Xtn) ∼ (Xt1−τ , .., Xtn−τ )

Definition A.1.3 Xt ∈ R, t ∈ Z is said to be stationary at the second order iff:– (Xt)t∈Z ∈ L2(R), i.e ∀t ∈ Z, E [X2

t ] <∞– ∀t ∈ Z, E [Xt] = E [X0] := µX– ∀s, t ∈ Z, γX(t, s) := Cov (Xt, Xs) = Cov (X0, Xs−t) =: γ (s− t)

Definition A.1.4 The autocorrelation function of a stochastic process Xt ∈ R, t ∈ Z is theseries

ρ(s, t) =Cov (Xt, Xs)

(V ar (Xs) .V ar (Xt))12

43

Page 44: HHT Report

A.1.2 Linearity

Within the family of stationary processes, an important family of processes is known as thelinear processes. They are derived from white noise processes.

Definition A.1.5 A stochastic process Xt ∈ R, t ∈ Z is a weak white noise iff it is stationaryat the second order, and:

µX = 0

∀h ∈ Z, γX(h) = σ2.δ0(h)

Definition A.1.6 A stochastic process Xt ∈ R, t ∈ Z is a strong white noise iff it is i.i.dand µX = 0.

Hence, second order linear processes can now be defined.

Definition A.1.7 Xt ∈ R, t ∈ Z is a weak (resp. strong) second order linear process iff

∃(Zt)t∈Z,∃(ψj)j∈Z, such as:

(Zt) weak (resp. strong) White Noise (σ2)∑j∈Z

|ψj| <∞

∀t ∈ Z, Xt =∑j∈Z

ψjZt−j

Second order linear processes are well known and studied. It can appear as excessive tomerely study these kinds of linear processes. However, the Wold’s decomposition provides astrong result for these processes:

A.1.3 Wold’s decomposition:

Every second order stationary process Xt ∈ R, t ∈ Z can be written as the sum of a secondorder linear process and a deterministic component.

∀t ∈ Z, Xt =∑j∈Z

ψjZt−j + η(t)

where :(Zt) weak (resp. strong) White Noise (σ2)

∑j∈Z

|ψj| <∞

η ∈ RZ

Hence, basic linear processes, such as ARMA models, provide a strong base for explainingstationary processes. However, the latter assumption is quite reductive.

44

Page 45: HHT Report

A.2 The particular case of financial time series: para-

metric and non parametric extensions

A.2.1 Non-stationary and non linear financial time series

Financial time series are known for displaying a few characteristic unknown to stationary orlinear processes:– Their flat tales distribution are non compatible to Gaussian density functions. They must

are more accurately fitted by power laws, i.e processes of infinite variance. These processesare not utilized in practice, because a measure of volatility (i.e variance) is paramount infinance ( For example, in order to price options, or to compute sharp rations of indices,stocks or strategies. See our definitions in chapter 4).

– Non-linearity: they display non constant variance. Clusters of volatilities are common infinancial time series. These clusters are incompatible with linear and stationary processeslike ARMA (which have a constant variance).

– Non-stationnarity: they have a long term memory.– - Time inversion: linear stationary processes are invariant to time changes. However, a

financial time series obviously is coherent with only one time direction, and is not consistentif time is inversed.

A.2.2 Parametric processes for financial time series

To tackle the issue of non linearity, popular parametric models are ARCH(p) and GARCH(p,q).

Definition A.2.1 Xt ∈ R, t ∈ Z is defined as an ARCH(p) process by:

Xt = σtZt

σ2t = ψ0 +

p∑j=1

ψjX2t−j

Where:∀j ∈ [[1; p]] , ψj > 0

Zt iid(0, 1)

Definition A.2.2 Xt ∈ R, t ∈ Z is defined as a GARCH (p,q) process by:

Xt = σtZt

σ2t = ψ0 +

p∑j=1

ψjX2t−j

45

Page 46: HHT Report

Where:∀j ∈ [[1; p]] , ψj > 0

∀j ∈ [[1; q]] , ϕj > 0

Zt iid(0, 1)

A.2.3 Non parametric processes for financial time series

Numerous non parametric methods have been and are being developed to fit financial data.The goal here is not to mention all of them. The Empirical Mode Decomposition lives withinthis environment.

A.3 General time series: the Box & Jenkins approach

for prediction

Within the framework of Box and Jenkins (1970), a time series can be modeled as realizationof simultaneous phenomena:

– The first, ηt is a regular and smooth time evolution, called trend.– The second, St, is a periodic process of period T.– The third component, Wt, is the random component. It can be a stationary process.

∀t ∈ Z, Xt = Wt + St + ηt

Definition A.3.1 St is a periodic process with period T, iff:

∀t ∈ Z, St+T = St

T∑t=1

St = 0

〈〉 : L2(R)× L2(R)→ R

(X, Y ) 7→ Cov(X, Y )

From this framework, we will connect the EMD algorithm to the literature of time series.Some assumptions will be made to match this approach, and they will drive the predictionsalgorithms formulated later in this chapter.

46

Page 47: HHT Report

Appendix BEvaluation criteria of backtests

In order to evaluate the efficiency of the potential highlighted strategies, a few rules need tobe taken. As mentioned above, adaptability is the main one. Every back-test ought to beimplemented as if the future were unknown. Therefore, it implies some obligations: - a timeframe restriction: every prediction must be computed without using any feature of its futurevalues. - a class restriction: predictions must be evaluated on an aggregate basis, for everykind of underlying. For example, no discrimination of the best or worst performers shouldbe done, because it is another form of unadaptability.

However, it remains pertinent to evaluate the performance of the strategies regarding theasset class to which they are applied. Hence, as it will be mentioned further on, somestrategies might be more efficient on stocks, trading pairs, or implied volatilities.

Within the asset management theory, a few variables suffice to quantify the efficacy of atrading strategy. They are usually noted as the following:

Let X the random variable which denotes the annualized gain(or loss) of each trade of atrading strategy. Its realizations are written: Xi, i = 1..n

Definition B.0.2

Average return = E [X]

Average gain = E [X|X > 0]

Average loss = E [X|X < 0]

Drawdown = - min {Xi, i = 1..n}Hit ratio = P (X > 0)

These values need to be analysed together. A hit ratio above 50% should be compared withthe average gain and loss. The drawdown also provides valuable information on the risk ofthe trading strategy, and gives a hint of the sharp ratio. Drawdowns are a valuable tool inorder to calibrate stop losses thresholds.

47

Page 48: HHT Report

Definition B.0.3

Information ratio =E [X − T ]

V ar (X − T )

with T as a benchmark performance rate. In the results displayed in the annexes, thebenchmark performance rate plugged in the computations of Information ratios is 0%.

Definition B.0.4

Sortino ratio =E [X − T ]√

V ar (X|X < T ))

with T as a benchmark performance rate. In our results displayed in the annexes, thebenchmark performance rate in our computations of Sortino ratios is 0%. Therefore, thismeasurement only takes into account ”negative volatility”, i.e the volatility of losses.

Definition B.0.5

Sharp ratio =E [X − rf ]√V ar (X))

with rf as the annualized risk free rate

The analyses hereby rely mainly on the information ratio and the Sortino ratio. However,at the light of the current risk free rates, the information ratio can be considered as a goodapproximation of the Sharp ratio.

48