Description Usage Arguments Details Value Author(s) References See Also Examples
Performs one and two sample tests of Sharpe ratio on vectors of data.
1 2 
x 
a (nonempty) numeric vector of data values, or an
object of class 
y 
an optional (nonempty) numeric vector of data values, or
an object of class 
alternative 
a character string specifying the alternative hypothesis,
must be one of 
zeta 
a number indicating the null hypothesis offset value, the S value. 
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 
paired 
a logical indicating whether you want a paired test. 
conf.level 
confidence level of the interval. 
... 
further arguments to be passed to or from methods. 
Given n observations xi from a normal random variable, with mean mu and standard deviation sigma, tests
H0: mu/sigma = S
against two or one sided alternatives.
Can also perform two sample tests of Sharpe ratio. For paired observations xi and yi, tests
H0: mu_x sigma_y = mu_y sigma_x
against two or one sided alternative, via
sr_equality_test
.
For unpaired (and independent) observations, tests
H0: mu_x / sigma_x  mu_y / sigma_y = S
against two or onesided alternatives via the upsilon distribution.
A list with class "htest"
containing the following components:
statistic 
the value of the t or Zstatistic. 
parameter 
the degrees of freedom for the statistic. 
p.value 
the pvalue for the test. 
conf.int 
a confidence interval appropriate to the specified alternative hypothesis. NYI for some cases. 
estimate 
the estimated Sharpe or difference in Sharpes depending on whether it was a onesample test or a twosample test. Annualized 
null.value 
the specified hypothesized value of the Sharpe or difference of Sharpes depending on whether it was a onesample test or a twosample test. 
alternative 
a character string describing the alternative hypothesis. 
method 
a character string indicating what type of test was performed. 
data.name 
a character string giving the name(s) of the data. 
Steven E. Pav shabbychef@gmail.com
Sharpe, William F. "Mutual fund performance." Journal of business (1966): 119138. 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
sr_equality_test
, sr_unpaired_test
, t.test
.
Other sr: as.sr
, confint.sr
,
dsr
, is.sr
,
plambdap
, power.sr_test
,
predint
, print.sr
,
reannualize
, se
,
sr_equality_test
,
sr_unpaired_test
, sr_vcov
,
sr
, summary
1 2 3 4 5 6 7 8 9 10 11 12 13 14  # should reject null
x < sr_test(rnorm(1000,mean=0.5,sd=0.1),zeta=2,ope=1,alternative="greater")
x < sr_test(rnorm(1000,mean=0.5,sd=0.1),zeta=2,ope=1,alternative="two.sided")
# should not reject null
x < sr_test(rnorm(1000,mean=0.5,sd=0.1),zeta=2,ope=1,alternative="less")
# test for uniformity
pvs < replicate(128,{ x < sr_test(rnorm(1000),ope=253,alternative="two.sided")
x$p.value })
plot(ecdf(pvs))
abline(0,1,col='red')
# testing an object of class sr
asr < as.sr(rnorm(1000,1 / sqrt(253)),ope=253)
checkit < sr_test(asr,zeta=0)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.