Learn R Programming

SharpeR (version 0.1306)

sr: Create an 'sr' object.

Description

Spawns an object of class sr.

Usage

sr(sr,df,c0=0,ope=1,rescal=sqrt(1/(df+1)),epoch="yr")

Arguments

sr
a Sharpe ratio statistic.
df
the degrees of freedom of the equivalent t-statistic.
c0
the 'risk-free' or 'disastrous' rate of return. this is assumed to be given in the same units as x, not in 'annualized' terms.
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
rescal
the rescaling parameter.
epoch
the string representation of the 'epoch', defaulting to 'yr'.

Value

  • a list cast to class sr.

Details

The sr class contains information about a rescaled t-statistic. The following are list attributes of the object:
  • srThe Sharpe ratio statistic.
  • dfThe d.f. of the equivalent t-statistic.
  • c0The drag 'risk free rate' used.
  • opeThe 'observations per epoch'.
  • rescalThe rescaling parameter.
  • epochThe string name of the 'epoch'.

The stored Sharpe statistic, sr is equal to the t-statistic times $rescal * sqrt{ope}$.

For the most part, this constructor should not be called directly, rather as.sr should be called instead to compute the Sharpe ratio.

References

Sharpe, William F. "Mutual fund performance." Journal of business (1966): 119-138. http://ideas.repec.org/a/ucp/jnlbus/v39y1965p119.html

See Also

reannualize

as.sr

Other sr: as.sr, as.sr.data.frame, as.sr.default, as.sr.lm, as.sr.xts, confint.sr, confint.sropt, dsr, is.sr, power.sr_test, print.sr, print.sropt, reannualize, reannualize.sr, reannualize.sropt, se, se.sr, sr_equality_test, sr_test

Examples

Run this code
# roll your own.
ope <- 253
zeta <- 1.0
n <- 3 * ope
rvs <- rsr(1,n,zeta,ope=ope)
roll.own <- sr(sr=rvs,df=n-1,ope=ope,rescal=sqrt(1/n))
# put a bunch in. naming becomes a problem.
rvs <- rsr(5,n,zeta,ope=ope)
roll.own <- sr(sr=rvs,df=n-1,ope=ope,rescal=sqrt(1/n))

Run the code above in your browser using DataLab