*Article* **Bio-inspired Machine Learning for Distributed Confidential Multi-Portfolio Selection Problem**

**Ameer Tamoor Khan 1,†, Xinwei Cao 2,\* ,†, Bolin Liao 3,† and Adam Francis 4,†**


**Abstract:** The recently emerging multi-portfolio selection problem lacks a proper framework to ensure that client privacy and database secrecy remain intact. Since privacy is of major concern these days, in this paper, we propose a variant of Beetle Antennae Search (BAS) known as Distributed Beetle Antennae Search (DBAS) to optimize multi-portfolio selection problems without violating the privacy of individual portfolios. DBAS is a swarm-based optimization algorithm that solely shares the gradients of portfolios among the swarm without sharing private data or portfolio stock information. DBAS is a hybrid framework, and it inherits the swarm-like nature of the Particle Swarm Optimization (PSO) algorithm with the BAS updating criteria. It ensures a robust and fast optimization of the multi-portfolio selection problem whilst keeping the privacy and secrecy of each portfolio intact. Since multi-portfolio selection problems are a recent direction for the field, no work has been done concerning the privacy of the database nor the privacy of stock information of individual portfolios. To test the robustness of DBAS, simulations were conducted consisting of *f our* categories of multi-portfolio problems, where in each category, *three* portfolios were selected. To achieve this, 200 days worth of real-world stock data were utilized from 25 NASDAQ stock companies. The simulation results prove that DBAS not only ensures portfolio privacy but is also efficient and robust in selecting optimal portfolios.

**Keywords:** multi-portfolio; optimization; swarm algorithm; beetle antennae search; stochastic algorithm; distributed beetle antennae search; investment; stocks

#### **1. Introduction**

Portfolio optimization is a hot research topic in academia, since it enables investors to make an optimal decision between profit and risk. This refers to the method of making the best investment in numerous stocks [1]. Apart from this, there are several other real-world constraints that researchers have taken care of over time, for instance, cardinality constraint, tax-aware constraint, lower and upper bounds, multiple portfolios, round-lot constraint, stock size, computational and time complexities.

There are several state-of-the-art algorithms that have been proposed over time to tackle these constraints. For instance, an unconstrained portfolio optimization problem can be easily solved using linear or quadratic programming, but constraints make it a complex optimization problem to solve. Ref. [2] showed that the simple addition of a cardinality constraint makes it an NP-complete problem. Therefore, there is no straightforward algorithm to compute the exact optimality of the problem. Techniques that use machine learning algorithms, heuristic algorithms, and black-box optimization are good alternatives to solve such highly complex, computationally and time-consuming problems. Ref. [3] proposed using multiple machine learning modules, i.e., coordinate descent, the proximal gradient, Dykstra, and alternating direction of multipliers. Their algorithm also accounts for

**Citation:** Khan, A.T.; Cao, X.; Liao, B.; Francis, A. Bio-inspired Machine Learning for Distributed Confidential Multi-Portfolio Selection Problem. *Biomimetics* **2022**, *7*, 124. https://doi.org/10.3390/ biomimetics7030124

Academic Editors: Stanislav N. Gorb, Giuseppe Carbone, Thomas Speck and Andreas Taubert

Received: 31 July 2022 Accepted: 19 August 2022 Published: 29 August 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

several constrained portfolios, i.e., equal risk contribution, diversified, and risk budgeting portfolios. Likewise, Ref. [4] combined several portfolio models, i.e., equal-weighted modeling (EQ), mean-variance model, and Monte Carlo simulation modeling. Furthermore, to improve the portfolio problem based on its time-series nature, they applied a long short-term memory (LSTM) model. However, the major drawback of these methods is the training of hundreds of hyper-parameters, which makes them computationally expensive and slow to compute.

In this paper, we are focused on the multi-portfolio selection problem while considering the investors' privacy. Since the multi-portfolio problem has only recently gained attention from academia and financial practitioners, no work has been conducted regarding the confidentiality and the secrecy of private databases and individual portfolios. The multi-portfolio selection problem enables the optimization of tens of hundreds of portfolios simultaneously, making it computationally economical and time efficient. There are several proposed methods for multi-portfolio optimization in the literature [5–17]. The authors of [18,19] were the pioneers of the multi-portfolio optimization domain. The objective was to maximize social welfare, which was the sum of the utility of the individual accounts. For instance, ref. [20] proposed a hybrid model that includes a heuristic and combinatorial framework and solved the multi-portfolio problem under a risk–budget constraint. Ref. [21] proposed a Cournot–Nash equilibrium framework to solve the multi-portfolio problem. The major drawback being that each portfolio was treated individually, assuming that the others gave the best response. Ref. [22] overcame this issue by proposing a joint optimization problem, where the model was able to optimize the portfolio as well as cost splitting among the portfolios. Ref. [23] employed an information pooling game mechanism for the multi-portfolio optimization. Ref. [24] added a risk measurement constraint along with the selection of multi-portfolios. Ref. [25] proposed fairness-aware multi-participant satisfying (FMS) criterion to model a target-oriented strategy which optimized client portfolios by maximizing the returns. The major drawback of these techniques is the lack of privacy for the investors. They also solve the multi-portfolio problem, collectively making asset data exposed, meaning data are not secure or confidential. In order to provide privacy to each investor, i.e., portfolios regarding their investment and portfolio selection, it is necessary to design a distributed framework that optimizes each portfolio locally and optimizes all portfolios collectively. The three types of optimizing models are shown in Figure 1. It shows that in local learning, all portfolios are optimized individually, which is computationally and time-wise inefficient. Likewise, typical swarm learning models do not account for the confidentiality of the data and portfolio, and the particles share critical information about the portfolios to reach the optimal solution. However, in the distributed system, each particle deals with a single portfolio locally, and the particles share the objective function value, i.e., gradients alone to each other. Thus, they efficiently optimize the multi-portfolio selection problem without violating privacy.

**Figure 1.** (**a**) shows the local learning where each BAS algorithm is assigned to one portfolio, and the objective is to optimize the respective portfolio. (**b**) shows the swarm architecture, where the swarm has access to a public database, where particles coordinate to obtain an optimal solution without considering the privacy of the database. (**c**) shows the distributed architecture, where particles only share the parameters, i.e., gradients, instead of the private information of the portfolios, i.e., private database, stock information, and client information.

In this paper, we propose a swarm variant of a known meta-heuristic algorithm known as Beetle Antennae Search (BAS). It mimics the food-collecting nature of the beetle in order to search for the optimal solution to a problem. BAS is a single particle searching algorithm, where the particle optimizes an objective function by searching the search space iteratively. The utility of BAS has expanded to several real-world problems [26–49], including the portfolio optimization. Ref. [50] employed BAS for the selection of the optimal portfolio under a non-convex cardinality constraint. Ref. [51] proposed a QBAS (Quantum Beetle Antennae Search) variant of BAS and solved the portfolio selection problem under cardinality constraint. Ref. [52] solved the time-varying portfolio selection problem under the transaction cost. Ref. [53] used the mean-variance model of portfolio optimization under two constraints: cardinality and transaction cost constraints. Ref. [54] proposed a hybrid framework of BAS-PSO and used it for portfolio optimization. From these research works, we can see the utility of BAS in portfolio optimization under real-world constraints. However, BAS has never been employed for the multi-portfolio optimization problem because of computational limitations. As mentioned earlier, BAS is a single particle searching algorithm, meaning it would be computationally challenging for BAS to optimize even a single portfolio with over 100 stock companies. Therefore, the efficiency of BAS will drop further if applied to the multi-portfolio selection problem.

We have proposed a swarm or distributed variant of BAS known as DBAS (Distributed Beetle Antennae Search). It is a hybrid variant with the swarm-like nature of Particle Swarm Optimization (PSO) and the BAS updating criteria. Each particle in DBAS will optimize a single portfolio, and collectively, the swarm will optimize all the portfolios without violating portfolio privacy. The DBAS will optimize the multi-portfolio in two stages by optimizing each portfolio locally and then optimizing all the portfolios globally without sharing any private data among portfolios. To the best of our knowledge, no researcher has considered the privacy issue while solving the multi-portfolio problem, since it is a newly emerging portfolio selection challenge. Through our proposed framework, we will optimize the multi-portfolio problem efficiently with low computation and time cost whilst ensuring the privacy of clients and their portfolios.

The rest of the paper is structured as follows: In Section 2, we will formulate the portfolio optimization problem. In Section 3, we will elaborate on the nature of BAS and will drive the DBAS variant. In Section 4, we will discuss the simulation results on a multi-portfolio selection problem with real-world stock data. In Section 5, we will conclude the paper with final remarks.

#### **2. Problem Formulation**

In this section, we will discuss the building blocks of the portfolio optimization problem. Later, we will elaborate on different portfolio models and select one for the DBAS algorithm. All the hyper-parameters are mentioned in Table 1.


