Description Usage Arguments Details Value Author(s) References See Also Examples
Performs a hypothesis test of equality of Sharpe ratios of p assets given paired observations.
1 2 3 4 |
X |
an n x p matrix of paired observations. |
type |
which approximation to use. |
alternative |
a character string specifying the alternative hypothesis,
must be one of |
contrasts |
an k x p matrix of the contrasts |
vcov.func |
a function which takes a model of class lm (one of
the form x ~ 1), and produces a variance-covariance matrix.
The default is |
Given n i.i.d. observations of the excess returns of p strategies, we test
H0: sr1 = sr2 = ...
using the method of Wright, et. al.
More generally, a matrix of constrasts, E can be given, and we can test
H0: E s = 0,
where s is the vector of Sharpe ratios of the p strategies.
When E consists of a single row (a single contrast), as is the case when the default contrasts are used and only two strategies are compared, then an approximate t-test can be performed against the alternative hypothesis Ha: E s > 0
Both chi-squared and F- approximations are supported; the former is described by Wright. et. al., the latter by Leung and Wong.
See ‘The Sharpe Ratio: Statistics and Applications’, section 3.3.1.
Object of class htest
, a list of the test statistic,
the size of X
, and the method
noted.
Steven E. Pav shabbychef@gmail.com
Sharpe, William F. "Mutual fund performance." Journal of business (1966): 119-138. https://ideas.repec.org/a/ucp/jnlbus/v39y1965p119.html
Wright, J. A., Yam, S. C. P., and Yung, S. P. "A note on the test for the equality of multiple Sharpe ratios and its application on the evaluation of iShares." J. Risk. to appear. https://www.risk.net/journal-risk/2340067/test-equality-multiple-sharpe-ratios
Leung, P.-L., and Wong, W.-K. "On testing the equality of multiple Sharpe ratios, with application on the evaluation of iShares." J. Risk 10, no. 3 (2008): 15–30. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=907270
Memmel, C. "Performance hypothesis testing with the Sharpe ratio." Finance Letters 1 (2003): 21–23.
Ledoit, O., and Wolf, M. "Robust performance hypothesis testing with the Sharpe ratio." Journal of Empirical Finance 15, no. 5 (2008): 850-859. doi: 10.1016/j.jempfin.2008.03.002
Lo, Andrew W. "The statistics of Sharpe ratios." Financial Analysts Journal 58, no. 4 (2002): 36-52. https://www.ssrn.com/paper=377260
Pav, S. E. "The Sharpe Ratio: Statistics and Applications." CRC Press, 2021.
Other sr:
as.sr()
,
confint.sr()
,
dsr()
,
is.sr()
,
plambdap()
,
power.sr_test()
,
predint()
,
print.sr()
,
reannualize()
,
se()
,
sr_test()
,
sr_unpaired_test()
,
sr_vcov()
,
sr
,
summary.sr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | # under the null
set.seed(1234)
rv <- sr_equality_test(matrix(rnorm(500*5),ncol=5))
# under the alternative (but with identity covariance)
ope <- 253
nyr <- 10
nco <- 5
set.seed(909)
rets <- 0.01 * sapply(seq(0,1.7/sqrt(ope),length.out=nco),
function(mu) { rnorm(ope*nyr,mean=mu,sd=1) })
rv <- sr_equality_test(rets)
# using real data
if (require(xts)) {
data(stock_returns)
pvs <- sr_equality_test(stock_returns)
}
# test for uniformity
pvs <- replicate(1024,{ x <- sr_equality_test(matrix(rnorm(400*5),400,5),type="chisq")
x$p.value })
plot(ecdf(pvs))
abline(0,1,col='red')
if (require(sandwich)) {
set.seed(as.integer(charToRaw("0b2fd4e9-3bdf-4e3e-9c75-25c6d18c331f")))
n.manifest <- 10
n.latent <- 4
n.day <- 1024
snr <- 0.95
la_A <- matrix(rnorm(n.day*n.latent),ncol=n.latent)
la_B <- matrix(runif(n.latent*n.manifest),ncol=n.manifest)
latent.rets <- la_A %*% la_B
noise.rets <- matrix(rnorm(n.day*n.manifest),ncol=n.manifest)
some.rets <- snr * latent.rets + sqrt(1-snr^2) * noise.rets
# naive vcov
pvs0 <- sr_equality_test(some.rets)
# HAC vcov
pvs1 <- sr_equality_test(some.rets,vcov.func=vcovHAC)
# more elaborately:
pvs <- sr_equality_test(some.rets,vcov.func=function(amod) {
vcovHAC(amod,prewhite=TRUE) })
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.