1. Introduction
Taking the Basel Committee documents into consideration, we divide the risk for business into five main parts [
1]: 1. The risk of country, which contains the lack of certainties of political systems and the internal dynamics of societies. 2. The risk of settlement, which contains the external uncertainties of running finance processes along with the operating sequences. 3. The market risk that includes the fuzziness of factors inside markets in association with the valuation and price mechanisms. 4. The credit risk that contains the lack of certainty for external economical effects on sources required from the economic environment. 5. The operational risk, which relates to the structures and parameters of internal organizational processes in connection to individual failures and misbehavior. Hence, managing risk or reinvestigating well-known algorithmic methods is of interest in mathematical finance [
2,
3].
We name a multidimensional cumulative distribution function (CDF) as a copula, when each variable has a uniform marginal probability distribution on [0,1]. These functions are employed to illustrate the dependency of several given stochastic variables. In fact, they have broadly been employed in multivariate statistics and quantitative finance ranging from trading in portfolios with several stocks to risk management [
4,
5,
6].
Perhaps the most fundamental finding for copulas is the theorem given by Sklar in [
7], which mentions that any multidimensional joint distribution could be obtained via one-dimensional marginal distribution functions along with a copula function that shows the structure of dependency among several variables. These distributions were first introduced in the 1940s, and their related machinery and terminology were improved in the 1950s and 1960s [
8].
Mostly, Archimedean copulas, unlike the Gaussian copula, possess an explicit formula. They have been widely employed because of their mathematical tractability and also their ability to cover broad range of dependency. For a continuous and decreasing function
with the conditions
and
being the pseudo-inverse [
7], we have:
which is an Archimedean copula having
as the generator when
for all
. Here,
is the cumulative of the (standard normal) distribution, and
is convex and decreasing. The function (
3) consists of several famous copulas including the Ali-Mikhail-Haq (AMH) copula, the Clayton copula, and the independence (product) copula [
8].
In general, if there are two known marginal continuous distributions we cannot derive their joint distribution, but we can recover a joint distribution using a copula function. One of the merits of employing copulas is their isolation of the structure of dependence from the structure of the marginal distributions, etc. The marginal distribution may capture different types of symmetries, asymmetries, fat tails, and structural breaks with a strong influence on the estimation results for modeling of the dependence structure. A copula enables us to separate the joint distribution into the marginal distributions of each variable. This separation enables us to model the dependency among the variables directly.
We recall that it is necessary to use nonparametric measures, such as Kendall’s
or Spearman’s
(Spearman’s correlation coefficient) [
8], in several practical cases, since the basic Pearson correlation coefficient measures the linear dependence only.
Consider the parameter
; then, the unique bivariate normal (or Gauss, or Gaussian) copula is given via the use of the Sklar’s theorem as follows:
where
is the CDF of the bivariate standard normal distribution. Note that for
, the correlation matrix of the two-dimensional standard normal distribution becomes singular. The Gaussian copula (
4) is flexible in the sense that it useful for both negative and positive dependency. The correlation parameter
is given as:
wherein
Sometimes, two-dimensional copulas are named doubly-stochastic measures.
In this work, we investigate how to construct a copula with Laplace marginal distribution function. The constructed copula is then be employed on pair trading (also known as pairs trading) as an efficient trading method in quantitative finance.
The Laplace distribution has been shown to provide better fits on economic and financial data when compared to the famous normal distribution [
9]. So, this is employed herein as a good tool for managing risk. In fact, the motivation behind choosing the Laplace distribution for risk management is the point that this distribution leads to fatter tails (in contrast to normal distribution tails), which matches much more preferably with the observations of the market [
10].
The remainder of this paper is organized as follows. In
Section 2, the Laplace distribution is defined briefly. Next, in
Section 3, the pairs trading strategy is given briefly. A trading algorithm is furnished in
Section 4 as an efficient tool for risk managers and traders. Further simulation results and comparisons are described in
Section 5. They confirm the applicability of the Laplace marginal distribution function in contrast to the normal distribution for risk management.
Section 6 ends the paper with a conclusion and future focuses.
3. A Review of Pairs Trade
It is known that pairs trade is a famous strategy for trading broadly employed by investment banks and hedge funds [
15]. This statistical arbitrage and convergence trading strategy is able to obtain profits irrespective of the direction of the market. It is derived via two steps. In the first step, an asset pair whose prices historically have moved with each other is detected. In the second step, by considering that in the future this equilibrium relationship should persist, the spread between the values of the stocks are controlled over a period of time. Furthermore, the investor shorts the overvalued asset and buys the undervalued one, when this deviates from its historical mean. After the price convergence, the positions are closed.
In the literature for the first part, two procedures are basically recommended. One is to perform a complete search for all available candidates among the chosen securities [
16]. The second is to cluster them based on unsupervised machine learning techniques such as
k-means++ and then constrain the groups into pairs. However, we consider here that we have already chosen these two appropriate pairs. In fact, pairs trading can be implemented after constructing an efficient portfolio via the clustering analysis procedure in unsupervised machine learning when the stocks of a portfolio have been clustered based on their associated risks, see the recent work [
17] for further information.
In pairs trading based on copula theory, the pairs choice stage determines the suitable candidate pairs, choosing the promising ones. Starting with the quest for suitable pairs, the trader must choose the appropriate pairs.
4. An Algorithm Based on the Laplace Distribution
The two stocks considered for imposing the copula distribution function with the Laplace marginal distribution function are shown in
Table 1. This is only one sample choice; in practice, any two highly correlated stocks inside a portfolio can be considered. The pairs can be obtained via strategies such as clustering analysis.
To show how the compared two stocks in our portfolio of companies behave through time, we compared their price trends, as shown in
Figure 1.
Based on the discussions in
Section 1,
Section 2 and
Section 3, it is now possible to write Algorithm 1 to perform the trading method. In fact, after constructing the copula function, the joint probability for each observed pair can be calculated.
Note that if only one joint distribution shows a lower tail dependence, then it is considered riskier than the one with a symmetric and weaker dependence.
The third item in Algorithm 1 includes a distribution fit test based on a hypothesis for test data. To illustrate the applicability of the proposed Laplace distribution in contrast to the normal distribution,
Table 2 and
Table 3 are furnished based on the same test stocks we considered in
Table 1. Floating shares are given based on the time of gathering the information for this work. The results clearly reveal that the normal distribution must not be assumed for the returns.
Several statistical test are shown in
Table 2 and
Table 3. Note that a statistical hypothesis test is a method of statistical inference used to determine a possible conclusion from two different, and likely conflicting, hypotheses [
18] (Chapter 9). For instance, the Anderson-Darling test is a statistical test, which shows whether a considered set of data is drawn from a given probability distribution or not. In its basic form, the test assumes that there are no parameters to be estimated in the distribution being tested, in which case the test and its set of critical values is distribution-free. When applied to testing whether a normal distribution properly describes a set of data, it is one of the most useful tools in finding departures from normality.
At the sixth step of the Algorithm 1, one is able to derive a Gaussian copula with marginal Laplace distributions. The PDF of the constructed copula is plotted in
Figure 2.
Algorithm 1 Pairs trade employing the Laplace marginal distribution function. |
- 1:
Choose the appropriate equity pair. Here, it was selected based on Table 1 on the given dates. - 2:
Gather daily prices on these indices and compute the log returns series. - 3:
Using the returns, we find the marginal distribution function. Here, the Laplace distribution based on Section 2 is fitted to these data. - 4:
We estimate the involved parameters by the maximum likelihood method. - 5:
The goodness-of-fit test is conducted and supports the selection of the Laplace distribution in contrast to the normal distribution with has a tighter tail dependency for the marginal distribution. This is where the proposed Laplace distribution helps us in practice. - 6:
Construct the bivariate normal copula ( 4), and save the final (estimated) copula distribution function as . - 7:
We calculate the returns during the out-of-sample period for our indices. - 8:
By considering the transactions costs to be negligible, we choose a threshold probability level of 95% and consider that we hold the trade for one day only, opening and closing the trade at the start and end of the day, after the signal is obtained. - 9:
Calculate each pair’s probability for daily observations. - 10:
Now, we obtain the signal based on the joint probabilities over the out-of-sample days of the series. - 11:
In the following days, when one observes the pairs with abnormally low/high estimated probabilities, s/he conducts the trading.
|
5. Simulation Results
In this work, the implementations were conducted using Mathematica 12.0 [
19] (Chapter 7) with a computer equipped with Core i7-9750H and SSD memory. It is necessary to check the effectiveness of the derived Gaussian copula under the marginal Laplace distribution. For this purpose, in
Figure 3, the empirical data of the two stocks are compared with
random numbers generated using the Gaussian copula function with the fitted marginal Laplace distribution. The results show how well the revisited copula works for fitting financial data. This distribution is fits stock market returns better, and it allows professionals working in the industry to obtain a more realistic expectation of daily returns.
In
Table 4, the Pearson correlation, the Spearman
, and the Kendall
for all data as well as for the lower and upper tails of the distribution of stock returns are provided.
Recall that the key element needed for this strategy is a conditional probability function. In fact,
and
are differentiations of the associated copula in terms of
v and
u, respectively, (see for instance [
5,
20]:)
Note that the probability threshold is always an obstacle for this approach. However, stocks are determined as being relatively undervalued as long as the conditional probability is less than 0.5 and relatively overvalued as long as the conditional probability is greater than 0.5 [
20]. Additionally, the conditional probabilities’ values are an indication of the certainty or confidence about the position of the stocks as well.
Thus, the execution of trade must be performed when one of the conditional probabilities is approaching 1. As such, the use of conditional probability functions is necessary for the strategy.
Some of the results are shown in
Table 5 for pairs trading. After a very high probability reading for 26 February 2020, we can conduct the trading. To illustrate further, we see the very high probability; then, by taking equal weighted positions, we long the NASDAQ:AAPL index and short the NYSE:LUV index on 27 February 2020. We close the position at the end of the day, producing a total return of 5.136%. Similarly, we can employ this pairs trade method to the entire sample and illustrate the resulting profit and loss.
Further acceleration of the pairs trade under Laplace marginal distribution can be pursued using parallel computation. In fact, using parallelization of the Mathematica command or the similar ones used in programming can help to improve the CPU time of the running times as much as possible.
In sum, the computational pieces of evidence reveal that the pairs trading under a copula approach is a good choice as long as a fat-tail marginal distribution (such as the Laplace distribution) is employed for fitting the data when we are calibrating the copula function.