alg_SCRP: Successive Constant Rebalanced Portfolio Algorithm (SCRP)

Description Usage Arguments Details Value Note References Examples

Description

copmutes the SCRP algorithm that directly adopts the Best Constant Rebalanced Portfolio until time t.

Usage

1
alg_SCRP(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

Gaivoronski & Stella 2000, Stochastic Nonstationary Optimization for Finding Universal Portfolios http://mpra.ub.uni-muenchen.de/21913/

Examples

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

# calculate BCRP
SCRP_rnd = alg_SCRP(returns, method="rand", samplings=1000); SCRP_rnd
SCRP_approx = alg_SCRP(returns, method="approx", step=0.05); SCRP_approx
plot(SCRP_rnd, SCRP_approx)
plot(SCRP_approx$Weights, type="l")

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