Fitting Compound Archimedean Copulas to Data for Modeling Electricity Demand

Modeling dependence between random variables is accomplished effectively by using copula functions. Practitioners often rely on the single parameter Archimedean family which contains a large number of functions, exhibiting a variety of dependence structures. In this work we propose the use of the multiple-parameter compound Archimedean family, which extends the original family and allows more elaborate dependence structures. In particular, we use a copula of this type to model the dependence structure between the minimum daily electricity demand and the maximum daily temperature. It is shown that the compound Archimedean copula enhances the flexibility of the dependence structure and provides a better fit to the data.


Introduction
Modeling the dependence structure between random variables is a long-standing research interest. Commonly, two random variables can be described by a bivariate distribution, such as normal, log normal or gamma. The key characteristic of this concept is that both of the random variables have the same parametric univariate distribution. This restriction does not exist when using copula functions (Genest and Favre, (2007)). These functions provide a formidable route to create multidimensional distributions with any given marginals and enable an auspicious way for describing dependence structures between them. Sklar's theorem (1959) established the foundation for the concept. By Sklar, every two-dimensional joint distribution function H (x, y) = P(X ≤ x, Y ≤ y), where X and Y are continuous random variables distributed F(x) = P(X ≤ x) and G(y) = P(Y ≤ y), can be expressed in terms of the separate parts of its marginal univariate distributions and copula C, which captures the interdependencies between them, such as H (x, y) = C (F (x) , G(y)) , x, y ∈ (−∞, ∞) . (1) An extensive study of the topic was conducted by Nelsen (2006), who established that the copula functions must meet three properties, for u = F (x) and v = G (y) , 1. When one of the marginals has zero value then C (u, 0) = C(0, v) = 0.
2. In cases where one of the marginals is equal to one, then C (u, 1) = u and C (1, v) = v. 3. C is 2-increasing function, i.e. for u 1 , Numerous types of copula functions have been described in the literature, with one of the most prominent groups of copulas being the Archimedean family, which is characterized by its generator function. A two-dimensional Archimedean copula is denoted by: where ϕ θ (t) is the Archimedean generator and θ is the dependence parameter. The generator ϕ is a decreasing and convex function with domain (0, 1] and range (0, ∞) such that ϕ θ (1) = 0. Numerous attributes of the Archimedean copulas and their generators were established by Nelsen (2006), in particular we note: • For every copula C and u, v which is the copula version of Fre'chet-Hoffding bounds inequality.
• The joint distribution of U and the Archimedean copula C(U, V) for (u, v) ∈ I 2 |u ≤ s, C(u, v) ≤ t is denoted by Archimedean copulas are widely useful in diverse areas, including hydrology, medical science, accident analysis, insurance, banking, weather, climate change, and more (Bhatti and Do, (2019)). In actuarial science, Hendriks and Landsman (2017) investigated the dependence structure of multivariate random variable with the probability measure F (X 1 , ..., X n ) = P (X 1 ≥ x, ..., X 1 ≥ x n ) = h n i=1 λ i x i , x i ≥ 0, and showed the intrinsic relation of this structure with survival Archimedean copula with a generator ϕ = h −1 . Alai and Landsman (2017) used this measure for modeling life dependence structure. Applications for portfolio allocations were introduced by Byun and Song (2021) who searched for appropriate copula functions in various dependence structures among asset return distributions. Chen and Guo (2019) exhibited various advantages of using copula in hydrology. They employed the Archimedean copula in order to describe the dependence structure between depth, volume, and duration of flows. Regarding energy research, applications of Archimedean copulas have been extensively studied in recent years. Schindler and Jung (2018) used copulas to fit bivariate distributions of wind vector components to estimate directional wind energy yields in Germany. A Wind-Wave energy model proposed by Wu et. al. (2019) used Archimedean copulas to analyse correlations between wind speed and wave height. Implementation of dependence structures of electricity demand, economic and sectoral indicators using members of the family were investigated by Evkaya et.al. (2018). Due to the increasing number of electric vehicles and smart cities, the estimation of the electricity demand has become progressively more important. For instance, an underestimation of peak demand might result in the shortage of electricity in different locations. Numerous other studies have investigated electricity peak demand, and used copula functions to research the dependence structures between components which affect it. Cecati et.al. (2015) and Wang et. al. (2016) suggested models for estimating demand behaviour and peak load. Sun et. al. (2019) gave a peak load estimate approach using copulas to model complex non-linear dependence structures among different consumers. Research on minimum electricity demand has received less attention, and even less so when it comes to dependence structures using copula functions. Minimum electricity demand is the lowest level of demand for any given day and is very important for a system design and day-to-day operation, since low demand results in the shut-down of power generating units which can have negative consequences when a sudden need for energy arises. In our work we take steps to fill this gap. We investigate the application of a compound Archimedean copula in electricity demand. The dependence structure between the minimum daily demand and the maximum daily temperature was examined. It is shown that the compound copula enriches the flexibility of the dependence structure and provides a better fit to the data than the original compound copula. In section 2, we provide an example of a compound Archimedean copula. Methods for fitting copula to data and in particular a nonparametric approach for fitting two dependence measures are outlined in section 3. The modeling of minimum electricity demand versus maximum temperature using the original and the compound copula is discussed in section 4. Conclusions are given in section 5.

An Example of a Compound Archimedean Copula
Kelner et. al. (2021) introduced a method for generating new Archimedean copulas having a more flexible dependence structure. They created new generators by compounding an existing generator with respect to g η (θ), a probability density of the dependence parameter θ, defined by where C denotes compound. They gave an example of a copula introduced by Nelsen (2006, 4.2.8), denoted by C8, where they compounded its generator function with a distribution of the dependence parameter θ given by, Then using Eq.(3) the compound generator takes the form Applying the equation introduced by Genest and Mackay (1986b) for establishing Kendall's tau we get an expression for Kendall's tau for the original copula Using Eq. (7) and Eq. (8) the Kendalls tau of the compound copula is given by,

Fitting Copula to Empirical Data Methods
Using copulas for modeling dependence and identifying the empirical associations between random variables has become a useful tool in many applied fields. The remaining challenge is how to fit a copula function to given data sets. The answers to this have attracted widespread attention over the years and various methods are available. Joe (1996) and Moore et. al. (2017) gave an in-depth introduction to three estimate approaches. These include the parametric, semi-parametric and non-parametric. The most effective parametric approaches are the maximum likelihood estimation (MLE), wherê , or the two stage inference for margins (IFM) method, in which the parameters of the marginals are estimated and used for estimating the copula dependence parameter. The semi-parametric approach, which is the maximim pseudo-likelihood (MPL), introduced by Genest et. al. (1995) is comparable to the MLE with a converted pseudo data. As for the non-parametric approach, Genest and Rivers (1993) developed a method for determining a suitable Archimedean copula for particular data. They provided an approach for estimating the dependence structure of Archimedean copulas, which is robust to outliers and has no need for information on the marginals distribution. The first step in their approach was to estimate the dependence parameter θ using the empirical value of kendall's tau. They estimated Kendall's tau using the observed variableŝ and estimated the dependence parameterθ usingτ by equating Eq.(11) to Eq.(8). In our work we use the same method for estimatingθ. We present another dependence measure, the Gini's gamma, which is a nonparametric measure which represents rank association of random variables. Genest et. al. (2010)  measure and explored its finite-sample moments and asymptotic distributions under independence. Nelsen (1998) showed the empirical form of the measure: For a random sample (X 1 , Y 1 ) , ..., X n, Y n with associated ranks (R 1 , S 1 ) , ..., R n, S n , the empirical Gini's gamma isγ Using copula functions, Nelsen (1998) showed that this measure can be represented as for all t ∈ (0, 1) . Notice that both of the dependence measures, Kendall's tau and Gini's gamma, depend only on the copula function and not on the marginals.
If we were to use a single parameter C8 copula we could estimate θ either by equating the theoretical value of Kendall's tau in Eq.(9) to its empirical value in Eq.(11) and obtain or repeat this procedure and estimate θ with respect to the Ginis's gamma by equating Eq.(12) to Eq.(13). Clearly these two approaches would typically yield different estimates of θ. In other words, there is noθ which could guarantee that the values of these two dependence measures are equal to their empirical values. This, of-course, is achievable when a two-parameter compound copula is considered. Equating Eq.(10) to Eq.(11) allows multiple parameter pairs (a, b). The chosen pair, say (â,b), is the one which would assure that Eq.(12) is equal to Eq.(13). Clearly the compound copula with parameters (â,b) exhibiting the dependence expressed by the data. This will be demonstrated in section four.

Application of Daily Electrical Demand Data
This study examines daily electricity demand data in Israel, which involves the minimum demand and maximum temperature in the working hours (08:00 to 20:00), from the year 2005 to 2020, excluding weekends and holidays, where weekdays companies are not operating and electricity demand is lower compared to the weekdays (a total of 4,233 observations). The data is divided into four seasons, Winter (December-February), Spring (March-May), Summer (June-September) and Autumn (October-November). Figure 1 introduces the distribution of the minimum demand in the four seasons. It shows that the minimal electricity demand during winter and summer is higher than the minimum demand during the transitional seasons, with the summer being the highest. This is due to the use of household appliances such as heaters in winter and cooling air conditioners in summer, which affect the total and minimum electricity demand. Figure 2 introduces seasonal scatter plots for daily minimum demand vs. daily maximum temperature. It is clear from figure 2 that during the winter, there is a negative dependence between the minimum daily electricity demand and the maximum daily temperature, and a positive dependence during the summer. In the other season, a correlation is not noticeable.
For each separate season we calculated the empirical values of Kendall's tau and the estimated dependence parameter using Eq.(11) and Eq. (14), respectively. The results are shown in Table 1. Once θ is estimated byθ τ , the Gini's gamma can be derived from the original copula using Eq.(13) and is denoted by γ τ . Clearly, this value is bound to be different then the empirical Gini estimateγ. We note that for the compound copula the empirical and the theoretical values of γ are identical since such a copula allows matching the empirical and theoretical values for both τ and γ . The results are introduced graphically in Figure 3.  The graph above represents the values ofγ vs. γ τ separated into four seasons. The blue dots depict the empirical values of Gini's gamma,γ for each season. The black hollow dots and the red pluses depict the values of γ τ with respect to the original copula and the compound copula, respectively. In this graph, the accuracy is denoted by the closeness ofγ to γ τ . It is easy to see that the compound copula symbolized by the red pluses offers an accurate match. As for the original copula, which is symbolized by the black hollow dot, absolute accuracy ofγ is unattainable. For measuring the deviance between the empirical and the estimated Gini's gamma, we used the Mean Average Percentage Error (MAPE) given by where i symbolizes the season. The values ofγ,γ τ and the MAPE for each season are presented in Table 3. The results of the MAPE show that using the original single parameter copula, the average deviation between the empirical values of Gini's gammaγ and the estimate values of Gini's gamma γ τ , is 46.9%, which means high inaccuracy. High deviations occur in the winter and the spring season, i.e. in December-May, which are the coldest months of the year.

Conclusions
In this paper, we introduce an application of an extension of Archimedean copulas, namely the compound copula, which is governed by more than a single parameter, thus offering a higher degree of flexibility in term of fitting a copula which accurately reflects dependence measures. We used daily data of electricity demand and applied a univariate copula function and a compound copula for fitting the dependence structure between the daily minimum demand and daily maximum temperature. The data was separated into four seasons and the study was conducted for two different dependence measures: the Kendall's tau, τ and the Gini's gamma, γ. We have shown that for a univariate copula it is impossible to find a value of the dependence parameter which allows accurate fitting with respect to these dependence measures, unlike the compound Archimedean copula which offers a perfect fit.