An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20121114/7d1d4409/attachment.pl>
ggplot2 and equity timeseries plot.
4 messages · jefe goode, Joshua Ulrich
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.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20121114/84183f99/attachment.pl>
On Wed, Nov 14, 2012 at 8:25 PM, jefe goode <jefe_goode at yahoo.com> wrote:
Thanks Joshua, I do like quantmod, but I need to get this working in ggplot2 for now.
Then I would recommend you ask on the ggplot2 mailing list.
Jefe PS Can we get pdf output with quantmod?
You can plot to any device with chartSeries. See ?pdf.
From: Joshua Ulrich <josh.m.ulrich at gmail.com>
To: jefe goode <jefe_goode at yahoo.com>
Cc: r-sig-finance <r-sig-finance at stat.math.ethz.ch>
Sent: Thursday, 15 November 2012, 1:29
Subject: Re: [R-SIG-Finance] 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.