Portfolio optimization with “ Threshold Accepting ” : a practical guide 211
Algorithm 2 Threshold Accepting.
1: initialize n (^) Steps and n (^) Rounds
2: compute threshold sequence τ
3: randomly generate current solution xc∈X
4: for r 1 : n (^) Rounds do
5: for i 1 : n (^) Steps do
6: generate xx
nc∈N() and compute Δ Φ ( x n ) Φ ( x c )
7: if Δ τ (^) r then x c x n
8: end for
9: end for
10: x sol x c
Compared with local search, the changes are actually small. We add an outer
loop that controls the thresholds τ. In Statement 7, the acceptance criterion is
changed from “ Δ 0 ” (i.e., improvement) to “ Δ τ (^) r ” (i.e., change not worse
than τ (^) r ). For an actual implementation, we need to discuss the objective function
Φ , the neighborhood function N , the thresholds τ , and the stopping criterion in
more detail.
9.3.2 Implementation
The objective function
Conceptually , the objective function Φ is given by the problem at hand. In our
case, Φ will be a ratio of a risk and a reward function, for instance the ratio of
downside semivariance to upside semivariance (i.e., PP 22 / ), to be minimized.
In the standard mean – variance model, we estimate the properties of sin-
gle assets (means, variances, and correlations), and then aggregate them on a
portfolio level. Thus, we capture the relevant information about the distribu-
tion of assets independently from the specific portfolio chosen. This approach
does often not generalize to other specifications of risk and reward, or only in
ways that are computationally very costly (see for instance Jondeau, Poon, and
Rockinger (2007, chapter 9 ) for how to set up skewness or kurtosis matrices).
Fortunately, our optimization procedure does not require such an aggregation,
and we will instead always work with a return sample rrrr[] 12 ...nS for a
specific portfolio. We will not assume a parametric distribution for the returns
and rather work with the CDF of this sample. Thus, we will conduct a scenario
optimization. The simplest case is to regard every historical return observation
as one scenario. We often found, however, that modeling the data (i.e., creating