
Density, distribution function, quantile function and random
generation for the Sharpe ratio distribution with df
degrees of freedom
(and optional signal-noise-ratio zeta
).
dsr(x, df, zeta, ope, ...)psr(q, df, zeta, ope, ...)
qsr(p, df, zeta, ope, ...)
rsr(n, df, zeta, ope)
dsr
gives the density, psr
gives the distribution function,
qsr
gives the quantile function, and rsr
generates random deviates.
Invalid arguments will result in return value NaN
with a warning.
vector of quantiles.
the number of observations the statistic is based on. This
is one more than the number of degrees of freedom in the
corresponding t-statistic, although the effect will be small
when df
is large.
the 'signal-to-noise' parameter,
the number of observations per 'epoch'. For convenience of
interpretation, The Sharpe ratio is typically quoted in 'annualized'
units for some epoch, that is, 'per square root epoch', though returns
are observed at a frequency of ope
per epoch.
The default value is 1, meaning the code will not attempt to guess
what the observation frequency is, and no annualization adjustments
will be made.
arguments passed on to the respective t-distribution functions, namely
lower.tail
with default TRUE
, log
with default FALSE
,
and log.p
with default FALSE
.
vector of probabilities.
number of observations.
Steven E. Pav shabbychef@gmail.com
Suppose
The units of
Letting
The parameters are encoded as follows:
df
.
zeta
.
ope
. ('Observations Per Year')
If the returns violate the assumptions of normality, independence, etc (as they always should in the real world), the sample Sharpe Ratio will not follow this distribution. It does provide, however, a reasonable approximation in many cases.
See ‘The Sharpe Ratio: Statistics and Applications’, section 2.2.
Sharpe, William F. "Mutual fund performance." Journal of business (1966): 119-138. https://ideas.repec.org/a/ucp/jnlbus/v39y1965p119.html
Pav, S. E. "The Sharpe Ratio: Statistics and Applications." CRC Press, 2021.
rvs <- rsr(128, 253*6, 0, 253)
dvs <- dsr(rvs, 253*6, 0, 253)
pvs.H0 <- psr(rvs, 253*6, 0, 253)
pvs.HA <- psr(rvs, 253*6, 1, 253)
# \donttest{
plot(ecdf(pvs.H0))
plot(ecdf(pvs.HA))
# }
Run the code above in your browser using DataLab