Abstract
Pairs trading under the copula approach is revisited in this paper. It is well known that financial returns arising from indices in markets may not follow the features of normal distribution and may exhibit asymmetry or fatter tails, in particular. Due to this, the Laplace distribution is employed in this work to fit the marginal distribution function, which will then be employed in a copula function. In fact, a multivariate copula function is constructed on two indices (based on the Laplace marginal distribution), enabling us to obtain the associated probabilities required for the process of pairs trade and creating an efficient tool for trading.
MSC:
91B60; 62H05
JEL Classification:
C15
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.
2. Laplace Distribution
The Laplace distribution is the distribution of differences between two independent variates with identical exponential distributions. In fact, the difference between two independent identically distributed exponential random variables is controlled by a Laplace distribution, as is a Brownian motion computed at an exponentially distributed random time. This distribution is employable in situations wherein the lower values originate under different external conditions than the higher ones such that they follow a different pattern, see [11,12] for further discussions.
It is useful in predicting when a fatter tail (in contrast to normal distribution tails) on the underlying prices exists in the market and to express very different events [13,14]. The statistical continuous Laplace distribution with as the mean and as the scale parameter is defined over the set of real numbers. Here, if
then its probability density function (PDF) is provided by:
Note that this distribution has a specific position along the normal distribution, being stable under geometric rather than ordinary summation; therefore, it is appropriate for stochastic modeling [13].
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.
Table 1.
Features of the equity pair considered for pairs trade. The dates on which the data were gathered, the copula function was constructed, and the prediction was calculated are provided.
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.
Figure 1.
Price trends for the NYSE:LUV and NASDAQ:AAPL stocks over time.
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.
Table 2.
Examination of whether the financial data follow the normal test under the best-fitted normal distribution. Goodness-of-fit tests are based on several well known statistical measures to test whether the sample data have the skewness and kurtosis matching a normal distribution.
Table 3.
Examination of whether the financial data follow the best-fitted Laplace distribution.
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. |
|
Figure 2.
The PDF of the Gaussian copula constructed based on the stocks shown in Table 1, which shows how it behaves on the domain.
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.
Figure 3.
Comparison of empirical data (left) and simulated data from the copula function (right).
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.
Table 4.
Correlation comparisons for the considered sticks, as well as their lower and upper tails.
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.
Table 5.
Results based on pairs trade and Algorithm 1 showing when to conduct the trades based on the probabilities.
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.
6. Conclusions
In this paper, we reviewed pairs trading using the copula approach with an emphasis on the use of the well-known fat-tailed Laplace distribution. The fat-tailed feature of the considered distribution, particularly when used on the marginal functions, helped us to produce copula distribution functions, which had a better ability to fit stock data. The computational pieces of evidence in Section 5 supported the discussions.
Finally, we note that due to the growth in the availability of data, sometimes it is difficult to determine efficient pairs. Hence, further questions can be investigated in future studies such as:
- How to determine the best pairs while limiting the search space; and,
- How to stop facing long decline periods due to prolonged divergent pairs.
Author Contributions
Conceptualization, T.N. and T.L.; Formal analysis, T.N. and T.L.; Funding acquisition, S.S.; Investigation, S.S.; Methodology, T.N. and T.L.; Project administration, T.N.; Writing—original draft, T.N., T.L. and S.S.; Writing—review & editing, T.L. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Data sharing is not applicable to this article, as no new data were used in this study. The data used were described in the text.
Acknowledgments
We are indebted to two anonymous referees for their comments on an earlier version of this work, which helped to clarify the manuscript.
Conflicts of Interest
The writers have no known personal relationships or competing financial interests which could have appeared to influence the work reported in this article.
References
- Basel Committee on Banking Supervision. Basel III: A Global Regulatory Framework for More Resilient Banks and Banking Systems; Basel Committee on Banking Supervision: Basel, Switzerland, 2011. [Google Scholar]
- Company, R.; Egorova, V.N.; Jódar, L.; Soleymani, F. A stable local radial basis function method for option pricing problem under the Bates model. Numer. Methods Part. Differ. Equ. 2019, 35, 1035–1055. [Google Scholar] [CrossRef]
- Tsoulos, I.G.; Kosmas, O.T.; Stavrou, V.N. DiracSolver: A tool for solving the Dirac equation. Comput. Phys. Commun. 2019, 236, 237–243. [Google Scholar] [CrossRef] [Green Version]
- Alexander, C. Market Risk Analysis, Chichester; John Wiley & Sons Ltd.: West Sussex, UK, 2008. [Google Scholar]
- Kinlay, J. Pairs Trading with Copulas. 2019, pp. 1–9. Available online: community.wolfram.com (accessed on 26 January 2022).
- Maneejuk, P.; Yamaka, W. The role of economic contagion in the inward investment of emerging economies: The dynamic conditional copula approach. Mathematics 2021, 9, 2540. [Google Scholar] [CrossRef]
- Sklar, A. Fonctions de répartition à n dimension et leurs marges. Publ. L’Institut Stat. L’Université Paris 1959, 8, 229–231. [Google Scholar]
- Okhrin, O.; Ristig, A.; Xu, Y.-F. Copulae in High Dimensions: An Introduction. Appl. Quant. Financ. Stat. Comput. 2017, 13, 247–277. [Google Scholar]
- Gerlach, R.; Lu, Z.; Huang, H. Exponentially smoothing the skewed Laplace distribution for value-at-risk forecasting. J. Forecast. 2013, 32, 534–550. [Google Scholar] [CrossRef]
- Ghanadian, A.; Lotfi, T. Approximate solution of nonlinear Black-Scholes equation via a fully discretized fourth-order method. AIMS Math. 2020, 5, 879–893. [Google Scholar] [CrossRef]
- Itkin, A.; Soleymani, F. Four-factor model of quanto CDS with jumps-at-default and stochastic recovery. J. Comput. Sci. 2021, 54, 101434. [Google Scholar] [CrossRef]
- Ernst, P.A.; Soleymani, F. A Legendre-based computational method for solving a class of Itô stochastic delay differential equations. Numer. Algorithms 2019, 80, 1267–1282. [Google Scholar] [CrossRef]
- Kotz, S.; Kozubowski, T.J.; Podgórski, K. The Laplace Distribution and Generalizations: A Revisit with Applications to Communications, Economics, Engineering and Finance; Birkhauser: Basel, Switzerland, 2001. [Google Scholar]
- Taylor, J. Forecasting value at risk and expected shortfall using a semiparametric approach based on the asymmetric Laplace distribution. J. Bus. Econ. Stat. 2019, 37, 121–133. [Google Scholar] [CrossRef]
- Blázquez, M.C.; De la Cruz, C.D.O.; Román, C.P. Pairs trading techniques: An empirical contrast. Eur. Res. Manag. Bus. Econ. 2018, 24, 160–167. [Google Scholar] [CrossRef]
- Do, B.; Faff, R. Does simple pairs trading still work? Finan. Anal. J. 2010, 66, 83–95. [Google Scholar] [CrossRef]
- Soleymani, F.; Vasighi, M. Efficient portfolio construction by means of CVaR and k-means++ clustering analysis: Evidence from the NYSE. Int. J. Finan. Econ. 2021, 1–15. [Google Scholar] [CrossRef]
- Rice, J.A. Mathematical Statistics and Data Analysis, 3rd ed.; Thomson Brooks/Cole.: Belmont, CA, USA, 2007. [Google Scholar]
- Georgakopoulos, N.L. Illustrating Finance Policy with Mathematica; Springer International Publishing: Cham, Switzerland, 2018. [Google Scholar]
- Liew, R.Q.; Wu, Y. Pairs trading: A copula approach. J. Deriv. Hedge Funds 2013, 19, 12–30. [Google Scholar] [CrossRef] [Green Version]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).