
STRATEGIES 163
cross-correlation and autocorrelation. Anticor adopts logarithmic price relatives in
two specific market windows, that is, y
1
= log(x
t−w
t−2w+1
) and y
2
= log(x
t
t−w+1
).It
then calculates the cross-correlation matrix between y
1
and y
2
:
M
cov
(i, j ) =
1
w −1
(y
1,i
−¯y
1
)
(y
2,j
−¯y
2
),
M
cor
(
i, j
)
=
M
cov
(i,j)
σ
1
(i)∗σ
2
(j)
σ
1
(i), σ
2
(j) = 0
0 otherwise
.
Then, following the cross-correlation matrix,Anticor moves the proportions from the
stocks increasedmoreto the stocks increased less,inwhichthe corresponding amounts
are adjusted according to the cross-correlation matrix. In particular, if asset i increases
more than asset j and their sequences in the window are positively correlated,Anticor
claims a transfer from asset i to j with the amount equaling the crosscorrelation
value (M
cor
(i, j )) minus their negative autocorrelation values (min{0,M
cor
(i, i)}
and min{0,M
cor
(j, j )}). These transfer claims are finally normalized to keep the
portfolio in the simplex domain.
Usage We implemented two Anticor algorithms, BAH
W
(Anticor) and BAH
W
(Anticor(Anticor)). Their usages are listed below.
anticor(fid, data, {W, λ}, opts);
anticor_anticor(fid, data, {W, λ}, opts);
• fid: file handle for writing log file;
• data: market sequence matrix;
• W: maximal window size;
• λ: transaction cost rates; and
• opts: options for behavioral control.
Example Call both Anticor algorithms on the “NYSE (O)” dataset with a maximal
window size of 30 and a transaction cost rate of 0.
1: >> manager(’anticor’, ’nyse-o’, {30, 0}, opts);
2: >> manager(’anticor_anticor’, ’nyse-o’, {30, 0}, opts);
A.3.3.2 Passive–Aggressive Mean Reversion
Description Rather than tracking the best stock, “passive–aggressive mean rever-
sion” (PAMR) (Li et al. 2012) explicitly tracks the worst stocks, while adopting
T&F Cat #K23731 — K23731_A001 — page 163 — 9/28/2015 — 20:46