sr_conditional_test | R Documentation |
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")
)
srs |
A vector of Sharpe ratios, quoted in terms of a given epoch. |
df |
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. |
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 |
R |
The correlation matrix of returns. Not needed if Rmax is given. |
Rmax |
The column of the correlation matrix corresponding to the
maximal element of |
zeta_0 |
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 |
conf.level |
confidence level of the test. |
alternative |
a character string specifying the alternative hypothesis,
must be one of |
Performs the conditional estimation procedure as outlined in Section 4.1.5 of The Sharpe Ratio: Statistics and Applications.
A list with class "htest"
containing the following components:
statistic |
the value of the conditional normal statistic. |
parameter |
the degrees of freedom for the statistic. |
p.value |
the p-value for the test. |
conf.int |
a one-sided confidence interval appropriate to the specified alternative hypothesis. |
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
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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.