-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"ylog" is ignored in chart.CumReturns #91
Comments
This may be related to this issue: #1 ... feel free to move things around if needed for cleanliness. |
For now, I've downgraded to 1.4.3541 using the instructions here: https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages |
Still an issue. https://github.com/braverock/PerformanceAnalytics/blob/master/R/chart.TimeSeries.builtin.R#L73 |
Any plans to fix this? Really need a log chart here. |
This is likely dependent on joshuaulrich/xts#103 being implemented. |
xts 0.13.2 is now out, but doesn't seem to fix this issue, perhaps @joshuaulrich can find an easy-ish fix for this now? I wouldn't say ylog parameter is "ignored" per se, but certainly doesn't produce a real log scale, and adding wealth.index=TRUE (to get rid of the 0 on the y-axis) doesn't help. |
Thanks for giving this a try @babbage9010! I just verified this works with the development version of the PerformanceAnalytics package if you set Here's the linear scale plot from library(PerformanceAnalytics)
data(edhec)
### linear scale
charts.PerformanceSummary(edhec) And here's the log scale plot. Note that the legend doesn't appear on the log-scale plot due to this bug in addLegend(). ### log scale
charts.PerformanceSummary(edhec, log = TRUE, wealth.index = TRUE) So, to fix this issue, we need to send We also need to handle the case when |
I recently updated packages on my R installation and noticed that plots using a log-scale for the y-axis were no longer displaying correctly. Digging in, it looks like the "ylog" parameter for chart.CumReturns is now being ignored.
If I'm reading the code correctly, chart.CumReturns() calls chart.TimeSeries(), which calls chart.TimeSeries.base(), which has recently(?) been modified to call plot.xts(). However, looking at this commit: 7f66651
...it appears that since that modification there is now nothing done with the ylog parameter.
Basic example code:
test <- xts(rep(0.01,1000),seq.Date(from=as.Date("2000-01-01"),to=as.Date("2002-09-26"),by=1))
chart.CumReturns(test,ylog=TRUE)
This plot should show a straight line, but now shows an exponential curve.
I am running R 3.4.4 and PerformanceAnalytics 1.5.2 on Antergos (Arch) Linux 64-bit. If you need any more details about my configuration let me know. Thanks!
The text was updated successfully, but these errors were encountered: