Learn R Programming

SharpeR (version 1.4.0)

sr_conditional_test: conditional test for maximum Sharpe ratios.

Description

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.

Usage

sr_conditional_test(
  srs,
  df,
  ope = 1,
  R = NULL,
  Rmax = NULL,
  zeta_0 = 0,
  conf.level = 0.95,
  alternative = c("two.sided", "less", "greater")
)

Value

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.

Arguments

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 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.

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 srs.

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 srs.

conf.level

confidence level of the test.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

Author

Steven E. Pav shabbychef@gmail.com

Details

Performs the conditional estimation procedure as outlined in Section 4.1.5 of The Sharpe Ratio: Statistics and Applications.

References

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

See Also

reannualize

sr_max_test

Examples

Run this code
# 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