data(edhec)
edhec.length = dim(edhec)[1]
start = rownames(edhec[1,])
end = rownames(edhec[edhec.length,])
edhec.zoo = zoo(edhec,order.by=rownames(edhec))
rf.zoo = download.RiskFree(start = start, end = end)
sp.zoo = download.SP500PriceReturns(start = start, end = end)
time(edhec.zoo) = as.yearmon(time(edhec.zoo))
time(sp.zoo) = as.yearmon(time(sp.zoo))
time(rf.zoo) = as.yearmon(time(rf.zoo))
Return.excess(edhec.zoo[,"Funds.of.Funds",drop=FALSE],rf.zoo)
Return.excess(edhec.zoo[,"Long.Short.Equity",drop=FALSE],rf.zoo)
Return.excess(edhec.zoo[,"Funds.of.Funds",drop=FALSE],sp.zoo)
Return.excess(edhec.zoo[,"Long.Short.Equity",drop=FALSE],sp.zoo)
Run the code above in your browser using DataLab