STRATEGIES 161
Moreover, we adopt an implementation (Kalai and Vempala 2002), which is based on
nonuniform random walks that are rapidly mixing and which requires a polynomial
time.
Usage
up(fid, data, {λ}, opts);
• fid: file handle for writing log file;
• data: market sequence matrix;
• λ ∈[0, 1): transaction costs rate; and
• opts: options for behavioral control.
Example Call Cover’s Universal Portfolios on the “NYSE (O)” dataset with default
parameters and a transaction cost rate of 0.
1: >> manager(’up’, ’nyse-o’, {0}, opts);
A.3.2.2 Exponential Gradient
Description “Exponential gradient” (EG) (Helmbold et al. 1996) tracks the best
stock and adopts a regularization term to constrain the deviation from the previous
portfolio, that is, EG’s formulation is
b
t+1
= arg max
b∈
m
η log b ·x
t
−R(b, b
t
),
where η refers to the learning rate and R(b, b
t
) denotes relative entropy, or R(b, b
t
) =
m
i=1
b
i
log
b
i
b
t,i
. Solving the optimization, we can obtain EG’s portfolio explicit
update:
b
t+1,i
= b
t,i
exp
η
x
t,i
b
t
·x
t
/Z, i = 1,...,m,
where Z denotes the normalization term such that the portfolio element sums to 1.
Usage
eg(fid, data, {η, λ}, opts);
• fid: file handle for writing log file;
• data: market sequence matrix;
• η: learning rate;
• λ: transaction costs rate; and
• opts: options for behavioral control.
Example Call EG on the “NYSE (O)” dataset with a learning rate of 0.05 and a
transaction cost rate of 0.
1: >> manager(’eg’, ’nyse-o’, {0.05, 0}, opts);
T&F Cat #K23731 — K23731_A001 — page 161 — 9/28/2015 — 20:46