Learn R Programming

SharpeR (version 0.1306)

sropt: Create an 'sropt' object.

Description

Spawns an object of class sropt.

Usage

sropt(z.s,df1,df2,drag=0,ope=1,epoch="yr",T2=NULL)

Arguments

z.s
an optimum Sharpe ratio statistic.
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<
T2
the Hotelling $T^2$ statistic. If not given, it is computed from the given information.
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
epoch
the string representation of the 'epoch', defaulting to 'yr'.
df1
the number of assets in the portfolio.
df2
the number of observations.

Value

  • a list cast to class sropt.

Details

The sropt class contains information about a rescaled T^2-statistic. The following are list attributes of the object:
  • sroptThe (optimal) Sharpe ratio statistic.
  • df1The number of assets.
  • df2The number of observations.
  • 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.sropt should be called instead to compute the needed statistics.

See Also

reannualize

as.sropt

Other sropt: as.sropt, as.sropt.default, as.sropt.xts, confint.sr, confint.sropt, dsropt, is.sropt, power.sropt_test, reannualize, reannualize.sr, reannualize.sropt, sropt_test

Examples

Run this code
# roll your own.
ope <- 253
zeta.s <- 1.0
df1 <- 10
df2 <- 6 * ope
rvs <- rsropt(1,df1,df2,zeta.s,ope,drag=0)
roll.own <- sropt(z.s=rvs,df1,df2,drag=0,ope=ope)
print(roll.own)
# put a bunch in. naming becomes a problem.
rvs <- rsropt(5,df1,df2,zeta.s,ope,drag=0)
roll.own <- sropt(z.s=rvs,df1,df2,drag=0,ope=ope)
print(roll.own)

Run the code above in your browser using DataLab