Skip to content
Prev 12323 / 15274 Next

Aligning time series

Definitely use xts !

For Question 2, I would merge all, leaving NA's for missing data.
Then what you do next depends on what you are trying to accomplish,
but sometimes LOCF can be appropriate,
for example if these are trades for less liquid instruments.
However, you may need to do some hard thinking about which of the many ways of dealing with missing data would be best for your specific task.

David L. Reiner, Ph.D.
Head Quant
XR Trading LLC

PS: better to post in plain text rather than html.

-----Original Message-----
From: r-sig-finance-bounces at r-project.org [mailto:r-sig-finance-bounces at r-project.org] On Behalf Of Chirag Anand
Sent: Wednesday, April 16, 2014 1:13 AM
To: r-sig-finance at r-project.org
Subject: Re: [R-SIG-Finance] Aligning time series

Hi Mikhail,

As Ilya said, xts takes care of it. You can use "merge.zoo" (if using
zoo) or "merge.xts" to merge two series. The missing timestamps are
taken care of by the "all" argument. You can use it to specify whether
to take missing timestamps from both the series, an individual series,
or not at all. The details are available in the respective man pages
of the functions.
On 16 April 2014 00:39, Ilya Kipnis <ilya.kipnis at gmail.com> wrote:
--
Chirag Anand
http://atvariance.in/chiraganand

_______________________________________________
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.


This e-mail and any materials attached hereto, including, without limitation, all content hereof and thereof (collectively, "XR Content") are confidential and proprietary to XR Trading, LLC ("XR") and/or its affiliates, and are protected by intellectual property laws.  Without the prior written consent of XR, the XR Content may not (i) be disclosed to any third party or (ii) be reproduced or otherwise used by anyone other than current employees of XR or its affiliates, on behalf of XR or its affiliates.

THE XR CONTENT IS PROVIDED AS IS, WITHOUT REPRESENTATIONS OR WARRANTIES OF ANY KIND.  TO THE MAXIMUM EXTENT PERMISSIBLE UNDER APPLICABLE LAW, XR HEREBY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS AND IMPLIED, RELATING TO THE XR CONTENT, AND NEITHER XR NOR ANY OF ITS AFFILIATES SHALL IN ANY EVENT BE LIABLE FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL AND PUNITIVE DAMAGES, LOSS OF PROFITS AND TRADING LOSSES, RESULTING FROM ANY PERSON'S USE OR RELIANCE UPON, OR INABILITY TO USE, ANY XR CONTENT, EVEN IF XR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF SUCH DAMAGES WERE FORESEEABLE.