Learn R Programming

SharpeR (version 1.0.0)

predint: prediction interval for Sharpe ratio

Description

Computes the prediction interval for Sharpe ratio.

Usage

predint(x,oosdf,oosrescal=1/sqrt(oosdf+1),ope=NULL,level=0.95,
				 level.lo=(1-level)/2,level.hi=1-level.lo)

Arguments

x
a (non-empty) numeric vector of data values, or an object of class sr.
oosdf
the future (or 'out of sample', thus 'oos') degrees of freedom. In the vanilla Sharpe case, this is the number of future observations minus one.
oosrescal
the rescaling parameter for the future Sharpe ratio. The default value holds for the case of unattributed models ('vanilla Shape'), but can be set to some other value to deal with the magnitude of attribution factors in the future period.
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
level
the confidence level required.
level.lo
the lower confidence level required.
level.hi
the upper confidence level required.

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

Given $n_0$ observations $x_i$ from a normal random variable, with mean $\mu$ and standard deviation $\sigma$, computes an interval $[y_1,y_2]$ such that with a fixed probability, the sample Sharpe ratio over $n$ future observations will fall in the given interval. The coverage is over repeated draws of both the past and future data, thus this computation takes into account error in both the estimate of Sharpe and the as yet unrealized returns.

References

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

Pav, Steven. "Inference on the Sharpe ratio via the upsilon distribution.' Arxiv (2015). http://arxiv.org/abs/1505.00829

See Also

confint.sr.

Other sr: as.sr, as.sr.data.frame, as.sr.default, as.sr.lm, as.sr.matrix, as.sr.timeSeries, as.sr.xts; confint.del_sropt, confint.sr, confint.sropt; dsr, psr, qsr, rsr; is.sr; plambdap, qlambdap, rlambdap; power.sr_test; print.del_sropt, print.sr, print.sropt; reannualize, reannualize.sr, reannualize.sropt; se, se.sr; sr_equality_test; sr_test; sr_unpaired_test; sr_vcov; sr

Examples

Run this code
# should reject null
etc <- predint(rnorm(1000,mean=0.5,sd=0.1),oosdf=127,ope=1)
etc <- predint(matrix(rnorm(1000*5,mean=0.05),ncol=5),oosdf=63,ope=1)

# check coverage
mu <- 0.0005
sg <- 0.013
n1 <- 512
n2 <- 256
p  <- 100
x1 <- matrix(rnorm(n1*p,mean=mu,sd=sg),ncol=p)
x2 <- matrix(rnorm(n2*p,mean=mu,sd=sg),ncol=p)
sr1 <- as.sr(x1)
sr2 <- as.sr(x2)
# takes too long to run ...
etc1 <- predint(sr1,oosdf=n2-1,level=0.95)
is.ok <- (etc1[,1] <= sr2$sr) & (sr2$sr <= etc1[,2])
covr <- mean(is.ok)

Run the code above in your browser using DataLab