2) Implementation of genetic operators: Since we need
to select 10 stocks from an index having 25 stocks, each
chromosome can be represented by a binary string consisting
of 25 bits, 10 of which are equal to ‘1’. The fitness function
evaluates the strength of each chromosome. A more fit
individual has a higher probability of reproduction over a
less fit one. In our research, the fitness function equals the
calculated tracking error of each chromosome. The lower
the better, because our objective is to minimize the tracking
error defined by equation (1). In order to calculate the
fitness of each chromosome, we do need to determine the
optimal weight vector t of each chromosome by, first, solving
minimization problem (2) and, second, based on the vector
x found, calculating t. At this stage, the genetic algorithm
is hybridized with the quadratic programming routine. The
routine solves the problem for each chromosome and delivers
the corresponding tracking error to the fitness function of the
genetic algorithm. This approach combines the search procedure
of the genetic algorithm in the solution space with the
local convergence properties of the quadratic programming
solver.
In this paper we use deterministic tournament selection as
selection operator. Tournament selection runs a tournament
among a few individuals and selects the winner (the one with
the best fitness). Tournament selection has several benefits:
it is efficient to code, works on parallel architectures, and
allows the selection pressure to be easily adjusted [27].
Associated with the selection step is the ‘elitism’ strategy.
Elitism is a method that guarantees that a number of best
solutions are placed directly into the next generation. In the
approach presented in this paper, elitism is used, because that
way, the search for a good solution never goes backwards.
Crossover operators (which take two parent chromosomes
and combine them to produce a child) need to be carefully
designed in order to guarantee that the number of ones and
zero’s (i.e., the number of stocks) in the children chromosomes
does not change. To deal with this constraint, we tried
two different crossover operators. First, a two-point ‘order based’
crossover [28] has been used. The idea behind the
order-based crossover is to swap the genes in the order found
at the other parent, going from left to right. The number
of ones and zeros will automatically remain the same.
In this way, the sub strings of the chromosomes on the left and
righth and site are preserved while the bit sub string in the
middle part changes: for an example, we refer to Table 1.
Unfortunately for this problem, order-based crossover yields
a rather random change of bits in the middle part, i.e., it
intrinsically involves a quite high mutation rate in the middle
part of the chromosomes.
Therefore, we also tried another two-point crossover operator.
This operator works as follows. If, after having
generated two children using standard two-point crossover,
the child chromosomes happen to contain the same number
of zeros and ones as the parents, the crossover operation
is finished. If the number of ones (respectively zeros) in a
child chromosome is larger than that of the parents, then
bits with value one (respectively zero) are randomly selected
and changed into a zero (respectively one) until the number
of zeros and ones equals that of the parents. In this way
it is tried (i) to minimize the occurrence of randomness
(mutation) by the crossover operator and (ii) to spread these
(additional) mutations more uniformly. We term this second
crossover operator the two-point ‘bit equalizer’ crossover
operator.
Mutation is necessary to prevent areas of the search space
being discarded. The standard mutation operator chooses a
single bit at random and swaps its value. Again, we did not
allow changing the number of ones and zero’s. Therefore, we
applied ‘mutation inversion’: rather than selecting a single
bit to mutate, inversion mutation finds just two random
characters in the string and reverses them. We further note
that the mutation effect of this inverse mutation operator
is uniformly spread over the chromosome and, in addition,
generally lower that the mutation effect caused by the order based
crossover operator mentioned above since the latter
often causes mutations of several bits.