power.sr_test: Power calculations for Sharpe ratio tests In SharpeR: Statistical Significance of the Sharpe Ratio

Description

Compute power of test, or determine parameters to obtain target power.

Usage

 ```1 2``` ```power.sr_test(n=NULL,zeta=NULL,sig.level=0.05,power=NULL, alternative=c("one.sided","two.sided"),ope=NULL) ```

Arguments

 `n` Number of observations `zeta` the 'signal-to-noise' parameter, defined as the population mean divided by the population standard deviation, 'annualized'. `sig.level` Significance level (Type I error probability). `power` Power of test (1 minus Type II error probability). `alternative` One- or two-sided test. `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.

Details

Suppose you perform a single-sample test for significance of the Sharpe ratio based on the corresponding single-sample t-test. Given any three of: the effect size (the population SNR, zeta), the number of observations, and the type I and type II rates, this function computes the fourth.

See ‘The Sharpe Ratio: Statistics and Applications’, section 2.5.8.

This is a thin wrapper on `power.t.test`.

Exactly one of the parameters `n`, `zeta`, `power`, and `sig.level` must be passed as NULL, and that parameter is determined from the others. Notice that `sig.level` has non-NULL default, so NULL must be explicitly passed if you want to compute it.

Value

Object of class `power.htest`, a list of the arguments (including the computed one) augmented with `method`, `note` and `n.epoch` elements, the latter is the number of epochs under the given annualization (`ope`), `NA` if none given.

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

Johnson, N. L., and Welch, B. L. "Applications of the non-central t-distribution." Biometrika 31, no. 3-4 (1940): 362-389. doi: 10.1093/biomet/31.3-4.362

Pav, S. E. "The Sharpe Ratio: Statistics and Applications." CRC Press, 2021.

Lehr, R. "Sixteen S-squared over D-squared: A relation for crude sample size estimates." Statist. Med., 11, no 8 (1992): 1099–1102. doi: 10.1002/sim.4780110811

`reannualize`

`power.t.test`, `sr_test`

Other sr: `as.sr()`, `confint.sr()`, `dsr()`, `is.sr()`, `plambdap()`, `predint()`, `print.sr()`, `reannualize()`, `se()`, `sr_equality_test()`, `sr_test()`, `sr_unpaired_test()`, `sr_vcov()`, `sr`, `summary.sr`

Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16``` ```anex <- power.sr_test(253,1,0.05,NULL,ope=253) anex <- power.sr_test(n=253,zeta=NULL,sig.level=0.05,power=0.5,ope=253) anex <- power.sr_test(n=NULL,zeta=0.6,sig.level=0.05,power=0.5,ope=253) # Lehr's Rule zetas <- seq(0.1,2.5,length.out=51) ssizes <- sapply(zetas,function(zed) { x <- power.sr_test(n=NULL,zeta=zed,sig.level=0.05,power=0.8, alternative="two.sided",ope=253) x\$n / 253}) # should be around 8. print(summary(ssizes * zetas * zetas)) # e = n z^2 mnemonic approximate rule for 0.05 type I, 50% power ssizes <- sapply(zetas,function(zed) { x <- power.sr_test(n=NULL,zeta=zed,sig.level=0.05,power=0.5,ope=253) x\$n / 253 }) print(summary(ssizes * zetas * zetas - exp(1))) ```

SharpeR documentation built on Aug. 18, 2021, 5:08 p.m.