# Sparse Portfolio Selection via Topological Data Analysis based Clustering

Anubha Goel<EMAIL_ADDRESS>Damir Filipović<EMAIL_ADDRESS>Puneet Pasricha<EMAIL_ADDRESS>Ecole Polytechnique Fédérale de
Lausanne, CH 1015 Lausanne, Switzerland  École Polytechnique Fédérale de
Lausanne and Swiss Finance Institute  Department of Mathematics, Indian
Institute of Technology Ropar, Rupnagar 140001, Punjab, India

###### Abstract

This paper uses topological data analysis (TDA) tools and introduces a data-
driven clustering-based stock selection strategy tailored for sparse portfolio
construction. Our asset selection strategy exploits the topological features
of stock price movements to select a subset of topologically similar
(different) assets for a sparse index tracking (Markowitz) portfolio. We
introduce new distance measures, which serve as an input to the clustering
algorithm, on the space of persistence diagrams and landscapes that consider
the time component of a time series. We conduct an empirical analysis on the
S&P index from 2009 to 2020, including a study on the COVID-19 data to
validate the robustness of our methodology. Our strategy to integrate TDA with
the clustering algorithm significantly enhanced the performance of sparse
portfolios across various performance measures in diverse market scenarios.

###### keywords:

Topological Data Analysis , Clustering , Index Tracking , Mean-Variance
Portfolio , Global Minimum Variance Portfolio , Sparse Portfolios

††journal: Decision Support Systems

##  1 Introduction

Asset selection and portfolio optimization are critical tasks for financial
institutions such as banks, fund management firms, and individual investors as
they seek to manage risk and maximize returns in an increasingly competitive
business environment and complex market conditions. Over the years, academics
and practitioners have actively developed quantitative techniques and models
to assess risk and construct efficient portfolios that perform well out-of-
sample. In this pursuit, sparse portfolio selection has become a well-known
and extensively researched problem in the fields of financial economics and
optimization, where sparseness is a desirable property not only from the point
of view of transaction costs but also because it allows investors to
concentrate their capital on assets that are most likely to generate returns
while minimizing exposure to unforeseen risks or market fluctuations.
Moreover, it also offers a potential solution to the limitations of
traditional mean-variance or index-tracking portfolios, as it focuses on a
smaller subset of assets to improve portfolio performance.111Despite its
popularity, mean-variance analysis has received criticism for its
susceptibility to parameter estimates and assumptions. It is observed that
small changes in assumed asset returns, volatilities, or correlations lead to
substantial effects on the optimization results, ultimately leading to sub-
optimal performance when tested against real-world data. In essence, the
classic Markowitz portfolio optimization represents an ill-posed inverse
problem. Several techniques have been proposed to address this challenge,
including regularization techniques imposing sparseness and adopting shrinkage
estimators of expected returns and covariance matrix.222In index tracking, the
goal is to construct a portfolio of securities that replicates the performance
of a market index. The simplest method to achieve this goal is through full
replication, which entails holding all the assets in the target market index
in the same proportions. While full replication provides perfect tracking
performance in a frictionless market, it is expensive, requiring frequent re-
balancing of many stocks. It is sometimes not possible due to restrictions on
trading illiquid securities or managerial constraints. An alternative approach
is partial replication, which aims to mimic the index performance using a
small subset of securities.

The problem of sparse portfolio selection can be reformulated as a two-step
problem, with the first step of selecting a subset of securities based on
their risk and return characteristics and the second step of obtaining the
optimal weights. In this paper, we adopt clustering to select a smaller set of
securities that provide diversification benefits to the portfolio. Clustering
methods have emerged as one of the most innovative strategies in portfolio
selection in recent years. This technique for classifying data objects into
homogeneous groups based on their similarities proved to be effective in
constructing sparse portfolios ([36, 28]).

This two-step approach has several advantages over the alternative methods in
the literature, such as regularization techniques (imposing a constraint on
the $\ell_{q}$-norm of portfolio weights) or including a cardinality
constraint on the number of securities to be included in the portfolio to
promote sparsity and stable allocations. Adding a cardinality constraint
significantly increases the combinatorial complexity of the optimization
problem, resulting in a mixed-integer quadratic programming problem that is
generally NP-hard and computationally intractable. Heuristic methods, such as
genetic algorithms, are typically required to find approximate solutions,
which may not guarantee global optimality ([41, 47, 19]). Similarly, the
regularization technique involves determining the regularization coefficients
through cross-validation, which becomes particularly challenging when each
security has its regularization parameter. This approach has been shown to
outperform the approach with a common regularization parameter.333For example,
[6] suggests integrating an $\ell_{1}$-norm (LASSO) penalty on the vector of
portfolio weights in optimization models to regularize the optimization
problem and encourage sparse portfolios. Moreover, [14] demonstrate that norm-
constrained global minimum variance portfolio yields improved out-of-sample
performance and [20] and [23] utilize $\ell_{1}$ penalty in the context of
replicating hedge funds. Recently, [27] considered the mean-variance
optimization with an advanced regularization technique called weighted
Elastic-Net. Further, these methods tend to result in risk concentration as
the resulting portfolio may not be diversified. This can lead to over-exposure
to a single industry sector, thus making the portfolio riskier due to
vulnerability to a downturn in that sector. Furthermore, due to local optima
and discontinuities in the search space, both the cardinality constraint
problem and the $\ell_{q}$-norm constraint problem are difficult to solve from
an optimization standpoint. Finally, the regularization technique LASSO
suffers from several known shortcomings, such as selecting at random from
equally correlated assets ([5]), being biased for large coefficient values
([18, 23]), and being ineffective in the no-short-sale area ([14]). In
contrast, clustering can result in a more diversified and sparse portfolio
without increasing the computational burden. Moreover, clustering allows for
the combination of judgment and quantitative optimization as it is an
intuitive approach.

The key to any clustering technique is the distance function that enables it
to identify similarities and dissimilarities among the inputs in the data set
(time series of stock returns in our case) and allocate them to different
clusters. Traditionally, correlation-based clustering has been employed to
locate clusters in the portfolio of financial assets, for instance, [32].
However, it is well known that Pearson’s correlation is not a suitable measure
of dependence to be used outside the Gaussian (elliptical) distributions, and,
in particular, it does not give an accurate indication and understanding of
the actual dependence between risk exposures [17]. Furthermore, even if two
assets are perfectly correlated, an investment in one can lead to positive and
negative returns in the other. In this paper, we employ a recently introduced
approach known as Topological Data Analysis (TDA) to define the similarity
between two time series and propose an efficient data-driven approach to
sparse portfolio selection. The underlying idea of TDA is that persistent
homology, through filtration, enables highly flexible and multi-resolution
analysis of $n$-dimensional holes, which are the most salient features of a
data set. TDA thus allows us to relate objects based on their qualitative
structural properties, such as shape and connectedness. This paper argues that
topological features can help identify exciting time series patterns and
spatial data clustering. In particular, insights can be gained by examining
the essential qualitative characteristics of data sets that are often
overlooked by traditional distance-based clustering techniques. To our
knowledge, this paper is the first to present a pioneering application of TDA
to address the sparse portfolio selection using clustering.

Our paper makes several methodological and empirical contributions that
address the aforementioned issues. First, despite the considerable amount of
research that has been conducted on applying TDA to study financial time-
series, there still needs to be practical implementation and utilization of
this method in the field of quantitative finance.444Recently, Goel et al
(2023) [24] proposed TDA based sparse index tracking model where the authors
adopt the regularization approach to achieve sparseness. We leverage tools
from TDA, namely persistence diagrams and landscapes, and design strategies
for sparse portfolio selection. By doing so, we establish a link between the
growing research on TDA and the most frequently studied portfolio selection
problem in the financial economics literature. Thus, we contribute to the
emerging literature on applications of TDA to the problem of selecting sparse
portfolios.

Second, our research draws attention to a critical limitation of distance
metrics defined on persistence diagrams when applied to financial time-series
data. Specifically, we show that the Wasserstein distance between the PDs
corresponding to the return series of two hypothetical assets is zero, even
when the two return series are not identical. We identify the reason for this
behavior as the critical time component in financial data. To address this
issue, we introduce two novel distance measures. The first, called the
differenced Wasserstein distance (DWD), defines the distance between the
persistence diagrams of two time series, ${x_{t}}$ and ${y_{t}}$, as the
Wasserstein distance between the persistence diagram of the differenced time
series ${x_{t}-y_{t}}$ and that of a constant series. The second called the
average Wasserstein distance (AWD), partitions the two time series into
overlapping sub-series and calculates the average Wasserstein distance between
the corresponding sub-series. We also introduce similar measures, including
the average landscape distance (ALD) and the differenced landscape distance
(DLD) on the space of persistence landscapes. Moreover, we also demonstrate
the stability of the persistence diagrams concerning the newly introduced
distance measures, thus contributing to the literature on TDA.

Third, we utilize the introduced distance measures to propose two strategies
for sparse portfolio selection. Our first strategy focuses on constructing a
sparse index tracking (IT) portfolio, while our second strategy aims to select
sparse mean-variance (MV) and global minimum variance (GMV) portfolios. To
accomplish this, we create a distance matrix corresponding to the index and
its $n$ constituents and define the corresponding similarity matrix. We then
use this matrix as input for affinity propagation clustering (APC). We select
the assets that share the cluster with the index for the sparse IT portfolio,
which are topologically similar to the index by construction. We solve an
index tracking problem on the selected assets. We select representative assets
from each cluster for the sparse MV and GMV portfolios and solve the portfolio
optimization problem on the filtered assets, thus obtaining a sparse
portfolio. Our TDA-based similarity matrices and the APC offer an entirely
data-driven approach, unlike the methodologies that employ $k$-mean clustering
for sparse portfolio selection, which requires investors to pre-specify the
number of assets in the portfolio.

We conduct an extensive empirical analysis, investigating the performance of
the sparse index tracking, MV, and GMV portfolios obtained using the daily
returns of the S&P 500 index and its constituents spanning approximately a
decade from Dec 2009 to Dec 2019. We further assess the performance of our
strategies during the recent COVID-19 Pandemic period from July 2019 to
November 2020 to check the robustness. We also compare the performance of our
sparse index tracking model on the benchmark data set for index tracking
problems available publicly on the Beasley OR library. Our analysis shows that
our TDA-based sparse portfolios outperform the traditional correlation-based
sparse portfolios as well as other leading benchmark models in the literature.

The rest of this paper is structured as follows. Section 2 briefly reviews
TDA. Section 3 introduces the novel distance measures and demonstrates their
stability. Section 4 describes the methodology, starting with the problem of
sparse portfolio selection, followed by a brief review of affinity propagation
clustering, and finally, our portfolio selection strategies. Section 5
presents the data and the empirical findings. Section 6 concludes with
potential future research directions.

##  2 Background of TDA

Inspecting the 2-dimensional point clouds in Figure 1, it is evident that each
point cloud has a distinct shape.555A point cloud is a finite set of points in
some Euclidean space $\mathbb{R}^{d}$ (or a more general metric space).
Specifically, the points in the first point cloud are scattered around one
loop, while those in the second point cloud are dispersed around two loops.
Given our inability to visualize beyond two or three dimensions, the natural
question is how to formalize these qualitative observations, particularly the
shapes of point clouds in higher dimensions. Fortunately, TDA provides a
rigorous tool to systematically define and study the “shape” of data in high
dimensional spaces.

Figure 1: Examples of two-dimensional noisy point clouds.

The first step involves building a simplicial complex given the point cloud
$X=\\{x_{i}\\}^{N}_{i=0}$ in $\mathbb{R}^{q}$. A simplicial complex is a space
comprising points, edges, triangles, tetrahedra, and higher-dimensional
polytopes. In the abstract sense, a simplicial complex is a finite set $S$ of
non-empty subsets of a set $S_{0}$ such that $\\{v\\}\in S$ for every $v\in
S_{0}$, the intersection of any two simplices in $S$ is either empty or shares
faces, and $\tau\subset\sigma$ and $\sigma\in S$ ensure that $\tau\in S$.666A
$k$-simplex is a convex hull
$[a_{0},a_{1},\ldots,a_{k}]=\\{\sum_{i=0}^{k}\eta_{i}a_{i}:\sum_{i=0}^{k}\eta_{i}=1\\}$
of $k+1$ geometrically independent points $\\{a_{0},a_{1},\ldots,a_{k}\\}$.
Furthermore, the faces of a $k$-simplex $[a_{0},\ldots,a_{k}]$ are the
$(k-1)$-simplices spanned by subsets of $\\{a_{0},\ldots,a_{k}\\}$. Note that
0-dimensional simplices represent data points (vertices), 1-dimensional
simplices are connected pairs of vertices (edges), and a 2-dimensional simplex
is a filled triangle determined by its three vertices. There are several ways
to construct a simplicial complex for a given point cloud, including the Cech
complex and the Vietoris-Rips complex. We adopt the Vietoris-Rips complex in
this paper. The underlying idea of the Rips complex is to connect the pairs
that are sufficiently close to points (vertices) by edges. Mathematically,

######  Definition 2.1.

Given a resolution parameter $\epsilon>0$, the Vietoris–Rips complex of $X$ is
defined to be the simplicial complex ${\mathcal{R}}_{\epsilon}(X)$ satisfying
$[x_{i1},\ldots,x_{il}]\in{\mathcal{R}}_{\epsilon}(X)$ if and only if
$diam(x_{i1},\ldots,x_{il})<\epsilon$.

The next question is how to extract the “shape” of the point cloud from the
simplicial complex. TDA defines this shape by examining the topological
features present in this complex. More specifically, TDA extracts the
topological features characterized by $k$-dimensional holes, where $k=0,1,2$
represents connected components, holes, and voids, respectively, and uses
these features as a surrogate to describe the shape of the point cloud.

Another important question revolves around the choice of $\epsilon$, i.e., how
do we define “sufficiently close” points to construct a simplicial complex?
The choice of $\epsilon$ is vital as a very large value can lead to just one
connected component as all the points get connected to each other, hence a
loss of any meaningful topological features. On the other hand, we might not
see any interesting topological features when $\epsilon$ is too small due to
no edge formation. TDA offers a systematic solution to address this question.
Instead of making random choices of $\epsilon$ that could impact our
conclusions, TDA involves analyzing the shape of the point cloud across
various resolutions by studying the evolution of topological features as a
function of $\epsilon$. To accomplish this, we construct a sequence of
Vietoris–Rips simplicial complexes for
$0=\epsilon_{0}<\epsilon_{1}<\ldots<\epsilon_{n}$ with
$\\{\epsilon_{n}\\}\in\mathbb{R}^{+}\cup\\{0\\}$. We call this sequence of
complexes, a Vietoris–Rips filtration and denote it by
$\\{{\mathcal{R}}_{\epsilon_{n}}(X)\\}_{n\in\mathbb{N}}$. Within this
filtration, due to several topological transformations, such as the closure of
existing holes or the emergence of new edges, several topological features
would appear (birth) and disappear (death) in the corresponding simplicial
complex. We finally assign each topological feature a ‘birth’ and ‘death’
value. The persistence (age) of these features provides a meaningful
characterization of the overall shape of the data; the features with longer
persistence are considered more robust, significant, and representative of the
shape of the point cloud. Conversely, features with shorter persistence are
considered less significant or noise and can be filtered out if necessary.

Figures 2 depict this step-by-step procedure, also known as persistence
homology, for obtaining the filtration from the point cloud. The idea is to
encircle each point in the point cloud with $\epsilon$-sized balls, gradually
expanding $\epsilon$ until all the balls merge, resulting in one connected
component and keeping track of birth and death times of various topological
features, such as connected components, loops, and voids.

(a) $\epsilon_{1}$=0.2, loops=0

(b) $\epsilon_{3}$=0.6, loops=1

(c) $\epsilon_{5}$=1.5, loops=2

(d) $\epsilon_{6}$=2.5, loops=0

Figure 2:  A diagram depicting the Rips filtration process. Each point in the
point cloud is equipped with an equal-sized ball, with the radius of the ball
serving as the filtering parameter. By increasing the value of the radius, a
succession of nested simplicial complexes is formed. It causes characteristics
like connected components and holes to emerge and vanish. The initial loop
appeared in 2(b) and died in 2(c). In 2(c), two additional substantial large
holes can be observed, which die in 2(d).

Having obtained the Rips filtration, we summarize the birth and death times of
topological features in a persistence diagram (PD) ${\mathcal{D}}$, which is a
multi-set of points in $\mathbb{W}\times\\{0,1,\ldots,q-1\\}$, where
$\mathbb{W}:=\\{(b,d)\in\mathbb{R}^{2}:d\geq b\geq 0\\}$ and each element
$(b,d,f)$ represents a topological feature of dimension $f$ that appeared at
$\epsilon=b$ and disappeared at scale $\epsilon=d$ during the construction of
filtration. Figure 3(a) gives the persistence diagram corresponding to the
filtration in Figure 2. When we study persistence diagrams for data analysis,
one must be able to compare persistence diagrams. Therefore, it becomes
necessary to introduce a distance metric between two persistence diagrams to
describe their relation. The similarity between two persistence diagrams is
commonly measured by $p$-Wasserstein distance, defined as

######  Definition 2.2.

The $p$-Wasserstein distance [13] between two persistence diagrams
${\mathcal{D}}_{{X}}$ and ${\mathcal{D}}_{{Y}}$ corresponding to data sets $X$
and $Y$ is defined as

$WD_{p}({\mathcal{D}}_{{X}},{\mathcal{D}}_{{Y}})=\left(\inf_{\gamma}\sum_{a\in{{\mathcal{D}}_{{X}}}}||a-\gamma(a)||_{\infty}^{p}\right)^{\frac{1}{p}}.$

where $p\geq 1$ and $\gamma$ ranges over all bijections from the points in
${\mathcal{D}}_{{X}}$ to the points in ${\mathcal{D}}_{{Y}}$. For $p=\infty$,
$p$-Wasserstein distance is called the bottleneck distance.

Though persistence diagrams contain potentially valuable information about the
underlying data set, it is a multi-set which, when equipped with Wasserstein
distance, forms an incomplete metric space and hence is not appropriate to
apply tools from statistics and machine learning for processing topological
features ([8]). A persistence landscape is an alternative tool to convey the
information in the persistence diagram. It comprises a sequence of continuous
and piece-wise linear functions defined on a re-scaled birth-death coordinate,
with the peaks of a persistence landscape representing the significant
topological features. Given the birth-death pairs
$p_{i}(a_{i},b_{i}),~{}i=1,\ldots,m$, a persistence landscape, illustrated in
Figure 3(b), is defined as a sequence of functions
$\lambda:\mathbb{N}\times\mathbb{R}\rightarrow[0,\infty)$, denoted as
$\lambda(k,t)=\lambda_{k}(t)$. Here, $\lambda_{k}(t)$ represents the $k$-th
largest value among the set $\\{\Lambda_{p_{i}}(t)\mid i=1,\ldots,m\\}$ and we
set $\lambda_{k}(x)=0$, ensuring that $\lambda_{k}(t)=0$ for $k>m$ if the
$k$-th largest value does not exist. Here, for a fixed feature dimension $f$,
we associate a piece-wise linear function
$\Lambda_{p}(t):\mathbb{R}\rightarrow[0,\infty)$ with each birth-death pair
$p=(a,b)\in{\mathcal{D}}$, where ${\mathcal{D}}$ is the persistence diagram,
as follows:

$\displaystyle\Lambda_{p}(t)=\left\\{\begin{array}[]{ll}t-a&\quad
t\in[a,\frac{a+b}{2}]\\\\[5.0pt] b-t&\quad t\in[\frac{a+b}{2},b]\\\\[5.0pt]
0&\quad\mbox{otherwise}.\end{array}\right.$ (4)

Simply put, a persistence landscape is obtained by rotating the persistence
diagram 45 degrees clockwise and then drawing right-angle isosceles triangles,
treating the birth-death pair in the persistence diagram as a right-angle
vertex. Finally, individual functions are traced out from this collection of
right triangles, such that the first ($k$th) landscape function is the point-
wise ($k$th) maximum of all the triangles drawn.

One of the notable advantages of the persistence landscape representation, as
compared to persistence diagrams (refer to [8, 7]), is that it forms a subset
of the Banach space $L^{p}(\mathbb{N}\times\mathbb{R})$, which comprises
sequences $\lambda=(\lambda_{k})_{k\in\mathbb{N}}$. This set possesses an
inherent vector space structure and becomes a Banach space when equipped with
a norm that measures the degree of “spread out” or “concentration” exhibited
by the landscape functions. The norm of a persistence landscape characterizes
a point cloud by a single numerical value, and a higher norm value indicates
the presence of more significant topological features in the underlying point
cloud and is given by

$\displaystyle||\lambda||_{p}=\left(\displaystyle\sum_{k=1}^{\infty}||\lambda_{k}||^{p}_{p}\right)^{\frac{1}{p}},$
(5)

where $||\cdot||_{p}$ is the $L^{p}$-norm.

(a) Persistence diagram

(b) Persistence Landscape

Figure 3:  (a) The persistence diagram associated to Figure 2; the dots in it
represent the birth and death of a feature; for instance, three off-diagonal
red dots represent the birth and death of three significant holes in Figure 2;
(b) the corresponding persistence landscape.

Given that TDA operates on point clouds in multi-dimensional spaces, and our
focus in this paper is on time series of stock returns, which lack natural
point cloud representations, we must devise a method to obtain a point cloud
from a time series. To achieve this, we adopt the standard procedure, called
Taken’s embedding ([46]) that embeds a time series
$x=\\{x_{t},t=1,\ldots,T\\}$ to a multi-dimensional representation as follows:

(a) Time series

(b) Point cloud

Figure 4: Time series and point cloud in $\mathbb{R}^{2}$ constructed using
Takens’ embedding

${X}=\left[\begin{array}[]{c}X_{1}\\\ X_{2}\\\ \vdots\\\ X_{T-(d-1)\tau}\\\
\end{array}\right]=\left[\begin{array}[]{cccc}x_{1}&x_{1+\tau}\dots&x_{1+(d-1)\tau}\\\
x_{2}&x_{2+\tau}\dots&x_{2+(d-1)\tau}\\\ \vdots&\vdots&\vdots\\\
x_{T-(d-1)\tau}&x_{T-(d-2)\tau}\dots&x_{T}\\\ \end{array}\right],$ (6)

where $d$ is the dimension of reconstructed space (embedding dimension),
$\tau$ is the time delay, and $T-(d-1)\tau$ is the number of points in the new
space. The row of the matrix $X$ denotes a point in the new space. We present
the idea of Taken’s embedding in Figure 4, where the first plot shows the time
series. In contrast, the second plot presents the corresponding 2-dimensional
point cloud, obtained using Taken’s embedding with $d=2$ and $\tau=1$.

##  3 New distance measures

The notion of distance is inherently linked to the characteristics of the
underlying data. For instance, the distance between two financial time series
may differ from that between two DNA sequences. Nonetheless, distance measure
aims to capture some sense of similarity, and often, one can employ the
distance measure inherited from the reference space. However, if that is not
the case, one must use a more suitable metric. For example, to compare
persistence diagrams, Wasserstein distance (or bottleneck distance) is
traditionally used due to their stability concerning perturbations of the
input [22, 21, 25]. However, considering the time factor while dealing with
financial time series is crucial, which the traditional Wasserstein distance
fails to capture, as shown in the following toy example.

Toy example 1 Suppose we have two time series obtained from some experiment,
${x}=\\{x_{t},~{}t=1,\ldots,T\\}$ and ${y}=\\{y_{t},~{}t=1,\ldots,T\\}$ in
$\mathbb{R}^{T}$ such that ${y}$ is the reverse of ${x}$, that is, if
${x}=(x_{1},x_{2},\ldots,x_{T})$ then ${y}=(x_{T},x_{T-1},\ldots,x_{1})$. The
point clouds obtained using Takens’ embedding theorem for $x$ and $y$ (say for
$d=3$ and $\tau=2$) are

$\displaystyle{X=\left[\begin{array}[]{ccc}x_{1}&x_{3}&x_{5}\\\
x_{2}&x_{4}&x_{6}\\\ \vdots&\vdots&\vdots\\\ x_{T-4}&x_{T-2}&x_{T}\\\
\end{array}\right],Y=\left[\begin{array}[]{ccc}y_{1}&y_{3}&y_{5}\\\
y_{2}&y_{4}&y_{6}\\\ \vdots&\vdots&\vdots\\\ y_{T-4}&y_{T-2}&y_{T}\\\
\end{array}\right]=\left[\begin{array}[]{ccc}x_{T}&x_{T-2}&x_{T-4}\\\
x_{2}&x_{4}&x_{6}\\\ \vdots&\vdots&\vdots\\\ x_{5}&x_{3}&x_{1}\\\
\end{array}\right].}$

since $y$ is reverse of $x$. Since TDA is a coordinate-free approach (or
coordinate invariant), the point clouds for $x$ and $y$ will result in the
same persistence diagrams and hence zero Wasserstein distance, implying a
perfect similarity between the two, which is misleading.

While the example above is hypothetical, it advocates for a more appropriate
distance measure for time-series data. It emphasizes that Wasserstein distance
might be beneficial when dealing with observations from a fixed geometrical
object where one is trying to identify the structure of that object. Still, it
is unsuitable for financial applications where time is essential. Further, the
literature has observed that computing the Bottleneck or the Wasserstein
distances is computationally demanding as it requires finding point
correspondence as observed in [1]. Therefore, we propose new distance measures
between persistence diagrams and persistence landscapes that are efficient in
terms of time and also consider the time component inherent in time-series
data.

Consider two time-series, ${x}=\\{x_{t},~{}t=1,\ldots,T\\}$ and
${y}=\\{y_{t},~{}t=1,\ldots,T\\}$ in $\mathbb{R}^{T}$. For a given length
$\ell\in\\{1,\dots,T\\}$, we define the sequence of $m$ sub-series

$\displaystyle seq({x})$ $\displaystyle=$
$\displaystyle\\{(x_{1},x_{2},\ldots,x_{\ell})_{1},(x_{1+\eta},x_{2+\eta},\ldots,x_{{\ell}+\eta})_{2},\ldots,(x_{T-{\ell}+1},x_{T-{\ell}+2},\ldots,x_{T})_{m}\\},$

where $\eta\in\\{1,\ldots,{\ell}\\}$ represents the degree of overlapping (for
$\eta=\ell$ the sub-series are non overlapping and $\eta=1$ represents maximum
overlapping), and $T-{\ell}=\eta(m-1)$. We now define distance between ${x}$
and ${y}$ using their corresponding sub-series as follows,

######  Definition 3.1.

(Average $p$-Wasserstein distance ($AWD_{p}$)) For $1\leq p<\infty$, the
average $p$-Wasserstein distance between the persistence diagrams
${\mathcal{D}}_{X}$ of ${x}$ and ${\mathcal{D}}_{Y}$ of ${y}$ is defined as
follows

$AWD_{p}({\mathcal{D}}_{X},{\mathcal{D}}_{Y})=\sum_{i=1}^{m}w_{i}WD_{p}({\mathcal{D}}_{X_{i}},{\mathcal{D}}_{Y_{i}})$

where $WD_{p}({\mathcal{D}}_{X_{i}},{\mathcal{D}}_{Y_{i}})$ represent the
$p$-Wasserstein distance between the persistence diagrams
${\mathcal{D}}_{X_{i}}$ and ${\mathcal{D}}_{Y_{i}}$ corresponding to the point
clouds of $i$th components in $seq({x})$ and $seq({y})$. Here the weights
$w_{i}$ are such that $w_{i}>0$ and $\sum_{i}w_{i}=1$. For instance, one can
simply take $w_{i}=\frac{1}{m}$. For $p=\infty$, we also call the average
Wasserstein distance as the average bottleneck distance ($ABD$).

######  Remark 3.1.

Computing $AWD_{p}$ is theoretically intuitive and computationally cheaper
than calculating $WD_{p}$ between the two diagrams. Further, the choice of
weights $w_{i}$ enables tuning of the influence of the preceding components of
the time series when determining the distance.

######  Definition 3.2.

(Differenced $p$-Wasserstein distance ($DWD_{p}$)) The differenced
$p$-Wasserstein distance ($DWD_{p}$) between the persistence diagrams
${\mathcal{D}}_{X}$ and ${\mathcal{D}}_{Y}$ of the point clouds ${X}$ and
${Y}$ of the time series ${x}$ and ${y}$ is defined as

$DWD_{p}({\mathcal{D}}_{X},{\mathcal{D}}_{Y})=WD_{p}({\mathcal{D}}_{X-Y},{\mathcal{D}}_{0}),$

where ${\mathcal{D}}_{X-Y}$ represents the persistence diagram corresponding
to the point cloud obtained from the series ${x}-{y}$ and ${\mathcal{D}}_{0}$
is the diagram corresponding to a constant series (note that PDs are shift-
invariant), containing only the diagonal [33], so that
$WD_{p}({\mathcal{D}}_{X},{\mathcal{D}}_{0})=\left(2^{-p}\sum_{a\in{\mathcal{D}}_{X}}(pers(a))^{p}\right)^{\frac{1}{p}}$,
where $pers(a)$ denotes the persistence of $a=(b,d)\in{\mathcal{D}}_{x}$,
given by $pers(a)=d-b$, with $b$ and $d$ denoting the birth and death time.

Clearly, for the toy example, $AWD$ and $DWD$ are non-zero. A similar distance
measures could also be defined on the space of persistence landscapes. Let
$\lambda_{x}$ and $\lambda_{y}$ denote the persistence landscapes for the time
series $x$ and $y$, respectively. The average $p$-Landscape distance
($ALD_{p}$) and the differenced $p$-Landscape distance ($DLD_{p}$) between
time series $x$ and $y$ as follows

$\displaystyle\begin{aligned}
ALD_{p}(\lambda_{x},\lambda_{y})=\sum_{i=1}^{m}w_{i}\|\lambda^{i}_{x}-\lambda^{i}_{y}\|_{p},~{}~{}DLD_{p}(\lambda_{x},\lambda_{y})=\|{\lambda}_{x-y}\|_{p},\\\
\end{aligned}$ (7)

where $\lambda_{x-y}$ is the persistence landscape corresponding to the point
cloud of series $x-y$ and $\lambda_{x}^{i}$ and $\lambda_{y}^{i}$ are the
persistence landscapes corresponding to the point clouds of $i$th components
in $seq({x})$ and $seq({y})$, respectively.

###  3.1 Stability of Persistence diagrams under new distance measures

Having introduced new distance measures, it is essential to ensure that the
mapping from data to a persistence diagram remains continuous as a data
representation. Given that data is often noisy, it is crucial for the
persistence diagrams to exhibit stability under perturbations in the data,
that is, to demonstrate resilience to minor deformations in the data input.
This section focuses on establishing the stability of persistence diagrams
under the proposed distance measures.

######  Definition 3.3.

Let $X$ and $Y$ be two compact sets in ${\mathbb{R}}^{d}$ i.e.,
$X,Y\subset{\mathbb{R}}^{d}$. The Hausdorff distance $HD(X,Y)$ between $X$ and
$Y$ is defined as

$HD(X,Y)=\inf\left\\{\epsilon\geq 0\mid\text{$X\subseteq Y_{\epsilon}$ and
$Y\subseteq X_{\epsilon}$}\right\\},$ (8)

where $Y_{\epsilon}=\cup_{y\in
Y}\\{z\in{\mathbb{R}}^{d}\mid\|z-y\|\leq\epsilon\\}$ denotes the generalized
ball of radius $\epsilon$ around $Y$. Observe that

$X\subseteq Y_{\epsilon}$ $\Longleftrightarrow$ for any $x\in X$ there exists
some $y\in Y$ with $\|x-y\|\leq\epsilon$. (9)

The following theorem relates the Euclidean distance between two time series
and Hausdorff distance between their corresponding point clouds.

######  Theorem 3.1.

Let ${x}$ and ${y}$ be two time series in ${\mathbb{R}}^{T}$. Let
$X=\\{x_{I_{1}},\dots,x_{I_{m}}\\}$ and $Y=\\{y_{I_{1}},\dots,y_{I_{m}}\\}$ be
their Takens’ embeddings in ${\mathbb{R}}^{d}$. Then

$HD(X,Y)\leq\|{x}-{y}\|_{2}.$ (10)

###### Proof.

For any $j=1,\dots,m$, we have $\|x_{I_{j}}-y_{I_{j}}\|^{2}_{2}=\sum_{t\in
I_{j}}(x_{t}-y_{t})^{2}\leq\sum_{t=1}^{T}(x_{t}-y_{t})^{2}=\|{x}-{y}\|^{2}_{2}.$
In view of (9), we infer that $X\subseteq Y_{\|{x}-{y}\|}$ and $Y\subseteq
X_{\|{x}-{y}\|}$. Combining this with (8), we arrive at Equation (10). ∎

We state the propositions required for our main theorem.

######  Proposition 3.2.

([12],[30],[10]) Let $(E,d_{E})$ be a metric space and $X$ and $Y$ be finite
subsets of $E$. Then the persistence diagrams ${\mathcal{D}}_{X}$ and
${\mathcal{D}}_{Y}$ satisfy

$BD({\mathcal{D}}_{X},{\mathcal{D}}_{Y})\leq HD(X,Y).$

######  Proposition 3.3.

[13],[30] Let $1\leq\hat{p}\leq p<\infty$, and ${\mathcal{D}}_{X}$ and
${\mathcal{D}}_{Y}$ be persistence diagrams whose degree $p$ total
persistences777Given a persistence diagram
${\mathcal{D}}_{X}=\\{a_{j}=(b_{j},d_{j})\\}$, the degree $p$ total
persistence of ${\mathcal{D}}_{X}$ is defined as sum of persistence of all the
points of degree $p$ in ${\mathcal{D}}_{X}$ i.e.,
$Pers_{p}({\mathcal{D}}_{X})=\sum_{j}(d_{j}-b_{j})$.  are bounded from above.
Then,

$WD_{p}({\mathcal{D}}_{X},{\mathcal{D}}_{Y})\leq\left(\frac{Pers_{\hat{p}}({\mathcal{D}}_{X})+Pers_{\hat{p}}({\mathcal{D}}_{Y})}{2}\right)^{\frac{1}{p}}BD({\mathcal{D}}_{X},{\mathcal{D}}_{Y})^{1-\frac{\hat{p}}{p}},$

where
$Pers_{\hat{p}}({\mathcal{D}}_{X}):=\sum_{a\in{\mathcal{D}}_{X}}pers(x)^{\hat{p}}$
for $1\leq\hat{p}<\infty$.

######  Proposition 3.4.

[30] Let $E$ be a triangulable compact subspace in ${\mathbb{R}}^{d}$, ${X}$
be a finite subset of $E$, and $p>d$. Then,

$Pers_{p}({\mathcal{D}}_{X})\leq\frac{p}{p-d}C_{E}diam(E)^{p-d},$

where $C_{E}$ is a constant depending only on $E$.

######  Theorem 3.5.

Let ${x}$ and ${y}$ be two time series in ${\mathbb{R}}^{T}$. Let
$X=\\{x_{I_{1}},\dots,x_{I_{m}}\\}$ and $Y=\\{y_{I_{1}},\dots,y_{I_{m}}\\}$ be
their Takens’ embeddings in ${\mathbb{R}}^{d}$. Then

$ABD({\mathcal{D}}_{X},{\mathcal{D}}_{Y})\leq\|{x}-{y}\|_{2},$ (11)
$AWD_{p}({\mathcal{D}}_{X},{\mathcal{D}}_{Y})\leq\left(\frac{\hat{p}}{\hat{p}-d}C_{E}diam(E)^{\hat{p}-d}\right)^{\frac{1}{p}}\|{x}-{y}\|_{2}^{1-\frac{\hat{p}}{p}}.$
(12)

###### Proof.

By definition, for any choice of $\eta$ and $l$,
$X_{i},~{}Y_{i};~{}i\in\\{1,2,\ldots,m\\}$, which represents the point cloud
of $i$th component in $seq({x})$ and $seq({y})$, say ${x}_{i}$ and ${y}_{i}$,
respectively, are again subsets of $E$. Therefore, using Proposition 3.2, we
have

$\displaystyle BD({\mathcal{D}}_{X_{i}},{\mathcal{D}}_{Y_{i}})$
$\displaystyle\leq$ $\displaystyle HD(X_{i},Y_{i})~{}~{}\forall~{}~{}i$
$\displaystyle\implies\sum_{i=1}^{m}w_{i}BD({\mathcal{D}}_{X_{i}},{\mathcal{D}}_{Y_{i}})$
$\displaystyle\leq$
$\displaystyle\sum_{i=1}^{m}w_{i}HD(X_{i},Y_{i}),~{}~{}(\because~{}w_{i}>0,~{}\sum_{i=1}^{m}w_{i}=1)$
$\displaystyle\leq$
$\displaystyle\sum_{i=1}^{m}w_{i}\|{x}_{i}-{y}_{i}\|_{2},~{}~{}(\mbox{using
Theorem \ref{thm3}})$ $\displaystyle\leq$
$\displaystyle\sum_{i=1}^{m}w_{i}\|{x}-{y}\|_{2},~{}~{}(\mbox{by definition of
Euclidean distance})$ $\displaystyle\leq$
$\displaystyle\|{x}-{y}\|_{2}\sum_{i=1}^{m}w_{i}\leq\|{x}-{y}\|_{2}~{}~{}(\because\sum_{i=1}^{m}w_{i}=1.)$

Therefore, we have (11). Again, by definition, we have

$AWD_{p}({\mathcal{D}}_{X},{\mathcal{D}}_{Y})=\sum_{i=1}^{m}w_{i}WD_{p}({\mathcal{D}}_{X_{i}},{\mathcal{D}}_{Y_{i}})$

Using Proposition 3.3 and 3.4, we have

$\displaystyle\sum_{i=1}^{m}w_{i}WD_{p}({\mathcal{D}}_{X_{i}},{\mathcal{D}}_{Y_{i}})$
$\displaystyle\leq$
$\displaystyle\sum_{i=1}^{m}w_{i}\left(\frac{Pers_{\hat{p}}({\mathcal{D}}_{X_{i}})+Pers_{\hat{p}}({\mathcal{D}}_{Y_{i}})}{2}\right)^{\frac{1}{p}}BD({\mathcal{D}}_{X_{i}},{\mathcal{D}}_{Y_{i}})^{1-\frac{\hat{p}}{p}}$
$\displaystyle\leq$
$\displaystyle\left(\frac{\hat{p}}{\hat{p}-d}C_{E}diam(E)^{\hat{p}-d}\right)^{\frac{1}{p}}\sum_{i=1}^{m}w_{i}BD({\mathcal{D}}_{X_{i}},{\mathcal{D}}_{Y_{i}})^{1-\frac{\hat{p}}{p}}$
$\displaystyle\leq$
$\displaystyle\left(\frac{\hat{p}}{\hat{p}-d}C_{E}diam(E)^{\hat{p}-d}\right)^{\frac{1}{p}}\sum_{i=1}^{m}w_{i}HD({X_{i}},{Y_{i}})^{1-\frac{\hat{p}}{p}}$
$\displaystyle\leq$
$\displaystyle\left(\frac{\hat{p}}{\hat{p}-d}C_{E}diam(E)^{\hat{p}-d}\right)^{\frac{1}{p}}\|{x}-{y}\|_{2}^{1-\frac{\hat{p}}{p}}.$

Therefore, we have result (12). ∎

######  Remark 3.2.

The $DWD_{p}$ is a special case of $WD_{p}$ with one component as zero $PD$.
Therefore, the stability of persistence diagrams with respect to $DWD_{p}$ is
trivial. Further, the stability of the proposed distances on persistence
landscapes follows directly from the landscape stability theorems, Theorem 12
- Theorem 16 in [8]. Further, the distance metrics $AWD_{p},DWD_{p},ALD_{p}$
and $DLD_{p}$ are pseudo-metrics. The properties of non-negativity and
symmetry are easily verified. Also, the triangular inequality property is
satisfied since they are defined using the Wasserstein and $p$-landscape
distance, which are again pseudo-metrics.

##  4 Our Methodology for Sparse Portfolios

Consider a stock-market index $I$ consisting of assets
$i\in{\mathcal{I}}=\\{1,2,\ldots,n\\}$, in discrete time $t=0,1,2,\ldots,$,
where $t$ represents the end of a trading day. At any time $t$, we denote the
price of the index $I$ and any asset $i\in{\mathcal{I}}$ by $P_{0,t}$ and
$P_{i,t}$ respectively. Further, we denote by $R_{i,t}$ and $r_{i,t}$, the
simple-return and log-return of the asset $i$ over the period $[t-1,t]$ with
$t=1,2,\ldots,$ and are obtained as follows,

$R_{i,t}=\frac{P_{i,t}-P_{i,t-1}}{P_{i,t-1}},~{}~{}r_{i,t}=\ln\,\frac{P_{i,t}}{P_{i,t-1}},\;\;i\in{\mathcal{I}}\cup\\{0\\};$

Now, consider an investor at time $T$, who desires to create a portfolio
consisting of assets in ${\mathcal{I}}$, based on the historical observations,
i.e., the time-series of prices (and hence of returns),
$(P_{0,t},P_{1,t},\ldots,P_{n,t}),~{}t=0,1,2,\ldots,T$. We define a portfolio
as an $n\times 1$ vector, denoted by $\bm{w}=(w_{1},w_{2},\ldots,w_{n})$,
where $w_{i},i\in{\mathcal{I}}$ denotes the proportion of investment in the
$i$th asset. We assume that the investor follows a so-called buy-and-hold
strategy, i.e., she plans to hold this portfolio until the end of a specific
investment horizon. Further, the set of all admissible portfolios is denoted
by ${\mathcal{W}}$,

${\mathcal{W}}=\left\\{{\bm{w}}=(w_{1},w_{2},\ldots,w_{n}):\sum_{i\in{\mathcal{I}}}w_{i}=1,w_{i}\geq
0~{}~{}\forall i\in{\mathcal{I}}\right\\}.$

There are multiple ways to select the portfolio $\bm{w}$ depending on the
goals and risk appetite of the investor. We discuss three of them, namely,
mean-variance ($MV$) optimal portfolio, global minimum variance ($GMV$)
portfolio, and index tracking ($IT$) portfolio with budget and short selling
constraints.

Mean-Variance Portfolio In the standard Markowitz, i.e., the mean-variance
portfolio optimization problem, the goal is to select a portfolio that
delivers the highest expected returns for a given variance. Mathematically,
the $MV$ portfolio corresponds to the solution of the following optimization
problem,

$\displaystyle(MV)\qquad$
$\displaystyle\max_{\bm{w}\in{\mathcal{W}}}\begin{aligned}
\bm{w}^{\prime}\bm{\mu}-\frac{\gamma}{2}\bm{w}^{\prime}\bm{\Sigma}\bm{w}\end{aligned}$
(13)

where $\bm{\mu}=(\mu_{1},\ldots,\mu_{n})$ is the sample mean vector and
$\bm{\Sigma}$ is the sample variance-covariance matrix of the asset returns
calculated over the observation period, $t=0,1,2\ldots,T$. Further,
$\bm{w}^{\prime}\bm{\mu}$ and $\bm{w}^{\prime}\bm{\Sigma}\bm{w}$ denote the
return and the variance of the portfolio. The parameter $\gamma$ is the risk
aversion parameter that controls the trade-off between the portfolio’s risk
and return. We follow [15] and set $\gamma=1$ for the empirical analysis.

It is well documented in the literature that estimating mean vector $\bm{\mu}$
is more difficult than the variance-covariance matrix $\bm{\Sigma}$ of asset
returns. Further, the impact of errors in $\bm{\mu}$ estimates is
significantly larger than that of $\bm{\Sigma}$ on the portfolio $\bm{w}$.
Therefore, we also consider a global minimum variance portfolio, which relies
solely on estimates of $\Sigma$ and thus is less vulnerable to estimation
error than $MV$ portfolio. The $GMV$ portfolio is the solution to the
following optimization problem,

$\displaystyle(GV)\qquad$
$\displaystyle\min_{\bm{w}\in{\mathcal{W}}}\begin{aligned}
\bm{w}^{\prime}\bm{\Sigma}\bm{w}\end{aligned}$ (14)

Index Tracking In an index tracking portfolio, the goal is to select the
portfolio $\bm{w}$ that aims to mimic the performance of the index $I$ by
minimizing the deviation of the portfolio return from the index return, the
measure commonly known as tracking error $TE(\bm{w})$. The problem can be
formulated as

$\displaystyle\min_{\bm{w}\in{\mathcal{W}}}\begin{aligned}
TE({\bm{w}})\end{aligned}$ (15)

The most common choice for the tracking error $TE(\bm{w})$ in the literature
is the mean of the squared deviations of the portfolio return and the index
return, traditionally called the tracking error variance ($TEV$). We also
adopt $TEV$ as the tracking error measure 888One of the key benefits of
employing this metric for tracking error is that the objective function is
quadratic in the asset weights, allowing for using standard and very efficient
quadratic programming algorithms to minimize it. A further advantage of this
tracking error is that it avoids the issues associated with metrics based
solely on the variance of the deviation since these measures ignore the
possibility of a constant difference between the two returns ([4]). Instead of
the squared deviations, the absolute error is also a popular choice in the
literature (e.g., [38, 40]). This is advantageous because the optimization
problem reduces to a linear program that can be efficiently solved. In
practice, squared deviation is preferred over absolute errors as a statistical
criterion, especially when large errors are undesirable. which is defined as

$\frac{1}{T}\sum_{t=1}^{T}(\sum_{i=1}^{n}w_{i}R_{i,t}-R_{0,t})^{2},$

where $R_{t}(\bm{w})=\sum_{i=1}^{n}w_{i}R_{i,t}$ denotes the portfolio return
at time $t$.

###  4.1 TDA-based Sparse Portfolios

As discussed in the Introduction, various approaches for asset selection have
been documented in the literature, especially for index-tracking and the
Markowitz model to obtain sparse portfolios. In this paper, we adopt a
strategy based on clustering that involves utilizing the distance measures
introduced on persistence diagrams and landscapes. Building upon the new
topology-based similarity measures, we seek to organize assets or clusters so
that assets in the same cluster are similar and assets across the clusters are
dissimilar in a topological sense. Once the clustering procedure is completed,
we select the assets based on the following two strategies:

Strategy 1: This strategy corresponds to selecting assets that share the
cluster with the index, intending to replicate the index’s performance. This
choice is intuitive because the assets in the same cluster have a similar
topological structure as quantified by the similarity matrix, thus narrowing
down the number of assets potentially more suitable to mimic index
performance. We then solve the tracking error optimization problem (15) on the
selected assets to find the optimal weights.

Strategy 2: This strategy involves selecting assets for mean-variance and
global minimum-variance portfolios. The underlying idea is to choose the
representative assets from each of the clusters, driven by the intuition that
this strategy promotes sparsity due to a smaller number of selected assets and
diversity due to inter-cluster dissimilarity, as quantified by the similarity
matrix. Once the assets are selected, we solve (13) and (14) to find the
optimal weights. In this strategy, one needs to select the cluster
representative. One possible way is to choose the representative based on
criteria, such as the asset with the highest Sharpe ratio or the minimum
standard deviation. However, this leads to a selection bias. Therefore,
instead of imposing some random selection criteria, we propose selecting the
cluster’s exemplar (representative center).

In this paper, we employ affinity propagation clustering (APC) [39] to obtain
clusters. Our choice of adopting APC mainly stems from the requirement that
the representative center of the clusters must be a part of the data set
(refer to Strategy 2). Further, we should get the same result, i.e., the same
clusters and centers, if we run our strategy on the same data set but on
different platforms/software. Clustering techniques, such as $K$-Means and
spectral clustering, assign random data points as initial cluster centers and
shift these centers in each iteration. The drawback of these methods is that
they yield different clustering sets upon each execution due to random
initialization, and the centroids often lack a meaningful connection to actual
variables in the dataset [29]. Affinity propagation addresses this issue by
directly returning exemplars or centroids that correspond to actual data
points.

Moreover, APC demonstrates superior accuracy compared to other clustering
algorithms ([39]) such as K-means [31], and spectral clustering [44, 34].
Notably, APC doesn’t require the pre-specification of the number of clusters,
unlike k-means and spectral clustering. Consequently, the similarity matrix is
the only input needed for affinity propagation clustering. Finally, as we deal
with time series of stock returns, which typically behaves like white noise,
clustering algorithms such as K-means would not be suitable as demonstrated in
[49].

Given the new topology-based distance measures, we define the following
similarity matrices for the set of time series $x,y\in\mathbb{R}^{T}$ to be
used as an input in affinity propagation clustering,

$\displaystyle K_{1}(x,y)$
$\displaystyle=e^{-\frac{AWD_{p}({\mathcal{D}}_{x},{\mathcal{D}}_{y})^{2}}{\sigma^{2}}},\quad$
$\displaystyle K_{2}(x,y)$
$\displaystyle=e^{-\frac{Wass_{p}({\mathcal{D}}_{x-y},{\mathcal{D}}_{0})^{2}}{\sigma^{2}}},$
$\displaystyle K_{3}(x,y)$
$\displaystyle=e^{-\frac{ALD_{p}(\lambda_{x},\lambda_{y})^{2}}{\sigma^{2}}},\quad$
$\displaystyle K_{4}(x,y)$
$\displaystyle=e^{-\frac{DLD_{p}(\lambda_{x},\lambda_{y})^{2}}{\sigma^{2}}},$
(16)

where $\sigma$ is a free parameter.999These are kernels in strict sense [37]
and induce similarity matrices which are semi-positive definite and hence can
be used as input for the clustering algorithms. It is worth highlighting that
apart from the advantage of the new TDA-based distance measure over
$p$-Wasserstein distance that it allows to compare time-series data as
discussed in Section 3, it offers a substantial computational speedup as it
reduces the computational complexity to compute the persistence landscape for
a large time series by dividing it into computations over several sub-series.
Further, this division into several sub-series accounts for heteroscedasticity
and non-stationarity in the financial data.

For comparison purposes, we also utilize the following kernels based on
traditional correlation measures, namely Spearman’s rank correlation and
Pearson’s correlation,

$\displaystyle\begin{aligned}
K_{5}(x,y)=e^{-\frac{d_{1}(x,y)^{2}}{\sigma^{2}}},~{}K_{6}(x,y)=e^{-\frac{d_{2}(x,y)^{2}}{\sigma^{2}}},\\\
\end{aligned}$ (17)

where $d_{i}(x,y)=\sqrt{2(1-\rho_{i}(x,y))}~{}~{}i\in\\{1,2\\}$, with
$\rho_{1}$ and $\rho_{2}$ denoting the Spearman’s rank correlation and
Pearson’s correlation, respectively.101010The distance measure $d_{1}$ defined
using Pearson’s correlation is the most commonly used distance measure in the
literature [35]. However, because these $x,y$ are logarithmic returns in our
scenario, Spearman’s or Kendall’s rank correlation coefficient is a much
better choice due to its robustness [49]. As a result, we select both of these
correlation measures for comparison. We use the same notation
$K_{i}~{}i=1,\ldots,6$ to represent the kernels and the corresponding
similarity matrix.

The kernels, $K_{1}$ to $K_{6}$, depend on hyper-parameter $\sigma$, which
needs to be estimated from training data. This paper adopts a data-driven
approach for estimating $\sigma$, specifically employing the local scaling
algorithm [48, 43]. More precisely, we use a local scaling parameter
$\sigma_{ij}$ for each pair of input data $(x_{i},x_{j})$ defined as

$\sigma_{ij}=d(x_{i},x_{m}(x_{i}))d(x_{j},x_{m}(x_{j})),$

where $x_{m}(x_{\cdot})$ denotes the $m$th nearest neighbor of the input
$x_{\cdot}$ in terms of distance measured by $d$ used in the corresponding
kernel.111111The selection of $m$ is independent of scale. We take $m=7$ in
our analysis since it provides good clustering results [48]. The adoption of
diverse scaling parameters for each pair $(x_{i},x_{j})$ rather than a single
scaling parameter $\sigma$ allows us to exploit the local statistics of the
neighborhoods around the corresponding input pair, thereby facilitating a
data-driven self-tuning of $\sigma$.

###  4.2 Performance Measures

Our goal is to evaluate the out-of-sample performance of the portfolio
strategies mentioned above: Strategy 1 for index tracking and Strategy 2 for
mean-variance and minimum variance optimal portfolios. We study the
performance of these portfolios across various standard datasets in the
literature on portfolio construction (more details on the datasets follow in
the next section).

Given a daily time series of out-of-sample returns of optimal index tracking
portfolio from strategy 1, we compute the five metrics. First, we calculate
out-of-sample tracking error (TE):
$\text{TE}={\frac{\sum_{t=1}^{T}(R_{t}(\bm{w})-R_{0,t})^{2}}{T}}.$

It measures how closely the optimally tracking portfolio replicates the
benchmark index. Further, we also apply one-tailed $t$-test, with null
hypothesis $H_{0}:\,\text{TE}_{s_{1}}-\text{TE}_{s_{2}}\leq 0$ against the
alternative hypothesis $H_{a}:\text{TE}_{s_{1}}-\text{TE}_{s_{2}}>0$, to test
whether the TE from strategy $s_{1}$ is statistically indistinguishable to
that from strategy $s_{2}$.121212 The $t$-test is used to test if the mean
$\mu$ of the population is ($\geq$ or $\leq$) to some constant $\mu_{0}$ when
the variance of the population is unknown. To test the following hypothesis
$H_{0}:\mu\leq\mu_{0}~{}~{}~{}\mbox{against}~{}~{}~{}H_{a}:\mu>\mu_{0},$ the
test statistics is given by $t=\frac{\bar{x}-\mu_{0}}{\frac{S}{\sqrt{N}}},$
where $S$ and $\bar{x}$ denote the sample variance and mean, respectively, and
$N$ is the sample size. The critical region for the test is
$t>t_{\alpha,N-1},$ where $\alpha$ is the significance level, and
$t_{\alpha,N-1}$ denotes the critical value of the $t$-distribution with $N-1$
degrees of freedom. The $p$-value can be obtained as $P(t_{N-1}>t)$ and we
reject the null hypothesis if $p-$value is less than $\alpha$. Second, we
calculate excess mean return (EMR), defined as the mean of the difference
between the out-of-sample returns from the optimal tracking portfolio and the
returns of the benchmark index, that is,
$\text{EMR}=\frac{\sum_{t=1}^{T}(R_{t}(\bm{w})-R_{0,t})}{T}.$ A positive
(negative) EMR indicates that the tracking portfolio outperforms
(underperforms) the benchmark index.

Third, to measure the extent to which the optimal tracking portfolio returns
levels differ from that of the benchmark, we calculate Pearson’s correlation
coefficient (COR) between the returns from the tracking portfolio and the
benchmark index. A strategy for index tracking is appealing if its correlation
is close to one. Fourth, we calculate the information ratio (IR), defined as
the ratio of excess mean returns and tracking error, to measure the trade-off
between excess mean return and tracking error:
$\text{IR}=\frac{\text{EMR}}{\text{TE}}.$ Higher values of the information
ratio are desirable.

Finally, to measure the tracking portfolio’s stability and understand the
average wealth traded while holding (and re-balancing) the portfolio, we
compute the portfolio turnover (TR). Formally, it is defined as the average
absolute value of trades among $n$ stocks:
$\text{TR}=\frac{1}{N}\sum_{r=1}^{N}\sum_{i=1}^{n}|w^{r}_{i}-w^{r-1}_{i}|,$
where $N$ is the total number of re-balancing windows, and $w^{r}_{i}$ and
$w^{r-1}_{i}$ are respectively the weights of $i$th asset in $r$th and
$(r-1)$th window. One can interpret $TR$ as a measure of the transaction costs
for implementing the corresponding portfolio strategy. For instance, a lower
TR means a lower transaction cost.

Similarly, given the time series of daily out-of-sample returns obtained from
mean-variance and minimum variance optimal portfolios, we follow [15] and
compute four quantities to assess the performance of the portfolios. First, we
measure the out-of-sample mean, which is given by
$\mu={\sum_{t=1}^{T}\frac{R_{t}(\bm{w})}{T}}.$ To test whether the mean from
the portfolio is statistically distinguishable, we also compute the p-value of
the difference using the $t$-test. We apply a one-tailed $t$-test on null
hypothesis $H_{0}:\,\mu_{s_{1}}-\mu_{s_{1}}=0$ against the alternative
hypothesis $H_{a}:\mu_{s_{1}}-\mu_{s_{1}}>0$ to test if the out-of-sample mean
return from $s_{1}$ is statistically significant from, $s_{2}$.

Second, we calculate the out-of-sample Sharpe ratio (SR), which is defined as
the ratio of the sample mean to the sample standard deviation, i.e.,
$\text{SR}=\frac{\mu}{\sigma}$. Furthermore, we test whether the out-of-sample
Sharpe ratios of two strategies, $s_{1}$ and $s_{2}$, are statistically
different. We apply the one-sided $z_{\text{SR}}$ test with the hypothesis
$H_{0}:\,\text{SR}_{s_{1}}-\text{SR}_{s_{2}}=0$ and
$H_{a}:\text{SR}_{s_{1}}-\text{SR}_{s_{2}}>0$.131313Given two strategies
$s_{1}$ and $s_{2}$, with $\mu_{s_{1}}$, $\mu_{s_{2}}$, $\sigma_{s_{1}}$,
$\sigma_{s_{2}}$, $\sigma_{s_{1},s_{2}}$ as their sample means, standard
deviations, and the covariance of two strategies over a sample period $n$. The
$z$-test statistic is
$z_{\text{SR}}=\frac{\sigma_{s_{2}}\mu_{s_{1}}-\sigma_{s_{1}}\mu_{s_{2}}}{\sqrt{\Upsilon}},~{}~{}\mbox{with}$
$\displaystyle\Upsilon=\frac{1}{n}\big{(}2\sigma_{s_{1}}^{2}\sigma_{s_{2}}^{2}-2\sigma_{s_{1}}\sigma_{s_{2}}\sigma_{s_{1},s_{2}}+0.5\mu_{s_{1}}\sigma_{s_{2}}^{2}+0.5\mu_{s_{2}}\sigma_{s_{1}}^{2}-\frac{\mu_{s_{1}}\mu_{s_{2}}}{\sigma_{s_{1}}\sigma_{s_{2}}}\sigma_{s_{1},s_{2}}^{2}\big{)}.$
Along with the above performance measures, we calculate the certainty-
equivalent (CEQ) return, defined as the risk-free rate an investor is willing
to accept rather than adopting a particular risky portfolio strategy.
Formally, we compute the CEQ return as
$\text{CEQ}=\mu-\frac{\gamma}{2}\sigma^{2},$ where $\sigma^{2}$ is the
variance of the out-of-sample returns of the portfolio. We take $\gamma=1$ as
in [15] in the analysis. We further test for the statistical significance of
the difference of CEQ returns from two strategies [15]. Fourth, we calculate
the portfolio turnover ratio (TR) as a proxy for the transaction cost.

##  5 Empirical Results

This section presents our empirical analysis. Section 5.1 describes the data
used in our study and introduces the rolling window scheme employed in the
analysis. Sections 5.2 and 5.3 contain the performance results of our sparse
index tracking and sparse mean-variance portfolios, respectively.
Additionally, within these sections, we further validate the robustness of our
findings through a performance analysis on the recent COVID-19 data.

###  5.1 Data

We consider the daily closing prices of constituents of the S&P 500 index,
obtained from the Thomson Reuters datastream spanning a decade from 1st Dec
2009 to 31st Dec 2019 (2631 observations). We chose the data period according
to the availability of a maximum number of constituents, resulting in 451
stocks in our dataset. We utilize daily log returns to obtain an input cloud
for filtration and, consequently, to compute the distance measures for
clustering. At the same time, we employ simple returns to solve the portfolio
optimization problem.

For out-of-sample performance analysis, we follow a rolling window
scheme.141414We look at the problem of constructing a sparse optimal portfolio
for a period $1,\ldots,T$, which corresponds to the recent past (the in-sample
period) and where the path of asset returns is known. The ultimate aim is to
create portfolios close to optimum performance in the $T+1,\ldots,T+L$ period
(the out-of-sample period).  To elaborate, we begin our first window with a
training period of 126 trading days (six months) as the in-sample period to
create the optimal portfolio and track its performance over a testing period
of 21 trading days (one month) without any re-balancing during this
period.151515We follow the standard of 21 trading days in a month (see, for
instance, [19]). In the next window, we shift forward our training and testing
period by one month to include more recent data and exclude the oldest data
points such that a fixed size of the rolling window (seven months) is
maintained. We then obtain an optimal portfolio on the new training period and
track its performance over the new testing period. We repeat this procedure
until the entire data sample is exhausted, consisting of 119 windows (test
months) and thus resulting in a time series of portfolio returns, i.e., a one-
month time series corresponding to each window. Finally, we analyze the
performance of the optimal portfolios over the testing period, thereby
offering a comprehensive assessment of the effectiveness of the filtering
strategy. The rolling window procedure is also illustrated in Figure 5.

Figure 5:  Example of a rolling window scheme: In this illustration, the
orange and blue hues indicate the in-sample and out-of-sample periods,
respectively. For a fixed in-sample period of length $d_{1}$ and out-of-sample
period of length $d_{2}$, the first in-sample period (rolling window 1) stands
for $1,\ldots,d_{1}$ with corresponding out-of-sample period
$d_{1}+1,\ldots,d_{1}+d_{2}$; the next in-sample period (rolling window 2)
gets shifted by $d_{2}$ to obtain an in-sample window
$1+d_{2}.\ldots,d_{1}+d_{2}$, with the accompanying out-of-sample period
$d_{1}+d_{2}+1,\ldots,d_{1}+d_{2}+d_{2}$, and so on. For our analysis,
$d_{1}=126$ and $d_{2}=21$.

To summarize, within a fixed rolling window, we obtain the time series of log
returns for each constituent of the S&P 500 index during the in-sample period.
We then follow the following steps:

  1. (i)

Convert each time series into a point cloud to calculate kernels $K_{2}$ and
$K_{4}$. Divide the time series into sub-series and convert each into a point
cloud to calculate kernels $K_{1}$ and $K_{3}$.

  2. (ii)

Use these point clouds to generate corresponding persistence diagrams and
persistence landscapes.

  3. (iii)

Calculate pair-wise distances between all possible pairs of stock return time-
series, as defined in Section 3.

  4. (iv)

Finally, obtain similarity matrices using the kernels $K_{i},~{}i=1,2,3,4$.
The calculations for kernels $K_{5}$ and $K_{6}$ are straightforward.

  5. (v)

With each of the obtained similarity matrices, apply affinity propagation
clustering, resulting in clusters.

  6. (vi)

Select assets from the obtained clusters using the proposed strategies,
Strategy 1 and Strategy 2. Solve the respective optimization problems using
simple returns of the constituents to get optimal portfolios.

  7. (vii)

Finally, track the performance of these portfolios over the out-of-sample
period.

###  5.2 Strategy 1: Sparse Index Tracking

In this subsection, we assess the performance of our TDA-based data-driven
sparse index tracking portfolios. We denote the optimal tracking portfolio
corresponding to a similarity matrix $K_{i}$ by $C_{i}$, $i=1,2,\ldots,6$. We
also create the following portfolios from the literature as benchmarks for
comparative analysis.

  * 1.

IT with cardinality constraint: This portfolio corresponds to the optimization
problem (15) with an additional constraint imposed on the maximum number of
assets that can be selected within a tracking portfolio. Specifically, we
impose the following restriction that the number of holdings with non-zero
weights $\leq K_{max}$ where we set $K_{max}$ equal to the number of assets
selected in the portfolio $C_{i},~{}i=1,2,\ldots,6$, to ensure a comparable
number of asset for a fair comparison to the clustering based portfolios.
Consequently, this yields six portfolios, denoted by
$I_{i},~{}i=1,2,\ldots,6$. Given that the problem (15) with an additional
constraint on the number of assets is a mixed-integer quadratic programming
(MIQP) problem, it poses a challenging computational task. To tackle this
computational bottleneck, we employ the Gurobi optimizer, which is recognized
for its prowess in solving mixed-integer programming (MIP). For practical
considerations, we follow [45] and impose time limits of thirty minutes and
one hour for solving each MIQP within every window. To distinguish, we denote
the portfolios solved within a 30-minute time limit by $I_{i}^{(1)}$, while
those solved with a one-hour time limit by $I_{i}^{(2)}$.

  * 2.

IT with similarity based selection: Considering that the clustering-based
portfolios $C_{i}$ are constructed by selecting assets from the clusters
identified using similarity matrices, an alternative and more straightforward
approach could be to eliminate the need for clustering altogether and choose
the assets with the maximum similarity to the index. To settle this debate, we
introduce an additional set of six portfolios, denoted by
$MS_{i},i=1,2,\ldots,6$. Each $MS_{i}$ corresponds to the portfolio obtained
by solving (15) on top $M$ assets selected based on maximum similarity with
the index, as measured by the similarity matrix $K_{i}$. We consider the
maximum similarity criteria with $M=20$ as a benchmark.

  * 3.

IT with in-sample tracking error: In light of the objective function in (15),
i.e., the tracking error between the portfolio and the benchmark index, one
might also consider the following simple approaches: (i) select $M$ assets
that have the highest similarity to the index, as gauged by the in-sample
tracking error between the stock return and the index return, (ii) follow the
strategy one based on the similarity matrix, denoted by $K_{7}$, where
similarity is measured by the negative of in-sample tracking
error161616$K_{7}$ is a negative squared distance function and is not a kernel
(see Proposition 9.4 in [37]) while the kernels $K_{1},\ldots,K_{6}$ are
actual kernel (positive definite) functions. Albeit for the affinity
propagation clustering, positive definiteness is not required [16].:

$K_{7}(X,Y)=-||X-Y||_{2}^{2}.$

We denote this portfolio by $C_{7}$.

Before analyzing the performance of the portfolios described above, we first
examine the number of assets in the cluster containing the index resulting
from APC based on the seven similarity matrices, $K_{i},~{}i=1,2,\ldots,7$,
following our strategy 1. The mean and median number of assets in all windows
are reported in Table 1. There are several observations. The number of
clusters formed with TDA-based similarity matrices $K_{1}$ to $K_{4}$, as well
as the correlation-based similarity matrices $K_{5}$ and $K_{6}$, is
consistent over the sample period. A small number, on average, of assets in
these clusters results in sparse portfolios as desired. For instance, the
similarity matrix $K_{2}$ selects 40 assets (approximately 8%) on average,
while the correlation-based matrix $K_{5}$ (or $K_{6}$) selects a further
smaller number of assets. In contrast, the similarity matrix $K_{7}$, on
average, selects almost 57% of assets, which is not desirable, and
consequently, we drop the portfolio $C_{7}$ from our analysis.171717In
Appendix 6.2, we present the study of the properties of the selected assets
with respect to the benchmark index.

Table 1: Mean and Median number of assets sharing cluster with the index Similarity matrix | $K_{1}$ | $K_{2}$ | $K_{3}$ | $K_{4}$ | $K_{5}$ | $K_{6}$ | $K_{7}$
---|---|---|---|---|---|---|---
Mean | 7 | 40 | 6 | 12 | 18 | 18 | 255
Median | 6 | 38 | 5 | 12 | 18 | 17 | 256
Table 2: The out-of-sample performance of clustering based portfolios $C_{1}-C_{6}$, maximum similarity based portfolios $MS_{1}-MS_{6}$ and portfolios from TEV model with cardinality constraint $I_{1t_{1}}-I_{6t_{1}}$ and $I_{1t_{2}}-I_{6t_{2}}$. | $C_{1}$ | $C_{2}$ | $C_{3}$ | $C_{4}$ | $C_{5}$ | $C_{6}$
---|---|---|---|---|---|---
TE | 2.62E-05 | 5.14E-06 | 2.79E-05 | 5.00E-06 | 1.21E-05 | 1.08E-05
EMR | 1.44E-04 | 1.30E-04 | -1.05E-05 | 3.40E-05 | 9.93E-05 | 9.03E-05
COR | 8.36E-01 | 9.68E-01 | 8.32E-01 | 9.70E-01 | 9.39E-01 | 9.44E-01
INFO | 2.81E-02 | 5.71E-02 | -1.98E-03 | 1.52E-02 | 2.86E-02 | 2.75E-02
TR | 1.47 | 1.10 | 1.70 | 1.58 | 1.18 | 1.08
| $MS_{1}$ | $MS_{2}$ | $MS_{3}$ | $MS_{4}$ | $MS_{5}$ | $MS_{6}$
TE | 1.01E-05 | 7.61E-06 | 1.18E-05 | 6.85E-06 | 8.79E-06 | 8.76E-06
EMR | 3.71E-05 | 5.74E-05 | -3.90E-05 | 6.62E-05 | 6.00E-05 | 5.91E-05
COR | 9.04E-01 | 9.36E-01 | 8.85E-01 | 9.37E-01 | 9.37E-01 | 9.41E-01
INFO | 9.55E-03 | 1.77E-02 | -9.07E-03 | 2.02E-02 | 1.63E-02 | 1.71E-02
TR | 1.02 | 7.74E-01 | 1.34 | 1.47 | 9.54E-01 | 8.50E-01
| $I_{1t_{1}}$ | $I_{2t_{1}}$ | $I_{3t_{1}}$ | $I_{4t_{1}}$ | $I_{5t_{1}}$ | $I_{6t_{1}}$
TE | 5.70E-05 | 3.14E-05 | 3.20E-05 | 5.41E-05 | 2.55E-05 | 4.67E-05
EMR | -5.81E-05 | 1.90E-04 | -1.54E-04 | 2.25E-04 | -3.14E-05 | -1.67E-05
COR | 7.57E-01 | 8.52E-01 | 8.43E-01 | 7.66E-01 | 8.75E-01 | 8.01E-01
INFO | -7.69E-03 | 3.39E-02 | -2.72E-02 | 3.06E-02 | -6.22E-03 | -2.45E-03
TR | 1.72 | 1.61 | 1.65 | 1.64 | 1.68 | 1.62
| $I_{1t_{2}}$ | $I_{2t_{2}}$ | $I_{3t_{2}}$ | $I_{4t_{2}}$ | $I_{5t_{2}}$ | $I_{6t_{2}}$
TE | 1.34E-05 | 2.45E-06 | 1.28E-05 | 8.00E-06 | 6.57E-06 | 5.13E-06
EMR | 1.36E-04 | 3.11E-05 | -3.70E-06 | 9.91E-06 | 7.48E-05 | 4.76E-05
COR | 9.26E-01 | 9.85E-01 | 9.32E-01 | 9.54E-01 | 9.62E-01 | 9.71E-01
INFO | 3.73E-02 | 1.99E-02 | -1.03E-03 | 3.50E-03 | 2.92E-02 | 2.10E-02
TR | 1.63 | 1.58 | 1.66 | 1.71 | 1.68 | 1.66

Table 2 presents the out-of-sample performance of all portfolios in terms of
five performance measures, i.e., correlation with the index (COR), tracking
error (TE), excess mean return (EMR), information ratio (INFO), and the
turnover ratio (TR). The best and second-best values among models are
highlighted in bold and italics, respectively. Given that it is challenging to
compare all the models simultaneously, we first identify the best-performing
portfolio among those constructed based on clustering using TDA-based distance
measures. Subsequently, we comprehensively compare these selected portfolios
to those based on maximum similarity criteria and cardinality constraints.

First, it is evident that all but $C_{3}$ portfolios generate positive EMR.
Although an ideal tracking portfolio should have zero excess mean return, it
is rarely observed in practice. We usually observe both positive and negative
values with a positive (negative) EMR indicating that the tracking portfolio
outperforms (under-performs) the benchmark index. A positive return over the
benchmark is desirable as it can certainly offset the negative impact of
transaction costs. Second, in terms of the tracking performance, the
portfolios $C_{4}$ and $C_{2}$ outperform the other TDA-based clustering
portfolios in terms of out-of-sample tracking error and result in the highest
correlation of 96.8% and 97%, respectively, with the index.

Furthermore, the tracking error from $C_{5}$ and $C_{6}$ is relatively high
compared to the tracking error from $C_{2}$ and $C_{4}$, demonstrating the
proposed kernels’ efficacy in filtering out more identical assets than the
conventional kernels. Third, $C_{2}$ excels $C_{4}$ as it attains the highest
information ratio and maintains a trade-off between the return over and above
the benchmark index and the tracking error. Last but not least, we compare the
turnover values that reflect the potential transaction costs associated with
portfolio re-balancing, with higher values showing more re-balancing, hence
higher transaction costs, and vice versa. The turnover values show that the
investor needs to re-balance fewer positions for $C_{6}$ and $C_{2}$ compared
to the re-balancing for $C_{4}$ portfolios from one investment period to the
other. Finally, we conclude that both $C_{2}$ and $C_{4}$ outperform the other
clustering-based portfolios, with $C_{2}$ outperforming $C_{4}$ in terms of
turnover ratio and information ratio.

Next, we observe that both the portfolios $C_{2}$ and $C_{4}$ outperform the
portfolios based on maximum similarity selection criteria with $M=10$ in terms
of the tracking error and correlation with the index. Further, $C_{2}$ also
beats the maximum similarity portfolios in terms of EMR, while $C_{4}$ fails
to do so. One can attribute the smaller values of TR for maximum similarity
portfolio compared to $C_{2}$ and $C_{4}$ to the fact the $MS$ portfolios
consist of only ten assets and hence the less re-balancing.

Comparing the performance of the portfolios $I_{1t_{1}}-I_{6t_{1}}$ to that of
the portfolios $I_{1t_{2}}-I_{6t_{2}}$, we find that the latter set of
portfolios outperforms the former in terms of TE, EMR, and correlation with
the index. In contrast, for other performance measures, INFO and TR, there is
no clear domination. Further, the portfolios $I_{1t_{1}}-I_{6t_{1}}$ perform
poor than the TDA-based sparse portfolios. When we compare the clustering-
based portfolios to portfolios represented as $I_{1t_{2}}-I_{6t_{2}}$, we
observe that the tracking error from $C_{2}$ is greater than that of
$I_{2t_{2}}$, but the turnover is relatively low. This higher tracking error
in the case of $C_{2}$ is quite intuitive. We minimize tracking error by
utilizing all available assets when considering $I_{2t_{2}}$. In contrast,
with $C_{2}$, we first filter out a subset of assets and then minimize the
tracking error on this reduced set, resulting in a sub-optimal solution.
However, it’s important to note that the former approach incurs higher
transaction costs because, in each evaluation window, the optimization problem
is solved anew using all assets, leading to frequent portfolio re-balancing.

On the other hand, for $C_{2}$, the initial filtering step imparts stability
to the problem, resulting in less frequent portfolio re-balancing and,
consequently, lower transaction costs. In conclusion, no consensus exists for
the best among $C_{2}$, $C_{4}$, and $I_{1t_{2}}-I_{6t_{2}}$. There is a
trade-off between the tracking error and the transaction costs. Nonetheless,
clustering-based portfolios require less computational time when compared to
cardinality-constrained portfolios. To find the best portfolio, we further
analyze their performance. That is, given the superior performance of the
portfolios $C_{2}$, $C_{4}$ and $I_{1t_{2}}-I_{6t_{2}}$, we now compute the
mean ratio of the in-sample tracking error and out-of-sample tracking error
181818We calculate the ratio of in-sample tracking error and out-of-sample
tracking error in each window and then take average to find the mean [9]. We
also compare it to the mean ratio of the portfolio $TE_{all}$, which
corresponds to a complete replication index tracking portfolio, i.e., a
tracking portfolio constructed using all the assets constituting the index
without penalty terms. A comparison of the mean ratios allows us to
investigate the severity of the estimation error. Table 3 shows the average
value of in-sample and out-of-sample tracking error across the windows and the
average value of the corresponding ratios. A ratio of less than one across all
portfolios indicates that, on average, there is a performance decline when
transitioning from the in-sample period to the out-of-sample period. It is not
surprising since the portfolio is optimized over the in-sample period, thus
generating a smaller tracking error, while the same portfolio composition,
when tracked over the out-of-sample period, the data that is unseen before.
Nevertheless, it is remarkable that performance degradation is not excessively
high, particularly for portfolios based on clustering techniques. This
reaffirms the robustness of clustering-based portfolios in both the in-sample
and out-of-sample periods.

Table 3: In-sample and out-of-sample robustness check. In-TE is the average
in-sample value of the tracking error across the windows, Out-TE is the
average out-of-sample value of the tracking error across the windows and Mean
ratio is the mean (taken across the windows) value of ratio of in-sample and
out-of-sample tracking error. $C_{2}$ and $C_{4}$ are clustering based
portfolios, $I_{1t_{2}}-I_{6t_{2}}$ are portfolios from cardinality constraint
model and $TE_{all}$ is the portfolio build using all the assets.

| Clustering |  |  | Cardinality constraint |  | All
---|---|---|---|---|---|---
| $C_{2}$ | $C_{4}$ | $I_{1t_{2}}$ | $I_{2t_{2}}$ | $I_{3t_{2}}$ | $I_{4t_{2}}$ | $I_{5t_{2}}$ | $I_{6t_{2}}$ | $TE_{all}$
In TE | 2.4E-06 | 2.2E-06 | 5.1E-06 | 1.7E-07 | 4.8E-06 | 2.1E-06 | 2.4E-06 | 1.0E-06 | 5.4E-15
Out TE | 5.1E-06 | 5.0E-06 | 1.3E-05 | 2.4E-06 | 1.3E-05 | 8.0E-06 | 6.6E-06 | 5.1E-06 | 9.0E-07
Mean ratio | 5.5E-01 | 5.2E-01 | 4.4E-01 | 7.4E-02 | 4.7E-01 | 3.0E-01 | 2.3E-01 | 2.3E-01 | 7.1E-09

######  Remark 5.1.

To further validate the exceptional performance of our top-performing TDA-
based sparse portfolio, $C_{2}$, we compare it to the tracking portfolios
constructed using the co-integration technique, a methodology known for its
effectiveness in index-tracking problems [3], [42]. We denote this portfolio
by $CO$. The idea underlying the co-integration index tracking portfolio
revolves around determining the optimal weights for a given set of assets
$S_{1},\ldots,S_{n}$ that achieve the highest level of co-integration with the
benchmark. Nevertheless, selecting the parameter $n$ is vital and demands
careful consideration. For instance, to obtain a stable co-integrating vector
of at least $n$ stocks out of $N$ stocks in the index, a mechanical search
would entail examining an extensive array of portfolios - specifically,
$N!/(N-n)!n!$ portfolios - as potential candidates for backtesting. However,
in our paper, we adopt the approach presented in [42] for constructing a co-
integration-based index-tracking portfolio. More specifically, we start by
randomly selecting 40 stocks, a choice motivated by our intention to compare
it to the $C_{2}$ portfolio, which, on average, consists of 40 stocks. We run
a regression analysis (for a comprehensive understanding of the co-integration
model, please refer to [42]) on the in-sample data and select this portfolio
as a candidate if the residuals from the regression are stationary, as
indicated by the Augmented Dickey-Fuller (ADF) test. The stationary residuals
would ascertain the presence of co-integration between the index and asset
price series. Otherwise, we discard the portfolio under consideration. We
repeat this process for 100,000 regressions conducted sequentially for each
portfolio. Each regression employs a unique combination of 40 assets. The
final portfolio chosen is determined by the regression that yields the
smallest sum of squared residuals. Our findings suggest that the $C_{2}$
portfolio outperforms the $CO$ portfolio in terms of all the performance
metrics as reported in Table 4. For instance, the $C_{2}$ portfolio achieves a
significantly lower tracking error of 5.14E-06 in contrast to 1.57E-05
achieved by the $CO$ portfolio. Similarly, the correlation of 0.968 with the
index for the $C_{2}$ portfolio is significantly higher than 0.924 for the
$CO$ portfolio. These findings suggest that TDA-based sparse index tracking
portfolios perform better than traditional portfolios based on correlation and
co-integration with the index.

Table 4: The out-of-sample performance of $C_{2}$ portfolio constructed using Strategy 1 with kernel 2 and the $CO$ portfolio obtained from co-integration based index tracking model. | $C_{2}$ | $CO$
---|---|---
TE | 5.14E-06 | 1.57E-05
EMR | 1.30E-04 | 5.06E-05
COR | 9.68E-01 | 9.24E-01
INFO | 5.71E-02 | 1.28E-02
TR | 1.10E+00 | 2.38E+00

Overall, we observed an improvement in the index tracking problem using the
TDA-based kernels with strategy 1. The key concern, though, is the robustness
of the strategy. The market fluctuations are not deterministic and cannot be
captured. So, we analyze the performance of TDA-based kernels during the
crisis period. In particular, we look at the recent Covid-19 pandemic.

Covid-19 robustness check: As a robustness check, Table 5 shows the out-of-
sample performance of tracking portfolios for data from the recent COVID-19
pandemic, July 2019 to mid-November 2020. Again, we use the daily prices of
the S&P500 index and its 502 constituents as available in this period. We
adopt the rolling window strategy with 21 days (approx one month) in-sample
period and five days (approx one week) out-of-sample period. Among TDA-based
portfolios, we observe that $C_{2}$ and $C_{4}$ still have the lowest and
statistically significant tracking errors. Also, $C_{2}$ attains minimum
turnover compared to other portfolios.

In contrast to the observations in the stable period, the maximum similarity-
based portfolio $MS_{2}$ outperforms the best TDA-based portfolios, i.e.,
$C_{2}$ and $C_{4}$. For instance, $MS_{2}$ achieves a tracking error of
3.05E-05, better than 3.86E-05 and 3.53E-05 obtained by $C_{2}$ and $C_{4}$.
Similarly, the turnover ratio 1.34 by $MS_{2}$ outperforms the ratio obtained
by $C_{2}$ and $C_{4}$ of 1.66 and 1.94, respectively. The comparison of TDA-
based portfolios against cardinality-based portfolios follows a pattern
similar to the findings in the stable period in that there is no clear
relation between them. However, considering the trade-off between the
performance and the computational time, clustering-based portfolios
outperform.

Table 5: The out-of-sample performance of clustering based portfolios $C_{1}-C_{6}$, maximum similarity based portfolios $MS_{1}-MS_{6}$ and portfolios from TEV model with cardinality constraint $I_{1t_{1}}-I_{6t_{1}}$ and $I_{1t_{2}}-I_{6t_{2}}$ on the Covid-19 pandemic period. | $C_{1}$ | $C_{2}$ | $C_{3}$ | $C_{4}$ | $C_{5}$ | $C_{6}$
---|---|---|---|---|---|---
TE | 7.88E-05 | 3.86E-05 | 8.96E-05 | 3.53E-05 | 8.59E-05 | 1.24E-04
EMR | -5.85E-05 | -1.51E-04 | -5.68E-04 | -2.44E-04 | -5.36E-04 | 9.48E-04
COR | 9.09E-01 | 9.52E-01 | 8.88E-01 | 9.53E-01 | 8.91E-01 | 8.58E-01
INFO | -6.59E-03 | -2.43E-02 | -6.00E-02 | -4.10E-02 | -5.78E-02 | 8.53E-02
TR | 1.82 | 1.66 | 1.83 | 1.94 | 1.68 | 1.66
| $MS_{1}$ | $MS_{2}$ | $MS_{3}$ | $MS_{4}$ | $MS_{5}$ | $MS_{6}$
TE | 7.02E-05 | 3.05E-05 | 1.06E-04 | 6.97E-05 | 6.34E-05 | 4.56E-05
EMR | -7.98E-04 | 1.47E-04 | 1.17E-04 | -6.86E-06 | 3.91E-04 | 2.78E-04
COR | 9.34E-01 | 9.61E-01 | 8.62E-01 | 9.21E-01 | 9.26E-01 | 9.49E-01
INFO | -9.52E-02 | 2.66E-02 | 1.13E-02 | -8.22E-04 | 4.90E-02 | 4.12E-02
TR | 1.74 | 1.34 | 1.84 | 1.72 | 1.44 | 1.42
| $I_{1t_{1}}$ | $I_{2t_{1}}$ | $I_{3t_{1}}$ | $I_{4t_{1}}$ | $I_{5t_{1}}$ | $I_{6t_{1}}$
TE | 5.93E-05 | 2.90E-05 | 3.91E-05 | 3.27E-05 | 3.56E-05 | 4.67E-05
EMR | 4.29E-04 | -1.63E-04 | 3.24E-04 | -2.49E-04 | 4.97E-04 | 3.82E-04
COR | 9.29E-01 | 9.62E-01 | 9.52E-01 | 9.58E-01 | 9.55E-01 | 9.45E-01
INFO | 5.57E-02 | -3.03E-02 | 5.18E-02 | -4.35E-02 | 8.33E-02 | 5.58E-02
TR | 1.84 | 1.92 | 1.84 | 1.83 | 1.93 | 1.91
| $I_{1t_{2}}$ | $I_{2t_{2}}$ | $I_{3t_{2}}$ | $I_{4t_{2}}$ | $I_{5t_{2}}$ | $I_{6t_{2}}$
TE | 5.80E-05 | 2.91E-05 | 3.99E-05 | 3.27E-05 | 3.58E-05 | 3.34E-05
EMR | 3.19E-04 | -1.71E-04 | 4.09E-04 | -2.49E-04 | 5.54E-04 | 4.73E-04
COR | 9.29E-01 | 9.62E-01 | 9.51E-01 | 9.58E-01 | 9.55E-01 | 9.55E-01
INFO | 4.18E-02 | -3.17E-02 | 6.48E-02 | -4.35E-02 | 9.27E-02 | 8.18E-02
TR | 1.829 | 1.918 | 1.827 | 1.830 | 1.920 | 1.917

Case Study (Publicly available data for Index tracking model): For
completeness, we also test the performance of our TDA-based sparse index
tracking portfolios on the benchmark data sets from [4, 9] for index tracking
problems. These data sets are drawn from several major world equity indices,
and thus, analyzing the performance of these data sets gives additional
evidence on the adequacy and effectiveness of the TDA-based portfolios.

Table 6: Indices used for empirical analysis

S. No. | Index | Country | Total Number | Constituents
---|---|---|---|---
|  |  | of constituents | considered
1. | FTSE 100 | UK | 100 | 89
2. | Nikkei 225 | Japan | 225 | 225
3. | DAX 100 | Germany | 100 | 85
4. | Hang-Seng | Hong Kong | 50 | 31
5. | S&P 100 | USA | 100 | 98
6. | S&P 500 | USA | 500 | 457
7. | Russell 2000 | USA | 2000 | 1318
8. | Russell 3000 | USA | 3000 | 2151

Our data sets belong to the OR-Library and are publicly available at
http://people.brunel.ac.uk/~mastjjb/jeb/info.html. There are currently eight
benchmark instances. Each instance corresponds to the securities composing a
specific market index. Specifically, the following market indices are
considered: Hang Seng (Hong Kong), DAX100 (Germany), FTSE100 (United Kingdom),
S&P100 (USA), Nikkei225 (Japan), S&P500 (USA), Russell2000 (USA) and
Russell3000 (USA). The data set comprises 291 weekly closing prices for each
of the indices spanning March 1992 to September 1997. Table 6 gives the list
of indices, their actual number of constituents, and the number of
constituents considered for this study.

We follow [4] and consider the first 145 weekly prices as in-sample
observations and the following 146 weeks as out-of-sample periods to evaluate
the performance of the models. We do not require a rolling window approach
here, as there is only one training and testing period. Consequently, instead
of reporting transaction costs, we find the Hinderfindahl index, a diversity
index calculated as $\text{HHI}=\sum_{i=1}^{n}w_{i}^{2}.$ In the case of a
naïve portfolio (which offers maximum diversification), the minimum value of
HHI is obtained and is equal to $\frac{1}{n}$. Smaller values of HHI are
desirable.

Table 7: Out-of-sample performance of strategy 1 on data set from Beasley OR
Library. Here $M$ denotes the number of assets filtered as clustering result,
i.e., the number of assets sharing the same cluster with the index

T1 | $C_{1}$ | $C_{2}$ | $C_{3}$ | $C_{4}$ | $C_{5}$ | $C_{6}$ | $TE_{all}$ | T5 | $C_{1}$ | $C_{2}$ | $C_{3}$ | $C_{4}$ | $C_{5}$ | $C_{6}$ | $TE_{all}$
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---
EMR | -4.61E-05 | 9.65E-05 | -4.85E-04 | -3.76E-05 | 2.59E-04 | 9.16E-04 | 9.96E-05 | EMR | -1.32E-03 | -7.80E-04 | -3.65E-05 | -1.04E-03 | -9.76E-04 | -1.24E-03 | -3.68E-04
TE | 1.27E-05 | 1.46E-05 | 1.84E-04 | 9.82E-05 | 1.96E-05 | 4.83E-05 | 7.30E-06 | TE | 5.85E-05 | 4.58E-05 | 1.53E-04 | 8.80E-05 | 6.34E-05 | 6.91E-05 | 2.96E-05
COR | 9.92E-01 | 9.91E-01 | 9.27E-01 | 9.36E-01 | 9.89E-01 | 9.79E-01 | 9.95E-01 | COR | 9.66E-01 | 9.70E-01 | 8.94E-01 | 9.43E-01 | 9.71E-01 | 9.61E-01 | 9.84E-01
HHI | 8.81E-02 | 8.82E-02 | 1.96E-01 | 1.56E-01 | 9.57E-02 | 1.21E-01 | 7.05E-02 | HHI | 2.90E-02 | 3.85E-02 | 2.60E-01 | 9.01E-02 | 4.92E-02 | 4.80E-02 | 1.37E-02
M | 19 | 18 | 6 | 8 | 18 | 15 | 31 | M | 62 | 54 | 5 | 15 | 57 | 46 | 225
T2 |  |  |  |  |  |  |  | T6 |  |  |  |  |  |  |
EMR | 3.32E-04 | 1.39E-04 | -2.07E-04 | 7.67E-04 | 3.43E-04 | 1.78E-04 | -2.66E-05 | EMR | 3.08E-03 | 2.15E-03 | 3.55E-03 | 2.34E-03 | 2.32E-03 | 1.97E-03 | 2.22E-03
TE | 1.12E-04 | 7.96E-05 | 1.79E-04 | 1.14E-04 | 9.76E-05 | 8.77E-05 | 5.76E-05 | TE | 7.64E-04 | 2.85E-04 | 7.30E-04 | 3.24E-04 | 5.78E-04 | 4.33E-04 | 1.03E-04
COR | 8.61E-01 | 9.06E-01 | 8.05E-01 | 8.67E-01 | 8.86E-01 | 8.95E-01 | 9.30E-01 | COR | 6.37E-01 | 7.89E-01 | 4.86E-01 | 7.71E-01 | 7.50E-01 | 8.01E-01 | 9.28E-01
HHI | 1.20E-01 | 1.12E-01 | 3.42E-01 | 1.58E-01 | 1.55E-01 | 1.26E-01 | 3.87E-02 | HHI | 3.11E-01 | 5.67E-02 | 2.51E-01 | 9.50E-02 | 2.65E-01 | 2.14E-01 | 1.80E-02
M | 27 | 12 | 4 | 8 | 8 | 10 | 85 | M | 4 | 40 | 7 | 24 | 6 | 7 | 457
T3 |  |  |  |  |  |  |  | T7 |  |  |  |  |  |  |
EMR | -8.44E-04 | -9.27E-04 | 2.47E-04 | -9.36E-04 | -1.23E-03 | -1.58E-03 | -1.72E-04 | EMR | 2.32E-03 | 2.24E-03 | 3.02E-03 | 2.50E-04 | 6.02E-04 | -3.54E-04 | 1.79E-03
TE | 7.94E-05 | 2.95E-05 | 8.27E-05 | 5.12E-05 | 5.25E-05 | 4.16E-05 | 7.83E-06 | TE | 5.65E-04 | 3.96E-04 | 7.80E-04 | 6.66E-04 | 5.39E-04 | 6.09E-04 | 2.14E-04
COR | 8.38E-01 | 9.36E-01 | 8.24E-01 | 8.91E-01 | 8.84E-01 | 9.11E-01 | 9.83E-01 | COR | 7.07E-01 | 7.74E-01 | 5.20E-01 | 5.65E-01 | 7.18E-01 | 6.89E-01 | 8.93E-01
HHI | 1.05E-01 | 4.36E-02 | 2.31E-01 | 9.42E-02 | 5.85E-02 | 6.43E-02 | 2.26E-02 | HHI | 1.09E-01 | 3.54E-02 | 1.53E-01 | 4.88E-02 | 6.48E-02 | 9.56E-02 | 1.33E-02
M | 11 | 35 | 5 | 14 | 25 | 24 | 89 | M | 14 | 63 | 8 | 47 | 40 | 20 | 1318
T4 |  |  |  |  |  |  |  | T8 |  |  |  |  |  |  |
EMR | -4.47E-04 | -2.75E-04 | -9.72E-04 | -5.62E-04 | -4.80E-04 | -7.23E-04 | -1.26E-04 | EMR | 1.43E-03 | 1.71E-03 | 3.69E-03 | 1.76E-03 | 1.67E-03 | 2.23E-03 | 2.52E-03
TE | 3.63E-04 | 3.86E-05 | 1.65E-04 | 5.31E-05 | 6.69E-05 | 7.03E-05 | 9.35E-06 | TE | 6.49E-04 | 2.33E-04 | 7.31E-04 | 3.18E-04 | 5.93E-04 | 5.26E-04 | 1.14E-04
COR | 6.30E-01 | 9.35E-01 | 7.44E-01 | 9.16E-01 | 8.93E-01 | 8.95E-01 | 9.85E-01 | COR | 6.09E-01 | 8.32E-01 | 3.21E-01 | 7.70E-01 | 7.17E-01 | 7.38E-01 | 9.26E-01
HHI | 3.69E-01 | 7.24E-02 | 2.21E-01 | 9.87E-02 | 1.06E-01 | 1.19E-01 | 2.70E-02 | HHI | 1.49E-01 | 4.40E-02 | 2.09E-01 | 5.49E-02 | 2.29E-01 | 1.62E-01 | 1.63E-02
M | 5 | 24 | 5 | 14 | 15 | 13 | 98 | M | 8 | 62 | 8 | 50 | 8 | 13 | 2151

Table 7 reports the performance of TDA-based sparse index tracking portfolios
$C_{1}$ to $C_{6}$ on the eight indices and the fully-replicating index
tracking portfolio, $TE_{all}$. There are several findings. First, our $C_{2}$
portfolio achieves the lowest tracking error when contrasted against the other
TDA-based portfolios for all the indices under consideration. What’s more, it
is striking that the tracking error stemming from $C_{2}$ is statistically
insignificant compared to the tracking error emanating from the $TE_{all}$
portfolio for five of the eight indices. Second, the correlation between the
$C_{2}$ portfolios and the respective market index is notably higher than that
observed in other TDA-based portfolios for five of the eight indices. Even for
the index where the correlation from the $C_{2}$ portfolios is not the
highest, it remains remarkably close to the highest correlation value. Third,
although the portfolios generate a negative excess mean return for some of the
indices, it is interesting that even in these instances, the $C_{2}$
portfolios consistently outperform their counterparts, namely the $C_{5}$ and
$C_{6}$ portfolios, which are constructed using conventional similarity
matrices. Fourth, it is remarkable that the $C_{2}$ portfolios are well-
diversified, as indicated by the Herfindahl-Hirschman Index (HHI), with
$C_{2}$ portfolios achieving the lowest values among the portfolios. It is
essential to underscore that the lower values of HHI for $C_{2}$ attributes to
the specific assets chosen based on the clustering with a similarity measure
based on the kernel $K_{2}$ and is not merely a by-product of the higher value
of $M$ (number of assets selected) as evidenced by the HHI values for T5.
These findings indicate that the based sparse index tracking portfolio,
$C_{2}$, consistently outperforms the other index tracking portfolios under
consideration.

######  Remark 5.2.

We also compare the performance of our best-performing TDA-based sparse
portfolio, $C_{2}$, to the index tracking portfolio proposed in [4], which we
denote by $C_{beas}$. It is worth noting that our TDA-based sparse portfolio,
unlike $C_{beas}$, doesn’t require the number of assets to be included in the
portfolio. Since the composition of the optimal index tracking portfolios in
[4] is not publicly available, we directly use the tracking error values
reported in that paper. Further, the tracking error used in [4] is

$TE_{beas}=\frac{1}{T}\sqrt{\sum_{j=1}^{T}(R_{j}(\bm{w})-R_{0,j})^{2}}.$

Therefore, for a fair comparison, we also compute the tracking error,
$TE_{beas}$, for our portfolio, $C_{2}$. Table 8 presents the out-of-sample
$TE_{beas}$ for $C_{2}$ and $C_{beas}$ for data sets T1-T5, the indices used
in [4]. Interestingly, our $C_{2}$ portfolio outperforms $C_{beas}$ for all
except T4 indices in terms of the tracking error $T_{beas}$.

Table 8: Out-of-sample value of tracking error $TE_{beas}$ for $C_{2}$ portfolio and $C_{beas}$ portfolio from $Beasley_{IT}$ model. Best value is highlighted in Bold Data | $C_{2}$ | $C_{beas}$
---|---|---
T1 | 2.96E-04 | 1.27E-03
T2 | 8.77E-04 | 2.05E-03
T3 | 7.40E-04 | 9.58E-04
T4 | 1.58E-03 | 1.03E-03
T5 | 6.35E-04 | 8.21E-04

The empirical study demonstrates the efficacy of the TDA-based kernel $K_{2}$
in facilitating the superior asset selection for the index-tracking model.
Further, the kernel $K_{2}$, when integrated with affinity propagation
clustering, results in an entirely data-driven approach, thus eliminating the
need to pre-specify the number of assets to be included in the tracking
portfolio. Therefore, our proposed TDA based strategy holds promise in
enhancing asset allocation decisions, particularly in the context of index
tracking.

###  5.3 Strategy 2: Sparse Mean-variance and Global Minimum Variance
Portfolios

Next, we assess the performance of our TDA-based data-driven mean-variance and
global minimum variance optimal portfolios. More precisely, for a fixed
window, we follow Strategy 2, i.e., given the similarity matrices $K_{1}$ to
$K_{6}$, we perform affinity propagation clustering and select the exemplars,
then construct the optimal portfolios solving problems (13) and (14) on the
filtered stocks. We denote the optimal mean-variance and the global minimum
variance portfolios corresponding to a similarity matrix $K_{i}$ by $MV_{i}$
and $GMV_{i}$, respectively, where $i=1,2,\ldots,6$. We also create the
following portfolios from the literature as benchmarks for comparative
analysis.

  * 1.

MV and GMV with all assets: These portfolios correspond to the optimal mean-
variance and global minimum variance portfolios created by solving (13) and
(14) with all of the assets that make up the benchmark index (without
clustering). We denote these portfolios by $MV_{A}$ and $GMV_{A}$,
respectively.

  * 2.

Naive portfolio: This portfolio corresponds to the equal-weighted portfolio.

Before analyzing the performance of optimal portfolios, we first observe that
the median number of assets (exemplars) for similarity matrices $K1-K6$ are
60, 64, 74, 86, 73, and 76, thus confirming that the resulting portfolios are
indeed sparse.

Panel A in Table 9 shows the out-of-sample performance of the TDA-based sparse
mean-variance portfolios. We observe that the portfolio $MV2$ achieves the
maximum values for mean, SR, and CEQ, and the minimum value of TR, thus
outperforming the other portfolios, including TDA-based portfolios and the
benchmark portfolios, namely, $MVA$, the naïve strategy and the benchmark
index. For instance, $MV2$ achieves the daily Sharpe ratio of .0733 (.3359 per
month / 1.1636 per annum) compared to 0.688 and 0.521 achieved by $MVA$ and
$SP500$. Further, the least value of the turnover ratio for $MV2$ indicates
less re-balancing across the windows and the formation of stable portfolios.
In contrast to the performance of TDA-based index-tracking portfolios, $MV4$
fails to consistently beat other TDA-based portfolios as well as the benchmark
portfolios. Nonetheless, these findings confirm our conclusion that the TDA-
based selection strategy, in particular, based on kernel $K_{2}$, outperforms
the benchmark models, thus providing an excellent asset selection
criteria.191919We also observe that the $MVA$ portfolio has a higher out-of-
sample mean, SR, and CEQ compared to those from the naïve $1/N$ portfolio. We
also perform hypothesis tests to assess whether the values from $MVA$ and
naïve strategy are statistically significant. We observed that the mean and
CEQ from $MVA$ is significantly greater than that from naïve strategy at 99%
confidence level while the Sharpe ratios from the two are not significantly
different, a similar conclusion was drawn in [15]. Panel B in Table 9 shows
the out-of-sample performance of the TDA-based sparse global minimum variance
portfolios. A similar conclusion can be drawn that in a $K_{2}$ based
portfolio, $GV2$ outperforms other TDA-based portfolios, with the exception
that $GV5$ has a lower turnover ratio than $GV2$, but the difference is not
very large. Further, $GV2$ beats the benchmark portfolios $GVA$, the naïve,
and the index in terms of mean and Sharpe ratio. These findings were further
confirmed using the statistical tests for mean, SR, and CEQ; for instance, we
observed that $MV2$ has a significantly higher mean, SR, and CEQ than $MVA$
portfolios at a 95% confidence level.

Table 9: In this table, we report the out-of-sample mean return, Sharpe ratio (SR), certainty-equivalent (CEQ) return, and portfolio turnover of the optimal mean-variance ($MV$) and global minimum variance ($GMV$) portfolios. The portfolios $MV1-MV6(GMV1-GMV6)$ correspond to the sparse optimal mean-variance (global minimum variance) portfolios obtained based on Strategy 2 corresponding to six similarity matrices. The portfolios $MVA$ and $GMVA$ correspond to the optimal mean-variance and global minimum variance portfolios obtained on all assets, and the naive corresponds to an equal-weighted portfolio. We calculate these measures using realized simple returns of the corresponding portfolios over the out-of-sample period. We also report these measures for the index for comparison. The best and second-best values are highlighted in bold and italics, respectively. A. Mean-Variance Portfolios |
---|---
| MV1 | MV2 | MV3 | MV4 | MV5 | MV6 | MVA | Naïve | Index
Mean | 9.69E-04 | 1.82E-03 | 1.22E-03 | 7.67E-04 | 7.27E-04 | 8.83E-04 | 1.70E-03 | 5.89E-04 | 4.70E-04
SR | 4.67E-02 | 7.33E-02 | 5.58E-02 | 3.28E-02 | 3.55E-02 | 4.19E-02 | 6.88E-02 | 6.22E-02 | 5.21E-02
CEQ | 7.54E-04 | 1.51E-03 | 9.79E-04 | 4.94E-04 | 5.17E-04 | 6.61E-04 | 1.40E-03 | 5.44E-04 | 4.29E-04
TR | 1.74E+00 | 1.37E+00 | 1.78E+00 | 1.67E+00 | 1.45E+00 | 1.39E+00 |  |  |
B. Global Minimum Variance Portfolios |
| GV1 | GV2 | GV3 | GV4 | GV5 | GV6 | GVA | Naïve | Index
Mean | 3.50E-04 | 4.42E-04 | 3.91E-04 | 3.44E-04 | 3.95E-04 | 3.35E-04 | 3.96E-04 | 5.89E-04 | 4.70E-04
SR | 5.04E-02 | 6.45E-02 | 5.75E-02 | 4.93E-02 | 5.73E-02 | 4.84E-02 | 6.38E-02 | 6.22E-02 | 5.21E-02
CEQ | 3.26E-04 | 4.18E-04 | 3.68E-04 | 3.20E-04 | 3.72E-04 | 3.11E-04 | 3.77E-04 | 5.44E-04 | 4.29E-04
TR | 1.46E+00 | 1.24E+00 | 1.70E+00 | 1.67E+00 | 1.22E+00 | 1.26E+00 |  |  |

To check our strategy’s robustness, we study the in-sample and out-of-sample
statistics by calculating the mean, SR, and CEQ values for each window (in-
sample and out-of-sample) and then taking the average across the windows.
Tables 10 presents the in-sample and out-of-sample statistics and their
differences. We observe a performance degradation in the out-of-sample period,
which is intuitive since the portfolios are optimized over the in-sample
period and are tested in the out-of-sample period where no optimization
occurs. Further, for $MV2$ and $GV2$, the difference between the in-sample and
out-of-sample average values is less than the $MVA$ and $GVA$ portfolios,
which suggests that TDA-based filtering strategy is more robust to the
changing market dynamics.

Table 10: Average (calculated across the windows) in-sample and out-of-sample
values of Mean, SR and CEQ for the portfolios MV1-MV6 and GV1-GV6. The
difference in the in-sample and out-of-sample values acts as an indicator for
consistency and robustness of the portfolios. Minimum value of the difference
is highlighted in bold A. Mean-Variance Portfolios
---
|  | MV1 | MV2 | MV3 | MV4 | MV5 | MV6 | MVA
Mean | In | 3.521E-03 | 4.612E-03 | 3.825E-03 | 3.878E-03 | 3.742E-03 | 3.750E-03 | 5.530E-03
| Out | 9.689E-04 | 1.825E-03 | 1.217E-03 | 7.668E-04 | 7.269E-04 | 8.835E-04 | 1.704E-03
| Difference | 2.552E-03 | 2.787E-03 | 2.608E-03 | 3.111E-03 | 3.015E-03 | 2.867E-03 | 3.826E-03
SR | In | 1.846E-01 | 1.806E-01 | 1.921E-01 | 1.711E-01 | 1.853E-01 | 1.880E-01 | 2.186E-01
| Out | 7.870E-02 | 8.542E-02 | 7.898E-02 | 4.842E-02 | 5.695E-02 | 7.132E-02 | 9.374E-02
| Difference | 1.059E-01 | 9.519E-02 | 1.131E-01 | 1.227E-01 | 1.283E-01 | 1.167E-01 | 1.248E-01
CEQ | In | 3.310E-03 | 4.242E-03 | 3.592E-03 | 3.561E-03 | 3.498E-03 | 3.516E-03 | 5.158E-03
| Out | 7.517E-04 | 1.513E-03 | 9.741E-04 | 4.901E-04 | 5.137E-04 | 6.597E-04 | 1.394E-03
| Difference | 2.558E-03 | 2.729E-03 | 2.618E-03 | 3.071E-03 | 2.984E-03 | 2.856E-03 | 3.765E-03
B. Global Minimum Variance Portfolios
|  | GV1 | GV2 | GV3 | GV4 | GV5 | GV6 | GVA
Mean | In | 5.137E-04 | 5.227E-04 | 5.067E-04 | 5.289E-04 | 5.276E-04 | 4.861E-04 | 5.017E-04
| Out | 3.504E-04 | 4.419E-04 | 3.911E-04 | 3.443E-04 | 3.955E-04 | 3.355E-04 | 3.961E-04
| Difference | 1.633E-04 | 8.084E-05 | 1.156E-04 | 1.846E-04 | 1.321E-04 | 1.506E-04 | 1.055E-04
SR | In | 1.009E-01 | 1.044E-01 | 1.040E-01 | 9.789E-02 | 1.041E-01 | 9.965E-02 | 1.274E-01
| Out | 7.462E-02 | 9.952E-02 | 8.179E-02 | 7.416E-02 | 8.972E-02 | 8.321E-02 | 9.334E-02
| Difference | 2.628E-02 | 4.830E-03 | 2.219E-02 | 2.373E-02 | 1.437E-02 | 1.643E-02 | 3.409E-02
CEQ | In | 4.961E-04 | 5.052E-04 | 4.902E-04 | 5.092E-04 | 5.102E-04 | 4.689E-04 | 4.907E-04
| Out | 3.260E-04 | 4.181E-04 | 3.676E-04 | 3.195E-04 | 3.714E-04 | 3.111E-04 | 3.765E-04
| Difference | 1.702E-04 | 8.713E-05 | 1.226E-04 | 1.897E-04 | 1.388E-04 | 1.578E-04 | 1.142E-04

COVID-19 Robustness Check Next, we analyze the portfolio performance in the
more volatile period from July 2019 to mid-November 2020, which includes the
COVID-19 pandemic. Table 11 presents the out-of-sample performance. Panel A
clearly shows that not all sparse TDA-based portfolios perform well. This
observation is not entirely surprising because of the increased market
fluctuations during the pandemic. Nevertheless, the TDA-based portfolio
$MV_{2}$ outperforms the $MVA$, the naive portfolio, and the benchmark index.
This is demonstrated with significant gaps; for instance, the Sharpe ratio of
4.63E-02 achieved by $MV_{2}$ is significantly better (almost double) than
2.24E-02 and 2.86E-02 achieved by $MVA$ and the naive portfolio, respectively.
Unlike TDA-based mean-variance portfolios, there is no clear pattern in the
performance of TDA-based global minimum variance portfolios. Nonetheless,
these portfolios, in particular, $GV_{2}$ outperform $GVA$ and naïve
portfolio, thus confirming our findings that TDA-based portfolios, in
particular, based on the kernel $K_{2}$ are not only sparse but also perform
superior to traditional models even in turbulent market conditions,
safeguarding against significant losses. These results underline the out-of-
sample efficacy of TDA-based models in managing risk and delivering returns.

Table 11: Out-of-sample performance analysis of portfolios $MV1-MV6,MVA,GV1-GV6,GVA$, naïve strategy and the index on COVID-19 data set. The best and second-best values are highlighted in bold and italics, respectively. A. Mean-Variance Portfolios |
---|---
| MV1 | MV2 | MV3 | MV4 | MV5 | MV6 | MVA | Naïve | Index
Mean | -4.22E-04 | 1.53E-03 | -1.64E-03 | 1.08E-04 | 6.09E-04 | -8.28E-04 | 7.66E-04 | 6.14E-04 | 6.73E-04
SR | -1.60E-02 | 4.63E-02 | -4.81E-02 | 3.57E-03 | 1.85E-02 | -2.64E-02 | 2.24E-02 | 2.86E-02 | 3.49E-02
CEQ | -7.67E-04 | 9.82E-04 | -2.22E-03 | -3.52E-04 | 6.81E-05 | -1.32E-03 | 1.81E-04 | 3.84E-04 | 4.87E-04
TR | 2.00E+00 | 1.81E+00 | 1.86E+00 | 1.82E+00 | 1.91E+00 | 1.56E+00 |  |  |
B. Global Minimum Variance Portfolios |
| GV1 | GV2 | GV3 | GV4 | GV5 | GV6 | GVA | Naïve | Index
Mean | 7.40E-04 | 5.68E-04 | 6.27E-04 | 8.25E-04 | 3.86E-04 | 2.90E-05 | 1.78E-04 | 6.14E-04 | 6.73E-04
SR | 6.16E-02 | 3.01E-02 | 5.25E-02 | 4.73E-02 | 2.12E-02 | 1.65E-03 | 1.53E-02 | 2.86E-02 | 3.49E-02
CEQ | 6.68E-04 | 3.90E-04 | 5.55E-04 | 6.73E-04 | 2.20E-04 | -1.25E-04 | 1.10E-04 | 3.84E-04 | 4.87E-04
TR | 1.54E+00 | 1.91E+00 | 1.47E+00 | 1.94E+00 | 1.74E+00 | 1.64E+00 |  |  |

##  6 Conclusion

In this paper, we introduced new distance measures on the space of persistence
diagrams and landscapes. Notably, these distance measures incorporate the
essential time component of a time series- a facet often overlooked by
traditional distance measures. Employing these novel measures as an input to
the affinity propagation clustering and proposed two strategies for asset
selection to promote sparsity in the portfolio. Specifically, we presented a
novel, entirely data-driven approach based on topological data analysis for
selecting sparse portfolios in the context of index tracking and Markowitz
portfolios. Our empirical findings demonstrate that the performance of sparse
portfolios selected based on proposed novel distance measures is not merely
comparable, but often excels in volatile market conditions relative to the
prevailing methods across diverse set of performance measures. Thus, our paper
contributes to sparse portfolio selection and applications of topological data
analysis in finance.

## References

  * Agami [2023] Agami, S., 2023.  Comparison of persistence diagrams.  Communications in Statistics-Simulation and Computation 52, 1948–1961.
  * Alcock et al. [1999] Alcock, R.J., Manolopoulos, Y., et al., 1999.  Time-series similarity queries employing a feature-based approach, in: 7th Hellenic conference on informatics, pp. 27–29.
  * Alexander and Dimitriu [2005] Alexander, C., Dimitriu, A., 2005.  Indexing and statistical arbitrage.  The Journal of Portfolio Management 31, 50–63.
  * Beasley et al. [2003] Beasley, J.E., Meade, N., Chang, T.J., 2003.  An evolutionary heuristic for the index tracking problem.  European Journal of Operational Research 148, 621–643.
  * Bondell and Reich [2008] Bondell, H.D., Reich, B.J., 2008.  Simultaneous regression shrinkage, variable selection, and supervised clustering of predictors with oscar.  Biometrics 64, 115–123.
  * Brodie et al. [2009] Brodie, J., Daubechies, I., De Mol, C., Giannone, D., Loris, I., 2009.  Sparse and stable Markowitz portfolios.  Proceedings of the National Academy of Sciences 106, 12267–12272.
  * Bubenik [2018] Bubenik, P., 2018.  The persistence landscape and some of its properties.  arXiv preprint arXiv:1810.04963 .
  * Bubenik et al. [2015] Bubenik, P., et al., 2015.  Statistical topological data analysis using persistence landscapes.  The Journal of Machine Learning Research 16, 77–102.
  * Canakgoz and Beasley [2009] Canakgoz, N.A., Beasley, J.E., 2009.  Mixed-integer programming approaches for index tracking and enhanced indexation.  European Journal of Operational Research 196, 384–399.
  * Chazal et al. [2014] Chazal, F., De Silva, V., Oudot, S., 2014.  Persistence stability for geometric complexes.  Geometriae Dedicata 173, 193–214.
  * Cheng et al. [2020] Cheng, D., Zhang, S., Huang, J., 2020.  Dense members of local cores-based density peaks clustering algorithm.  Knowledge-Based Systems 193, 105454.
  * Cohen-Steiner et al. [2007] Cohen-Steiner, D., Edelsbrunner, H., Harer, J., 2007.  Stability of persistence diagrams.  Discrete & computational geometry 37, 103–120.
  * Cohen-Steiner et al. [2010] Cohen-Steiner, D., Edelsbrunner, H., Harer, J., Mileyko, Y., 2010.  Lipschitz functions have l p-stable persistence.  Foundations of computational mathematics 10, 127–139.
  * DeMiguel et al. [2009a] DeMiguel, V., Garlappi, L., Nogales, F.J., Uppal, R., 2009a.  A generalized approach to portfolio optimization: Improving performance by constraining portfolio norms.  Management Science 55, 798–812.
  * DeMiguel et al. [2009b] DeMiguel, V., Garlappi, L., Uppal, R., 2009b.  Optimal versus naive diversification: How inefficient is the 1/n portfolio strategy?  The Review of Financial Studies 22, 1915–1953.
  * Dueck and Frey [2007] Dueck, D., Frey, B.J., 2007.  Non-metric affinity propagation for unsupervised image categorization, in: 2007 IEEE 11th International Conference on Computer Vision, IEEE. pp. 1–8.
  * Embrechts et al. [2003] Embrechts, P., Höing, A., Juri, A., 2003.  Using copulae to bound the value-at-risk for functions of dependent risks.  Finance and Stochastics 7, 145–167.
  * Fan and Li [2001] Fan, J., Li, R., 2001.  Variable selection via nonconcave penalized likelihood and its oracle properties.  Journal of the American statistical Association 96, 1348–1360.
  * Fastrich et al. [2014] Fastrich, B., Paterlini, S., Winker, P., 2014.  Cardinality versus q-norm constraints for index tracking.  Quantitative Finance 14, 2019–2032.
  * Giamouridis and Paterlini [2010] Giamouridis, D., Paterlini, S., 2010.  Regular (ized) hedge fund clones.  Journal of Financial Research 33, 223–247.
  * Gidea [2017] Gidea, M., 2017.  Topology data analysis of critical transitions in financial networks.  Available at SSRN 2903278 .
  * Gidea and Katz [2018] Gidea, M., Katz, Y., 2018.  Topological data analysis of financial time series: Landscapes of crashes.  Physica A: Statistical Mechanics and its Applications 491, 820–834.
  * Giuzio et al. [2018] Giuzio, M., Eichhorn-Schott, K., Paterlini, S., Weber, V., 2018.  Tracking hedge funds returns using sparse clones.  Annals of Operations Research 266, 349–371.
  * Goel et al. [2023] Goel, A., Pasricha, P., Kanniainen, J., 2023.  Sparse index tracking via topological learning.  arXiv preprint arXiv:2310.09578 .
  * Goel et al. [2020] Goel, A., Pasricha, P., Mehra, A., 2020.  Topological data analysis in investment decisions.  Expert Systems with Applications 147, 113222.
  * He et al. [2019] He, X., Wang, Q., Li, X., 2019.  Robust adaptive graph regularized non-negative matrix factorization.  IEEE Access 7, 83101–83110.
  * Ho et al. [2015] Ho, M., Sun, Z., Xin, J., 2015.  Weighted elastic net penalized mean-variance portfolio design and computation.  SIAM Journal on Financial Mathematics 6, 1220–1244.
  * Hui [2005] Hui, T.K., 2005.  Portfolio diversification: a factor analysis approach.  Applied Financial Economics 15, 821–834.
  * Jain et al. [1999] Jain, A.K., Murty, M.N., Flynn, P.J., 1999.  Data clustering: a review.  ACM Computing Surveys (CSUR) 31, 264–323.
  * Kusano et al. [2017] Kusano, G., Fukumizu, K., Hiraoka, Y., 2017.  Kernel method for persistence diagrams via kernel embedding and weight factor.  The Journal of Machine Learning Research 18, 6947–6987.
  * MacQueen et al. [1967] MacQueen, J., et al., 1967.  Some methods for classification and analysis of multivariate observations, in: Proceedings of the fifth Berkeley symposium on mathematical statistics and probability, Oakland, CA, USA. pp. 281–297.
  * Mantegna [1999] Mantegna, R.N., 1999.  Hierarchical structure in financial markets.  The European Physical Journal B-Condensed Matter and Complex Systems 11, 193–197.
  * Mileyko et al. [2011] Mileyko, Y., Mukherjee, S., Harer, J., 2011.  Probability measures on the space of persistence diagrams.  Inverse Problems 27, 124007.
  * Murzin et al. [1995] Murzin, A.G., Brenner, S.E., Hubbard, T., Chothia, C., 1995.  Scop: a structural classification of proteins database for the investigation of sequences and structures.  Journal of Molecular Biology 247, 536–540.
  * Onnela et al. [2003] Onnela, J.P., Chakraborti, A., Kaski, K., Kertesz, J., Kanto, A., 2003.  Dynamics of market correlations: Taxonomy and portfolio analysis.  Physical Review E 68, 056110.
  * Panton et al. [1976] Panton, D.B., Lessig, V.P., Joy, O.M., 1976.  Comovement of international equity markets: a taxonomic approach.  Journal of Financial and Quantitative Analysis 11, 415–432.
  * Paulsen and Raghupathi [2016] Paulsen, V.I., Raghupathi, M., 2016.  An introduction to the theory of reproducing kernel Hilbert spaces. volume 152.  Cambridge university press.
  * Prigent [2007] Prigent, J.L., 2007.  Portfolio optimization and performance analysis.  CRC Press.
  * Redmond et al. [2011] Redmond, P., Trono, J.A., Kronenberg, D., 2011.  Affinity propagation, and other data clustering techniques.
  * Rudolf et al. [1999] Rudolf, M., Wolter, H.J., Zimmermann, H., 1999.  A linear model for tracking error minimization.  Journal of Banking & Finance 23, 85–103.
  * Ruiz-Torrubiano and Suárez [2009] Ruiz-Torrubiano, R., Suárez, A., 2009.  A hybrid optimization approach to index tracking.  Annals of Operations Research 166, 57–71.
  * Sant’Anna et al. [2017] Sant’Anna, L.R., Filomena, T.P., Caldeira, J.F., 2017.  Index tracking and enhanced indexing using cointegration and correlation with endogenous portfolio selection.  The Quarterly Review of Economics and Finance 65, 146–157.
  * Shang et al. [2012] Shang, F., Jiao, L., Shi, J., Wang, F., Gong, M., 2012.  Fast affinity propagation clustering: A multilevel approach.  Pattern Recognition 45, 474–486.
  * Shi and Malik [2000] Shi, J., Malik, J., 2000.  Normalized cuts and image segmentation.  IEEE Transactions on Pattern Analysis and Machine Intelligence 22, 888–905.
  * Shu et al. [2020] Shu, L., Shi, F., Tian, G., 2020.  High-dimensional index tracking based on the adaptive elastic net.  Quantitative Finance 20, 1513–1530.
  * Takens [1981] Takens, F., 1981.  Detecting strange attractors in uid turbulence.  Dynamical Systems and Turbulence 898, 366.
  * Woodside-Oriakhi et al. [2011] Woodside-Oriakhi, M., Lucas, C., Beasley, J.E., 2011.  Heuristic algorithms for the cardinality constrained efficient frontier.  European Journal of Operational Research 213, 538–550.
  * Yang et al. [2008] Yang, C., Zhang, X., Jiao, L., Wang, G., 2008.  Self-tuning semi-supervised spectral clustering, in: 2008 International Conference on Computational Intelligence and Security, IEEE. pp. 1–5.
  * Zheng et al. [2020] Zheng, Y., Hospedales, T.M., Yang, Y., 2020.  Diversity and sparsity: A new perspective on index tracking, in: ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), IEEE. pp. 1768–1772.

## Appendix

###  6.1 Case study: Time series clustering

In this section, we demonstrate the superior performance of the newly
introduced distance measures by applying clustering on a standard data set
from the machine learning literature. More precisely, we show that the
distance measures $AWD$ and $DWD$ that quantify the dissimilarity between
persistence diagrams ${\mathcal{D}}_{x}$ and ${\mathcal{D}}_{y}$ outperform
the conventional Wasserstein distance ($WD$). Furthermore, we show that the
proposed distance measure on landscapes $ALD$ and $DLD$ outperform the
traditional distance between landscapes ($LD$), defined as
$||\lambda_{x}-\lambda_{y}||_{p}$ where $\lambda_{x}$ and $\lambda_{y}$ are
landscapes corresponding to the PD ${\mathcal{D}}_{x}$ and
${\mathcal{D}}_{y}$. For comparison purposes, we also compare the traditional
distances, denoted by $d_{1}$ and $d_{2}$, defined in terms of Spearman’s rank
correlation $\rho_{1}$ and Pearson’s correlation coefficient $\rho_{2}$, as
follows $d_{i}(x,y)=\sqrt{2(1-\rho_{i}(x,y))}~{}~{}i\in\\{1,2\\}.$ Finally,
for completeness, we also consider the Euclidean distance $ED$. We evaluate
the clustering performance in terms of the accuracy ($ACC$) [26], which ranges
from 0 to 1, with a higher value indicating better clustering results.

We collect the data set from the UCI machine learning repository that contains
600 examples of control charts with 60 instances each, synthetically generated
by the process in [2]. The data consists of six different classes of control
charts: Normal and cyclic, increasing and decreasing trend, upward and
downward shift.

Table 12:  Accuracy of clustering results with different distance metrics.
Each value $v$ is to be read as $v\times 10^{-2}$

| ACC
---|---
Distance metric | K-med | APC with Gaussian kernel
WD | 48.3 | 55
LD | 36.67 | 28.3
AWD | 60 | 56.67
ALD | 35 | 45
DWD | 60 | 61.67
DLD | 31.67 | 33.33
$d_{1}$ | 33.3 | 15
$d_{2}$ | 31.67 | 15
ED | 51.67 | 15

Table 12 presents the clustering results based on two standard algorithms, the
affinity propagation clustering (APC) with $K$ clusters and the $K$-medoids
with the distance measures mentioned above.202020We use Gaussian exponential
kernel as similarity measure defined using these distance measures as an input
for APC. We fix embedding dimension $d=2$, and we take $\tau=1$ with $p=1$ for
calculating the TDA-based distances. Moreover, we focus on the 1-dimensional
features, i.e., loops. Further, the hyper-parameter $\sigma^{2}$ in the
kernels is taken to be .01. We set $K$ equal to six for illustration purposes.
We observe that the TDA-based distance measures AWD and DWD outperform the
other distance measures, particularly the existing Wasserstein distance. We
also compare the accuracy values reported for the same data set in two recent
papers [11] and [26]. The authors proposed a new clustering algorithm and a
more accurate distance metric in both papers and compared the performance with
different clustering methods. The accuracy values obtained using TDA-based
distance measures DWD with affinity propagation clustering and AWD and DWD
with K-medoids clustering are higher than the accuracy values reported in [11]
which is .58 and in [26] which is .5886.

###  6.2 Analyzing the assets selected for index tracking

It is essential to understand the characteristics of assets that are selected
based on the similarity matrices $K_{1}-K_{7}$ for the index tracking problem.
Specifically, we focus our study on the standard deviation, VaR, and CVaR of
the difference return series, that is, the asset return series minus the index
return series. Additionally, we analyze downside deviation from the index, and
the correlation with the index.212121VaR of the differenced series is the VaR
relative to the index, which is the largest value by which the portfolio
return can miss the index target in $1-\alpha$ fraction of cases. Similarly,
CVaR relative to an index shows the mean deviation relative to the benchmark
in the worst $\alpha$ cases. Our analysis focuses on the top 60 stocks,
identified as the most similar to the index, in each of the 119 windows for
all seven similarity matrices. The heat maps in Figures (6(a)-6(e)) illustrate
the average values of these measures across all windows, providing insights
into the properties of the shortlisted stocks.

There are several observations. First, the assets selected using the
similarity matrices $K_{6}$ and $K_{5}$ have a higher correlation than TDA-
based similarity matrices, with $K_{6}$ achieving the highest correlation,
which is not surprising given that the distance measure in this case is based
on Pearson’s correlation. On the other hand, among TDA-based similarity
matrices, $K_{2}$ and $K_{4}$ filter assets have a higher correlation with the
index than $K_{1}$, $K_{3}$. Second, in terms of standard deviation and
downside deviation from the index, the similarity matrices $K_{2}$ and $K_{7}$
have the lowest values among all kernels. Third, the assets filtered using the
similarity matrices $K_{2}$ and $K_{7}$ have the lowest values of the VaR and
CVaR of the difference series (assets returns and index returns). Other
kernels show varying behavior in different windows, but on average, assets
picked using $K_{3}$, $K_{5}$, and $K_{6}$ have a higher tail deviation from
the index. In conclusion, the assets selected using $K_{2}$ are most suitable
for the index tracking problem, as further confirmed in Section 5. The
robustness of the kernel $K_{2}$ is established from Figures 7(a)-7(e), which
shows similar plots but for a randomly chosen window during the COVID-19
period.

(a) Correlation with index

(b) Standard deviation of difference series

(c) Downside deviation of difference series

(d) VaR of difference series

(e) CVaR of difference series

Figure 6: Average values of five measures (correlation, standard deviation,
downside deviation, VaR, CVaR) across all windows for the top 60 stocks (rows)
and for the similarity matrices $K_{1}-K_{7}$ (columns)

(a) Correlation with index

(b) Standard deviation of difference series

(c) Downside deviation of difference series

(d) VaR of difference series

(e) CVaR of difference series

Figure 7: Values of five measures (correlation, standard deviation, downside
deviation, VaR, CVaR) for a randomly selected window during the COVID-19
period. The values are plotted for the top 60 stocks (rows) and for the
similarity matrices $K_{1}-K_{7}$ (columns)