218 Optimizing Optimization
9.5 Diagnostics
In this section, we will discuss several potential problems that may occur when
implementing portfolio selection models and some “ rules of thumb ” that we
found helpful in spotting trouble.
It is difficult to clearly characterize where TA works well and where it does
not. Generally, TA is a local search method, so when it comes to the explora-
tion of very large search spaces, there may be more appropriate methods (e.g.,
Genetic Algorithms). The algorithm may also run into trouble if the objective
function is very noisy, or very “ flat ” overall.
9.5.1 Benchmarking the algorithm
When implementing the algorithm afresh, it is good practice to work with a
well-known problem, one which can also be solved with another method — the
obvious candidate is to conduct a mean – variance optimization with a quad-
ratic programming solver and compare the results with those obtained from
TA. This does not only help to spot errors in the implementation, but also gives
an intuition of how closely TA approximates the exact solution.
If , for a convex problem like mean – variance, the solutions from TA differ
widely across different optimization runs (restarts), this indicates insufficient
computational resources, i.e., too few iterations.
9.5.2 Arbitrage opportunities
A serious problem in scenario optimization is the existence of arbitrage oppor-
tunities in the scenario set. This is a problem for any optimization algorithm,
not just for TA. There exist formal tests to detect arbitrage (see for instance
Ingersoll (1987, chapter 2 )), but they rarely help to remove them. Furthermore,
these tests will not find spurious “ good deals ” in the data (i.e., situations
“ close ” to arbitrage). The resulting overfit is particularly pronounced if short
positions are allowed, because then the algorithm will finance seemingly advan-
tageous positions by short-selling less-attractive assets. This becomes clearest if
we consider portfolios that also include options. If some underlyer never drops
more than 10%, say, in our scenarios, it will always appear a good idea to
write a put on this stock at 90% of spot. In fact, an unconstrained algorithm
will sell as many puts as possible. Nonetheless, such problems are not limited
to long – short portfolios; long-only portfolios also overfit in such cases, even
though the effect is less pronounced ( Gilli et al., 2008 ).
A practical solution for the equity-only case is to increase the number of
observations in relation to the number of assets. When working with historical
data, we may either use a longer historical time horizon or reduce the number
of selectable assets. If we work with “ artifical ” scenarios, e.g., obtained from
resampling, we can simply increase the number of replications.
Including restrictions like maximum holding sizes is practically always advis-
able, even though it just reflects the sad fact that we cannot model asset prices