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)
df is large.ope per epoclower.tail with default TRUE, log with default FALSE,
and log.p with default FALSE.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.
The units of $z$ is $\mbox{time}^{-1/2}$. Typically the Sharpe ratio is annualized by multiplying by $\sqrt{d}$, where $d$ is the number of observations per epoch (typically a year).
Letting $z = \sqrt{d}\frac{\bar{x}-c_0}{s}$, where the sample estimates are based on $n$ observations, then $z$ takes a (non-central) Sharpe ratio distribution parametrized by $n$ 'degrees of freedom', non-centrality parameter $\zeta = \frac{\mu - c_0}{\sigma}$, and annualization parameter $d$.
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.
reannualizet-distribution functions, dt, pt, qt, rt
Other sr: as.sr,
as.sr.data.frame,
as.sr.default, as.sr.lm,
as.sr.matrix,
as.sr.timeSeries, as.sr.xts;
confint.del_sropt,
confint.sr, confint.sropt;
is.sr; plambdap,
qlambdap, rlambdap;
power.sr_test; predint;
print.del_sropt, print.sr,
print.sropt; reannualize,
reannualize.sr,
reannualize.sropt; se,
se.sr; sr_equality_test;
sr_test; sr_unpaired_test;
sr_vcov; sr
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)
plot(ecdf(pvs.H0))
plot(ecdf(pvs.HA))Run the code above in your browser using DataLab