Learn R Programming

SharpeR (version 1.3.0)

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 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'.

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:

sropt

the optimal Sharpe statistic.

df1

the number of assets.

df2

the number of observed vectors.

drag

the input drag term.

ope

the input ope term.

epoch

the input epoch term.

T2

the Hotelling \(T^2\) statistic.

Details

The sropt class contains information about a rescaled T^2-statistic. The following are list attributes of the object:

sropt

The (optimal) Sharpe ratio statistic.

df1

The number of assets.

df2

The number of observations.

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.sropt should be called instead to compute the needed statistics.

See Also

reannualize

as.sropt

Other sropt: as.sropt(), confint.sr(), dsropt(), is.sropt(), pco_sropt(), power.sropt_test(), reannualize(), sropt_test()

Examples

Run this code
# NOT RUN {
# 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