ggplot2 and equity timeseries plot.
chartSeries (and chart_Series) in quantmod do this. For example:
require(quantmod)
getSymbols("SPY")
chartSeries(SPY, subset="last 2 weeks")
Hope that helps,
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
On Wed, Nov 14, 2012 at 7:23 PM, jefe goode <jefe_goode at yahoo.com> wrote:
I have tried using ggplot2 and I cannot seem to obtain an adequate finance timeseries.
What I need is the standard plot of, say S&P500 over say a two week period, which would contain 10 datapoints. But ggplot2 is including the weekends on the plot whereas I want to have the weekdays only plotted and still retain dates as the x-axis labels.
There are a multitude of examples in the various manuals and R-blog's for non-finance style graphs, but none comment on the usual need to exclude days on which the exchanges are closed.
Has anyone an example of a plot that does this?
Thanks
Jefe
[[alternative HTML version deleted]]
_______________________________________________ R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.