sharpeTesting: Testing the difference of Sharpe ratios

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Function which performs the testing of the difference of Sharpe ratios

Usage

1
  sharpeTesting(x, y, control = list())

Arguments

x

vector (of lenght T) of returns for the first fund. NA values are allowed.

y

vector (of lenght T) returns for the second fund. NA values are allowed.

control

control parameters (see *Details*).

Details

The Sharpe ratio (Sharpe 1992) is one industry standard for measuring the absolute risk adjusted performance of hedge funds. This function performs the testing of Sharpe ratio difference for two funds using the approach by Ledoit and Wolf (2002).

For the testing, only the intersection of non-NA observations for the two funds are used.

The argument control is a list that can supply any of the following components:

type

asymptotic approach (type = 1) or studentized circular bootstrap approach (type = 2). Default: type = 1.

ttype

test based on ratio (type = 1) or product (type = 2). Default: type = 2.

hac

heteroscedastic-autocorrelation consistent standard errors. Default: hac = FALSE.

minObs

minimum number of concordant observations to compute the ratios. Default: minObs = 10.

nBoot

number of boostrap replications for computing the p-value. Default: nBoot = 499.

bBoot

block length in the circular bootstrap. Default: bBoot = 1, i.e. iid bootstrap. bBoot = 0 uses optimal block-length.

pBoot

symmetric p-value (pBoot = 1) or asymmetric p-value (pBoot = 2). Default: pBoot = 1.

Value

A list with the following components:

n: number of non-NA concordant observations.

sharpe: vector (of length 2) of unconditional Sharpe ratios.

dsharpe: Sharpe ratios difference.

tstat: t-stat of Sharpe ratios differences.

pval: pvalues of test of Sharpe ratios differences.

Note

Further details on the methdology with an application to the hedge fund industry is given in in Ardia and Boudt (2014). The file ‘ThePeerPerformanceOfHedgeFunds.txt’ in the ‘/doc’ package's folder allows the reprodution of the steps followed in the article. See also the presentation by Kris Boudt at the R/Finance conference 2012 at http://www.rinfinance.com.

Some internal functions where adapted from Wolf's R code.

Please cite the package in publications. Use citation("PeerPerformance").

Author(s)

David Ardia and Kris Boudt.

References

Ardia, D., Boudt, K. (2015). Testing equality of modified Sharpe ratios Finance Research Letters 13, pp.97–104.

Ardia, D., Boudt, K. (2015). The Peer Performance of Hedge Funds. http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2000901

Ledoit, O., Wolf, M. (2008). Robust performance hypothesis testing with the Sharpe ratio. Journal of Empirical Finance 15, pp.850–859.

Sharpe, W. F. (1994). The Sharpe ratio. Journal of Portfolio Management Fall, pp.49–58.

See Also

sharpe, sharpeScreening and msharpeTesting.

Examples

 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
  ## Load the data (randomized data of monthly hedge fund returns)
  data("hfdata")
  x = hfdata[,1]
  y = hfdata[,2]	

  ## Run Sharpe testing (asymptotic)
  ctr = list(type = 1)
  out = sharpeTesting(x, y, control = ctr)
  print(out)
  
  ## Run Sharpe testing (asymptotic hac)
  ctr = list(type = 1, hac = TRUE)
  out = sharpeTesting(x, y, control = ctr)
  print(out)
  
  ## Run Sharpe testing (iid bootstrap)
  set.seed(1234)
  ctr = list(type = 2, nBoot = 250)
  out = sharpeTesting(x, y, control = ctr)
  print(out)
  
  ## Run Sharpe testing (circular bootstrap)
  set.seed(1234)
  ctr = list(type = 2, nBoot = 250, bBoot = 5)
  out = sharpeTesting(x, y, control = ctr)
  print(out)

Example output

Loading required package: snow
Loading required package: sandwich
Loading required package: lmtest
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Loading required package: compiler
$n
[1] 60

$sharpe
[1]  0.02047499 -0.02339368

$dsharpe
[1] 9.104921e-05

$tstat
[1] 0.4690858

$pval
[1] 0.6390083

$n
[1] 60

$sharpe
[1]  0.02047499 -0.02339368

$dsharpe
[1] 9.104921e-05

$tstat
[1] 0.492668

$pval
[1] 0.6222472

$n
[1] 60

$sharpe
[1]  0.02047499 -0.02339368

$dsharpe
[1] 9.104921e-05

$tstat
[1] 0.4690858

$pval
[1] 0.6733068

$n
[1] 60

$sharpe
[1]  0.02047499 -0.02339368

$dsharpe
[1] 9.104921e-05

$tstat
[1] 0.4792263

$pval
[1] 0.7011952

PeerPerformance documentation built on May 2, 2019, 4:53 p.m.