212 Optimizing Optimization
“ artifical ” scenarios) improved the performance of portfolios in the out-of-
sample period ( Gilli & Schumann, 2009a ; Gilli, Schumann, di Tollo, & Cabej,
2008 ). Since we discuss the optimization here, we will assume that we have
a scenario set, be it historical data, expert forecasts, or observations obtained
from some resampling procedure.
For each of our nA assets, we assume nS return scenarios, all collected in
a matrix R of size nnS A. One row of this matrix thus stores the returns
for one state of nature. We can equivalently work with price scenarios,
computed as:
PR ()^1 diag()p^0
where 1 is a matrix of ones of size nnSA and “ diag ” is an operator that
transforms a vector into a diagonal matrix. Note that the columns of P here are
not time series. Every row of P holds the prices for one possible future scenario
that might occur, given initial prices of p 0. In fact, for many objective functions
(like partial moments), it is not relevant whether the scenarios are sorted in
time, since such criteria only capture the cross section of returns. The portfolio
values in these scenarios can be obtained by v Px. Equivalently, we can com-
pute returns r Rw.
For selection criteria that need a path of portfolio wealth (like drawdowns),
we need to work with time series. Resampling is still possible: We may, for
instance, estimate a model that captures serial dependencies (like a GARCH
model) and then resample from its residuals, or use a block bootstrap method.
For simplicity, assume we work with historical data, and arrange the prices
in a matrix P hist of size ()Tn (^1) A , where each column holds the histori-
cal prices of one asset. The portfolio values over time are then computed by
v P hist x.
Let us stress the difference between Px and P hist x here: Px gives a sample of
portfolio values over the cross section of scenarios, while P hist x gives one path
of the portfolio value from time 0 to time T. For both scenarios and paths,
given a vector v , any objective function constructed from the building blocks in
Section 9.2 can easily be computed.
Like many other heuristics, TA is computationally intensive, with the main
part of running time spent on evaluating the objective function. It therefore
often pays (in terms of reduced computing time) to analyze and profile the
objective function extensively. In some cases, the objective function can be
updated, so that certain results from prior iterations can be reused. Let us give
a concrete example. Assume we work with the matrix P of price scenarios (the
same holds for P hist ). In practice, this matrix is often fairly large, storing thou-
sands of scenarios for hundreds or thousands of assets. The algorithm started
with an initial random portfolio x c and now has to evaluate x n. This means
that the product Px c has already been computed. As will be discussed below, a