Learn R Programming

SharpeR (version 0.1306)

confint.sr: Confidence Interval on (optimal) Signal-Noise Ratio

Description

Computes approximate confidence intervals on the (optimal) Signal-Noise ratio given the (optimal) Sharpe ratio. Works on objects of class sr and sropt.

Usage

## S3 method for class 'sr':
confint(object, parm, level = 0.95,
    level.lo = (1 - level)/2, level.hi = 1 - level.lo,
    type = c("exact", "t", "Z"), ...)

## S3 method for class 'sropt': confint(object, parm, level = 0.95, level.lo = (1 - level)/2, level.hi = 1 - level.lo, ...)

Arguments

object
an observed Sharpe ratio statistic, of class sr or sropt.
parm
ignored here, but required for the general method.
level
the confidence level required.
level.lo
the lower confidence level required.
level.hi
the upper confidence level required.
type
which method to apply.
...
further arguments to be passed to or from methods.

Value

  • A matrix (or vector) with columns giving lower and upper confidence limits for the parameter. These will be labelled as level.lo and level.hi in %, e.g. "2.5 %"

Details

Constructs confidence intervals on the Signal-Noise ratio given observed Sharpe ratio statistic. The available methods are:

  • The default,exact, which is only exact when returns are normal, based on inverting the non-central t distribution.
  • A method based on the standard error of a non-central t distribution.
  • A method based on a normal approximation.

Suppose $x_i$ are $n$ independent draws of a $q$-variate normal random variable with mean $\mu$ and covariance matrix $\Sigma$. Let $\bar{x}$ be the (vector) sample mean, and $S$ be the sample covariance matrix (using Bessel's correction). Let $$z_* = \sqrt{\bar{x}^{\top} S^{-1} \bar{x}}$$ Given observations of $z_*$, compute confidence intervals on the population analogue, defined as $$\zeta_* = \sqrt{\mu^{\top} \Sigma^{-1} \mu}$$

References

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

See Also

confint, se

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

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

Examples

Run this code
# using "sr" class:
ope <- 253
df <- ope * 6
xv <- rnorm(df, 1 / sqrt(ope))
mysr <- as.sr(xv,ope=ope)
confint(mysr,level=0.90)
# using "lm" class
yv <- xv + rnorm(length(xv))
amod <- lm(yv ~ xv)
mysr <- as.sr(amod,ope=ope)
confint(mysr,level.lo=0.05,level.hi=1.0)
# rolling your own.
ope <- 253
df <- ope * 6
zeta <- 1.0
rvs <- rsr(128, df, zeta, ope)
roll.own <- sr(sr=rvs,df=df,c0=0,ope=ope)
aci <- confint(roll.own,level=0.95)
coverage <- 1 - mean((zeta < aci[,1]) | (aci[,2] < zeta))
# using "sropt" class
ope <- 253
df1 <- 4
df2 <- ope * 3
rvs <- as.matrix(rnorm(df1*df2),ncol=df1)
sro <- as.sropt(rvs,ope=ope)
aci <- confint(sro)
# on sropt, rolling your own.
zeta.s <- 1.0
rvs <- rsropt(128, df1, df2, zeta.s, ope)
roll.own <- sropt(z.s=rvs,df1,df2,drag=0,ope=ope)
aci <- confint(roll.own,level=0.95)
coverage <- 1 - mean((zeta.s < aci[,1]) | (aci[,2] < zeta.s))

Run the code above in your browser using DataLab