Hi all, I am trying to make a plot based on stock market prices and the library quantmod, imagine
BatchGetSymbols(‘^IBEX’, first.date = ‘1999-12-31’, last.date = ‘2020-12-07’) The thing is I want to plot a plot that for each year on 31/12/year tthe base is 100 and each day calvulate the cumulative returns so if on 01/01/year t+1 in one day stock climbs a 3% the Index values 103. I want to plot for each day off the year to the end of the year a line (in fact would be 20 lines) in the example from year 2000 to actual 2020. Aditionally on the current year I want to plot the line more thig (dar) to clearly distinguish It. Do you know if there is some predefinited function to construct It. Many thanks in advance [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.