next up previous
Next: How stochastic simulation fits Up: Portfolio optimization Previous: RORAC

Swarm Intelligence

Swarm Intelligence (SI) is a property of a system where the collective behaviours of (unsophisticated) agents interacting locally with their environment cause coherent functional global patterns to emerge. SI provides a basis with which it is possible to explore collective (or distributed) problem solving without centralized control or the provision of a global model (cf. Kennedy et al., 2001).

The three underlying principles of SI are: evaluate, compare and imitate. Living organisms can learn by evaluating stimuli and rate them as positive or negative. In our case this is the metric (i.e. risk or performance measure) we want to minimize/maximize. As practiced in the Adaptive Culture Model (cf. Shibanai, Yasuno and Ishiguro, 2001) and in real life, people compare themselves to others and imitate only those neighbours that are superior to themselves. Imitation is central to human sociality and important for the aquisition and maintenance of mental abilities (cf. Kennedy et al., 2001). SI offers a tradeoff between individual and group learning.

We give a brief outline of the algorithm (cf. Kennedy et al. (2001), Kennedy and Eberhart (1995)) and use standard notation. Let $ y_i$ be the position of particle $ i$. In our case the position represents a specific portfolio ( $ y_i \in \mathbb{R}^n$). The change of portfolio is called $ v$. $ v$ traditionally stands for velocity. Each clockstep $ t$ particles move from one stop to another by $ y_i(t)=y_i(t-1)+v_i(t)$ and sample the search space by modifying the velocity term. The direction of movement is a function of the current position ($ y_i$), velocity ($ v_i$), the location of the individual's previous best success ($ p_i$), and the best position found by any member of the neighborhood ($ p_g$):

$\displaystyle y_i(t)=f(y_i(t-1), v_i(t-1), p_i, p_g) .$ (26)

One possible implementation is

$\displaystyle v_i(t)=v_i(t-1)+n_1(p_i-y_i(t-1))+n_2(p_g-y_i(t-1))$ (27)

with

$\displaystyle y_i(t)=y_i(t-1) + v_i(t) .$ (28)

The $ n$ variables are random variables defined by an upper limit, so that the particles cycle around the two best bets: $ p_i$ and $ p_g$. The random numbers ($ n_1$ and $ n_2$) are updated in every iteration. With real-life data the velocity $ v$ very quickly becomes too large and one has to set limits.

Figure 2: Extended and slow but simple Ruby-Pseudocode for portfolio optimization using swarm particles based on Kennedy et al. (2001). This basic algorithm is implemented more efficiently.
\begin{figure}\small\begin{verbatim}ys=generateInitialPortfolios  ...

As the present value of a portfolio has to remain constant, two minor modifications in the choice of $ v$ are required.

In simulation studies on typical portfolios it proves successful to inject about $ 10\%$ of new particles with random speeds and locations from time to time and to remove the $ 10\%$ worst performing particles. The exact population size is an open research problem with experts having different opinions. A rule of thumb is to keep the population size small, but to rely on a high number of iterations. As this can take a long time for higher dimensional problems, parallel solutions are an easy way out of the dilemma, following Kent Thompson's (co-inventor of Unix) famous quote: ''When in doubt, use brute force''.


next up previous
Next: How stochastic simulation fits Up: Portfolio optimization Previous: RORAC
2003-10-24 Approximity