alg_PAMR: Passive Aggressive Mean Reversion Algorithm (PAMR)

Description Usage Arguments Details Value Note References Examples

Description

computes the Passive Aggressive Mean Reversion algorithm by Li et al. 2012

Usage

1
alg_PAMR(returns, epsilon = 0.5)

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).

epsilon

sensitivity parameter

Details

The idea of PAMR is to exploit the mean-reversion property of asset prices. Based on a loss function PAMR passively maintains the last portfolio if the loss is zero and otherwise aggressively aproaches a new portfolio that can force the loss to be zero.

As the algorithm can lead to negative portfolio weights which are not permitted by the definition of on-line portfolio selection a simplex projection step is needed. The simplex projection is implemented according to Duchi et al. 2008 (see also projsplx).

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

Li, B.; Zhao, P.; Hoi, S. C. H. & Gopalkrishnan, V. PAMR: Passive aggressive mean reversion strategy for portfolio selection, Machine Learning, 2012

Duchi, J.; Shalev-Shwartz, S.; Singer, Y. & Chandra, T. Efficient projections onto the l 1-ball for learning in high dimensions, Proceedings of the 25th international conference on Machine learning, 2008

Examples

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

# compute PAMR algorithm
PAMR = alg_PAMR(x, epsilon=0.5)
plot(PAMR)

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