Description Usage Arguments Value Examples
xTs values less that zero will generate a numeric error
1 | logReturns(xTs = NULL)
|
xTs |
xts object of arithmatic returns |
xts object of geometric returns
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# > require(xts)
# > xTs <- xts(10:12,zoo::as.Date(0:2))
# > lr <- logReturns(xTs)
# > lr
# logrets
# 1970-01-01 0.000000000000000000
# 1970-01-02 0.095310179804324768
# 1970-01-03 0.087011376989629685
#
# > as.vector(coredata(exp(cumsum(lr)) * 10L))
# [1] 10.000000000000000 10.999999999999998 11.999999999999996
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.