Learn R Programming

SharpeR (version 0.1501)

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.
df1
the number of assets in the portfolio.
df2
the number of observations.
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'.
T2
the Hotelling $T^2$ statistic. If not given, it is computed from the given information.

Value

  • a list cast to class sropt, with the following attributes:
  • sroptthe optimal Sharpe statistic.
  • df1the number of assets.
  • df2the number of observed vectors.
  • dragthe input drag term.
  • opethe input ope term.
  • epochthe input epoch term.
  • T2the Hotelling $T^2$ statistic.

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.del_sropt, confint.sr, confint.sropt; dsropt, psropt, qsropt, rsropt; is.sropt; pco_sropt, qco_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
set.seed(as.integer(charToRaw("fix seed")))
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