back start next


[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [ 26 ] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134]


26

The symbol ly denotes one year, so 8t/\y is the length of <5f expressed in years. With this choice of units, a is an annualized volatility, with values roughly from 1 % (for bonds) to 50% (for stocks), and a typical value of 10% for foreign exchange. For t < -T, t < -T, we have the expectation

E[z(t)z(t)] = z(-T)2 + amin(--, ~ ~ 7) (3.39)

Having defined the space of processes, a short computation gives

e2 = zi-T)2

(j dt£l(t)j +2(7 J dtw(t) J dt { )-- (3.40)

The first term is the "error at initialization" corresponding to the decay of the initial value Q\- T](-T) = 0 in Equation 3.36. A better initialization is T](- T) = z(-T) /0°° co(t), corresponding to a modified definition for £2[T](t):

Q[T; zKt) = z(-T) f dtco(t-t)+ f dtco(t - t) z(t) (3.41)

Another interpretation for the above formula is that z is approximated by its most probable value z(-T) for t < T. With this better definition for Q, the error reduces to

C°° t - T

2a / dt co(t) / dt coif)- (3.42)

Jt Jt iy

For a given kernel , volatility a and error e, Equation 3.42 is an equation for T. Most of the kernels introduced in the next section have the scaling form w(t, t) = <w(r/ )/ . In this case, the equation for f - / reduces to

2a- f dt wit) f dtcoit) it- f) (3.43)

1 Jf Jf

Because this equation cannot be solved for general operators, the build-up interval should be computed numerically. This equation can be solved analytically for the simple EMA kernel, and it gives the solution for the build-up time

As expected, the build-up time interval is large for a small error tolerance and for processes with high volatility. For operators more complicated than the simple EMA, Equation 3.43 is in general not solvable analytically. A simple rule of thumb can be given such that the heavier the tail of the kernel, the longer the required build-up. A simple measure for the tail can be constructed from the first two



moments of the kernel as defined by Equation 3.30. The aspect ratio AR[Q] is defined as

AR\Q\ = (12)]12/{1)

Both (t) and ( 2) measure the extension of the kernel and are usually proportional to r; thus the aspect ratio is independent of r and dependent only on the shape of the kernel, in particular its tail property. Typical values of this aspect ratio are 2/\/3 for a rectangular kernel and \fl for a simple EMA. A low aspect ratio means that the kernel of the operator has a short tail and therefore a short build-up time interval in terms of r. This is a good rule for nonnegative causal kernels; the aspect ratio is less useful for choosing the build-up interval of causal kernels with more complicated, partially negative shapes.

3.3.4 Homogeneous Operators and Robustness

There are many ways to build nonlinear operators; an example is given in Section 3.3.13 for the (moving) correlation. In practice, most nonlinear operators are homogeneous of degree p, namely Q[ax] = \a\p Q[x] (here the word "homogeneous" is used in a sense different from that in the term "homogeneous time series"). Translation-invariant homogeneous operators of degree pq take the simple form of a convolution

fi[z](0

f dtto(t-t)\z(t)\>

-oo

(3.45)

for some exponents p and q. An example is the moving norm (see Section 3.3.8) with corresponding to an average and q = \/p.

Nonlinear operators can also be used to build robust estimators. Data errors (outliers) should be eliminated by a data filter prior to any computation, as discussed in Chapter 4. As an alternative or in addition to prior data cleaning, robust estimators can reduce the dependency of results on outliers or the choice of the data cleaning algorithm. This problem is acute mainly when working with returns, because the difference operator needed to compute returns (r) from prices (x) is sensitive to outliers. The following modified operator achieves robustness by giving a higher weight to the center of the distribution of returns r than to the tails:

fi[/;r] = /-,{fi[/(r)]} (3.46)

where / is an odd, monotonic function over E. Possible mapping functions f(x) are

sign(x)x) = x\x\r~l (3.47)

sign(x) when -+ 0 (3.48)

tanh(x/x0) (3.49)



Robust operator mapping functions defined by Equation 3.47 have an exponent 0 < < 1. Tn some special applications, operators with > 1, emphasizing the tail of the distribution, may also be used. In the context of volatility estimates, the usual L2 volatility operator based on squared returns can be made more robust by using the mapping function / = sign(x)y[x (the signed square root); the resulting volatility is then based on absolute returns as in Equation 3.67. More generally, the signed power f(x) = sign(x)xp transforms an L2 volatility into an L2p volatility. This simple power law transformation is often used and therefore included in the definition of the moving norm, moving variance or volatility operators, Equation 3.60. Yet some more general transformations can also be used.

3.3.5 Exponential Moving Average (EMA)

The basic exponential moving average (EMA) is the simplest linear operator, the first one in a series of linear operators to be presented. It is an averaging operator with an exponentially decaying kernel:

e-t/r

ema(r) =- (3.50)

This EMA operator is our foundation stone, because its computation is very efficient and other more complex operators can be built with it, such as moving averages (MAs), differentials, derivatives, and volatilities. The numerical evaluation is efficient because of the exponential form of the kernel, which leads to a simple iterative formula first proposed by Muller (1991):

EMA[r; z](r) = (3.51)

ix [ ; z](f-i) + (v - n)zn-i + (1 - v)zn

with

a = -

ll = e~a

where v depends on the chosen interpolation scheme,

1 previous point

(1 - )/ linear interpolation (3.52)

next point

Due to this iterative formula, the convolution is never computed in practice; only few multiplications and additions have to be done for each tick. Tn Section 3.3.14, the EMA operator is extended to the case of complex kernels.

3.3.6 The Iterated EMA Operator

The basic EMA operator can be iterated to provide a family of iterated exponential moving average operators EMA[r, ]. Practitioners of technical analysis have



[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [ 26 ] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134]