SharpeR-package {SharpeR} | R Documentation |
statistics concerning Sharpe ratio and Markowitz portfolio
Description
Inference on Sharpe ratio and Markowitz portfolio.
Sharpe Ratio
Suppose are
independent draws of a normal random
variable with mean
and variance
.
Let
be the sample mean, and
be
the sample standard deviation (using Bessel's correction). Let
be the 'risk free' or 'disastrous rate' of return. Then
is the (sample) Sharpe ratio.
The units of are
.
Typically the Sharpe ratio is annualized by multiplying by
, where
is the number of observations
per year (or whatever the target annualization epoch.) It is not
common practice to include units when quoting Sharpe ratio, though
doing so could avoid confusion.
The Sharpe ratio follows a rescaled non-central t distribution. That
is, follows a non-central t-distribution
with
degrees of freedom and non-centrality parameter
, for some
,
and
.
We can generalize Sharpe's model to APT, wherein we write
where the are observed 'factor returns', and
the variance of the noise term is
.
Via linear regression, one can compute estimates
,
and
, and then let the 'Sharpe ratio' be
As above, this Sharpe ratio follows a rescaled t-distribution under normality, etc.
The parameters are encoded as follows:
-
df
stands for the degrees of freedom, typically, but
in general.
-
is denoted by
zeta
. -
is denoted by
ope
. ('Observations Per Year') For the APT form of Sharpe,
K
stands for the rescaling parameter.
Optimal Sharpe Ratio
Suppose are
independent draws of a
-variate
normal random variable with mean
and covariance matrix
. Let
be the (vector) sample mean, and
be the sample covariance matrix (using Bessel's correction). Let
be the (sample) Sharpe ratio of the portfolio , subject to
risk free rate
.
Let be the solution to the portfolio optimization problem:
with maximum value .
Then
and
The variable follows an Optimal Sharpe ratio
distribution. For convenience, we may assume that the sample statistic
has been annualized in the same manner as the Sharpe ratio, that is
by multiplying by
, the number of observations per
epoch.
The Optimal Sharpe Ratio distribution is parametrized by the number
of assets, , the number of independent observations,
, the
noncentrality parameter,
the 'drag' term, , and the annualization factor,
.
The drag term makes this a location family of distributions, and
by default we assume it is zero.
The parameters are encoded as follows:
-
is denoted by
df1
. -
is denoted by
df2
. -
is denoted by
zeta.s
. -
is denoted by
ope
. -
is denoted by
drag
.
Spanning and Hedging
As above, let
be the (sample) Sharpe ratio of the portfolio , subject to
risk free rate
.
Let be a
matrix of 'hedge constraints'.
Let
be the solution to the portfolio optimization problem:
with maximum value .
Then
can be expressed as the difference of two squared
optimal Sharpe ratio random variables. A monotonic transform takes this
difference to the LRT statistic for portfolio spanning, first described by
Rao, and refined by Giri.
Legal Mumbo Jumbo
SharpeR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
Note
The following are still in the works:
Corrections for standard error based on skew, kurtosis and autocorrelation.
Tests on Sharpe under positivity constraint. (c.f. Silvapulle)
Portfolio spanning tests.
Tests on portfolio weights.
This package is maintained as a hobby.
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
Lo, Andrew W. "The statistics of Sharpe ratios." Financial Analysts Journal 58, no. 4 (2002): 36-52. https://www.ssrn.com/paper=377260
Opdyke, J. D. "Comparing Sharpe Ratios: So Where are the p-values?" Journal of Asset Management 8, no. 5 (2006): 308-336. https://www.ssrn.com/paper=886728
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
Giri, N. "On the likelihood ratio test of a normal multivariate testing problem." Annals of Mathematical Statistics 35, no. 1 (1964): 181-189. doi: 10.1214/aoms/1177703740
Rao, C. R. "Advanced Statistical Methods in Biometric Research." Wiley (1952).
Rao, C. R. "On Some Problems Arising out of Discrimination with Multiple Characters." Sankhya, 9, no. 4 (1949): 343-366. https://www.jstor.org/stable/25047988
Kan, Raymond and Smith, Daniel R. "The Distribution of the Sample Minimum-Variance Frontier." Journal of Management Science 54, no. 7 (2008): 1364–1380. doi: 10.1287/mnsc.1070.0852
Kan, Raymond and Zhou, GuoFu. "Tests of Mean-Variance Spanning." Annals of Economics and Finance 13, no. 1 (2012) https://econpapers.repec.org/article/cufjournl/y_3a2012_3av_3a13_3ai_3a1_3akanzhou.htm
Britten-Jones, Mark. "The Sampling Error in Estimates of Mean-Variance Efficient Portfolio Weights." The Journal of Finance 54, no. 2 (1999): 655–671. https://www.jstor.org/stable/2697722
Silvapulle, Mervyn. J. "A Hotelling's T2-type statistic for testing against one-sided hypotheses." Journal of Multivariate Analysis 55, no. 2 (1995): 312–319. doi: 10.1006/jmva.1995.1081
Bodnar, Taras and Okhrin, Yarema. "On the Product of Inverse Wishart and Normal Distributions with Applications to Discriminant Analysis and Portfolio Theory." Scandinavian Journal of Statistics 38, no. 2 (2011): 311–331. doi: 10.1111/j.1467-9469.2011.00729.x