Next Article in Journal
A Primer on Rules of Origin as Non-Tariff Barriers
Previous Article in Journal
Causal Effects of Financial Education Intervention Aimed at University Students on Financial Knowledge and Financial Self-Efficacy
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Particle Swarm Optimization Copula-Based Approach with Application to Cryptocurrency Portfolio Optimisation

by
Jules Clément Mba
1,* and
Magdaline Mbong Mai
2
1
School of Economics, College of Business and Economics, University of Johannesburg, P.O. Box 524, Auckland Park, Johannesburg 2006, South Africa
2
Cultural Studies and Applied Linguistics (LanCSAL), University of Johannesburg, Languages, P.O. Box 524, Auckland Park, Johannesburg 2006, South Africa
*
Author to whom correspondence should be addressed.
J. Risk Financial Manag. 2022, 15(7), 285; https://doi.org/10.3390/jrfm15070285
Submission received: 12 March 2022 / Revised: 9 June 2022 / Accepted: 13 June 2022 / Published: 28 June 2022
(This article belongs to the Section Financial Technology and Innovation)

Abstract

:
Blockchain and cryptocurrency are gradually going mainstream with new cryptocurrencies introduced every single day. The speculative nature of these digital assets expose their prices to large fluctuations. Trading these crypto-assets necessitate an adequate understanding of this emerging market as well as adequate tools to model the market risk and efficient allocation of funds. This may assist crypto investors in taking advantage of the highly volatile aspects of these assets. The portfolio consider in this study consists of six cryptocurrencies: four traditional cryptocurrencies (BTC, ETH, BNB and XRP) and two stablecoins (USDT and USDC). We examine the copula particle swarm optimization (CPSO) portfolio strategy against three other portfolio strategies, namely, the global minimum variance (GMV), the most diversified portfolio (MDP) and the minimum tail dependent (MTD). CPSO appears to be a promising strategy during extreme market conditions while GMV seem favorable during normal market conditions. Most importantly, hedge and safe-havens ability of the two stablecoins is clearly exhibited with CPSO, while their diversification property is inhibited.
JEL Classification:
C02; G11; G17

1. Introduction

The introduction of Bitcoin in 2009 by an anonymous person or group of people known as “Satoshi Nakamoto” ignited a technological revolution called blockchain, which spawned similar tokens, now called “cryptocurrencies”. By design, a blockchain is an open, distributed ledger able to record transactions efficiently between two parties and in a permanent and verifiable way. Starting from just one cryptocurrency (Bitcoin) with tokens valued at less than a cent, at the time of this writing we have around 19,500 cryptocurrencies with market capitalization reaching USD 1.2 trillion. Recent years have seen an increase popularity of cryptocurrencies used mostly as financial assets known as cryptoassets. These new type of assets are known to be highly volatile and these extreme dynamics can results in dependence shifts and portfolio losses (see, e.g., Bekiros et al. 2015; Brunnermeier 2009; Florackis et al. 2014; Moshirian 2011). Developing technical tools that can deal with such underlying properties is contemporary among practitioners and academic community.
On the one hand, we have models developed from technical trading rules and on the other hand those built from econometrics models. A review has been provided in (Corbet et al. 2009b) indicating the presence of a gap in the trading dynamics of these new assets, especially in the performance of trading rules. Using high-frequency trading data, moving average and the trading range break are tested in (Corbet et al. 2009b) to check if they hold for the Bitcoin market. The result reveals that the variable-length moving average has predictive power in cryptocurrency markets and is the most beneficial trading strategy when trading Bitcoin. While testing trend-following indicators in (Gerritsen et al. 2009), the results reveals that trading range breakout displays significant forecasting power for Bitcoin prices. This is also supported in (Gradojevic et al. 2021) where a combination of technical analysis with non-linear forecasting models appears to be statistically significantly dominant relative to the random walk model on a daily horizon. Furthermore, a classification tree-based model for return prediction is constructed in (Huang et al. 2019) and displays strong out-of-sample predictive power for narrow ranges of daily returns on bitcoin which is in line with the findings in (Nair 2021) illustrating the use of technical trading indicators as control variables in the extreme value regressions significantly improves the predictive power of models for cryptocurrencies. However, quite opposite to the previous findings, no predictability for Bitcoin was found in the out-of-sample period while employing 15,000 technical trading rules from the main five classes of technical trading rules, see (Hudson and Urquhart 2021).
In this study, we adopt a different approach to trading. Instead of focusing on trading signals through technical trading rules which looks at each asset individually, we target the behaviour of of assets collectively in a portfolio. To this end, we look at how capital should be allocated to minimize risk while maximizing the portfolio return.
Among other models are the class of multivariate GARCH models which rely on parametric multivariate distribution and are likely to be erroneously specified when the distribution of all the variables are not the same, as in the case of cryptoassets. This can be addressed through copula models famous for their ability to describe the dependence structure (inter-correlation) between random variables. Alongside the multivariate elliptical copula family (Gaussian copula and t-copula), Vine copula have been introduced with the ability to model the dependence structure between random variables using a cascade of bivariate copulas, including asymmetric Archimedean copulas, see (Aas et al. 2009; Allen et al. 2013; Bedford and Cooke 2001, 2002). The introduction of Vine copula models is very interesting in the sense that suitable bivariate copulas matching the stylized facts of the concerned random variables can be used to model their dependence structure. Another important aspect of these Vine models is their ability to auto-select these bivariate copulas when modelling the dependence structure. This way, the model learn from the data to adequately assign bivariate copula to each pair of random variable, so that appropriate tail dependence coefficients can be computed. We distinguish the regular vine (R-vine) copula and its two subclasses: the canonical vine (C-vine) and the drawable vine (D-vine). The statistical inference techniques for these two subclasses can be found in (Aas et al. 2009). In this paper, we will use C-vine copula specification for its flexibility and its ability to model the dependence around a selected central node (see, e.g., Embrechts et al. 2001; Fang and Fang 2002).
The problem of portfolio optimization consists of finding the portfolio weights meeting the investor’s objectives and constraints. In 1952, (Markowitz 1952) developed a parametric optimization model providing a fundamental basis for portfolio selection termed as standard portfolio optimization. The constraints taken into account here are full investment and no-short selling. In practice, portfolio optimization has realistic constraints such as diversification constraint, transaction cost, portfolio size or any other additional constraints to suit the needs of the investors. Adding these constraints makes the portfolio optimization problem too complex to be solved by standard optimization methods, and therefore require alternative techniques such as heuristic algorithms.
Many meta-heuristic techniques (Chang et al. 2000) such as genetic algorithms, simulated annealing and tabu search have been used in portfolio optimization to find the cardinality constrained efficient frontier. Other recent more efficient ones are differential evolution (DE) and particle swarm optimization (PSO). Although PSO belongs to swarm intelligence, both DE and PSO can be classified into stochastic optimization algorithms. DE is a population-based search strategy developed by Storn and Price (Price et al. 2006; Storn and Price 1997) and found to be more efficient than genetic algorithms and simulated annealing. It has shown remarkable performance on continuous numerical problems and optimizing portfolios under non-convex settings, see (Ardia et al. 2011; Krink and Paterlini 2009a, 2009b; Maringer and Oyewumi 2007; Yollin 2009). Similar to DE, PSO is a population based stochastic optimization technique developed by Kennedy and Eberhart in 1995 (Kennedy and Eberhart 1995). It has become a popular optimization method as it often succeeds in finding the best optimum by global search in contrast with most common optimization algorithms. Iwan et al. (2012) realised that generally, in terms of repeatability (robustness) and the quality of the obtained solutions, DE outperforms PSO. As the cryptocurrency market is still revealing its intrinsic properties in terms of price discovery, this study aims at first contrasting the performance of PSO against DE in combination with a copula model.
Given the ability of t-copula to successfully model the tails/extreme events (Mba et al. 2018) introduced the Copula differential evolution (CDE)-based approac,h which outperforms the standard DE and exhibits risk control ability. However, t-copula is symmetric, meaning that it models the lower tail and the upper exactly the same way. Although the tail of financial returns data are heavy, the heaviness varies from one dataset to another. So, imposing one type of copula to model the dependence structure between all assets pairs as in (Mba et al. 2018) may result in inaccurate risk measures. It is on this ground that this study instead employs the Vine copula, which has the ability to use a cascade of bivariate copulas to model the dependence structure between pairs of random variables in a multivariate settings. The Vine copula model is flexible enough to allow to user to determine list of copulas to be used. This has a great advantage over multivariate copula such as t copula or Gaussian copula. Inspired by this result, we aim in this paper to introduce copula particle swarm optimization (CPSO) and contrast its performance to that of copula differential evolution (CDE) in a portfolio consisting of six top cryptocurrencies by market capitalization, namely Bitcoin (BTC), Ethereum (ETH), USDT (Tether), USDC (USD coin), Binance coin (BNB) and Ripple (XRP). The rest of the paper is organised as follows: Section 2 presents the mathematical formalism of optimization methods and portfolio strategies used in this study. Section 3 discusses the empirical findings and the last Section 4, concludes the work.

2. Mathematical Formalism for Optimization Methods and Portfolio Strategies

The basic Mean-Variance optimization by (Markowitz 1952) can be formulated as in the Equation (1) below.
min ω i = 1 n k = 1 n σ i k ω i ω k subject to i = 1 n ω i = 1 i = 1 n E [ r i ] ω i = μ p ω i 0 , i = 1 , 2 , , n .
where ω i represents the portfolio weights, r i is the return of asset i and E [ r i ] its expectation, σ i k = c o v ( r i , r k ) is the covariance between r i and r k , μ p is the portfolio expected return.
Let ω R n be the portfolio vector representing the proportion of wealth invested in each of the n financial assets. Let r = ( r 1 , , r n ) be the vector of returns. Let α ( 0 , 1 ) and f ( ω , r ) be, respectively, a confidence level and a loss function for the portfolio ω and the return vector r R n . Then, the value-at-risk (VaR) function, ξ ( ω , α ) is the smallest number satisfying ψ ( ω , ξ ( ω , α ) ) = α , where ψ ( ω , ξ ) = Pr [ f ( ω , r ) ξ ] is the probability that the loss f ( ω , r ) does not exceed the threshold value ξ . Given that VaR does not satisfy the sub-additivity axiom that should be expected from any sensible risk measure, the Conditional VaR (CVaR), was introduced by (Rock and Uryasev 2000) as an alternative measure of risk. It is more appropriate to the loss function of the tail distribution and suitable for timeSeries with fat tails than most of the cryptocurrencies. Equation (2) gives the expression of the CVaR.
ψ α ( ω ) = ( 1 α ) 1 f ( ω , r ) > ξ ( ω , α ) f ( ω , r ) p ( r ) d r
To avoid complications resulting from the implicitly defined function ξ ( ω , α ) , (Rock and Uryasev 2000) provided an alternative function given by Equation (3).
F α ( ω , ξ ) = ξ + ( 1 α ) 1 f ( ω , r ) > ξ [ f ( ω , r ) ξ ] p ( r ) d r
for which they show that the minimum of CVaR can be found by minimizing F α ( ω , ξ ) with respect to ( ω , ξ ) .
Given returns data r j for j = 1 , , n , the function F α ( ω , ξ ) defined in Equation (3) can be approximated by Equation (4)
F ˜ α ( ω , ξ ) = ξ + [ ( 1 α ) n ] 1 j = 1 n m a x { f j ( ω ) ξ , 0 }
where f j ( ω ) = f ( ω , r j ) .
In this study, we intend to solve the CVaR-optimization problem defined in Equation (5)
min ω ξ + [ ( 1 α ) n ] 1 i = 1 n m a x { f i ( ω ) ξ , 0 } subject to i = 1 n ω i = 1 i = 1 n E [ r i ] ω i = μ p ω i 0 , i = 1 , , n .
We intend to find the portfolio that minimizes CVaR under 95% confidence level subject to the following weight constraints: weights must sum to 1 ( i n ω i = 1 ) and no short-selling is allowed ( ω i 0 ) .

2.1. GARCH Specifications

Let r t = ( r 1 , t , r 2 , t , , r d , t ) be a d-dimensional vector of random variables. The standard GARCH is defined by Equation (6):
r i , t = μ i , t + ϵ i , t ϵ i , t = σ i , t ν i , t σ i , t = ω i , t + α i , t ϵ i , t 2 + β i , t σ i , t 1
where σ i , t is the conditional variance of the returns series r i , t and ν i , t N ( 0 , 1 ) the standardized innovations/residuals which can be assumed to follow a normal, student t, skewed-student t or any other distribution. Giving the lack of standard GARCH model to capture the leverage effect, we opted for an asymmetric GARCH, namely GJR-GARCH introduced in (Glosten et al. 1993) to simulate the dynamics of the conditional variance given by Equation (7):
σ i , t 2 = ω i + j = 1 p β i , j σ i , t j 2 + k = 1 q α i , k + γ i , k I i , t k ϵ i , t k
where I i , t k = 1 , if ϵ i , t k < 0 ; 0 , if ϵ i , t k 0 . The distribution in this GARCH model is chosen as skewed-Student t, which is a generalization of the student-t distribution with an additional parameter to control the skewness. Its density is given by:
d ( x ; η , λ ) = b c 1 + 1 η 2 b x + a 1 λ 2 η + 1 2 if x > a b b c 1 + 1 η 2 b x + a 1 + λ 2 η + 1 2 if x a b
where a = 4 λ c η 2 η 1 , b = 1 + 3 λ 2 a 2 , c = Γ η + 1 2 π ( η 2 ) Γ η 2 and Γ is the gamma function. What is interesting about this density function is that it encompasses a wide range of conventional densities. For example, when λ = 0 , it reduces to student-t distribution; if λ = 0 and η , it reduces to the normal distribution. This justifies our choice for skewed Student-t distribution as margins in the copula model used in this study.

2.2. Copula Particle Swarm Optimization (CPSO)

2.2.1. Particle Swarm Optimization

The behavior of one organism in a swarm is often insignificant but their collective and social behavior is of great importance. In the PSO method, a swarm of particles flies through an N-dimensional search space where the position of each particle represents a potential solution to the optimization problem. Each particle p in the swarm S = { x 1 , , x p , , x n } is characterised by its jth dimensional following components: position x p , j ( t ) , velocity v p , j ( t ) , personal best (pbest) position y p , j ( t ) and the global best (gbest) position of the swarm y ˜ j ( t ) .
Let f be the objective function to be minimized in a d dimensional space. Then, the personal best position of particle p can be obtained iteratively using Equation (8):
y p , j ( t + 1 ) = y p , j ( t + 1 ) if f ( x p ( t + 1 ) ) > f ( y p ( t ) ) x p , j ( t ) , else
The global best gbest is then given by Equation (9)
y ˜ ( t ) = y g b e s t ( t ) = m i n ( y 1 ( t ) , , y n ( t ) )
where y i ( t ) = ( y i , 1 ( t ) , , y i , d ( t ) ) .
For each iteration, updating of positions are performed for each particle p [ 1 , n ] and along each dimensional component j [ 1 , d ] as described by Equation (10):
v p , j ( t + 1 ) = ω ( t ) v p , j ( t ) + a 1 r 1 , j ( t ) ( y p , j ( t ) x p , j ( t ) ) + a 2 r 2 , j ( t ) ( y ˜ j ( t ) x p , j ( t ) ) x p , j ( t ) = x p , j ( t ) + v p , j ( t + 1 ) )
where ω is the inertia weight, a 1 and a 2 are the acceleration constants, usually set to 1.49 or 2. r 1 , j and r 2 , j are random variables with a uniform distribution. In the first equation of Equation (10), the first term in the summation is the memory term representing the contribution of previous velocity, the second term is the cognitive component, which represents the particle’s own experience, and the third term is the social component, guiding the particle by the gbest of the particle towards the global best of the swarm so far obtained.

2.2.2. Vine-Copula

This subsection describes the characteristics necessary for a function to be a copula, as well as some of their properties.
Let X = ( X 1 , , X n ) be a vector of n random variables with the following marginal distributions F 1 , , F n , such as F i ( x i ) = P ( X i x i ) = u i (the probability that the measure of X i be less than x i ). Then, the joint distribution function is given by Equation (11)
F ( x 1 , , x n ) = P ( X 1 x 1 , , X n x n ) .
Definition 1.
An n dimensional ( n 2 ) copula is a function C : I n I satisfying the following properties:
1. 
C is non-decreasing that is C ( 0 , , x i , , 0 ) = 0 , for all x i I = [ 0 , 1 ]
2. 
C possess one dimensional uniform margins on C i , that is:
C i ( x i ) = C ( 1 , , 1 , x i , 1 , , 1 ) = x i for all x i I . C i is an invariant non-decreasing transformation of the marginal.
Copula was introduced in (Sklar 1959) through the following theorem.
Theorem 1.
Assume F = ( F 1 , , F n ) is an n dimensional joint distribution function with marginal distribution function F i ( i = 1 , , n ) . Then there exists a copula C such that for all x = ( x 1 , , x n ) I n
F ( x ) = C ( F 1 ( x 1 ) , , F n ( x n ) )
If F 1 , , F n are continue,then C is unique. Otherwise C is non-unique on I n
In addition, if F 1 , , F n are distribution function on I and if C is a copula, then the function F ( x ) = C ( F 1 ( x 1 ) , , F n ( x n ) ) is a joint distribution function on I n .
The canonical representation of the copula density function is given by Equation (12)
c ( u 1 , , u n ) = n C ( u 1 , , u n ) u 1 , , u n
To obtain the density of the n-dimension distribution F, Equation (13) is used
f ( x 1 , , x n ) = c ( F 1 ( x 1 ) , , F n ( x n ) ) i = 1 n f i ( x i )
where f i is the density of the marginal distribution F i .
Copula functions constitute an advantageous statistical tool for constructing and simulating multivariate distributions and therefore modelling the dependence structure. Multivariate copulas are restricted to Elliptical copula family (Gaussian and t copulas). Giving the limitations of this copula family in accounting for stylized of financial returns, Vine copula models which use bivariate conditional copulas as building blocks have been introduced. Vine models are flexible enough to capture the underlying dependence and tail dependence structure. In dimension N, a multivariate density is constructed by N ( N 1 ) / 2 bivariate (conditional) copulas (see, Bedford and Cooke 2001) as building blocks, thus the name Pair-Copula Construction (PCC) given to this construction process. For example, let X 1 , X 2 and X 3 be three random variables with distribution functions F 1 , F 2 and F 3 respectively. The joint density can be decomposed as
f ( x 1 , x 2 , x 3 ) = f 3 | 12 ( x 3 | x 1 , x 2 ) f 2 | 1 ( x 2 | x 1 ) f 1 ( x 1 )
where
f 2 | 1 ( x 2 | x 1 ) = c 12 ( F 1 ( x 1 ) , F 2 ( x 2 ) ) f 2 ( x 2 )
f 3 | 12 ( x 3 | x 1 , x 2 ) = c 13 ; 2 ( F 1 | 2 ( x 1 | x 2 ) , F 3 | 2 ( x 3 | x 2 ) ) f 3 | 2 ( x 3 | x 2 )
f 3 | 2 ( x 3 | x 2 ) = c 23 ( F 2 ( x 2 ) , F 3 ( x 3 ) ) f 3 ( x 3 )
with
F ( x | v ) = C x , v j ; v j { F ( x | v j ) , F ( v j | v j ) } F ( v j | v j )
for every v j of the vector v with v j = v { v j } in the general case.
As this construction is not unique, all the possible constructions can be illustrated by a set of nested trees T i = ( V i , E i ) where V i are the nodes and E i the edges. This set of trees is called a vine. The advantage of Vine copula is its ability and flexibility to model the dependence structure between time series using a cascade of bivariate copulas, see (Aas et al. 2009; Allen et al. 2013; Bedford and Cooke 2001, 2002). We distinguish the Regular vine (R-vine) copula and its two subclasses: the Canonical vine (C-vine) and the Drawable vine (D-vine). The statistical inference techniques for these two subclasses can be found in (Aas et al. 2009). In this paper, we will use C-vine copula specification.

2.2.3. Implementation

The Copula Particle Swarm Optimisation (CPSO) method is implemented as follows:
(1)
Obtain the standardized residuals d i from GJR-GARCH.
(2)
Simulate from C-vine copula a sample data s i from the standardized residuals d i with skew-student’s t (sst) marginals.
(3)
Apply the inverse transformation of sst to s i to obtain new data c i .
(4)
Solve the optimization problem (14):
(i)
Minimum CVaR portfolio using PSO and DE.
arg min ω ξ + [ ( 1 α ) n ] 1 i = 1 n m a x { f i ( ω ) ξ , 0 } subject to i = 1 n ω i = 1 i = 1 n E [ c i ] ω i 0 ω i 0 , i = 1 , , n .
where α = 0.1 and f i ( ω ) = f ( ω , c i ) .
(ii)
Global minimum variance portfolio (PGMV).
Let ω = ( ω 1 , , ω N ) be the weights vector. Let μ = ( μ 1 , , μ N ) be the return vector and Σ the positive semi-definite variance–covariance matrix of the portfolio’s assets. The portfolio return is given by r p = ω T μ and the portfolio variance σ W 2 = ω T Σ ω . For the global minimum variance portfolio for a given portfolio return, r p , the optimization problem can be stated as: arg min ω σ W 2 = ω T Σ ω , ω T μ = r p , ω T i = 1
where i is a column vector of ones.
(iii)
Most diversified portfolio (MDP).
The diversification ratio (DR) is given by Equation (15)
D R ω Ω = 1 ρ + C R ρ C R
where ρ and CR denote the volatility-weighted average correlation and the volatility-weighted concentration ratio, respectively. The diversification ratio measure the degree of diversification of a portfolio. The higher the DR, the more the portfolio is diversified. Portfolio solutions that are characterized by either a highly concentrated allocation or highly correlated asset returns would qualify as being poorly diversified. A most diversified portfolio (MDP) can be obtained through maximization of DR:
P M D P = arg max ω Ω D R
(iv)
Minimum tail-dependent (MTD) portfolio.
An optimal MDP portfolio is the one which yields the greatest diversification, by definition. However, this approach is based on the symmetric correlations between the assets. Akin to the optimization of a global minimum-variance portfolio, the minimum tail dependent portfolio is determined by replacing the variance–covariance matrix with the matrix of the lower tail dependence coefficients as returned by TDC. If the limit exists, then the lower tail dependence coefficient (TDC) is given by Equation (17)
λ L = lim u 0 C ( u , u ) u
where C is the copula of the marginal distributions.

2.3. Copula Differential Evolution (CDE)

DE uses biology-inspired operations of initialization, mutation, recombination, and selection on a population to minimize an objective function through successive generations (see Holland 1975). Similar to other evolutionary algorithms, to solve optimization problems, DE uses alteration and selection operators to evolve a population of candidate solutions.
Let N denote the population size. To create the initial generation, the optimal guess for N is made, either by using values input by the user or random values selected between lower and upper bounds (choosing by the user).
Consider the optimization problem (5) and let ξ + [ ( 1 α ) n ] 1 i = 1 n m a x { f i ( ω ) ξ , 0 } = h ( ω ) where ω = { ω 1 , ω 2 , , ω n } .
Given the population
ω k i g = { ω k 1 g , ω k 2 g , , ω k n g
where g is the generation and k = 1 , 2 , , N . The process is achieved through the following stages:
(1)
Initial population:
The initial population is randomly generated as
ω k i = ω k i L + rand ( ) ( ω k i U ω k i L )
where ω i L and ω i U represents the lower and upper bounds of ω i , respectively, and i = 1 , 2 , , n .
(2)
Mutation:
The differential mutation is accomplished as follows: A random selection of three members of the population ω r 1 k g , ω r 2 k g and ω r 3 k g to create an initial mutant vector parameter u k g + 1 , called donor vector, which is generated as
u k g + 1 = ω r 1 k g + F ( ω r 2 k g ω r 3 k g )
where F is the scale vector and k = 1 , 2 , , N .
(3)
Recombination or Cross-Over:
Let ω k i g denotes the target vector. From the target vector and the donor vector, a trial vector v k i g + 1 is selected as follows
v k i g + 1 = u k i g + 1 , if rand ( ) C p or i = I rand i = 1 , 2 , , n ; ω k i g , if rand ( ) > C p and i I rand k = 1 , 2 , , N
where I rand is a random integer in [ 1 , n ] and C p the recombination probability.
(4)
Selection:
At this stage, the target vector is compared with the trial vector and the one with the smallest function value is the candidate for the next generation
ω k i g + 1 = v k i g + 1 , if h ( v k i g + 1 ) < h ( ω k i g ) ; ω k i g , Otherwise .
where k = 1 , 2 , , N .

3. Results and Analysis

3.1. Data and Preliminary Analysis

The data used is composed of the daily returns (100 times the difference in logarithms of Crypt/USD exchange rates) of the top six cryptocurrencies by market capitalization. The data was downloaded from Yahoo Finance (https://finance.yahoo.com/cryptocurrencies/, accessed on the 17 May 2022). It spans the period 8 October 2018 to 15 May 2022 and consists of the following cryptoassets: Bitcoin (BTC), Ethereum (ETH), USDT (Tether), USDC (USD coin), Binance coin (BNB) and Ripple (XRP). Table 1 presents a descriptive statistics of the data used. These assets are leptokurtic with Kurtosis ranging between 13.8 to 50.3, suggesting that large fluctuations are more likely on the fat tails. Except for USDT and USDC, the remaining four assets returns are left-skewed. We can also see that the values for JB test are for from zero for all the digital assets. This signals that the data do not have a normal distribution. To account for all these characteristics, we will use the Skew-student’s t distribution as distribution in the GARCH model, as well as marginal distributions in the CVine copula model.
Figure 1 below displays the historical returns of the six digital assets. It is evident that volatility is not constant over time and periods of high volatility are followed by periods of low volatility. This justifies our choice of the GARCH-type model, famous for in modelling such stylized facts.
Table 2 displays the Kendall Tau coefficients illustrating the pairwise dependance among the six assets. From this table, we distinguish two groups of assets: the first group consisting of BTC, ETH, BNB, and XRP, which are highly positively correlated, the second group consisting of the stablecoins USDT and USDC. Assets in the first group are weakly (positively or negatively) correlated to assets in the second group. To model the dependence structure between these assets, we will employ the C-Vine copula.
As illustrated in Table 3, in modelling the dependence structure with C-vine, the following bivariate copulas were auto-selected by the model: the Gumbel 90 (G90), the Survival Gumbel (SG), the t-copula (t), and the SBB6 copulas. The lower tail dependence coefficients confirm the high level of correlation between assets in the first group as shown in Table 2. The lower tail dependence coefficient measure the level of dependence during extreme events. So, if ETH is in distress, BTC, BNB and XRP are likely to follow its trend by a probability of at least 67%. This suggests also exploring the minimum tail dependence portfolio strategy. Luckily the assets in the second group (USDT and USDC) are likely not to follow the same trend, making this portfolio quite diversified in some sense. We will confirm this later by computing the diversification ratio as well as the concentration ratio of this portfolio strategy based on the copula PSO. This portfolio approach will be compared with the classical Global mean-variance portfolio GMVP, the Most diversified portfolio (MDP) and the Minimum tail dependence portfolio (MTDP).

3.2. Portfolio Optimization

The following R packages are used for solving our optimization problem: DEoptim developed in (Ardia et al. 2011) and pso developed by Claus Bendtsen (pso: particle swarm optimization, R package version 1 (3), 2012). Particle swarm optimization (PSO) is an optimization algorithm popular for its simplicity and efficiency. Differential evolution (DE) is another popular algorithm comes up as a robust and efficient Evolutionary Algorithm. Although PSO belongs to swarm intelligence, both DE and PSO can be classified into stochastic optimization algorithms.
In a PSO process, a swarm of particles navigate through the feasible space and each of these particles represent a potential solution to the optimization problem. Initially, the particles are randomly distributed over the feasible space with a random velocity. The goal here is to converge to the global optimum of the objective function. In this setting, to achieve the global optimum, each particle keeps track of its position in the feasible space and its best position/solution (called pbest in Kennedy and Eberhart 1995) achieved so far. The global best position/solution of the swarm so far achieved is also tracked with the particle index of the swarm (the so-called gbest in Kennedy and Eberhart 1995). The journey towards the global optimum consists of discrete time iterations through which the velocity of each particle in the next iteration is computed by:
(i)
The best position of the swarm (position of the particle gbest as the social component);
(ii)
The best personal position of the particle (pbest as the cognitive component);
(iii)
Its current velocity (the memory term).
One drawback of PSO is that particles are flown through a single point which is (randomly) determined by the social and cognitive components and this point is not even guaranteed to be a local optimum (Kiranyaz et al. 2014). As display in Table 4, while the weights allocation for both algorithms are different, they allocate the highest weights to USDC and the least weight to BNB. Though they both achieve positive return, CDE outperforms the CPSO as can be seen from the Sharpe ratio in Table 4.
DE has shown efficient convergence to one (presumably global) optimum and has in general outperformed PSO (see Iwan et al. 2012). This out-performance still persist even when combined with copula. In the following subsection, we compare the copula PSO portfolio strategy with three other portfolio strategies, namely the global minimum variance (GMV) portfolio, the most diversified portfolio (MDP) and the minimum tail dependent (MTD) portfolio.

3.3. Portfolio Strategies Comparison

The aim in this subsection is to assess the performance of the CPSO with that of GMV, MDP and MTD portfolios in terms of diversification ratio, marginal risk contribution, and portfolio risks.
As displayed in Table 5, for the four portfolios, the weights are concentrated between USDT and USDC, both belonging to the second group of assets and weakly correlated to the remaining assets, while GMV, MDP and MTD assign almost the weights to USDT and USDC, CPSO assigns almost exactly half of these weights to them, respectively. Moreover, CPSO appears to be less concentrated as compare to the other three strategies. We will confirm this shortly with the computation of the concentration ratio (CR).
Table 6 presents the contribution to the portfolio risk of each asset in each portfolio. While the two stablecoins USDT and USDC share the highest contribution to risk in the first three portfolios (GMV, MDP and MTD), their risk contribution in the CPSO is the lowest, almost negligeable, with USDC showing a gaining sign. GMV and CPSO appear to be completely in the opposite end. The safe-haven characteristics of both stablecoins is clearly observed in the CPSO. What does this mean for an investor? This suggests that the benefits of the stablecoins as diversifier, hedge and safe havens is conditional to the portfolio strategy. Hence, investors should look for portfolio strategy that make the most of these properties such as CPSO strategy.
Looking at the portfolio risks (SD and ES95), from Table 7 it appears that CPSO is the riskiest portfolio, while GMV is the lowest-risk portfolio. This is not surprising, as the highly volatile and correlated BTC, ETH, and XRP are the highest contributors to risk in CPSO portfolio. Moreover CPSO appears to be the least diversified, and is more concentrated than the GMV. MDP and MTD stand in the middle in terms of risk, diversification, and concentration ratios. So, CPSO could be used during extreme market conditions, while GMV could be used during normal market conditions.

4. Conclusions

The portfolios considered in this study consisted of six cryptocurrencies: four traditional cryptocurrencies (BTC, ETH, BNB and XRP) and two stablecoins (USDT and USDC). We have examined the copula particle swarm optimization (CPSO) portfolio strategy against three other portfolio strategies, namely, the Global minimum variance (GMV), the most diversified portfolio (MDP), and the minimum tail-dependent (MTD). Initially we compare the performance CPSO against its analog population-based algorithm “copula differential evolution” (CDE), which shows out-performance ability based on their Sharpe ratios. While examining the risk contribution of each asset in each portfolio, CPSO appears to be a promising strategy during extreme market conditions, while GMV seem favorable during normal market conditions. Most importantly, the hedge and safe-haven ability of the two stablecoins is clearly exhibited with CPSO, while their diversification property is inhibited. So, we may ask the following question: can the benefits of the stablecoins properties as diversifiers, hedges and safe havens be exploited in one portfolio strategy? In order words, can we have a portfolio strategy in which stablecoins risk contribution is the lowest, while the diversification remains the highest? This direction of research will be taken in our next study.

Author Contributions

Conceptualization, J.C.M.; methodology, J.C.M.; validation, J.C.M., M.M.M.; formal analysis, J.C.M.; data curation, M.M.M.; writing—original draft preparation, J.C.M.; writing—review and editing, M.M.M.; visualization, M.M.M.; project administration, M.M.M.; funding acquisition, J.C.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Research Fund (NRF) grant number 145819 and The APC was funded by the University of Johannesburg.

Data Availability Statement

The data used in this study can be found in Yahoo Finance: https://finance.yahoo.com/, accessed on 17 May 2021.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Aas, Kjersti, Claudia Czado, Arnoldo Frigessi, and Henrik Bakken. 2009. Pair-copula constructions of multiple dependence. Insurance: Mathematics and Economics 44: 182–98. [Google Scholar] [CrossRef] [Green Version]
  2. Allen, David E., Mohammad A. Ashraf, Michael McAleer, Robert J. Powell, and Abhay K. Singh. 2013. Financial dependence analysis: Applications of vine copulas. Statistica Neerlandica 67: 403–35. [Google Scholar] [CrossRef]
  3. Ardia, David, Kris Boudt, Peter Carl, Katharine M. Mullen, and Brian G. Peterson. 2011. DEoptim: Differential Evolution Optimization in R. R Package Version. Available online: http://CRAN.R-project.org/package=DEoptim (accessed on 5 May 2021).
  4. Bedford, Tim, and Roger Cooke. 2001. Probability density decomposition for conditionally dependent random variables modeled by vines. Annals of Mathematics and Artificial Intelligence 32: 245–68. [Google Scholar] [CrossRef]
  5. Bedford, Tim, and Roger Cooke. 2002. Vines: A new graphical model for dependent random variables. The Annals of Statistics 30: 1031–68. [Google Scholar] [CrossRef]
  6. Bekiros, Stelios, Jose Arreola Hernandez, Shawkat Hammoudeh, and Duc Khuong Nguyen. 2015. Multivariate dependence risk and portfolio optimization: An application to mining stock portfolios. International Journal of Minerals Policy and Economics 46: 1–11. [Google Scholar]
  7. Brunnermeier, Markus. 2009. Deciphering the 2007–2008 liquidity and credit crunch. Journal of Economic Perspectives 23: 77–100. [Google Scholar] [CrossRef] [Green Version]
  8. Chang, Tun-Jen, Nigel Meade, John Beasley, and Yazid Sharaiha. 2000. Heuristics for cardinality constrained portfolio optimisation. Computers and Operations Research 27: 1271–302. [Google Scholar] [CrossRef]
  9. Corbet, Shaen, Veysel Eraslan, Brian Lucey, and Ahmet Sensoy. 2019. The effectiveness of technical trading rules in cryptocurrency markets. Finance Research Letters 31: 32–37. [Google Scholar] [CrossRef]
  10. Embrechts, Paul, Alexander McNeil, and Daniel Straumann. 2001. Correlation and dependency in risk management: Properties and pitfalls. In Risk Management: Value at Risk and Beyond. Edited by Martin Dempster and Hugh Moffatt. Cambridge: Cambridge University Press, pp. 176–223. [Google Scholar]
  11. Fang, Hong-Bin, Kai-Tai Fang, and Samuel Kotz. 2002. The meta-Elliptical distributions with given marginals. Journal of Multivariate Analysis 82: 1–16. [Google Scholar] [CrossRef] [Green Version]
  12. Florackis, Chris, Alexandros Kontonikas, and Alexandros Kostakis. 2014. Stock market liquidity and macro-liquidity shocks: Evidence from the 2007–2009 financial crisis. Journal of International Money and Finance 44: 97–117. [Google Scholar] [CrossRef]
  13. Gerritsen, Dirk, Elie Bouri, Ehsan Ramezanifar, and David Roubaud. 2020. The profitability of technical trading rules in the Bitcoin market. Finance Research Letters 34: 101263. [Google Scholar] [CrossRef]
  14. Glosten, Lawrence, Ravi Jagannathan, and David Runkle. 1993. On the relation between the expected value and the volatility of the nominal excess return on stocks. The Journal of Finance 48: 1779–801. [Google Scholar] [CrossRef]
  15. Gradojevic, Nikola, Dragan Kukolj, Robert Adcock, and Vladimir Djakovic. 2021. Forecasting Bitcoin with technical analysis: A not-so-random forest? International Journal of Forecasting. in press. [Google Scholar] [CrossRef]
  16. Holland, John. 1975. Adaptation in Natural Artificial Systems. Ann Arbor: University of Michigan Press. [Google Scholar]
  17. Huang, Jing-Zhi, William Huang, and Jun Ni. 2019. Predicting bitcoin returns using high-dimensional technical indicators. The Journal of Finance and Data Science 5: 140–155. [Google Scholar] [CrossRef]
  18. Hudson, Robert, and Andrew Urquhart. 2021. Technical trading and cryptocurrencies. Annals of Operations Research 297: 191–220. [Google Scholar] [CrossRef] [Green Version]
  19. Iwan, Mahmud, Rini Akmeliawati, Tarig Faisal, and Hayder MAA Al-Assadi. 2012. Performance Comparison of Differential Evolution And Particle Swarm Optimization in Constrained Optimization. Procedia Engineering 41: 1323–1328. [Google Scholar] [CrossRef] [Green Version]
  20. Kennedy, James, and Russell Eberhart. 1995. Particle swarm optimization. Paper presented at the IEEE International Conference on Neural Networks—Conference Proceedings, Perth, WA, Australia, November 27–December 1; vol. 4, pp. 1942–48. [Google Scholar]
  21. Kiranyaz, Serkan, Turker Ince, and Moncef Gabbouj. 2014. Improving Global Convergence. In Multidimensional Particle Swarm Optimization for Machine Learning and Pattern Recognition. Adaptation, Learning, and Optimization. Berlin/Heidelberg: Springer, vol. 15. [Google Scholar]
  22. Krink, Thiemo, and Sandra Paterlini. 2009. Multiobjective optimization using differential evolution for real-world portfolio optimization. Computational Management Science 8: 157–179. [Google Scholar] [CrossRef]
  23. Krink, Thiemo, Stefan Mittnik, and Sandra Paterlini. 2009. Differential evolution and combinatorial search for constrained index-tracking. Annals of Operations Research 172: 153–176. [Google Scholar] [CrossRef]
  24. Maringer, Dietmar, and Olufemi Oyewumi. 2007. Index tracking with constrained portfolios. Intelligent Systems in Accounting Finance & Management 15: 57–71. [Google Scholar]
  25. Markowitz, Harry. 1952. Portfolio selection. The Journal of Finance 7: 77–91. [Google Scholar]
  26. Mba, Jules Cl’ement, Edson Pindza, and Ur Koumba. 2018. A differential evolution copula-based approach for a multi-period cryptocurrency portfolio optimization. Financial Markets and Portfolio Management 32: 399–418. [Google Scholar] [CrossRef]
  27. Moshirian, Fariborz. 2011. The global financial crisis and the evolution of markets institutions and regulation. Journal of Banking and Finance 35: 502–511. [Google Scholar] [CrossRef]
  28. Nair, Saji Thazhungal Govindan. 2021. On extreme value theory in the presence of technical trend: Pre and post COVID-19 analysis of cryptocurrency markets. Journal of Financial Economic Policy. in press. [Google Scholar]
  29. Price, Kenneth, Rainer Storn, and Jouni Lampinen. 2006. Differential Evolution: A Practical Approach to Global Optimization. Berlin/Heidelberg: Springer Science & Business Media. [Google Scholar]
  30. Rockafellar, Tyrrell, and Stanislav Uryasev. 2000. Optimization of conditional value-at-risk. Journal of Risk 2: 21–42. [Google Scholar] [CrossRef] [Green Version]
  31. Sklar, Abe. 1959. Fonctions de Répartition à n Dimensions et Leurs Marges. Paris: Publications de l’Institut de Statistique de l’Université de Paris, Université de Paris, vol. 8, pp. 229–31. [Google Scholar]
  32. Storn, Rainer, and Kenneth Price. 1997. Differential evolution—A simple and efficient heuristic for global optimization over continuous spaces. Journal of Global Optimization 11: 341–59. [Google Scholar] [CrossRef]
  33. Yollin, Guy. 2009. R tools for portfolio optimization. Paper presented at the R/Finance Conference, R/Finance 2009: Applied Finance with R, Chicago, IL, USA, April 24–25; vol. 2009. [Google Scholar]
Figure 1. Historical returns. Notes: This figure displays the returns of the six cryptocurrencies from 27 September 2019 to 29 April 2022. It depicts the fact that the volatility is not constant over time as well as the volatility clustering. The vertical red line represents an unusual event which is is the time which Bitcoin touched an all-time high of around $65,000.
Figure 1. Historical returns. Notes: This figure displays the returns of the six cryptocurrencies from 27 September 2019 to 29 April 2022. It depicts the fact that the volatility is not constant over time as well as the volatility clustering. The vertical red line represents an unusual event which is is the time which Bitcoin touched an all-time high of around $65,000.
Jrfm 15 00285 g001
Table 1. Descriptive statistics.
Table 1. Descriptive statistics.
Cryptocurrencies
BTCETHUSDTUSDCBNBXRP
Mean0.1180.1700.0002−0.00020.258−0.007
min−46.500−55.100−5.260−3.720−54.300−55.000
max17.20023.1005.3404.24052.90044.500
sd3.9005.0100.4030.4015.5705.910
Kurtosis17.20013.80050.30025.60017.10015.400
Skewness−1.240−1.2800.3020.492−0.233−0.120
JB16,621.00010,803.000139,337.00035,979.00016,086.00013,128.000
Notes: “Mean”, “min”, “max” stand for the mean, minimum and maximum of the returns series respectively. “sd” stands for standard deviation. “JB” stands for the Jarque–Bera test for normality.
Table 2. Kendall Tau correlation coefficients.
Table 2. Kendall Tau correlation coefficients.
BTCETHUSDTUSDCBNBXRP
BTC1 0.633 0.057 −0.027 0.500 0.523
ETH 0.633 1 0.050 −0.026 0.538 0.582
USDT 0.057 0.050 1 0.377 0.024 0.048
USDC−0.027−0.026 0.377 1−0.028−0.016
BNB 0.500 0.538 0.024 −0.0281 0.471
XRP 0.523 0.582 0.048 −0.016 0.471 1
Notes: This table displays the Kendall tau correlation between all the pairs of assets in the portfolio. Different from Pearson and Spearman which are nearly equivalent in the way they correlate normally distributed data, Kendall tau tests the strength of dependence. Kendall tau coefficient is also known as rank correlation coefficient. The rank correlation examines the correlation between the rankings of X and Y. They are unaffected by any increasing transformation of X and Y.
Table 3. Bivariate copulas used in the C-vine and the lower tail dependence coefficients.
Table 3. Bivariate copulas used in the C-vine and the lower tail dependence coefficients.
Pair of AssetsCopulaTauLtd
ETH, USDTt0.050.02
ETH, BNBSBB60.550.67
ETH, BTCSG0.630.71
ETH, USDCG90−0.05
ETH, XRPSG0.590.67
Notes: This table displays from the first column to the fourth: the pairs of assets follow by the corresponding copula in the second column, the Kendall tau coefficients between the pairs in the third column, and the lower tail dependence coefficients in the last column. “t” stands for t copula; “SBB6” stands for Survival Joe-Gumbel copula; “SG” stands for Survival Gumbel copula; “G90” stands for Rotated Gumbel 90 degrees.
Table 4. Portfolio weights for CPSO and CDE optimization algorithms.
Table 4. Portfolio weights for CPSO and CDE optimization algorithms.
BTCETHUSDTUSDCBNBXRPSharpe Ratio
CPSO14.0919.3919.6027.934.2814.710.002
CDE27.0010.0015.0034.002.0012.000.005
Notes: This table displays the portfolio weights from the copula Particle Swarm Optimization (CPSO) and the copula Differential Evolution (CDE) algorithms respectively. The last column displays the Sharpe ratio from the two optimization algorithms. The weights are given in percentages.
Table 5. Weights allocation for GMV, MDP, MTD and CPSO portfolios.
Table 5. Weights allocation for GMV, MDP, MTD and CPSO portfolios.
GMVMDPMTDCPSO
BTC 0.49 2.00 1.15 14.10
ETH 0.58 1.21 1.42 19.40
USDT 47.90 41.20 42.60 19.60
USDC 50.80 51.30 51.00 27.90
BNB 0.31 2.27 1.25 4.28
XRP 0.0002 2.01 2.53 14.70
Notes: This table displays the portfolio weights allocation from the copula particle swarm optimization (CPSO), the global minimum variance (GMV) portfolio, the maximum diversification portfolio (MDP), the minimum tail dependent (MTD) portfolio. The weights are given in percentages.
Table 6. Marginal risk contribution for the 4 portfolio strategies.
Table 6. Marginal risk contribution for the 4 portfolio strategies.
GMVMDPMTDCPSO
BTC 0.49 10.30 5.47 20.80
ETH 0.58 8.04 8.94 39.20
USDT 47.90 21.90 25.90 0.06
USDC 50.80 27.20 30.90 0.17
BNB 0.31 16.70 8.11 8.02
XRP 0.0003 15.70 20.60 32.10
Notes: This table displays the marginal risk contribution per asset and per portfolio. The portfolio involved are the copula particle swarm optimization (CPSO) portfolio, the global minimum variance (GMV) portfolio, the maximum diversification portfolio (MDP), the minimum tail-dependent (MTD) portfolio. These marginal risk contribution are given in percentages.
Table 7. Standard deviation (SD), expected shortfall (ES95) at 95% level, diversification ratio (DR), and concentration ratio (CR) for each portfolio strategy.
Table 7. Standard deviation (SD), expected shortfall (ES95) at 95% level, diversification ratio (DR), and concentration ratio (CR) for each portfolio strategy.
GMVMDPMTDCPSO
SD 0.35 0.45 0.42 2.32
ES95 0.27 0.72 0.63 10.20
DR 1.33 1.69 1.68 1.22
CR 0.38 0.19 0.21 0.26
Notes: This table displays for each portfolio: the standard deviation (SD), the expected shortfall at 95% level (ES95), the diversification ratio (DR) and the concentration ratio (CR). These portfolios are: the copula particle swarm optimization (CPSO) portfolio, the global minimum variance (GMV) portfolio, the maximum diversification portfolio (MDP), and the minimum tail-dependent (MTD) portfolio.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Mba, J.C.; Mai, M.M. A Particle Swarm Optimization Copula-Based Approach with Application to Cryptocurrency Portfolio Optimisation. J. Risk Financial Manag. 2022, 15, 285. https://doi.org/10.3390/jrfm15070285

AMA Style

Mba JC, Mai MM. A Particle Swarm Optimization Copula-Based Approach with Application to Cryptocurrency Portfolio Optimisation. Journal of Risk and Financial Management. 2022; 15(7):285. https://doi.org/10.3390/jrfm15070285

Chicago/Turabian Style

Mba, Jules Clément, and Magdaline Mbong Mai. 2022. "A Particle Swarm Optimization Copula-Based Approach with Application to Cryptocurrency Portfolio Optimisation" Journal of Risk and Financial Management 15, no. 7: 285. https://doi.org/10.3390/jrfm15070285

Article Metrics

Back to TopTop