alg_BCRP: Best Constant Rebalanced Portfolio Algorithm (BCRP)

Description Usage Arguments Details Value Note References Examples

Description

computes the best constant rebalanced portfolio, i.e., the constant rebalanced portfolio achieving the highest wealth in hindsight.

Usage

1
alg_BCRP(returns, method = "rand", ...)

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

method

The method used to calculate BCRP. "rand" generates random CRPs to find BCRP. By default the number of random portfolios is "samplings=1000". "approx" limits the set of CRPs to the portfolios of the form b=(b_1, 1-b_1), where b_1 runs from 0 to 1 in steps of length "step=0.05".

...

further arguments (samplings, step) dependend on the "method" argument.

Details

For the "approx" method the calculation may require very much memory dependend on the number of assets and the "step" argument. If an error occurs due to memory problems the "rand" method may work.

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

Ishijima 2001, Numerical Methods for Universal Portfolios http://www.business.uts.edu.au/qfrc/conferences/qmf2001/Ishijima_H.pdf

Examples

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

# compute BCRP
BCRP_rnd = alg_BCRP(returns, method="rand", samplings=1000); BCRP_rnd
BCRP_approx = alg_BCRP(returns, method="approx", step=0.05); BCRP_approx
plot(BCRP_rnd, BCRP_approx)

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