[R-SIG-Finance] Is there a bug in Return.calculate function of the PerformanceAnalytics package?

Brian G. Peterson brian at braverock.com
Wed May 16 01:39:22 CEST 2012


Please try with the latest from R-Forge.  There was a bug in the CRAN
release that could cause this behavior under certain circumstances.

I cannot reproduce with current code.

Regards,

   - Brian

On Tue, 2012-05-15 at 16:04 -0700, Jorge Nieves wrote:
> Hi,
> 
> I am running an example from the "help" provided in the Performance Analytics package. I would like to compute the returns with the choice method="simple". However, the result is a column of ZEROS. I checked to see if my decimal places were set to zero, but that is not the case. The result is zero.
> 
> 
> When I change form "simple" to "compound" the function seems to work. 
> 
> 
> Am I missing something? or is it a bug?
> 
> Thanks 
> 
> 
> Jorge
> 
> 
> 
> Here is the example.
> 
> 
> 
> library(PerformanceAnalytics)
> 
> library(xts)
>  ## Not run:
> require(tseries)
> prices = get.hist.quote("IBM", start = "1999-01-01", end = "2007-01-01", quote = "AdjClose", compression = "d")
> 
> ## End(Not run)
> 
> R.IBM = Return.calculate(prices, method="simple")
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list