Re: [R] Plot base 100

2020-07-20 Thread Joshua Ulrich
You can do this with PerformanceAnalytics. library(PerformanceAnalytics) data(edhec) chart.RelativePerformance(edhec, 0, legend = "topleft") Also note that there's a finance-specific mailing list: R-SIG-Finance. Best, Josh On Sun, Jul 19, 2020 at 1:46 PM Pedro páramo wrote: > > Hi all, > > I a

Re: [R] Plot base 100

2020-07-20 Thread Pedro páramo
I understand. I Will send my Code tomorrow, I am outside home now. Many thanks David, sorry about all. El dom., 19 jul. 2020 21:13, David Winsemius escribió: > > On 7/19/20 11:18 AM, Pedro páramo wrote: > > Hi all, > > > > I am trying to make a plot based on stock market prices and the library

Re: [R] Plot base 100

2020-07-19 Thread Jim Lemon
Hi Pedro, Assuming that you get a vector of daily percentage changes: dpc<-c(+3.1, -2.8, +1.7, +2.1) get the cumulative change and add 100: cumsum(dpc)+100 [1] 103.1 100.3 102.0 104.1 You can then plot that. As Rui noted, your mail client is inserting invisible characters that prevent cutting a

Re: [R] Plot base 100

2020-07-19 Thread David Winsemius
On 7/19/20 11:18 AM, Pedro páramo wrote: 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

[R] Plot base 100

2020-07-19 Thread Pedro páramo
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 cumulat