# Multi-Guide Set-Based Particle Swarm Optimization for Multi-Objective Portfolio Optimization
## 3 Optimization Algorithms for Portfolio Optimization
### Particle Swarm Optimization  
PSO, which was first proposed in 1995 by [PERSON] and [PERSON], is a single-objective optimization algorithm [23]. The algorithm iteratively updates its collection of particles (referred to as a swarm) to find solutions to the optimization problem under consideration. The position of a particle, which is randomly initialized, is a candidate solution to the problem. In the case of portfolio optimization, the position of a particle represents the weights used in the calculation of Equation (3). Each particle also has a velocity (initially a vector of zeros) that guides the particle to more promising areas of the search space. The position of a particle is updated with their velocity at each time step \(t\) to produce a new candidate solution. The velocity of a particle is influenced by the previous velocity of the particle and social and cognitive guides. The cognitive guide is a particle's personal best-known solution that has been found thus far, and the social guide is the best-known solution found thus far within a neighborhood (network) of particles. A global network means that the social guide is the best-known solution found by the entire swarm thus far, which is what is used in this paper. This paper also uses an inertia-weighted velocity update to regulate the trade-off between exploitation and exploration [24]. The velocity update is defined as  
\[\mathbf{v}_{i}(t+1)=w\mathbf{v}_{i}(t)+c_{1}\mathbf{r}_{1,i}(t)(\mathbf{y}_{i}(t)-\mathbf{x}_{i}(t) )c_{2}\mathbf{r}_{2,i}(t)(\mathbf{\hat{y}}_{i}(t)-\mathbf{x}_{i}(t)) \tag{8}\]  
where \(\mathbf{v}_{i}\) is the velocity of particle \(i\); \(w\) is the inertia weight; \(c_{1}\) and \(c_{2}\) are acceleration coefficients that control the influence of the cognitive and social guides, respectively; \(\mathbf{r}_{1}\) and \(\mathbf{r}_{2}\) are vectors of random values sampled from a standard uniform distribution in the range [0, 1]; \(\mathbf{y}_{i}\) is the cognitive guide of particle \(i\); \(\mathbf{\hat{y}}_{i}\) is the social guide of particle \(i\). A particle's position is updated using  
\[\mathbf{x}_{i}(t+1)=\mathbf{x}_{i}(t)+\mathbf{v}_{i}(t+1). \tag{9}\]  
Algorithm 1 contains pseudo-code for PSO.  
```
\(t=0\);  Let \(f\) be the objective function;  Create and initialize a swarm, \(S\), of \(n\) particles uniformly within a predefined hypercube of dimension \(d\); for each particle \(i=1,\cdots,n\)do  Let \(\mathbf{y}_{i}\) represent the personal best position of particle \(\mathbf{x}_{i}\), initialized to \(\mathbf{x}_{i}(t)\);  Let \(\mathbf{\hat{y}}_{i}\) represent the neighborhood best position of particle \(\mathbf{x}_{i}\), initialized to the best \(\mathbf{x}_{i}\) in \(i\)'s neighborhood;  Initialize \(\mathbf{v}_{i}(t)\) to \(\mathbf{0}\); whilestopping condition is not truedo for each particle \(i=1,\cdots,n\)do if\(f(\mathbf{x}_{i}(t))<f(\mathbf{y}_{i}(t))\)then \(\mathbf{y}_{i}(t+1)=\mathbf{x}_{i}(t)\); for particles \(i\) with particle \(i\) in their neighborhooddo if\(f(\mathbf{x}_{i}(t))<f(\mathbf{\hat{y}}_{i}(t))\)then \(\mathbf{\hat{y}}_{i}(t+1)=\mathbf{x}_{i}(t)\); for each particle \(i=1,\cdots,n\)do  Update particle \(i\)'s velocity using Equation (8);  Update particle \(i\)'s position using Equation (9); \(t=t+1\);
```  
**Algorithm 1**Particle Swarm Optimization