if(!require("TTR")){install.packages("TTR"); library(TTR)}
? ROC
Michael
On Wed, Jul 4, 2012 at 11:20 PM, Akhil dua <akhil.dua.12 at gmail.com>
wrote:> Hello Every one
> I have data on Stock prices and I want to calculate the return on all the
> stocks
> and then replace all the stock prices with the returns
>
> can any one tell me how to do
>
> My data is in the format given below
>
> Date Stock1 Stock2 Stock3
> 01/01/2000 1 2 3
> 01/02/2000 5 6 7
> 01/03/2000 1 2 3
> 01/04/2000 5 6 7
>
>
> Thanks
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.