Learn R Programming

DOSPortfolio (version 0.1.0)

r0Strategy: Computes the relative loss of the target portfolio used

Description

The function computes the initial value of the relative loss in the variance of the target portfolio as given in Eq. (2.10) of BODNAR21dynshrink;textualDOSPortfolio.

Usage

r0Strategy(data, target_portfolio, c)

Arguments

data

an n by p matrix of asset returns. Columns represent different assets rows are observations, where n>p, containing, for instance, log-returns.

target_portfolio

a vector which determines the weights of the target portfolio used when the shrinkage estimator of the global minimum variance portfolio is constructed for the first time.

c

a numeric which is the concentration ratio.

Value

vector

References

Examples

Run this code
# NOT RUN {
n <- 200*2
p <- 80
data <- 5/3 * matrix(rt(n*p, df=5), ncol=p, nrow=n)
# set a target portfolio, such as equally weighted
b <- rep(1,p)/p
r0Strategy(data, b, p/n)

# }

Run the code above in your browser using DataLab