confint.sr {SharpeR} | R Documentation |
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", "Mertens", "Bao"),
...
)
## S3 method for class 'sropt'
confint(
object,
parm,
level = 0.95,
level.lo = (1 - level)/2,
level.hi = 1 - level.lo,
...
)
## S3 method for class 'del_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 |
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. |
Details
Constructs confidence intervals on the Signal-Noise ratio given observed Sharpe ratio statistic. The available methods are:
- exact
The default, which is only exact when returns are normal, based on inverting the non-central t distribution.
- t
Uses the Johnson Welch approximation to the standard error, centered around the sample value.
- Z
Uses the Johnson Welch approximation to the standard error, performing a simple correction for the bias of the Sharpe ratio based on Miller and Gehr formula.
- Mertens
Uses the Mertens higher order approximation to the standard error, centered around the sample value.
- Bao
Uses the Bao higher order approximation to the standard error, performing a higher order correction for the bias of the Sharpe ratio.
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}
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 %"
Author(s)
Steven E. Pav shabbychef@gmail.com
References
Sharpe, William F. "Mutual fund performance." Journal of business (1966): 119-138. https://ideas.repec.org/a/ucp/jnlbus/v39y1965p119.html
See Also
Other sr:
as.sr()
,
dsr()
,
is.sr()
,
plambdap()
,
power.sr_test()
,
predint()
,
print.sr()
,
reannualize()
,
se()
,
sr_equality_test()
,
sr_test()
,
sr_unpaired_test()
,
sr_vcov()
,
sr
,
summary.sr
Other sropt:
as.sropt()
,
dsropt()
,
is.sropt()
,
pco_sropt()
,
power.sropt_test()
,
reannualize()
,
sropt_test()
,
sropt
Examples
# 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))
# using "del_sropt" class
nfac <- 5
nyr <- 10
ope <- 253
set.seed(as.integer(charToRaw("be determinstic")))
Returns <- matrix(rnorm(ope*nyr*nfac,mean=0,sd=0.0125),ncol=nfac)
# hedge out the first one:
G <- matrix(diag(nfac)[1,],nrow=1)
asro <- as.del_sropt(Returns,G,drag=0,ope=ope)
aci <- confint(asro,level=0.95)
# under the alternative
Returns <- matrix(rnorm(ope*nyr*nfac,mean=0.001,sd=0.0125),ncol=nfac)
asro <- as.del_sropt(Returns,G,drag=0,ope=ope)
aci <- confint(asro,level=0.95)