Performs tests for the hypothesis $$\zeta_{(k)} \le \zeta_0$$ against the alternative $$\zeta_{(k)} > \zeta_0,$$ where \(\zeta_{(k)}\) is the signal-noise ratio of the asset selected because it has the largest Sharpe ratio. The test is conditional on having selected the maximum. Testing is via the polyhedral lemma of Lee et al.
sr_conditional_test(
srs,
df,
ope = 1,
R = NULL,
Rmax = NULL,
zeta_0 = 0,
conf.level = 0.95,
alternative = c("two.sided", "less", "greater")
)
A list with class "htest"
containing the following components:
the value of the conditional normal statistic.
the degrees of freedom for the statistic.
the p-value for the test.
a one-sided confidence interval appropriate to the specified alternative hypothesis.
a character string describing the alternative hypothesis.
a character string indicating what type of test was performed.
a character string giving the name(s) of the data.
A vector of Sharpe ratios, quoted in terms of a given epoch.
The number of ‘degrees of freedom’ of the Sharpe ratios, which are assumed to have been measured over the same period. The degrees of freedom are one less than the number of observed returns.
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 epoch.
The default value is 1, meaning the code will not attempt to guess
what the observation frequency is, and no annualization adjustments
will be made.
The correlation matrix of returns. Not needed if Rmax is given.
The column of the correlation matrix corresponding to the
maximal element of srs
.
The cutoff for the test. We test whether all Signal-noise
ratios are equal to zeta_0. This value is quoted in terms of the same epoch
as srs
.
confidence level of the test.
a character string specifying the alternative hypothesis,
must be one of "two.sided"
(default), "greater"
or
"less"
. You can specify just the initial letter.
Steven E. Pav shabbychef@gmail.com
Performs the conditional estimation procedure as outlined in Section 4.1.5 of The Sharpe Ratio: Statistics and Applications.
Pav, S. E. "The Sharpe Ratio: Statistics and Applications." CRC Press, 2021.
Pav, S. E. "Conditional inference on the asset with maximum Sharpe ratio." 2019 https://arxiv.org/abs/1906.00573
Lee, J. D., Sun, D. L., Sun, Y. and Taylor, J. E. "Exact post-selection inference, with application to the Lasso." Ann. Statist. 44, no. 3 (2016): 907-927. doi:10.1214/15-AOS1371. https://arxiv.org/abs/1311.6238
reannualize
sr_max_test
# generate some fake data
ope <- 252
zeta0 <- 1.0
set.seed(1234)
zetas <- rsr(50, zeta=zeta0, df=ope*2, ope=ope)
sr_conditional_test(zetas,df=ope*2,ope=ope,R=diag(length(zetas)))
Run the code above in your browser using DataLab