Learn R Programming

SharpeR (version 1.0.0)

del_sropt: Create an 'del_sropt' object.

Description

Spawns an object of class del_sropt.

Usage

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, $c_0/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 epoc
epoch
the string representation of the 'epoch', defaulting to 'yr'.

Value

  • a list cast to class del_sropt, with attributes
  • sroptthe optimal Sharpe statistic.
  • sropt.subthe optimal Sharpe statistic on the subspace.
  • df1the number of assets.
  • df2the number of observed vectors.
  • df1.subthe input df1.sub term.
  • dragthe input drag term.
  • opethe input ope term.
  • T2the Hotelling $T^2$ statistic.
  • T2.subthe Hotelling $T^2$ statistic on the subspace.
  • roll.own <- sropt(z.s=z,z.sub=zsub,df1=10,df2=1000,df1.sub=df1.sub,ope=ope)

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:
  • sroptThe (optimal) Sharpe ratio statistic of the 'full' set of assets.
  • sropt_subThe (optimal) Sharpe ratio statistic on some subset, or linear subspace, of the assets.
  • df1The number of assets.
  • df2The number of observations.
  • df1.subThe number of degrees of freedom in the hedge constraint.
  • dragThe drag term, which is the 'risk free rate' divided by the maximum risk.
  • opeThe 'observations per epoch'.
  • epochThe 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.

See Also

reannualize

as.del_sropt

Other del_sropt: as.del_sropt, as.del_sropt.default, as.del_sropt.xts; is.del_sropt

Examples

Run this code
# 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)

Run the code above in your browser using DataLab