[R-SIG-Finance] XTS with unique time stamps?

Brian G. Peterson brian at braverock.com
Mon Jan 31 17:31:53 CET 2011


|      make.time.unique(x, eps = 1e-05, ...)
 >>
>> > On 01/31/2011 10:09 AM, Dirk Eddelbuettel wrote:
>> >  Why eps=1e-05?  I wrote variants of this in-house and use
>> >
>> >      incrementTimestamps<- function(times, incr=1.0e-6, ...) {
>> >         ...
>> >      }
>> >
On 01/31/2011 10:23 AM, Jeffrey Ryan wrote:
> Why not.;-)
>
> On the topic of semantics, why 1.0e-6:  1.0 is redundant, given that a
> negative exponent will assure you a mode of "double".

I recall (hazy, I'm suspect there was beer involved) that we did some 
testing a year or so ago on multiple different R installations and found 
that 1e-5 was reliable even on 32 bit architectures, and 1e-6 was 
(potentially) in the precision wiggle.  My recollection could easily be 
incorrect, and I'm sure that any precision issue like this is highly 
compiler dependent.

As µs (microsecond, 1e-6) timestamped data becomes increasingly 
available, this functionality should become less necessary.  For now, 
I'm happy that it's in xts.

Cheers,

   - Brian

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list