alg_CRP: Constant Rebalanced Portfolio Algorithm (CRP)

Description Usage Arguments Value Note Examples

Description

computes the constant rebalanced portfolio algorithm (CRP)

Usage

1
alg_CRP(returns, weights)

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

weights

vector containing portfolio weights

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.

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)
weights = c(0.5, 0.5)

# compute Constant Rebalanced Portfolio
CRP = alg_CRP(returns, weights); CRP
plot(CRP)
plot(CRP$Weights[,1], type="l")

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