sr_bias: sr_bias .

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/sr_bias.r

Description

Computes the asymptotic bias of the sample Sharpe ratio based on moments.

Usage

1
sr_bias(snr, n, cumulants, type = c("simple", "second_order"))

Arguments

snr

the population Signal Noise ratio. Often one will use the population estimate instead.

n

the sample size that the Shapre ratio is observed on.

cumulants

a vector of the third through fourth, or the third through seventh population cumulants of the random variable. More terms are needed for the higher accuracy approximation.

type

determines the order of accuracy of the bias approximation. Takes values of

simple

We compute the simple approximation using only the skewness and excess kurtosis.

second_order

We compute the more accurate approximation, given by Bao, which is accurate to o≤ft(n^{-2}\right).

Details

The sample Sharpe ratio has bias of the form

B = ≤ft(\frac{3}{4n} + 3 \frac{γ_2}{8n}\right) ζ - \frac{1}{2n} γ_1 + o≤ft(n^{-3/2}\right),

where ζ is the population Signal Noise ratio, n is the sample size, γ_1 is the population skewness, and γ_2 is the population excess kurtosis. This form of the bias appears as Equation (5) in Bao, which claims an accuracy of only o≤ft(n^{-1}\right). The author believes this approximation is slightly more accurate.

A more accurate form is given by Bao (Equation (3)) as

B = \frac{3ζ}{4n}ζ + \frac{49ζ}{32n^2} - γ_1 ≤ft(\frac{1}{2n} + \frac{3}{8n^2}\right) + γ_2 ζ ≤ft(\frac{3}{8n} - \frac{15}{32n^2}\right) + \frac{3γ_3}{8n^2} - \frac{5γ_4 ζ}{16n^2} - \frac{5γ_1^2ζ}{4n^2} + \frac{105γ_2^2 ζ}{128 n^2} - \frac{15 γ_1 γ_2}{16n^2} + o≤ft(n^{-2}\right),

where γ_3 through γ_5 are the fifth through seventh cumulants of the error term.

See ‘The Sharpe Ratio: Statistics and Applications’, section 3.2.3.

Value

the approximate bias of the Sharpe ratio. The bias is the expected value of the sample Sharpe minus the Signal Noise ratio.

Note

much of the code is adapted from Gauss code provided by Yong Bao.

Author(s)

Steven E. Pav shabbychef@gmail.com

References

Bao, Yong. "Estimation Risk-Adjusted Sharpe Ratio and Fund Performance Ranking Under a General Return Distribution." Journal of Financial Econometrics 7, no. 2 (2009): 152-173. doi: 10.1093/jjfinec/nbn022

Pav, S. E. "The Sharpe Ratio: Statistics and Applications." CRC Press, 2021.

See Also

sr_variance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# bias under normality:
sr_bias(1, 100, rep(0,2), type='simple')
sr_bias(1, 100, rep(0,5), type='second_order')

# plugging in sample estimates
x <- rnorm(1000)
n <- length(x)
mu <- mean(x)
sdv <- sd(x)
snr <- mu / sdv
# these are not great estimates, but close enough:
sku <- mean((x-mu)^3) / sdv^3
kur <- (mean((x-mu)^4) / sdv^4) - 4
sr_bias(snr, n, c(sku,kur), type='simple')

SharpeR documentation built on Aug. 18, 2021, 5:08 p.m.