as.del_sropt {SharpeR} | R Documentation |
Compute the Sharpe ratio of a hedged Markowitz portfolio.
Description
Computes the Sharpe ratio of the hedged Markowitz portfolio of some observed returns.
Usage
as.del_sropt(X, G, drag = 0, ope = 1, epoch = "yr")
## Default S3 method:
as.del_sropt(X, G, drag = 0, ope = 1, epoch = "yr")
## S3 method for class 'xts'
as.del_sropt(X, G, drag = 0, ope = 1, epoch = "yr")
Arguments
X |
matrix of returns, or |
G |
an |
drag |
the 'drag' term, |
ope |
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 |
epoch |
the string representation of the 'epoch', defaulting to 'yr'. |
Details
Suppose are
independent draws of a
-variate
normal random variable with mean
and covariance matrix
. Let
be a
matrix
of rank
.
Let
be the (vector) sample mean, and
be the sample covariance matrix (using Bessel's correction).
Let
be the (sample) Sharpe ratio of the portfolio , subject to
risk free rate
.
Let be the solution to the portfolio optimization
problem:
with maximum value .
Note that if ope
and epoch
are not given, the
converter from xts
attempts to infer the observations per epoch,
assuming yearly epoch.
Value
An object of class del_sropt
.
Author(s)
Steven E. Pav shabbychef@gmail.com
See Also
Other del_sropt:
del_sropt
,
is.del_sropt()
Examples
nfac <- 5
nyr <- 10
ope <- 253
# simulations with no covariance structure.
# under the null:
set.seed(as.integer(charToRaw("be determinstic")))
Returns <- matrix(rnorm(ope*nyr*nfac,mean=0,sd=0.0125),ncol=nfac)
# hedge out the first one:
G <- matrix(diag(nfac)[1,],nrow=1)
asro <- as.del_sropt(Returns,G,drag=0,ope=ope)
print(asro)
G <- diag(nfac)[c(1:3),]
asro <- as.del_sropt(Returns,G,drag=0,ope=ope)
# compare to sropt on the remaining assets
# they should be close, but not exact.
asro.alt <- as.sropt(Returns[,4:nfac],drag=0,ope=ope)
# using real data.
if (require(xts)) {
data(stock_returns)
# hedge out SPY
G <- diag(dim(stock_returns)[2])[3,]
asro <- as.del_sropt(stock_returns,G=G)
}