# Sharpe testing in R

My goal test: The statistical significance of the difference in Sharpe ratio between funds A and B.

My data: I have daily prices from January 23 2008 until 10th of April 2019 (n = 2818 observations). I upload an excel sheet to r with prices of fund A in column 1 and prices of fund B in column 2.

R Code: I run the following code

## Run Sharpe testing (asymptotic hac)
x = SR_for_r[,1]
y = SR_for_r[,2]
ctr = list(type = 1, hac = TRUE)
out = sharpeTesting(x, y, control = ctr)
print(out)

## Run Sharpe testing (circular bootstrap)
x = SR_for_r[,1]
y = SR_for_r[,2]
set.seed(1234)
ctr = list(type = 2, nBoot = 1000, bBoot = 3)
out = sharpeTesting(x, y, control = ctr)
print(out)


My questions

1) Should I have fund prices, rate of return, or excess returns in columns 1 and 2 in the datasheet I import to R?

2) Should I use HAC standard errors only or use circular bootstrap to test the statistical significance of the Sharpe ratio difference?

3) How can I interpret the output from the test?

4) Does anyone know of an article of someone who have tested the statistical significance of the Sharpe ratio difference between two funds?

My Sources: The R code comes from here: https://rdrr.io/cran/PeerPerformance/man/sharpeTesting.html

## 1 Answer

Unless you're doing this as a purely educational exercise, it looks like you may be overcomplicating things.

Sharpe ratios follow a student's t distribution. You can thus use standard approaches to test hypotheses or create confidence intervals for each Sharpe estimate.

A quick google turned up this paper that addresses topics similar to what you're asking about.

To answer your specific questions:

(1) That depends entirely on how the calculation is being done. Sharpe ratios are calculated using arithmetic returns (which can be calculated from either prices or returns themselves).

(2) Depends on your intentions.

(3) Again, depends on what calculation is being done. If it's a standard t-test, pval represents the likelihood you'd see a tstat that extreme if the sample estimates weren't different (ie, type 1 error) under the hypothesis Sharpe1=Sharpe2. You typically pick some confidence level, a (eg, 95 or 90%), and reject the null (eg, Sharpe1 = Sharpe2) if pval < 1 - a. tstat is the statistic that's calculated to make this determination.