Type: | Package |
Title: | Moment-Free Estimation of Sharpe Ratios |
Version: | 1.4.3 |
Date: | 2022-07-25 |
Author: | Damien Challet |
Maintainer: | Damien Challet <damien.challet@gmail.com> |
Description: | An efficient moment-free estimator of the Sharpe ratio, or signal-to-noise ratio, for heavy-tailed data (see <doi:10.48550/arXiv.1505.01333>). |
License: | GPL-2 | GPL-3 [expanded from: GPL] |
Depends: | R (≥ 3.5.0), ghyp, methods |
Imports: | Rcpp (≥ 0.12.4) |
LinkingTo: | Rcpp |
RoxygenNote: | 7.2.0 |
Encoding: | UTF-8 |
NeedsCompilation: | yes |
Packaged: | 2022-07-05 14:07:50 UTC; damien |
Repository: | CRAN |
Date/Publication: | 2022-07-05 14:20:02 UTC |
A moment-free estimator of the Sharpe (signal-to-noise) ratio
Description
This package implements a new estimator of Sharpe ratios that does not rely on the computation of any moment, despite the fact that its usual definition involves at least the first two moments (average and standard deviation).
Details
An implementation of an alternative method to measure Sharpe ratios, i.e. signal-to-noise ratios in time series with heavy-tailed increments. The method itself does not require the computation of any moment as it is based on counting the number of records of the cumulative sum of the increments. When increments are known to be Gaussian, the usual estimator has to be used. However, when the increments are heavy-tailed, the new estimator is more precise (efficient). Note that the increments are assumed to be i.i.d. Note also that the new estimator is almost as efficient as the usual Sharpe ratio for Gaussian variables.
Author(s)
Damien Challet Maintainer: Damien Challet
References
Challet, D. (2017). Sharper asset ranking from total drawdown durations. Applied Mathematical Finance, 24(1), 1-22.
A pre-calibrated spline function needed to translate the number of upper/lower records in to signa-to-noise ratios.
Description
This function is needed to translate the number of records to Sharpe ratios. There should not be any need to use directly this function.
See Also
estimateSNR
Computes the average difference between the number of upper and lower records of the cumulative sum of the sample values.
Description
Computes the average difference between the number of upper and lower records of the cumulative sum of the sample values.
Usage
computeR0bar(x, numPerm = 100L, q1 = 0.025, q2 = 0.975)
Arguments
x |
a vector of sample values |
numPerm |
the number of random permutations (or shuffles) of the sample value order |
q1 |
a real number for computing the lower confidence interval |
q2 |
a real number for computing the upper confidence interval |
Value
a list
mean the average difference of upper and lower records of the cumulative sum of
x
q1 the q1 quantile of the difference
q1 the q2 quantile of the difference
computes the signal-to-noise ratio
Description
computes the signal-to-noise ratio
Usage
estimateSNR(x, numPerm = NA, nu = NA, quantiles = c(0.05, 0.95))
Arguments
x |
A (non-empty) numeric vector of data values. |
numPerm |
The number of permutations (or shuffling) of the order of the sample values. By default set to |
nu |
the Student t-distribution tail exponent of the sample data (if know). By default: NA. If set to NA, the tail exponent of the data is obtained from fit to a Student t-distribution. If NA, nu is estimated. |
quantiles |
a vector of the lower and upper quantile needed to compute the confidence interval (use only if nu is known). |
Value
a list element
SNR The signal-to-noise ratio. To have something comparable with a t-statistics, multiply by
sqrt(length(x))
. To have a Sharpe ratio, multiply by the correct factor (sqrt(252)
) for daily returns)SNR.ci The 95
nu The fitted Student t-distribution tail exponent.
R0bar The number of upper records minus the number of lower records of the cumulated sum of
x
.N The length of the vector
x
. It may be smaller than the input length if x contains NAs.
Examples
x <- rt(100,3)/sqrt(3)+0.05 #some Student-t distributed synthetic price log-returns
estimateSNR(x)
A pre-calibrated spline function needed to translate the number of upper/lower records in to signa-to-noise ratios.
Description
This function is needed to translate the number of records to Sharpe ratios. There should not be any need to use directly this function.
See Also
estimateSNR
Computes the number of lower records of the cumulative sum of x
Description
Computes the number of lower records of the cumulative sum of x
Usage
num_records_down(x)
Arguments
x |
a vector of sample values |
Value
the number of lower records
Computes the number of upper records of the cumulative sum of x
Description
Computes the number of upper records of the cumulative sum of x
Usage
num_records_up(x)
Arguments
x |
a vector of sample values |
Value
the number of upper records