alg_Anticor: Anticor Algorithm

Description Usage Arguments Details Value Note References Examples

Description

computes the Anticor algorithm by Borodin et al. 2004

Usage

1
alg_Anticor(returns, w)

Arguments

returns

Matrix of price relatives, i.e. the ratio of the closing (opening) price today and the day before (use function get_price_relatives to calculate from asset prices).

w

window size (w ≥ 2)

Details

The idea of Anticor is to exploit the mean-reversion property of asset prices. Based on two consecutive market windows of size w wealth is transferred from asset i to asset j if the growth rate of asset i is greater than the growth rate of asset j in the most recent window. Additionally, the correlation between asset i in the second last window and asset j in the last window must to be positive. The amount of wealth transferred from asset i to j depends on the strength of correlation between the assets and the strength of "self-anti-correlations" between each asset i.

Value

Object of class OLP containing

Alg

Name of the Algorithm

Names

vector of asset names in the portfolio

Weights

calculated portfolio weights as a vector

Wealth

wealth achieved by the portfolio as a vector

mu

exponential growth rate

APY

annual percantage yield (252 trading days)

sigma

standard deviation of exponential growth rate

ASTDV

annualized standard deviation (252 trading days)

MDD

maximum draw down (downside risk)

SR

Sharpe ratio

CR

Calmar ratio

see also print.OLP, plot.OLP

Note

The print method for OLP objects prints only a short summary.

References

Borodin, A.; El-Yaniv, R. & Gogan, V. Can we learn to beat the best stock, Journal of Artificial Intelligence Research, 2004 http://arxiv.org/abs/1107.0036

Examples

1
2
3
4
5
6
7
8
# load data
data(NYSE)
# select stocks
x = cbind(iroqu=NYSE$iroqu, kinar=NYSE$kinar)

# compute Anticor algorithm
Anticor = alg_Anticor(x, 30)
plot(Anticor)

ngloe/olpsR documentation built on May 23, 2019, 4:42 p.m.