del_sropt: Create an 'del_sropt' object.

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/sr.r

Description

Spawns an object of class del_sropt.

Usage

1
del_sropt(z.s, z.sub, df1, df2, df1.sub, drag = 0, ope = 1, epoch = "yr")

Arguments

z.s

an optimum Sharpe ratio statistic, on some set of assets.

z.sub

an optimum Sharpe ratio statistic, on a linear subspace of the assets. If larger than z.s an error is thrown.

df1

the number of assets in the portfolio.

df2

the number of observations.

df1.sub

the rank of the linear subspace of the hedge constraint. by restricting attention to the subspace.

drag

the 'drag' term, c0/R. defaults to 0. It is assumed that drag has been annualized, i.e. has been multiplied by sqrt(ope). This is in contrast to the c0 term given to sr.

ope

the number of observations per 'epoch'. For convenience of interpretation, The Sharpe ratio is typically quoted in 'annualized' units for some epoch, that is, 'per square root epoch', though returns are observed at a frequency of ope per epoch. The default value is 1, meaning the code will not attempt to guess what the observation frequency is, and no annualization adjustments will be made.

epoch

the string representation of the 'epoch', defaulting to 'yr'.

Details

The del_sropt class contains information about the difference between two rescaled T^2-statistics, useful for spanning tests, and inference on hedged portfolios. The following are list attributes of the object:

sropt

The (optimal) Sharpe ratio statistic of the 'full' set of assets.

sropt_sub

The (optimal) Sharpe ratio statistic on some subset, or linear subspace, of the assets.

df1

The number of assets.

df2

The number of observations.

df1.sub

The number of degrees of freedom in the hedge constraint.

drag

The drag term, which is the 'risk free rate' divided by the maximum risk.

ope

The 'observations per epoch'.

epoch

The string name of the 'epoch'.

For the most part, this constructor should not be called directly, rather as.del_sropt should be called instead to compute the needed statistics.

Value

a list cast to class del_sropt, with attributes

sropt

the optimal Sharpe statistic.

sropt.sub

the optimal Sharpe statistic on the subspace.

df1

the number of assets.

df2

the number of observed vectors.

df1.sub

the input df1.sub term.

drag

the input drag term.

ope

the input ope term.

T2

the Hotelling T^2 statistic.

T2.sub

the Hotelling T^2 statistic on the subspace.

Note

WARNING: This function is not well tested, may contain errors, may change in the next package update. Take caution.

2FIX: allow rownames?

Author(s)

Steven E. Pav shabbychef@gmail.com

See Also

reannualize

as.del_sropt

Other del_sropt: as.del_sropt(), is.del_sropt()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# roll your own.
ope <- 253

set.seed(as.integer(charToRaw("be determinstic")))
n.stock <- 10
X <- matrix(rnorm(1000*n.stock),nrow=1000)
Sigma <- cov(X)
mu <- colMeans(X)
w <- solve(Sigma,mu)
z <- t(mu) %*% w
n.sub <- 6
w.sub <- solve(Sigma[1:n.sub,1:n.sub],mu[1:n.sub])
z.sub <- t(mu[1:n.sub]) %*% w.sub
df1.sub <- n.stock - n.sub

roll.own <- del_sropt(z.s=z,z.sub=z.sub,df1=10,df2=1000,
 df1.sub=df1.sub,ope=ope)
print(roll.own)

shabbychef/SharpeR documentation built on Aug. 21, 2021, 8:50 a.m.