del_sropt | R Documentation |
Spawns an object of class del_sropt
.
del_sropt(z.s, z.sub, df1, df2, df1.sub, drag = 0, ope = 1, epoch = "yr")
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 |
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, |
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 |
epoch |
the string representation of the 'epoch', defaulting to 'yr'. |
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:
The (optimal) Sharpe ratio statistic of the 'full' set of assets.
The (optimal) Sharpe ratio statistic on some subset, or linear subspace, of the assets.
The number of assets.
The number of observations.
The number of degrees of freedom in the hedge constraint.
The drag term, which is the 'risk free rate' divided by the maximum risk.
The 'observations per 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.
a list cast to class del_sropt
, with attributes
the optimal Sharpe statistic.
the optimal Sharpe statistic on the subspace.
the number of assets.
the number of observed vectors.
the input df1.sub
term.
the input drag
term.
the input ope
term.
the Hotelling T^2
statistic.
the Hotelling T^2
statistic on the subspace.
WARNING: This function is not well tested, may contain errors, may change in the next package update. Take caution.
2FIX: allow rownames?
Steven E. Pav shabbychef@gmail.com
reannualize
as.del_sropt
Other del_sropt:
as.del_sropt()
,
is.del_sropt()
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.