making data start at a specified point(for example 50)

Hey, I have a with data.frame with returns from a couple of stocks, I want them to all start a the same point and move with the return of the stock, so that it's possible to compare stock even though the price difference is big. For example Amazon and Netflix, Amazon is priced at 1 785 USD and Netflix 291 USD, but in the last 10 years. Amazon have risen 2 000% and netflix 4 000%, and I want to put them in the same plot. along with around 20 other stocks

my data set looks like this:
2009-11-02 NA NA
2009-11-03 -0.003954839 -0.0009293867
2009-11-04 -0.010729112 0.0076279818
2009-11-05 0.029974407 0.0411743715
2009-11-06 0.046347699 -0.0093989174
2009-11-09 0.003724255 0.0239885965

its goes on for 10 years, but this is the top.

When I read your explanation, I thought the thing to do would be to divide the price of each stock by the price on the first day of the data set, so they would all begin at 1. However, your data are not prices. What are those values?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.