[R] Return on Stock Market

R. Michael Weylandt michael.weylandt at gmail.com
Thu Jul 5 15:33:03 CEST 2012


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.



More information about the R-help mailing list