158 OLPS: A TOOLBOX FOR ONLINE PORTFOLIO SELECTION
A.3 Strategies
This section focuses on describing the implemented strategies in the toolbox. We
describe the four implemented categories of algorithms: benchmarks, follow the
winner, follow the loser, and pattern matching–based approaches.
A.3.1 Benchmarks
In the financial markets, there exist various benchmarks (such as indices, etc.). In this
section, we introduce four benchmarks: Uniform Buy and Hold, Best Stock, Uniform
Constant Rebalanced Portfolios, and Best Constant Rebalanced Portfolios.
A.3.1.1 Uniform Buy and Hold
Description The “buy and hold” (BAH) strategy buys the set of assets at the begin-
ning and holds the allocation of assets till the end of trading periods. BAH with an
initial uniform portfolio is termed “uniform buy and hold” (UBAH), which is often
a market strategy in the related literature. The final cumulative wealth achieved by
a BAH strategy is the initial portfolio weighted average of individual stocks’ final
wealth,
S
n
(BAH(b
1
)) = b
1
·
n
t=1
x
t
,
where b
1
denotes the initial portfolio. In the case of UBAH, b
1
=
1
m
,...,
1
m
.To
see its update clearly, BAH’s explicit portfolio update can also be written as
b
t+1
=
b
t
x
t
b
t
x
t
, (A.1)
where
denotes the operation of element-wise product.
Usage
ubah(fid, data, {λ}, opts);
fid: file handle for writing log file;
data: market sequence matrix;
λ ∈[0, 1): proportional transaction cost rate; and
opts: options for behavioral control.
Example Call market (uniform BAH) strategy on the “NYSE (O)” dataset with a
transaction cost rate of 0.
1: >> manager(’market’, ’nyse-o’, {0}, opts);
T&F Cat #K23731 — K23731_A001 — page 158 — 9/28/2015 — 20:46
STRATEGIES 159
A.3.1.2 Best Stock
Description “Best Stock” (Best) is a special BAH strategy that buys the best
stock in hindsight. The final cumulative wealth achieved by the Best strategy can
be calculated as
S
n
(Best) = max
b
m
b ·
n
t=1
x
t
= S
n
(BAH(b
)),
where the initial portfolio b
can be calculated as
b
= arg max
b
m
b ·
n
t=1
x
t
.
Its portfolio update can also be explicitly written as the same as Equation A.1, except
that the initial portfolio equals b
.
Usage
best(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 Best Stock strategy on the “NYSE (O)” dataset with a transaction
cost rate of 0.
1: >> manager(’best’, ’nyse-o’, {0}, opts);
A.3.1.3 Uniform Constant Rebalanced Portfolios
Description “Constant rebalanced portfolios” (CRP) is a fixed proportion strategy,
which rebalances to a preset portfolio at the beginning of every period. In particular,
the portfolio strategy can be represented as b
n
1
={b, b,...}. The final cumulative
portfolio wealth achieved by a CRP strategy after n periods is defined as
S
n
(CRP(b)) =
n
t=1
b
x
t
.
In particular, UCRP chooses a uniform portfolio as the preset portfolio, that is, b =
1
m
,...,
1
m
.
Usage
ucrp(fid, data, {λ}, opts);
fid: file handle for writing log file;
data: market sequence matrix;
T&F Cat #K23731 — K23731_A001 — page 159 — 9/28/2015 — 20:46
160 OLPS: A TOOLBOX FOR ONLINE PORTFOLIO SELECTION
λ ∈[0, 1): transaction costs rate; and
opts: options for behavioral control.
Example Call UCRP strategy on the “NYSE (O)” dataset with a transaction cost
rate of 0.
1: >> manager(’ucrp’, ’nyse-o’, {0}, opts);
A.3.1.4 Best Constant Rebalanced Portfolios
Description “Best constant rebalanced portfolio” (BCRP) is a special CRP strategy
that sets the portfolio as the portfolio that maximizes the terminal wealth in hindsight.
BCRP achieves a final cumulative portfolio wealth as follows:
S
n
(BCRP) = max
b
m
S
n
(CRP(b)) = S
n
(CRP(b
)),
and its portfolio is calculated in hindsight as
b
= arg max
b
n
m
log S
n
(CRP(b)) = arg max
b
m
n
t=1
log(b
x
t
).
Usage
bcrp(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 BCRP strategy on the “NYSE (O)” dataset with a transaction cost
rate of 0.
1: >> manager(’bcrp’, ’nyse-o’, {0}, opts);
A.3.2 Follow the Winner
The Follow the Winner approach is characterized by transferring portfolio weights
from the underperforming assets (experts) to the outperforming ones.
A.3.2.1 Universal Portfolios
Description Covers (1991) “Universal Portfolios” (UP) uniformly buys and holds
the whole set of CRP experts within the simplex domain. Its cumulative wealth is
calculated as
S
n
(UP) =
m
S
n
(b)dμ(b).
T&F Cat #K23731 — K23731_A001 — page 160 — 9/28/2015 — 20:46
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 Covers 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
162 OLPS: A TOOLBOX FOR ONLINE PORTFOLIO SELECTION
A.3.2.3 Online Newton Step
Description “Online Newton Step”(ONS)(Agarwal et al. 2006) tracks the best CRP
to date and adopts a L2-norm regularization to constrain the portfolio’s variability.
In particular, its formulation is
b
t+1
= arg max
b
m
t
τ=1
log(b ·x
τ
)
β
2
b.
Solving the optimization, we can obtain the explicit portfolio update of ONS:
b
1
=
1
m
,...,
1
m
, b
t+1
=
A
t
m
(δA
1
t
p
t
),
with
A
t
=
t
τ=1
x
τ
x
τ
(b
τ
·x
τ
)
2
+I
m
, p
t
=
1 +
1
β
t
τ=1
x
τ
b
τ
·x
τ
,
where β is the trade-off parameter, δ is a scaling term, and
A
t
m
(·) is an exact pro-
jection to the simplex domain.
Usage
ons(fid, data, {η, β, δ, λ}, opts)
fid: file handle for writing log file;
data: market sequence matrix;
η: mixture parameter;
β: trade-off parameter;
δ: heuristic tuning parameter;
λ: transaction costs rate; and
opts: options for behavioral control.
Example Call the ONS on the “NYSE (O)” dataset with a transaction cost rate of 0.
1: >> manager(’ons’, ’nyse-o’, {0, 1, 1/8, 0}, opts);
A.3.3 Follow the Loser
The Follow the Loser approaches assume that the underperforming assets will revert
and outperform others in the subsequent periods. Thus, their common behavior is to
move portfolio weights from the outperforming assets to the underperforming assets.
A.3.3.1 Anticorrelation
Description “Anticorrelation” (Anticor) (Borodin et al. 2004) transfers the
wealth from the outperforming stocks to the underperforming stocks via their
T&F Cat #K23731 — K23731_A001 — page 162 — 9/28/2015 — 20:46
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.40.207