Closed tchevri closed 4 years ago
Thanks for your report.
The code for chart.RollingPerformance
is old, and quite stable with the last major changes in 2016 for plot.xts
, so I don't recall precisely why every decision in the code was made. As I (barely) recall, the "label" provided in periodicity
doesn't read as well as setting them manually.
You also mention a problem, but this report isn't specific about the data you are using, or the symptoms you are seeing. My local reports are working OK, and the example in the documentation also produces the expected output.
So perhaps you could be more specific about what you think the problem is, or at least what steps we could use to duplicate the problem you are seeing?
So sorry to have troubled you Brian. Thank you so much for having taken the time to respond - really much appreciated - understood your preference to set things "manually" - I guess this way, you do not rely as much on a 3rd party package. Thought i'd highlight it anyway - apologies for this mistake.
On the side note, I nailed the issue I was experiencing, because as you point out - the example in the documentation was working for me too, obviously (but as I said, I have been using your package just fine, hence the puzzle). The issue happened with a different package - I had been using "to.monthly" to convert my daily returns to monthly. And that's what was causing the incoherent input. I searched online and found that aggregate(my_daily_returns_series,as.yearmon,function(x) tail(cumprod(1 + x) -1,1))
seems the best and fastest code to convert daily returns to monthly (see SO). Given you are one of the top rockstars on the topic in R
- if you have another suggestion, i'd be all ears. Otherwise, I am all set. Many thanks and sincere apologies again for having wasted your time. I guess the lesson is to do more of what you do - write more self reliant code rather than always rely on packages.
I am looking at a function which i have used for a long time, but is no longer giving me satisfactory output: chart.RollingPerformance. Let's take a closer look at code lines 99-107, if you don't mind. I think these lines
are not necessary, as periodicity also provides
label
, if I am not mistaken (well, I checked). (still does not help me with why my chart is not looking right anymore, when it's the same code I am using) Many thanks. thomas