[R-SIG-Finance] XTS plot of intra-daily stock prices
Jeffrey Ryan
jeffrey.ryan at lemnica.com
Fri Jul 13 21:35:55 CEST 2012
plot.xts is designed to have time intervals properly represented on
the x-axis, whereas something like chart_Series will simply use
1:length(x) for the spacing (i.e. constant delta). This is useful as
it faithfully represents the intervals between events, but in some
cases (weekend in market data), it can look a bit sketchy.
You can either use chart_Series or remove the 'xts' part via coredata,
and use a generic plot command.
HTH
Jeff
On Fri, Jul 13, 2012 at 1:50 PM, Costas Vorlow <costas.vorlow at gmail.com> wrote:
> Hello,
>
> When I plot more than a day's xts time series data on a stock (intra-daily
> frequency) I get gaps during the non-trading hours.
>
> I placed some examples here:
>
> http://users.hol.gr/~laurarvc/Costas/R/
>
>
> Can I homogenize the plots i.e., skip those gaps so I have more continuous
> plots of high frequency prices?
> I can't find something on the help page of the relevant plot command...
>
> Best regards,
> Costas
>
> --
>
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> |c|o|s|t|a|s|@|v|o|r|l|o|w|.|o|r|g|
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
> [[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.
--
Jeffrey Ryan
jeffrey.ryan at lemnica.com
www.lemnica.com
www.esotericR.com
More information about the R-SIG-Finance
mailing list