Wavelet-Smoothed Empirical Copula Estimators

Submitted in May 2010. Accepted in July 2010. The article was double blind refereed and evaluated by the editor. Supervising editor: Ricardo P. C. L eal. The authors are grateful to a referee for useful comments and acknowledge the support of FAPESP grant 08/51097-6. We also thank Albert M. Fisher, who read the manuscript and provided several sugges tions to improve it. *University of São Paulo, São Paulo, Brazil. E-mail: pam@ ime.usp.br **University of São Paulo, São Paulo, Brazil. E-mail: cle lia@ime.usp.br ***University of São Paulo, São Paulo, Brazil. E-mail: ch ang@ime.usp.br ****University of São Paulo, São Paulo, Brazil. E-mail: s imon@ime.usp.br


Introduction
Copulas provide a convenient tool for describing the dependence between variables.Copula techniques have been developed basically for the independent, identically distributed (i.i.d.) case, which would prevent, at least theoretically, their applications to dependent data (e.g.time series data) appearing in economics, finance and other areas.The presence of serial correlation and time-varying heteroscedasticity in financial time series, for example, claims for the development of new methodologies or extensions of the existing ones for this kind of data, specially in the field of copula estimation.For i.i.d.samples of bivariate or in general multivariate distributions, parametric and nonparametric methods are well known.
Several approaches are used for copula estimation.If the copula is assumed to belong to some parametric family of copulas, consistent and asymptotically normal estimators of the parameters can be obtained by the method of maximum likelihod (ML).See Genest and Rivest (1993) and Shi and Louis (1995).A two-step procedure called inference function for margins can be used; first the parameters of the marginals are estimated and then the parameters of the (parametric) copula are estimated, both via ML.See for example Joe and Xu (1996).These estimators are consistent and asymptotically normal and also almost as efficient as fully MLE.Another possibility is to use the so-called empirical copulas, introduced by Deheuvels (1979Deheuvels ( , 1981a,b),b).These are highly discontinuous, and some form of smoothing is necessary to obtain better estimates.An approach of Fermanian et al. (2002), using kernel estimates based on empirical copulas, is discussed in section 3.An approach based on wavelet expansions is introduced also in section3.
Concerning the estimation of copulas for time series, to our knowledge there are only the works of Fermanian and Scaillet (2003), using nonparametric techniques with kernels and Morettin et al. (2006), using wavelets.A related paper is Chen and Fan (2004), but this focuses on stationary Markov processes of order one and assumes a parametric form for the copula function.One purpose of this paper is to propose wavelet estimators based on the empirical copulas.Another is to indicate that the methods developed for i.i.d.samples can be used with time series data, under some circumstances.
The plan of the article is as follows.In section 2 we set down the necessary background on copulas and wavelets.In section 3 we describe the parametric and nonparametric methods used for copula estimation in the case of i.i.d.data.In section 4 we do the same for time series data.In section 5 we perform some simulations and in section 6 we apply the proposed techniques for two sets of real data.The article ends with some further comments in section 7.

Background
In this section we present some basic notions on copulas and wavelets.

Copulas
We restrict our attention to the bivariate case for ease of notation.The extensions to the n-dimensional case is straightforward.
A copula can be viewed as a function C defined on I 2 = [0, 1] 2 with values in I, satisfying, for 0 ≤ x ≤ 1 and x 1 ≤ x 2 , y 1 ≤ y 2 , (x 1 , y 1 ), (x 2 , y 2 ) ∈ I 2 , the conditions Property (1) means uniformity of the margins, while (2), the n-increasing property (with n = 2) means that P See Nelsen (1999) for a general definition and further details on copulas.The following important theorem links the definition of copula with a d.f. and its marginal distributions.A proof can be found in Sklar (1959).
(ii) Conversely, for a two-dimensional d.f.F with marginals F 1 , F 2 , there exists a copula C satisfying (3), and this is unique if F 1 , F 2 are continuous and then, for any (u, v) where denote the generalized left continuous inverses of F 1 , F 2 .It follows that copulas are bivariate (in general multivariate) d.f.'s with uniform univariate marginals.See also Kolev et al. (2005) and Schweizer (1991) for good reviews of copulas.In what follows we assume that F 1 and F 2 are continuous.
We now introduce empirical copulas.Let (X i , Y i ), i = 1, . . ., n, be a sample from (X, Y ) and let be the empirical d.f. and let F 1n (x), F 2n (y) be the corresponding marginal d.f.'s, namely Then the empirical copula function is defined by and the empirical copula process is defined by Deheuvels (1979) proves uniform consistency of the empirical copula, while Deheuvels (1981aDeheuvels ( , 1981b) ) obtained results concerning limits for Z n in the case of independent marginals.In particular, he proposed a Kolmogorov-Smirnov-type statistic for testing the independence hypothesis that C(u, v) = uv and obtained its asymptotic distribution under the null hypothesis.Fermanian et al. (2002) prove that the empirical copula process converges weakly to a Gaussian process in L ∞ [0, 1] 2 (the space of a.e.bounded functions on I 2 with sup-norm), under the asumption that C has continuous partial derivarives.See also Ibragimov (2005) for a similar result in the case of a stationary β-mixing process.

Wavelets
We will need two-dimensional wavelets in this paper, but we mention briefly the one-dimensional case.From a mother wavelet ψ and a father wavelet φ (or scaling function), an orthonormal system for L 2 (IR) is generated by setting φ j,k (x) = 2 j/2 φ(2 j x−k), j ≥ j 0 and ψ j,k (x) = 2 j/2 ψ(2 j x−k), j, k ∈ Z Z, for some coarse scale j 0 , which we take as zero.Hence, for any f ∈ L 2 (IR) we may write, uniquely, where the wavelet coefficients are given by In our case, a copula will be assumed to belong to L 2 (I 2 ), so we need first to consider periodized wavelets in the interval [0, 1], defined by see Vidakovic (1999) for details.We will supress the upper tilde from now on.For any function f ∈ L 2 (I 2 ) we may have a similar expansion to (8), where the wavelets are obtained as products of one-dimensional wavelets.One possibility is to consider a basis with a single scale.Define the bivariate scaling function as Φ(x, y) = φ(x)φ(y) and the wavelets by Ψ h (x, y) = φ(x)ψ(y), Ψ v (x, y) = ψ(x)φ(y) and Ψ d (x, y) = ψ(x)ψ(y), where h, v and d indicate the horizontal, vertical and diagonal directions, respectively.Let k = (k 1 , k 2 ).Then a wavelet expansion for f (x, y) is with the wavelet coefficients given by Another possibility is to built a basis as the tensor product of two onedimensional bases with different scales for each dimension.This will not be considered here.This approach is used by Morettin et al. (2006).

Estimation for i.i.d. data
As we mentioned in the Introduction, if a copula belongs to a parametric family of copulas, ML methods can be used.These are all well known and wil not be discussed further here.The software S+FinMetrics, a module of S-Plus, implement at least one of these procedures.See Zivot and Wang (2006) for further details.
We now turn to nonparametric estimators.Fermanian et al. (2002) proposed to use as a smoothed empirical distribution function estimator.Here for some bivariate kernel function k : IR 2 → IR, k(x, y)dxdy = 1, and a sequence of bandwidths a n ↓ 0, as n → ∞.It is easily proved that for small enough bandwidths a n , under mild conditions, Similar smoothed estimators F1n and F2n can be proposed , using univariate kernels.A smoothed (kernel) empirical copula estimator is then obtained from (6), namely We now propose a smoothed empirical copula wavelet estimator.
Assume that the copula C(u, v) ∈ L ∞ ([0, 1] 2 ) and consider its wavelet expansion with the wavelet coefficients given by We take as the empirical wavelet coefficients, and a similar expression for c 0,0 .
We have that the corresponding estimator for C(u, v) is then where δ(•, λ) is a threshold.See Donoho et al. (1995) for details on thresholds.In this paper we will take a high quantile as a threshold.The sums in (18) are computed for j ≤ J, where J = J(n) is the maximum scale analyzed, chosen (for theoretical purposes) in such a way that J → ∞ as n → ∞, but J/n → 0. In turn, k 1 , k 2 vary from zero to 2 j − 1. See Morettin et al. (2006) for details of copula estimators based on wavelet estimators of densities.
We will not deal here with properties of these smoothed (kernel and wavelet) estimators.For kernel estimators we cojecture that properties similar to those derived by Fermanian and Scaillet (2003), for time series, hold in this case of i.i.d.data, probably with milder conditions.For wavelet estimators, research by the present authors is under way.
Actually, Fermanian et al. (2002) proved that the smoothed empirical copula process 4 Estimation for time series data As remarked in section 1, most of the results available in the literature of copulas apply to i.i.d.samples (X i , Y i ), i = 1, . . ., n from a distribution function F .As properly remarked by Mikosch (2005), "it is contradictory that in risk management, where one observes a lot of dependence through time, copulas are applied most frequently".For stochastic processes, there are a few works dealing with time series, namely Fermanian and Scaillet (2003) and Morettin et al. (2006).The former consider strictly stationary processes satisfying a strong mixing condition and kernel-type estimators, the latter consider a larger class of stochastic processes satisfying also some mixing conditions and wavelet-type estimators.
If we decide to apply the theory developed for i.i.d.sequences to time series data, at least some care should be taken.We recall that in problems involving MCMC methods, the ultimate goal is to obtain a (i.i.d.) sample from some target distribution, and this is done by sampling from the stationary distribution of the simulated Markov chain, taking observations separated by a number τ , which can be obtained from an inspection of the autocorrelation function (a.c.f.) of the simulated chain: τ corresponds to the lag at which the a.c.f.dumps to zero.In order to reduce dependence, similar approach can be followed in the case of copulas, inspecting the a.c.f. and cross-correlation function (c.c.f.) of the series involved.
Of course the folowing procedure does not produce i.i.d.samples, but it is hoped that most of dependence will be eliminated from the series of interest.
Let X t = (X 1t , . . ., X rt ) ′ be an r-dimensional stochastic process and suppose we have n observations from this process, X t , t = 1, . . ., n. Assume that this process is strictly stationary, with distribution function F (x) and density function f (x), generally unknown.Let ρ(τ ), τ ∈ Z Z be the estimated correlation matrix.We can plot the a.c.f.ρii (τ ) and the c.c.f.ρij (τ ) and look for the lags τ ij for which there is decay to zero.Do the same with the correlations of the squared series.Sample the series by taking observations separated by some τ , which is a compromise value obtained by loking at the τ ij values.The rational is that, at least for returns of financial assets, these are in general non-correlated, but they are dependent, so the reason for looking at the squared returns.
Another possibility is to consider the (usual) norm of the matrices ρ(τ ), for each τ , and plot these norms against τ ; then look at the lag τ that minimizes this norm.Then take samples from the series at each τ observation.See also de Miranda (2005).
In what follows, we will apply these simple inspection procedures for simulated series.
Concerning nonparametric techniques, Fermanian and Scaillet (2003) and Morettin et al. (2006) proposed kernel and wavelet estimators for the copula, respectively.Estimators of densities, d.f.'s, quantiles and finally of C are obtained through the relation (4).Properties of the estimators, simulations and applications are given in the above mentioned papers.
Here we propose to use the wavelet estimator (18) for time series data, which is a sample of a strictly stationary process.As a matter of fact, it is only necessary to consider a wider class of processes, for which the d.f.F t (x) = F (x), for all t.Some form of mixing condition will be needed also.

Simulations
In this section we present simulation examples of the wavelet estimators proposed in sections 3 and 4 and also estimators based on parametric copulas.We use the same examples of Fermanian and Scaillet (2003).
Table 1 shows the bias, E ĈJ −C, and mean squered error (MSE), E[( Ĉ − C) 2 ], computed for the Daubechies d8 wavelet using J = 5.All values (true value of the copula, bias and MSE) are expressed as multiples of 10 −4 .The results are satisfactory in terms of bias and MSE, comparable with those of Fermanian and Scaillet.Figures 1 and 2 show the estimated copula and the contour plots, respectively.(2) We now turn to the case where the components of X t are dependent processes, with A = (1, 1) ′ , vec(B) = (0.25, 0.2, 0.2, 0.75) ′ and vec(Σ) = (0.75, 0.5, 0.5, 1.25) ′ .Since X 1t and X 2t are positively dependent, we have C(u 1 , u 2 ) > u 1 u 2 .Based on 500 Monte Carlo replications with the data length n = 1024, results are reported in Table 2.These results are much better than those of Fermanian and Scaillet and comparable with those of Morettin et al. (2006).Figure 3 and 4 bring the estimated copula and contour plots, respectively.Again, we have used the d8 wavelet with J = 5. (3) We now consider the case (2) above, but will investigate the use of i.i.d, methods for it.Since the true underlying copula is a normal one, we consider to fit this to the associated bivariate AR(1) process above.First we generate a sample of 40,000 observations of the process.Figure 5 (top pannel) shows the acf of both components of the bivariate series, showing that there are significant correlations, as expected.Then we consider the norm of the estimated correlation matrix for several lags and see that this dies out around lag 34.See the botton pannel of Figure 6.We sample the above process using this sampling interval (34) and obtain a (bivariate) series of 1,024 observations.The corresponding acf's are also shown in the botton pannel of Figure 5.We see now that the series are practically non-correlated.The twoo upper pannels of Figure 6 also show the ccf's of the original series, showing also significant cross-correlations.Figure 7 shows the acf's of the squared original and sampled series, showing that the original bivariate process presents some degree of dependence, which is almost removed in the sampled series.We cannot guarantee that all the dependence is removed, but as far as the series and squared series are concerned the correlation is almost totally removed.This is an indication that the dependence is reduced (possibly a lot).Reducing this correlation is a necessary condition for independence, but of course we do not claim that this sampled series is independent.We have used the norm, acf and ccf of series and squared series as simple necessary tests, in the sense that if these requirements are not fulfilled then i.i.d.methods may be very missleading.
Figure 8 shows the contour plot of the estimated normal copula, for the original (40,000 values) and sampled series (1,024 values), superimposed to the corresponding empirical copulas.We see that they are practically the same (except that the empirical copula for the longer series is smoother).The S+FinMetrics package was used to do the estimation, using the IFM (inference for margins) approach of Joe and Xu (1996).If we use the same sampled data to estimate the copula using the smoothed wavelet estimator, we will obtain a contour plot similar to the ones in Figure 4 and Figure 8, respectively.
Table 3 presents the values of Kendall's τ for our simulated examples, showing that the values are very close.So we can conclude tentatively that if we can fit a parametric copula to our time series data, it is safe to apply the usual estimation procedures that were developed for i.i.d.variables, provided we have a large number of observations and can sample the series appropriately and obtain a reasonable number of observations to proceed.The estimators are quite close.But in situations where we are not sure which parametric copula family to fit, or we have a not too large sample, it is better to use nonparametric estimators developed for time series data, like the smoothed wavelet estimator of section 4 or the estimators proposed in Fermanian and Scaillet (2003) and Morettin et al. (2006).We observe that the simulated process in example (2) may be considered an m− dependent process, with m ≈ 34.In a practical situation we would fit the parametric copula to the whole series and then to the sampled series and compare both fits.If they are close enough the use of i.i.d.procedures is likely to be a god solution.

Empirical Applications
In this section we illustrate the estimation of copulas using the smoothed wavelet estimator given by ( 18), considering two pairs of daily series: In the first example we consider returns of the São Paulo Stock Exchange index (Ibovespa) and prices of stocks of the Brazilian oil company, Petrobrás, from January 2, 1995 to February 3, 1999 (T = 1, 024 observations).In the second example we consider daily returns of the Ibovespa and IPC (Mexico) indexes, from September 4, 1995 to June 5, 2000 (also T = 1, 024 observations).
Figure 9 shows the scatter plot of Ibovespa and Petrobrás, and we see a rather strong contemporaneous correlation between both series (Pearson correlation coefficient is 0.83).In figures 10 and 11 we have the plot of the estimated copula using (18) and the corresponding contour plot, respectively.We see that these contours resemble the ones corresponding to a comonotonic copula (perpendicular straight lines on the diagonal).We have used the 0.90 percentile as the λ parameter of the thresholding procedure: all empirical wavelet coefficients smaller than λ were discarded.Figure 12 shows the scatterplot of the returns of Brazilian (Ibovespa) and Mexican (IPC) indices.The contemporaneous correlation coefficient is low, 0.552.The plots for the smoothed empirical estimates are given in Figures 13 and 14.We see the same kind of behavior as in the simulated dependent case above.The same threshold as before was used.

Further remarks
In this work we have developed wavelet estimators of copulas based on empirical copulas which can be used for i.i.d. and time series data.We further have suggested a simple approach to check if the usual procedures developed for i.i.d.variables can be used with time series data.Of course this requires that the series have a large number of observations.Preliminary findings indicate that the estimators based on i.i.d.samples (basically versions of the maximum likelihod estimators) can be used with time series data provided some simple checks are done.But further studies, mainly theoretical, based on convergence rates of estimators for i.i.d.variables and time series, have to be performed in order to derive more precise conclusions.

Table 1 :
Bias and MSE of d8 wavelet estimator: independent case

Table 2 :
Bias and MSE of d8 wavelet estimator: dependent case

Table 3 :
Kendall's τ for the simulated series