ROBUST INFERENCE FOR DIFFERENCES OF SHARPE RATIOS
=================================================

Michael Wolf
University of Zurich
September 2026


This MATLAB package provides robust inference for differences of Sharpe
ratios. It supersedes all previous versions of the package.

The package is designed for inference on the difference between two Sharpe
ratios. It does not provide inference for an individual Sharpe ratio.


MAIN ROUTINES
=============

HAC_Sharpe
----------

Carries out HAC inference for the difference between two Sharpe ratios.

The routine provides the estimated difference in Sharpe ratios, a HAC
standard error and p-value, and their prewhitened counterparts. Both the
Parzen-Gallant and Quadratic-Spectral kernels are available.


bootstrap_Sharpe
----------------

Carries out studentized circular block bootstrap inference for the
difference between two Sharpe ratios.

The routine returns the bootstrap p-value, the estimated difference in
Sharpe ratios, the original test statistic, and the block size.

If the block size is not supplied by the user, it is selected by
blockSizeCalibrate_Sharpe.


blockSizeCalibrate_Sharpe
-------------------------

Selects the block size for the circular block bootstrap using the
calibration procedure implemented in the package.

The default candidate block sizes are

    bVec = [1,2,4,6,8,10]'

the default number of bootstrap replications used for each test is

    M = 499

and the default number of calibration samples is

    K = 2000.

The calibration is computationally more demanding than the other
routines and may take several minutes. We recommend running this
function separately and then supplying the selected block size to
bootstrap_Sharpe.

Users should inspect the estimated rejection probabilities rather than
rely mechanically on the selected block size. In particular, if the
selected block size is at the boundary of bVec and the rejection
probabilities are still moving toward the nominal significance level,
the candidate set should be extended and the calibration rerun.


bootStats_Sharpe
----------------

For a given circular block bootstrap sample and block size, computes

    DeltaHatStar    the bootstrap difference in sample Sharpe ratios

and

    seStar          the corresponding bootstrap standard error.

This routine is useful when the Sharpe-ratio inference in this package
is embedded in a multiple-testing procedure. In particular, HAC_Sharpe
and bootStats_Sharpe provide the low-level ingredients needed to construct
studentized bootstrap statistics for a collection of Sharpe-ratio
differences. These quantities can then be used with higher-level
multiple-testing procedures such as the Romano-Wolf stepdown methodology;
see Romano and Wolf (2016).

To preserve the dependence across hypotheses, bootstrap samples must be
generated jointly across all assets or strategies involved. The function
cbbSequence can be used to generate a common bootstrap index sequence,
which is then used to re-index the rows of the original data matrix.

Users interested in bootstrap inference for a single difference of Sharpe
ratios do not need to call bootStats_Sharpe directly; bootstrap_Sharpe
handles these calculations internally.


VECTORIZED AND OLD IMPLEMENTATIONS
==================================

The default routines use vectorized MATLAB code where possible for
computational efficiency.

For selected routines, versions whose names contain "Old" are also
included. These retain the earlier, more explicit implementations based
on for loops. They are not recommended for normal use but are provided
as transparent reference implementations.

The Old routines may be particularly useful for users who wish to
understand the computational steps in detail or translate the MATLAB
code into another programming language such as Python or C++.


SUPPORTING ROUTINES
===================

The package contains a number of supporting routines used internally for
HAC estimation, prewhitening, circular and stationary block bootstrap
sampling, block-size calibration, and computation of differences in
Sharpe ratios.

Users interested only in standard inference will normally need to call
only HAC_Sharpe, bootstrap_Sharpe, and, if desired,
blockSizeCalibrate_Sharpe.

Users implementing their own bootstrap or multiple-testing procedures
may additionally find bootStats_Sharpe useful.


DATA
====

The input return matrix for the main inference routines has two columns,
one for each return series. Returns should be in excess of the relevant
risk-free rate.

The data sets used in the two empirical applications of Ledoit and Wolf
(2008) are included in the file retSharpe.mat.


REFERENCES
==========

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

Romano, J. P. and Wolf, M. (2016).
Efficient computation of adjusted p-values for resampling-based stepdown
multiple testing.
Statistics & Probability Letters 113, 38-40.

