The units of $z$ are $\mbox{time}^{-1/2}$. Typically the Sharpe ratio is annualized by multiplying by $\sqrt{d}$, where $d$ 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, $z/K$ follows a non-central t-distribution with $m$ degrees of freedom and non-centrality parameter $\zeta / K$, for some $K$, $m$ and $\zeta$.
We can generalize Sharpe's model to APT, wherein we write $$x_i = \alpha + \sum_j \beta_j F_{j,i} + \epsilon_i,$$ where the $F_{j,i}$ are observed 'factor returns', and the variance of the noise term is $\sigma^2$. Via linear regression, one can compute estimates $\hat{\alpha}$, and $\hat{\sigma}$, and then let the 'Sharpe ratio' be $$z = \frac{\hat{\alpha} - c_0}{\hat{\sigma}}.$$ As above, this Sharpe ratio follows a rescaled t-distribution under normality, etc.
The parameters are encoded as follows:
dfstands for the degrees of freedom, typically$n-1$, but$n-J-1$in general.zeta.ope. ('Observations Per Year')Kstands for the
rescaling parameter.Let $w_*$ be the solution to the portfolio optimization problem: $$\max_{w: 0 < w^{\top}S w \le R^2} Z(w),$$ with maximum value $z_* = Z\left(w_*\right)$. Then $$w_* = R \frac{S^{-1}\bar{x}}{\sqrt{\bar{x}^{\top}S^{-1}\bar{x}}}$$ and $$z_* = \sqrt{\bar{x}^{\top} S^{-1} \bar{x}} - \frac{c_0}{R}$$
The variable $z_*$ 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 $d$, the number of observations per epoch.
The Optimal Sharpe Ratio distribution is parametrized by the number of assets, $q$, the number of independent observations, $n$, the noncentrality parameter, $$\zeta_* = \sqrt{\mu^{\top}\Sigma^{-1}\mu},$$ the 'drag' term, $c_0/R$, and the annualization factor, $d$. The drag term makes this a location family of distributions, and by default we assume it is zero.
The parameters are encoded as follows:
df1.df2.zeta.s.ope.drag.Let $G$ be a $g \times q$ matrix of 'hedge constraints'. Let $w_*$ be the solution to the portfolio optimization problem: $$\max_{w: 0 < w^{\top}S w \le R^2,\,G S w = 0} Z(w),$$ with maximum value $z_* = Z\left(w_*\right)$. Then $z_*^2$ 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.
Johnson, N. L., and Welch, B. L. "Applications of the non-central t-distribution."
Biometrika 31, no. 3-4 (1940): 362-389.
Lo, Andrew W. "The statistics of Sharpe ratios." Financial Analysts Journal 58, no. 4
(2002): 36-52.
Opdyke, J. D. "Comparing Sharpe Ratios: So Where are the p-values?" Journal of Asset
Management 8, no. 5 (2006): 308-336.
Ledoit, O., and Wolf, M. "Robust performance hypothesis testing with the
Sharpe ratio." Journal of Empirical Finance 15, no. 5 (2008): 850-859.
Giri, N. "On the likelihood ratio test of a normal multivariate testing problem."
Annals of Mathematical Statistics 35, no. 1 (1964): 181-189.
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.
Kan, Raymond and Smith, Daniel R. "The Distribution of the Sample Minimum-Variance Frontier."
Journal of Management Science 54, no. 7 (2008): 1364--1380.
Kan, Raymond and Zhou, GuoFu. "Tests of Mean-Variance Spanning."
Annals of Economics and Finance 13, no. 1 (2012)
Britten-Jones, Mark. "The Sampling Error in Estimates of Mean-Variance
Efficient Portfolio Weights." The Journal of Finance 54, no. 2 (1999):
655--671.
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.
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.